{"openapi":"3.0.0","paths":{"/hooks/paymob":{"post":{"operationId":"PaymobWebhookController_receive","parameters":[],"responses":{"201":{"description":""}},"tags":["PaymobWebhook"]}},"/api/v1/partner/checkouts":{"post":{"operationId":"PartnerCheckoutsController_create","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["PartnerCheckouts"],"security":[{"bearer":[]}]}},"/api/v1/partner/checkouts/{id}":{"get":{"operationId":"PartnerCheckoutsController_status","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["PartnerCheckouts"],"security":[{"bearer":[]}]}},"/api/v1/partner/accounts":{"get":{"operationId":"PartnerAccountsController_list","parameters":[],"responses":{"200":{"description":""}},"tags":["PartnerAccounts"],"security":[{"bearer":[]}]}},"/api/v1/partner/accounts/{id}":{"get":{"operationId":"PartnerAccountsController_one","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["PartnerAccounts"],"security":[{"bearer":[]}]}},"/api/v1/accounts/business":{"post":{"operationId":"BusinessOnboardingController_create","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["BusinessOnboarding"],"security":[{"cookie":[]}]}},"/api/v1/accounts/business/{id}/documents":{"get":{"operationId":"BusinessOnboardingController_documents","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["BusinessOnboarding"],"security":[{"cookie":[]}]}},"/api/v1/accounts/business/{id}/documents/{documentId}":{"get":{"operationId":"BusinessOnboardingController_download","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["BusinessOnboarding"],"security":[{"cookie":[]}]}},"/api/v1/public/marketing/unsubscribe":{"post":{"operationId":"MarketingOptOutController_unsubscribe","parameters":[],"responses":{"201":{"description":""}},"tags":["MarketingOptOut"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":300}},"required":["token"],"additionalProperties":false}}}}}},"/api/v1/messaging":{"get":{"operationId":"MessagingController_list","parameters":[],"responses":{"200":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"x-naz-permission":"messaging.view"}},"/api/v1/messaging/providers":{"post":{"operationId":"MessagingController_create","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"adapter":{"type":"string","enum":["taqnyat"]},"sender":{"type":"string"},"token":{"type":"string","writeOnly":true},"maxMessageCostMinor":{"type":"integer","minimum":1,"maximum":10000}},"required":["name","adapter","sender","token"],"additionalProperties":false}}}},"x-naz-permission":"messaging.configure"}},"/api/v1/messaging/providers/{id}":{"patch":{"operationId":"MessagingController_enabled","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"x-naz-permission":"messaging.configure"}},"/api/v1/messaging/providers/{id}/test":{"post":{"operationId":"MessagingController_test","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string"}},"required":["phone"],"additionalProperties":false}}}},"x-naz-permission":"messaging.configure"}},"/api/v1/messaging/providers/{id}/verify":{"post":{"operationId":"MessagingController_verify","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"challengeId":{"type":"string","format":"uuid"},"code":{"type":"string","pattern":"^[0-9]{6}$","writeOnly":true}},"required":["challengeId","code"],"additionalProperties":false}}}},"x-naz-permission":"messaging.configure"}},"/api/v1/messaging/routes/{category}":{"patch":{"operationId":"MessagingController_route","parameters":[{"name":"category","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerIds":{"type":"array","maxItems":5,"uniqueItems":true,"items":{"type":"string","format":"uuid"}}},"required":["providerIds"],"additionalProperties":false}}}},"x-naz-permission":"messaging.configure"}},"/api/v1/messaging/campaigns":{"post":{"operationId":"MessagingController_campaign","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"bodyAr":{"type":"string","minLength":5,"maxLength":600},"bodyEn":{"type":"string","minLength":5,"maxLength":600},"maxRecipients":{"type":"integer","minimum":1,"maximum":10000},"budgetMinor":{"type":"integer","minimum":0,"maximum":100000000},"scheduledAt":{"type":"string","format":"date-time"}},"required":["name","bodyAr","bodyEn","maxRecipients","budgetMinor"],"additionalProperties":false}}}},"x-naz-permission":"messaging.campaigns"}},"/api/v1/messaging/campaigns/{id}":{"patch":{"operationId":"MessagingController_status","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","paused","canceled"]}},"required":["status"],"additionalProperties":false}}}},"x-naz-permission":"messaging.campaigns"}},"/api/v1/messaging/preference":{"get":{"operationId":"MessagingController_preference","parameters":[],"responses":{"200":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}]},"patch":{"operationId":"MessagingController_preferenceUpdate","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Messaging"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"consent":{"type":"boolean"}},"required":["consent"],"additionalProperties":false}}}}}},"/api/v1/connections/{id}/events/{eventId}/retry":{"post":{"operationId":"ConnectionsController_retryEvent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"eventId","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Connections"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.configure"}},"/api/v1/connections/{id}/jobs":{"get":{"operationId":"ConnectionsController_jobs","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Connections"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.view"}},"/api/v1/connections/{id}/jobs/{jobId}/retry":{"post":{"operationId":"ConnectionsController_retry","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Connections"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.configure"}},"/api/v1/connections":{"get":{"operationId":"ConnectionsController_list","parameters":[],"responses":{"200":{"description":""}},"tags":["Connections"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.view"},"post":{"operationId":"ConnectionsController_create","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Connections"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"storeId":{"type":"string","format":"uuid"},"name":{"type":"string"},"origin":{"type":"string","format":"uri"},"adapter":{"type":"string"},"apiPath":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string","enum":["sso","services","subscriptions","invoices","products","orders"]}},"redirectUris":{"type":"array","items":{"type":"string","format":"uri"}}},"required":["organizationId","name","origin","capabilities"],"additionalProperties":false}}}},"x-naz-permission":"integrations.create"}},"/api/v1/connections/{id}":{"patch":{"operationId":"ConnectionsController_approve","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Connections"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.configure"}},"/api/v1/connections/{id}/rotate":{"post":{"operationId":"ConnectionsController_rotate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Connections"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.configure"}},"/api/v1/connections/{id}/oidc":{"post":{"operationId":"ConnectionsController_oidc","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Connections"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.identity"}},"/api/v1/partner/events":{"post":{"operationId":"PartnerEventsController_receive","parameters":[{"in":"header","name":"X-Naz-Connection","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"header","name":"X-Naz-Signature","required":true,"schema":{"type":"string","description":"t=UNIX_SECONDS,v1=HMAC_SHA256(secret, timestamp + dot + rawBody); 300-second replay window"}}],"responses":{"201":{"description":""}},"tags":["PartnerEvents"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"id":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["product.upsert","product.deleted","service.upsert","service.deleted","plan.upsert","plan.deleted","subscription.upsert","invoice.upsert","order.status","refund.approved"]},"entityId":{"type":"string","minLength":1,"maxLength":160},"revision":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"data":{}},"required":["version","id","type","entityId","revision","occurredAt","data"],"additionalProperties":false,"oneOf":[{"properties":{"type":{"type":"string","enum":["product.upsert"]},"data":{"type":"object","properties":{"name":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false},"description":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false},"published":{"type":"boolean"},"priceMinor":{"type":"integer","minimum":0,"maximum":100000000},"currency":{"type":"string","enum":["SAR"]},"sku":{"type":"string","maxLength":100},"category":{"type":"string","maxLength":120},"images":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":1500}},"variants":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false},"priceMinor":{"type":"integer","minimum":0,"maximum":100000000},"available":{"type":"boolean"}},"required":["id","name","priceMinor","available"],"additionalProperties":false}},"available":{"type":"boolean"},"taxLabel":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false}},"required":["name","published","priceMinor","currency","images","variants","available"],"additionalProperties":false}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["service.upsert"]},"data":{"type":"object","properties":{"name":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false},"description":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false},"published":{"type":"boolean"},"image":{"type":"string","minLength":1,"maxLength":1500}},"required":["name","published"],"additionalProperties":false}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["plan.upsert"]},"data":{"type":"object","properties":{"serviceId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false},"description":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false},"published":{"type":"boolean"},"priceMinor":{"type":"integer","minimum":0,"maximum":100000000},"currency":{"type":"string","enum":["SAR"]},"interval":{"type":"string","enum":["month","year","one_time","custom"]},"intervalDays":{"type":"integer","minimum":1,"maximum":3660},"features":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false}},"taxLabel":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false}},"required":["serviceId","name","published","priceMinor","currency","interval","features"],"additionalProperties":false}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["subscription.upsert"]},"data":{"type":"object","properties":{"buyerRegistration":{"type":"string","maxLength":40},"serviceId":{"type":"string","minLength":1,"maxLength":160},"planId":{"type":"string","minLength":1,"maxLength":160},"status":{"type":"string","enum":["trialing","active","past_due","paused","canceled","expired","provisioning"]},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"features":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false}},"usage":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"object","properties":{"ar":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"required":["ar"],"additionalProperties":false},"used":{"type":"number","minimum":0},"limit":{"nullable":true,"type":"number","minimum":0}},"required":["name","used","limit"],"additionalProperties":false}}},"required":["buyerRegistration","serviceId","planId","status","features","usage"],"additionalProperties":false}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["invoice.upsert"]},"data":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":160},"kind":{"type":"string","enum":["invoice","credit_note"]},"status":{"type":"string","enum":["issued","paid","void"]},"buyerKind":{"type":"string","enum":["personal","business"]},"buyerPhone":{"type":"string","maxLength":40},"buyerRegistration":{"type":"string","maxLength":40},"sourceCustomerId":{"type":"string","minLength":1,"maxLength":160},"sourceOrderId":{"type":"string","minLength":1,"maxLength":160},"issuedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"currency":{"type":"string","enum":["SAR"]},"netMinor":{"type":"integer","minimum":0,"maximum":100000000},"vatMinor":{"type":"integer","minimum":0,"maximum":100000000},"grossMinor":{"type":"integer","minimum":0,"maximum":100000000},"documentPath":{"type":"string","minLength":1,"maxLength":1500},"documentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"originalInvoiceId":{"type":"string","minLength":1,"maxLength":160}},"required":["reference","kind","status","buyerKind","issuedAt","currency","netMinor","vatMinor","grossMinor"],"additionalProperties":false}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["order.status"]},"data":{"type":"object","properties":{"nazOrderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceOrderId":{"type":"string","minLength":1,"maxLength":160},"status":{"type":"string","enum":["accepted","processing","shipped","delivered","collected","activated","disputed","cancellation_requested"]},"tracking":{"type":"object","properties":{"carrier":{"type":"string","maxLength":120},"number":{"type":"string","maxLength":120},"url":{"type":"string","maxLength":1000,"format":"uri"}},"additionalProperties":false}},"required":["nazOrderId","sourceOrderId","status"],"additionalProperties":false}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["refund.approved"]},"data":{"type":"object","properties":{"nazOrderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceRefundId":{"type":"string","minLength":1,"maxLength":160},"amountMinor":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100000000},"eligibleNetMinor":{"type":"integer","minimum":0,"maximum":100000000},"creditNoteId":{"type":"string","minLength":1,"maxLength":160},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["nazOrderId","sourceRefundId","amountMinor","eligibleNetMinor","creditNoteId","reason"],"additionalProperties":false}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["product.deleted"]},"data":{"type":"object"}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["service.deleted"]},"data":{"type":"object"}},"required":["type","data"]},{"properties":{"type":{"type":"string","enum":["plan.deleted"]},"data":{"type":"object"}},"required":["type","data"]}]}}}}}},"/api/v1/catalog/stores":{"get":{"operationId":"ConnectedCatalogController_stores","parameters":[],"responses":{"200":{"description":""}},"tags":["ConnectedCatalog"],"security":[]}},"/api/v1/catalog/products":{"get":{"operationId":"ConnectedCatalogController_products","parameters":[],"responses":{"200":{"description":""}},"tags":["ConnectedCatalog"],"security":[]}},"/api/v1/catalog/products/{connectionId}/{sourceId}":{"get":{"operationId":"ConnectedCatalogController_product","parameters":[{"name":"connectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"sourceId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["ConnectedCatalog"],"security":[]}},"/api/v1/catalog/services":{"get":{"operationId":"ConnectedCatalogController_services","parameters":[],"responses":{"200":{"description":""}},"tags":["ConnectedCatalog"],"security":[]}},"/api/v1/catalog/images/{connectionId}/{sourceId}/{index}":{"get":{"operationId":"ConnectedCatalogController_image","parameters":[{"name":"connectionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"sourceId","required":true,"in":"path","schema":{"type":"string"}},{"name":"index","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["ConnectedCatalog"],"security":[]}},"/api/v1/my-invoices":{"get":{"operationId":"CustomerDocumentsController_invoices","parameters":[],"responses":{"200":{"description":""}},"tags":["CustomerDocuments"],"security":[{"cookie":[]}],"x-naz-permission":"invoices.view"}},"/api/v1/my-invoices/{id}/document":{"get":{"operationId":"CustomerDocumentsController_document","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["CustomerDocuments"],"security":[{"cookie":[]}],"x-naz-permission":"invoices.view"}},"/api/v1/connected-services":{"get":{"operationId":"CustomerDocumentsController_subscriptions","parameters":[],"responses":{"200":{"description":""}},"tags":["CustomerDocuments"],"security":[{"cookie":[]}]}},"/api/v1/market/cart":{"get":{"operationId":"MarketController_cart","parameters":[],"responses":{"200":{"description":""}},"tags":["Market"],"security":[{"cookie":[]}]},"put":{"operationId":"MarketController_updateCart","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Market"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0},"lines":{"type":"array","items":{"type":"object","properties":{"connectionId":{"type":"string","format":"uuid"},"productId":{"type":"string"},"variantId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":100}},"required":["connectionId","productId","quantity"],"additionalProperties":false},"maxItems":30}},"required":["version","lines"],"additionalProperties":false}}}}}},"/api/v1/market/shipping":{"post":{"operationId":"MarketController_shipping","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Market"],"security":[{"cookie":[]}]}},"/api/v1/market/checkouts":{"post":{"operationId":"MarketController_checkout","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Market"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cartVersion":{"type":"integer","minimum":1},"address":{"type":"object","properties":{"name":{"type":"string"},"phone":{"type":"string"},"city":{"type":"string"},"line1":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string","enum":["SA"]}},"required":["name","phone","city","line1"],"additionalProperties":false},"shipping":{"type":"object","additionalProperties":{"type":"string"}},"pointsMinor":{"type":"integer","minimum":0,"maximum":100000000}},"required":["cartVersion","address"],"additionalProperties":false}}}}}},"/api/v1/market/service-checkouts":{"post":{"operationId":"MarketController_subscribe","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Market"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","format":"uuid"},"serviceId":{"type":"string"},"planId":{"type":"string"},"subscriptionId":{"type":"string"},"subscriptionVersion":{"type":"string"}},"required":["connectionId","serviceId","planId"],"additionalProperties":false}}}}}},"/api/v1/market/orders":{"get":{"operationId":"MarketController_orders","parameters":[],"responses":{"200":{"description":""}},"tags":["Market"],"security":[{"cookie":[]}]}},"/api/v1/market/orders/{id}/returns":{"post":{"operationId":"MarketController_returns","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Market"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["reason"],"additionalProperties":false}}}}}},"/api/v1/merchant/refunds/{id}/reconcile":{"post":{"operationId":"MerchantController_reconcileRefund","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Merchant"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerRefundId":{"type":"string"},"evidence":{"type":"string","minLength":20,"maxLength":1000}},"required":["providerRefundId","evidence"],"additionalProperties":false}}}},"x-naz-permission":"finance.reconcile"}},"/api/v1/merchant/reconciliation":{"get":{"operationId":"MerchantController_reconciliation","parameters":[],"responses":{"200":{"description":""}},"tags":["Merchant"],"security":[{"cookie":[]}],"x-naz-permission":"finance.view"}},"/api/v1/merchant/orders":{"get":{"operationId":"MerchantController_orders","parameters":[],"responses":{"200":{"description":""}},"tags":["Merchant"],"security":[{"cookie":[]}],"x-naz-permission":"commerce.view"}},"/api/v1/merchant/orders/{id}/dispute":{"patch":{"operationId":"MerchantController_resolveDispute","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merchant"],"security":[{"cookie":[]}],"x-naz-permission":"commerce.manage"}},"/api/v1/merchant/balances":{"get":{"operationId":"MerchantController_balances","parameters":[],"responses":{"200":{"description":""}},"tags":["Merchant"],"security":[{"cookie":[]}],"x-naz-permission":"finance.view"}},"/api/v1/merchant/withdrawals":{"get":{"operationId":"MerchantController_withdrawals","parameters":[],"responses":{"200":{"description":""}},"tags":["Merchant"],"security":[{"cookie":[]}],"x-naz-permission":"finance.view"},"post":{"operationId":"MerchantController_withdraw","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Merchant"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"}},"required":[],"additionalProperties":false}}}},"x-naz-permission":"finance.payout"}},"/api/v1/merchant/withdrawals/{id}":{"patch":{"operationId":"MerchantController_complete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Merchant"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["paid","canceled"]},"transferRef":{"type":"string"},"evidence":{"type":"string","minLength":20,"maxLength":1000}},"required":["status","evidence"],"additionalProperties":false}}}},"x-naz-permission":"finance.payout"}},"/api/v1/team":{"get":{"operationId":"TeamController_list","parameters":[],"responses":{"200":{"description":""}},"tags":["Team"],"security":[{"cookie":[]}],"x-naz-permission":"team.view"},"post":{"operationId":"TeamController_create","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Team"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"phone":{"type":"string","example":"05xxxxxxxx"},"roleId":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Known permission IDs from the catalogue. Actions require group.view; team.export also requires team.activity.","nullable":true}},"required":["name","phone","roleId"],"additionalProperties":false}}}},"x-naz-permission":"owner"}},"/api/v1/team/roles":{"get":{"operationId":"TeamController_roles","parameters":[],"responses":{"200":{"description":""}},"tags":["Team"],"security":[{"cookie":[]}],"x-naz-permission":"team.view"},"post":{"operationId":"TeamController_createRole","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Team"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"description":{"type":"string","maxLength":500},"permissions":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Known permission IDs from the catalogue. Actions require group.view; team.export also requires team.activity."}},"required":["name","permissions"],"additionalProperties":false}}}},"x-naz-permission":"owner"}},"/api/v1/team/activity":{"get":{"operationId":"TeamController_activity","parameters":[{"in":"query","name":"memberId","required":false,"schema":{"type":"string","format":"uuid"}},{"in":"query","name":"type","required":false,"schema":{"type":"string","enum":["login","logout","create","update","access","approval","finance","export","other"]}},{"in":"query","name":"action","required":false,"schema":{"type":"string","maxLength":100}},{"in":"query","name":"from","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"to","required":false,"schema":{"type":"string","format":"date"}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":30}},{"in":"query","name":"cursor","required":false,"schema":{"type":"string","maxLength":600}}],"responses":{"200":{"description":""}},"tags":["Team"],"security":[{"cookie":[]}],"x-naz-permission":"team.activity","description":"Requires active admin account, team.view and team.activity. Dates are inclusive calendar days in Asia/Riyadh. Immutable, sanitized administrative activity; successful identity sign-in/out included. Personal/business activity and ambiguous legacy events excluded. Cursor is tied to the filters."}},"/api/v1/team/activity/export":{"post":{"operationId":"TeamController_exportActivity","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Attachment; X-Naz-Export-Count and X-Naz-Export-Id headers","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Export permission missing"},"422":{"description":"Export limit exceeded; narrow filters"},"429":{"description":"Export busy or cooldown"},"503":{"description":"Renderer timeout or unavailable"}},"tags":["Team"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","enum":["xlsx","pdf"]},"memberId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["login","logout","create","update","access","approval","finance","export","other"]},"action":{"type":"string","maxLength":100},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"required":["format"],"additionalProperties":false}}}},"x-naz-permission":"team.export","description":"Requires active admin account and team.view + team.activity + team.export. All matching sanitized events from a consistent snapshot; inclusive Asia/Riyadh dates. XLSX limit 5000, PDF limit 200. Oversized exports fail with 422 without truncation. One export at a time; 15-second per-actor cooldown. Successful generation is audited before sending. Session and persisted grants are rechecked after rendering."}},"/api/v1/team/roles/{id}":{"patch":{"operationId":"TeamController_updateRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Team"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"description":{"type":"string","maxLength":500},"permissions":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Known permission IDs from the catalogue. Actions require group.view; team.export also requires team.activity."},"version":{"type":"integer","minimum":1}},"required":["name","permissions","version"],"additionalProperties":false}}}},"x-naz-permission":"owner"}},"/api/v1/team/{id}":{"patch":{"operationId":"TeamController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Team"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"roleId":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"},"uniqueItems":true,"description":"Known permission IDs from the catalogue. Actions require group.view; team.export also requires team.activity.","nullable":true},"enabled":{"type":"boolean"},"version":{"type":"integer","minimum":1}},"required":["name","roleId","enabled","version"],"additionalProperties":false}}}},"x-naz-permission":"owner"}},"/api/v1/wallet/membership":{"get":{"operationId":"WalletController_status","parameters":[],"responses":{"200":{"description":""}},"tags":["Wallet"],"security":[{"cookie":[]}]}},"/api/v1/wallet/google":{"post":{"operationId":"WalletController_google","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Wallet"],"security":[{"cookie":[]}]}},"/api/v1/wallet/apple":{"post":{"operationId":"WalletController_apple","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Wallet"],"security":[{"cookie":[]}]}},"/api/v1/accounts":{"get":{"operationId":"AccountsController_list","parameters":[],"responses":{"200":{"description":""}},"tags":["Accounts"],"security":[{"cookie":[]}]}},"/api/v1/accounts/preferences":{"patch":{"operationId":"AccountsController_preferences","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Accounts"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","enum":["ar","en"]}},"required":["language"],"additionalProperties":false}}}}}},"/api/v1/accounts/select":{"post":{"operationId":"AccountsController_select","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Accounts"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","description":"personal, admin, or org:<organization UUID>"}},"required":["accountId"],"additionalProperties":false}}}}}},"/api/reference/developers.ar.md":{"get":{"operationId":"ReferenceController_arabic","parameters":[],"responses":{"200":{"description":""}},"tags":["Reference"]}},"/api/reference/developers.en.md":{"get":{"operationId":"ReferenceController_english","parameters":[],"responses":{"200":{"description":""}},"tags":["Reference"]}},"/api/reference/partner-source.openapi.json":{"get":{"operationId":"ReferenceController_sourceSpec","parameters":[],"responses":{"200":{"description":""}},"tags":["Reference"]}},"/api/reference/partner-sdk.ts":{"get":{"operationId":"ReferenceController_tsSdk","parameters":[],"responses":{"200":{"description":""}},"tags":["Reference"]}},"/api/reference/NazPartner.php":{"get":{"operationId":"ReferenceController_phpSdk","parameters":[],"responses":{"200":{"description":""}},"tags":["Reference"]}},"/api/health/live":{"get":{"operationId":"HealthController_live","parameters":[],"responses":{"200":{"description":""}},"tags":["Health"]}},"/api/health/ready":{"get":{"operationId":"HealthController_ready","parameters":[],"responses":{"200":{"description":""}},"tags":["Health"]}},"/api/v1/auth/bootstrap/challenge":{"post":{"operationId":"AuthController_bootstrapChallenge","parameters":[],"responses":{"201":{"description":""}},"tags":["Auth"]}},"/api/v1/auth/bootstrap/verify":{"post":{"operationId":"AuthController_bootstrapVerify","parameters":[],"responses":{"201":{"description":""}},"tags":["Auth"]}},"/api/v1/auth/start":{"get":{"operationId":"AuthController_start","parameters":[],"responses":{"200":{"description":""}},"tags":["Auth"]}},"/api/v1/auth/callback":{"get":{"operationId":"AuthController_callback","parameters":[],"responses":{"200":{"description":""}},"tags":["Auth"]}},"/api/v1/auth/me":{"get":{"operationId":"AuthController_me","parameters":[],"responses":{"200":{"description":""}},"tags":["Auth"]}},"/api/v1/auth/logout":{"post":{"operationId":"AuthController_logout","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Auth"]}},"/api/v1/public":{"get":{"operationId":"PublicController_data","parameters":[],"responses":{"200":{"description":""}},"tags":["Public"]}},"/api/v1/dashboard":{"get":{"operationId":"PortalController_dashboard","parameters":[],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"description":"Admin response is projected by effective page permissions; access does not grant all dashboard records."}},"/api/v1/organizations":{"post":{"operationId":"PortalController_createOrganization","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"registrationNumber":{"type":"string"},"vatNumber":{"type":"string","pattern":"^[0-9]{15}$"}},"required":["name"],"additionalProperties":false}}}},"x-naz-permission":"organizations.create"}},"/api/v1/stores":{"post":{"operationId":"PortalController_createStore","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"name":{"type":"string"},"domain":{"type":"string","format":"uri"},"description":{"type":"string"},"platform":{"type":"string","enum":["custom","salla","zid","shopify","woocommerce"]}},"required":["organizationId","name"],"additionalProperties":false}}}},"x-naz-permission":"stores.create"}},"/api/v1/services":{"post":{"operationId":"PortalController_service","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"services.manage"}},"/api/v1/plans":{"post":{"operationId":"PortalController_plan","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"services.manage"}},"/api/v1/integrations":{"post":{"operationId":"PortalController_integration","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.create"}},"/api/v1/organizations/{id}":{"patch":{"operationId":"PortalController_editOrganization","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"organizations.approve"}},"/api/v1/stores/{id}":{"patch":{"operationId":"PortalController_editStore","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"stores.manage"}},"/api/v1/services/{id}":{"patch":{"operationId":"PortalController_publishService","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"services.manage"}},"/api/v1/plans/{id}":{"patch":{"operationId":"PortalController_publishPlan","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"services.manage"}},"/api/v1/integrations/{id}":{"patch":{"operationId":"PortalController_configure","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.configure"}},"/api/v1/settings/{key}":{"patch":{"operationId":"PortalController_setting","parameters":[{"name":"key","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}]}},"/api/v1/profile":{"patch":{"operationId":"PortalController_profile","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}]}},"/api/v1/sessions":{"get":{"operationId":"PortalController_sessions","parameters":[],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}]}},"/api/v1/sessions/{id}":{"delete":{"operationId":"PortalController_revokeSession","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}]}},"/api/v1/consents":{"post":{"operationId":"PortalController_grantConsent","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string","format":"uuid"},"scopes":{"type":"array","minItems":1,"items":{"type":"string","enum":["profile","phone","email","address","customer_sync"]}},"purpose":{"type":"string"}},"required":["integrationId","scopes","purpose"],"additionalProperties":false}}}}},"get":{"operationId":"PortalController_consents","parameters":[],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}]}},"/api/v1/consents/{id}":{"delete":{"operationId":"PortalController_revokeConsent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}]}},"/api/v1/requests":{"post":{"operationId":"PortalController_request","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}]},"get":{"operationId":"PortalController_supportRequests","parameters":[],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"support.view"}},"/api/v1/requests/{id}":{"patch":{"operationId":"PortalController_handleRequest","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress","resolved"]}},"required":["status"],"additionalProperties":false}}}},"x-naz-permission":"support.manage"}},"/api/v1/stores/{id}/payouts":{"post":{"operationId":"PortalController_payout","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"finance.payout"}},"/api/v1/sync-batches/{id}":{"get":{"operationId":"PortalController_batchDetail","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"reviews.view"}},"/api/v1/sync-batches":{"post":{"operationId":"PortalController_stage","parameters":[{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string","format":"uuid"},"records":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"sourceId":{"type":"string"},"type":{"type":"string","enum":["customer","product","offer","order"]},"data":{"type":"object"}},"required":["sourceId","type","data"],"additionalProperties":false}}},"required":["integrationId","records"],"additionalProperties":false}}}},"x-naz-permission":"reviews.stage"}},"/api/v1/sync-batches/{id}/approve":{"post":{"operationId":"PortalController_approveBatch","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceHash":{"type":"string","minLength":64,"maxLength":64}},"required":["sourceHash"],"additionalProperties":false}}}},"x-naz-permission":"reviews.approve"}},"/api/v1/sync-batches/{id}/commit":{"post":{"operationId":"PortalController_commit","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceHash":{"type":"string","minLength":64,"maxLength":64}},"required":["sourceHash"],"additionalProperties":false}}}},"x-naz-permission":"reviews.publish"}},"/api/v1/sync-batches/{id}/reject":{"post":{"operationId":"PortalController_reject","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"x-naz-permission":"reviews.reject"}},"/api/v1/subscriptions":{"post":{"operationId":"PortalController_subscribe","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Portal"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","format":"uuid"},"planId":{"type":"string","format":"uuid"}},"required":["organizationId","planId"],"additionalProperties":false}}}},"x-naz-permission":"services.subscribe"}},"/hooks/nalpay":{"post":{"operationId":"WebhookController_receive","parameters":[],"responses":{"201":{"description":""}},"tags":["Webhook"]}},"/api/v1/redemptions/authorize":{"post":{"operationId":"FinancialController_authorize","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Financial"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storeId":{"type":"string","format":"uuid"},"orderRef":{"type":"string"},"amountMinor":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["storeId","orderRef","amountMinor"],"additionalProperties":false}}}}}},"/api/v1/redemptions/{id}/capture":{"post":{"operationId":"FinancialController_capture","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Financial"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storeId":{"type":"string","format":"uuid"}},"required":["storeId"],"additionalProperties":false}}}},"x-naz-permission":"loyalty.redeem"}},"/api/v1/redemptions/{id}/void":{"post":{"operationId":"FinancialController_void","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Financial"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storeId":{"type":"string","format":"uuid"}},"required":["storeId"],"additionalProperties":false}}}},"x-naz-permission":"loyalty.redeem"}},"/api/v1/commerce/orders":{"post":{"operationId":"FinancialController_recordOrder","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Financial"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storeId":{"type":"string","format":"uuid"},"personId":{"type":"string","format":"uuid"},"sourceRef":{"type":"string"},"eligibleNetMinor":{"type":"integer","minimum":0,"maximum":100000000000},"totalMinor":{"type":"integer","minimum":1,"maximum":100000000000},"moneyPaidMinor":{"type":"integer","minimum":0,"maximum":100000000000},"nazPaidMinor":{"type":"integer","minimum":0,"maximum":100000000000}},"required":["storeId","personId","sourceRef","eligibleNetMinor","totalMinor","moneyPaidMinor","nazPaidMinor"],"additionalProperties":false}}}},"x-naz-permission":"loyalty.orders"}},"/api/v1/commerce/orders/{id}/refunds":{"post":{"operationId":"FinancialController_refund","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":150}}],"responses":{"201":{"description":""}},"tags":["Financial"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"storeId":{"type":"string","format":"uuid"},"refundRef":{"type":"string"},"refundedEligibleNetMinor":{"type":"integer","minimum":1,"maximum":100000000000}},"required":["storeId","refundRef","refundedEligibleNetMinor"],"additionalProperties":false}}}},"x-naz-permission":"loyalty.refund"}},"/api/v1/organizations/{id}/members":{"get":{"operationId":"BusinessController_members","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Business"],"security":[{"cookie":[]}],"x-naz-permission":"organizations.view"},"post":{"operationId":"BusinessController_member","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Business"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string"},"role":{"type":"string","enum":["owner","manager","finance","cashier","developer","viewer"]},"active":{"type":"boolean"}},"required":["phone","role"],"additionalProperties":false}}}},"x-naz-permission":"organizations.members"}},"/api/v1/organizations/{id}/bank":{"post":{"operationId":"BusinessController_bank","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Business"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"iban":{"type":"string","pattern":"^SA[0-9]{22}$"},"accountName":{"type":"string"}},"required":["iban","accountName"],"additionalProperties":false}}}},"x-naz-permission":"finance.bank"}},"/api/v1/organizations/{id}/bank/verify":{"post":{"operationId":"BusinessController_verifyBank","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Business"],"security":[{"cookie":[]}],"x-naz-permission":"finance.verify_bank"}},"/api/v1/integrations/{id}/oidc":{"post":{"operationId":"IdentityIntegrationController_register","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["IdentityIntegration"],"security":[{"cookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"redirectUris":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string","format":"uri"}}},"required":["redirectUris"],"additionalProperties":false}}}},"x-naz-permission":"integrations.identity"}},"/api/v1/integrations/{id}/oidc/disable":{"post":{"operationId":"IdentityIntegrationController_disable","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"in":"header","name":"X-CSRF-Token","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["IdentityIntegration"],"security":[{"cookie":[]}],"x-naz-permission":"integrations.identity"}},"/api/v1/partner/profile":{"get":{"operationId":"PartnerProfileController_profile","parameters":[],"responses":{"200":{"description":""}},"tags":["PartnerProfile"],"security":[{"bearer":[]}]}}},"info":{"title":"NAZ Platform API / واجهات ناز","description":"Amounts use integer SAR halalas. POST financial operations require Idempotency-Key. Browser sessions require X-CSRF-Token. Partner capabilities require separate approval.","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"cookie":{"type":"apiKey","in":"cookie","name":"__Host-naz_session"},"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{}}}