{"basePath":"/api","securityDefinitions":{"jwt":{"type":"apiKey","name":"Authorization","in":"header"}},"security":[{"jwt":[]}],"info":{"title":"Rwiqha API Documentation","version":"1.1.0","description":"\n<hr/>\n    <h2 style=\"margin-bottom:0px;\">Introduction</h2>\n    <p style=\"font-size:16px; line-height: 20px;\">\n    The Rwiqha API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors.\n    We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients.\n    JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.\n    To make the API as explorable as possible, this documentation has a test mode. You can test all methods with no cost.\n    In general the API consists of 4 sets:\n    <ul style=\"list-style-type: square;\">\n    <li>ADMIN API - full capability, designed to be accessed from admin web application.</li>\n    <li>PARTNER API - full capability, designed to be accessed from partner web application.</li>\n    <li>CASHIER API - limited capability, designed to be accessed from cashier tablet application.</li>\n    <li>CUSTOMER API - limited capability, designed to be accessed from mobile application.</li>\n    </ul>\n    </p>\n<hr>\n<h2>Authentication</h2>\nTo obtain a token you need to login:\n\n<code>POST /api/{stakeholder}/login</code>\n<p style=\"font-size:16px;\">\nThe body of this request should be a json object containing login credentials.<br />\nThe response will be contain Authorization header and body data.\n</p>\n<h2> Authorization </h2>\nTo reach protected api you need token.<br />\nA Valid Token must be passed in every request in Authorization header as follow:\n\n<code>Authorization: Bearer TOKEN_HERE</code>\n<hr>\n  <h2>Errors</h2>\n  <p style=\"font-size:16px\">\n      The Rwiqha API uses conventional HTTP status codes to indicate success or failure.\n      Responses with a status code starting with 4xx or 5xx can be considered as failed.\n      The API returns errors in JSON format in the following structure:\n  </p>\n  <h4>Error Structure</h4>\n\n    {\n      \"statusCode\": 400,\n      \"message\": {\n        en:\"Something Bad happend\",\n        ar:\"حدث خطاء\"\n      },\n      \"data\": null\n    }\n<h4>HTTP status code summary</h4>\n<table>\n  <thead>\n    <tr>\n      <th>Code</th>\n      <th>Error message</th>\n      <th>Description Message</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>200</code></td>\n      <td>Successful.</td>\n      <td>return json object contain data.</td>\n    </tr>\n    <tr>\n      <td><code>400</code></td>\n      <td>Bad Request.</td>\n      <td> The request was invalid.It may occur\n      for various reasons - a malformed JSON or a violated rule</td>\n    </tr>\n    <tr>\n      <td><code>401</code></td>\n      <td>Unauthorized.</td>\n      <td>Authentication has failed or has not been provided yet.</td>\n    </tr>\n    <tr>\n      <td><code>404</code></td>\n      <td>Not Found.</td>\n      <td>The requested resource could not be found.</td>\n    </tr>\n      <tr>\n      <td><code>405</code></td>\n      <td>Method Not Allowed.</td>\n      <td>The request used a method(GET, POST, etc.) that is not available for given resource.</td>\n    </tr>\n    </tr>\n      <tr>\n      <td><code>409</code></td>\n      <td>conflict.</td>\n      <td>Item already exists.</td>\n    </tr>\n    <tr>\n      <td><code>429</code></td>\n      <td>Too many attempts.</td>\n      <td>Too Many requests to resource.</td>\n    </tr>\n    <tr>\n      <td><code>500</code></td>\n      <td>Internal Server Error.</td>\n      <td>An internal API error occurred. we track all errors and try to react as soon as possible.</td>\n    </tr>\n    <tr>\n      <td><code>502</code></td>\n      <td>Server Down.</td>\n      <td>Server is offline for maintenance.</td>\n    </tr>\n    <tr>\n      <td><code>503</code></td>\n      <td>Server Down.</td>\n      <td>Server is offline for maintenance.</td>\n    </tr>\n  </tbody>\n</table>\n"},"swagger":"2.0","host":"api.rwiqha.com","schemes":["https"],"tags":[],"paths":{"/admin/invoices":{"get":{"summary":"Get all invoices with pagination and filters (admin only)","operationId":"getAdminInvoices","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","enum":["PENDING","PAID","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["STORE_TO_CUSTOMER","RWIQHA_TO_CUSTOMER","RWIQHA_TO_STORE"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/banks":{"get":{"summary":"Saudi bank codes (IBAN positions 5-6) with bilingual names. [any authenticated scope]","operationId":"getBankbeneficiariesBanks","tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/driver":{"get":{"summary":"The driver's own payout account plus the history of changes to it. [driver scope]","operationId":"getBankbeneficiariesDriver","tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Set the driver's own payout account. Takes effect immediately; every change is versioned and audited. [driver scope]","operationId":"putBankbeneficiariesDriver","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model1"}}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"delete":{"summary":"Withdraw the driver's own payout account. The row is retired, never deleted. [driver scope]","operationId":"deleteBankbeneficiariesDriver","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model187"}}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/core/upload":{"get":{"summary":"Get signed upload URL for R2. [ADMIN, CUSTOMER, STORE_OWNER, DRIVER, RIDER_COMPANY scope]","operationId":"getCoreUpload","parameters":[{"type":"string","x-convert":{"trim":true},"name":"filename","in":"query","required":true},{"type":"string","x-convert":{"trim":true},"name":"directory","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"content_type","in":"query"}],"tags":["core"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/customer/invoices":{"get":{"summary":"Get customer invoices with pagination and filters","operationId":"getCustomerInvoices","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","enum":["PENDING","PAID","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["STORE_TO_CUSTOMER","RWIQHA_TO_CUSTOMER"],"x-convert":{"trim":true},"name":"type","in":"query"}],"tags":["customer"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/upload-url":{"get":{"summary":"Signed upload URL for a registration document (Iqama, driving licence), for applicants who do not have an account yet. The public URL it returns is what POST /api/driver-registration-requests takes in `documents[].fileUrl`. [no auth scope]","operationId":"getDriverregistrationrequestsUploadurl","parameters":[{"type":"string","enum":["national-id","driving-license"],"x-convert":{"trim":true},"name":"type","in":"query","required":true},{"type":"string","maxLength":200,"x-convert":{"trim":true},"name":"filename","in":"query","required":true},{"type":"string","enum":["image/jpeg","image/png","image/webp","image/heic"],"x-convert":{"trim":true},"name":"content_type","in":"query","required":true}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payments/cancelled":{"get":{"summary":"payment cancelled.","operationId":"getPaymentsCancelled","tags":["payments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payments/create":{"get":{"summary":"payment create.","operationId":"getPaymentsCreate","tags":["payments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payments/failed":{"get":{"summary":"payment failed.","operationId":"getPaymentsFailed","tags":["payments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payments/success":{"get":{"summary":"payment success.","operationId":"getPaymentsSuccess","parameters":[{"type":"string","description":"The payment ID from the checkout session.","x-convert":{"trim":true},"name":"cko-payment-id","in":"query","required":true},{"type":"string","description":"The session ID from the checkout session.","x-convert":{"trim":true},"name":"cko-session-id","in":"query","required":true}],"tags":["payments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payments/verify":{"get":{"summary":"payment verify.","operationId":"getPaymentsVerify","parameters":[{"type":"string","name":"id","in":"query","required":true},{"type":"string","name":"storeId","in":"query","required":true},{"type":"string","name":"hyperpayPaymentMethod","in":"query"},{"type":"string","name":"resourcePath","in":"query"}],"tags":["payments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/store-owner":{"get":{"summary":"Get store owner payouts with pagination and filters","operationId":"getPayoutsStoreowner","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","enum":["DRAFT","PENDING","APPROVED","TRANSFERRED","ON_HOLD","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/service-zones/list":{"get":{"summary":"List active service zones (names + polygons) for map overlays and filters [admin + rider-company scopes]","operationId":"getServicezonesList","parameters":[{"type":"string","x-convert":{"trim":true},"name":"city","in":"query","required":false},{"type":"boolean","default":false,"name":"includePolygons","in":"query"}],"tags":["service-zones"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/store-owner/invoices":{"get":{"summary":"Get store owner invoices with pagination and filters","operationId":"getStoreownerInvoices","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","enum":["PENDING","PAID","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["STORE_TO_CUSTOMER","RWIQHA_TO_STORE"],"x-convert":{"trim":true},"name":"type","in":"query"}],"tags":["store-owner"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/get-availability":{"get":{"summary":"get driver availability. [driver scope]","operationId":"getUsersGetavailability","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/get-profile":{"get":{"operationId":"getUsersGetprofile","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/{id}":{"get":{"operationId":"getUsersId","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"id","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/addresses/admin/list":{"get":{"summary":"List user Addresses .[admin scope]","operationId":"getAddressesAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"userId","in":"query"}],"tags":["addresses"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/addresses/customer/list":{"get":{"summary":"List user Addresses .[customer scope]","operationId":"getAddressesCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"}],"tags":["addresses"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/categories/get-calculations":{"get":{"summary":"Get categories calculations .[admin scope]","operationId":"getAdminCategoriesGetcalculations","parameters":[{"type":"boolean","name":"isActive","in":"query"},{"type":"boolean","name":"isDeleted","in":"query"},{"type":"string","enum":["parent","child"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/credit-notes/get-calculations":{"get":{"summary":"Get credit notes calculations .[admin scope]","operationId":"getAdminCreditnotesGetcalculations","parameters":[{"type":"string","enum":["PENDING","APPLIED","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/invoices/get-calculations":{"get":{"summary":"Get invoices calculations .[admin scope]","operationId":"getAdminInvoicesGetcalculations","parameters":[{"type":"string","enum":["PENDING","PAID","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["STORE_TO_CUSTOMER","RWIQHA_TO_CUSTOMER","RWIQHA_TO_STORE"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/invoices/statistics":{"get":{"summary":"Get invoice statistics for admin dashboard","operationId":"getAdminInvoicesStatistics","parameters":[{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/invoices/{invoiceId}":{"get":{"summary":"Get invoice by ID for admin","operationId":"getAdminInvoicesInvoiceid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/payment-refunds/get-calculations":{"get":{"summary":"Get payment refunds calculations .[admin scope]","operationId":"getAdminPaymentrefundsGetcalculations","parameters":[{"type":"string","enum":["success","failed"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"paymentId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/general":{"get":{"summary":"Get general settings","operationId":"getAdminSettingsGeneral","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update general settings","operationId":"putAdminSettingsGeneral","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model5"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/invoices":{"get":{"summary":"Get invoice settings","operationId":"getAdminSettingsInvoices","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update invoice settings","operationId":"putAdminSettingsInvoices","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model6"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/notifications":{"get":{"summary":"Get notification settings","operationId":"getAdminSettingsNotifications","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update notification settings","operationId":"putAdminSettingsNotifications","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model7"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/operator-coupons":{"get":{"summary":"Get the store-operator referral coupon settings","operationId":"getAdminSettingsOperatorcoupons","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update the store-operator referral coupon settings","operationId":"putAdminSettingsOperatorcoupons","description":"Saving these terms also rewrites every existing operator coupon, so the programme runs on one set of terms rather than a drift of vintages. `codePrefix` is the exception — it shapes only codes minted afterwards, because issued codes are already in customers' hands.","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model8"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/payouts":{"get":{"summary":"Get the store payout cycle settings","operationId":"getAdminSettingsPayouts","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update the store payout cycle settings","operationId":"putAdminSettingsPayouts","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model9"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/promotions":{"get":{"summary":"Get the customer promotion settings","operationId":"getAdminSettingsPromotions","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update the customer promotion settings","operationId":"putAdminSettingsPromotions","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model10"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/rider-ops":{"get":{"summary":"Get the rider-operations thresholds (dispatch pacing, not-accepting rules, stale GPS, stalled orders, document-expiry reminders)","operationId":"getAdminSettingsRiderops","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update the rider-operations thresholds. Dispatch and the exception engine pick changes up within a minute — no redeploy.","operationId":"putAdminSettingsRiderops","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model11"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/security":{"get":{"summary":"Get security settings","operationId":"getAdminSettingsSecurity","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update security settings","operationId":"putAdminSettingsSecurity","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model12"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca":{"get":{"summary":"Get Rwiqha ZATCA settings","operationId":"getAdminSettingsZatca","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update Rwiqha ZATCA settings","operationId":"putAdminSettingsZatca","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model13"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/audit-events/admin/list":{"get":{"summary":"Browse the immutable audit log, filterable by company, entity, subject, actor, action and date [admin scope]","operationId":"getAuditeventsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":50,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"query","required":false},{"type":"string","maxLength":60,"x-convert":{"trim":true},"name":"entityType","in":"query","required":false},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"entityId","in":"query","required":false},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"subjectId","in":"query","required":false},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"actorId","in":"query","required":false},{"type":"string","maxLength":80,"x-convert":{"trim":true},"name":"action","in":"query","required":false},{"type":"string","format":"date-time","name":"fromDate","in":"query","required":false},{"type":"string","format":"date-time","name":"toDate","in":"query","required":false}],"tags":["audit-events"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/admin/pending":{"get":{"summary":"Pending beneficiary verifications with the change-diff against the current beneficiary. Full IBAN visible to finance admins only here (§9). [admin scope]","operationId":"getBankbeneficiariesAdminPending","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":100,"name":"page_size","in":"query"}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/rider-company/current":{"get":{"summary":"The company's current verified beneficiary plus any pending submission/change. IBANs are masked (§11). [rider-company scope]","operationId":"getBankbeneficiariesRidercompanyCurrent","tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/banners/admin/list":{"get":{"summary":"List homepage marketing banners. [admin scope]","operationId":"getBannersAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"sortOrder","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"boolean","name":"isActive","in":"query"}],"tags":["banners"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/banners/customer/list":{"get":{"summary":"Active homepage marketing banners, in display order. [public]","operationId":"getBannersCustomerList","tags":["banners"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/list":{"get":{"summary":"list customer carts. [CUSTOMER scope]","operationId":"getCartsCustomerList","tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/admin/export-data":{"get":{"summary":"Export categories as Excel .[admin scope]","operationId":"getCategoriesAdminExportdata","parameters":[{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"typeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parentId","in":"query"},{"type":"boolean","name":"isActive","in":"query"},{"type":"string","format":"date","name":"fromDate","in":"query"},{"type":"string","format":"date","name":"toDate","in":"query"}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/admin/list":{"get":{"summary":"List Categories .[admin scope]","operationId":"getCategoriesAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"boolean","name":"isActive","in":"query"},{"type":"boolean","name":"isDeleted","in":"query"},{"type":"string","enum":["parent","child"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/customer/list":{"get":{"summary":"List Categories .[customer scope]","operationId":"getCategoriesCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"searchJoin","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"with","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"language","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"parent","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"limit","in":"query"}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/store-owner/list":{"get":{"summary":"List Categories .[STORE OWNER scope]","operationId":"getCategoriesStoreownerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-payout-requests/admin/list":{"get":{"summary":"Company payout requests across companies — the Finance workflow queue [admin scope]","operationId":"getCompanypayoutrequestsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","enum":["submitted","under-review","approved","processing","paid","rejected","failed","cancelled"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"boolean","default":false,"name":"openOnly","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"query"}],"tags":["company-payout-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-payout-requests/rider-company/list":{"get":{"summary":"Payout request history with statuses, beneficiary and payment references. [rider-company scope]","operationId":"getCompanypayoutrequestsRidercompanyList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","enum":["submitted","under-review","approved","processing","paid","rejected","failed","cancelled"],"x-convert":{"trim":true},"name":"status","in":"query"}],"tags":["company-payout-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-wallets/admin/list":{"get":{"summary":"List company settlement wallets with bucket balances [admin scope]","operationId":"getCompanywalletsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","default":"-buckets.available","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"query"}],"tags":["company-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-wallets/rider-company/balance":{"get":{"summary":"Company settlement balances (buckets), payout eligibility and lock state. [rider-company scope]","operationId":"getCompanywalletsRidercompanyBalance","tags":["company-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-wallets/rider-company/transactions":{"get":{"summary":"Company settlement ledger with period summary; format=csv for export. [rider-company scope]","operationId":"getCompanywalletsRidercompanyTransactions","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","enum":["EARNING","CLEARING","ADJUSTMENT","PAYOUT_REQUEST","PAYOUT_PAID","PAYOUT_REVERSAL"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"riderId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"string","default":"json","enum":["json","csv"],"x-convert":{"trim":true},"name":"format","in":"query"}],"tags":["company-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/core/upload/gcs":{"get":{"summary":"Get signed upload URL for GCS. [ADMIN, CUSTOMER, STORE_OWNER, DRIVER scope]","operationId":"getCoreUploadGcs","parameters":[{"type":"string","x-convert":{"trim":true},"name":"filename","in":"query","required":true},{"type":"string","x-convert":{"trim":true},"name":"directory","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"content_type","in":"query"}],"tags":["core"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupon-usages/admin/list":{"get":{"summary":"List coupon redemptions. [admin scope]","operationId":"getCouponusagesAdminList","description":"Filter by `couponId` for a single campaign, or by `customerId` to see what one customer has redeemed. Alongside the page, `totals` reports the discount given and the number of redemptions across the whole filtered set, not just the current page — that is the campaign cost figure.","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"couponId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"code","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"boolean","default":false,"name":"includeReversed","in":"query"}],"tags":["coupon-usages"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/admin/get-calculations":{"get":{"summary":"Get coupons calculations. [admin scope]","operationId":"getCouponsAdminGetcalculations","description":"Accepts exactly the same filters as /coupons/admin/list, so the figures always describe the same set of coupons the table is showing. Cached for 5 minutes per filter combination.","parameters":[{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"boolean","name":"isActive","in":"query"},{"type":"boolean","name":"isVisible","in":"query"},{"type":"boolean","name":"isDeleted","in":"query"},{"type":"string","enum":["percentage","fixed"],"x-convert":{"trim":true},"name":"discountType","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/admin/list":{"get":{"summary":"List discount coupons. [admin scope]","operationId":"getCouponsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"boolean","name":"isActive","in":"query"},{"type":"boolean","name":"isVisible","in":"query"},{"type":"boolean","name":"isDeleted","in":"query"},{"type":"string","enum":["percentage","fixed"],"x-convert":{"trim":true},"name":"discountType","in":"query"},{"type":"string","enum":["single","bulk","operator"],"x-convert":{"trim":true},"name":"kind","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/admin/{couponId}":{"get":{"summary":"Get a discount coupon by id. [admin scope]","operationId":"getCouponsAdminCouponid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"couponId","in":"path","required":true}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"delete":{"summary":"Soft-deletes a discount coupon. [admin scope]","operationId":"deleteCouponsAdminCouponid","description":"A soft delete, because orders reference this coupon and its usage records have to stay readable. Carts holding it drop it on their next reprice. To stop a campaign without removing it from the roster, set `isActive: false` via update instead.","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"couponId","in":"path","required":true}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/customer/list":{"get":{"summary":"List the public coupons this customer can currently use. [CUSTOMER scope]","operationId":"getCouponsCustomerList","description":"Only returns coupons the customer could actually redeem right now: public, active, inside their validity window, not exhausted, and allowed for this account. Private coupons never appear here — they exist only to be typed into /carts/customer/apply-coupon. `minOrderAmount` is NOT applied as a filter: a coupon the customer could unlock by adding to their basket is worth showing, and the threshold is returned so the client can say so.","tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/store-operator/my-coupon":{"get":{"summary":"The signed-in store operator's personal referral coupon. [STORE_OPERATOR scope]","operationId":"getCouponsStoreoperatorMycoupon","description":"Returns the operator's own code, its terms, and how many times it has been redeemed. The count only includes redemptions that stuck — an order that was cancelled or refunded releases its redemption, so the figure reflects orders the operator actually brought in. 404 when the referral programme is switched off or no code has been minted yet.","tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/credit-notes/admin/list":{"get":{"summary":"List credit notes [admin scope]","operationId":"getCreditnotesAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"query"},{"type":"string","enum":["PENDING","APPLIED","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"}],"tags":["credit-notes"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/credit-notes/admin/{id}":{"get":{"summary":"Get credit note by id [admin scope]","operationId":"getCreditnotesAdminId","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"id","in":"path","required":true}],"tags":["credit-notes"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/credit-notes/customer/list":{"get":{"summary":"List customer credit notes [customer scope]","operationId":"getCreditnotesCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"orderId","in":"query","required":false},{"type":"string","enum":["PENDING","APPLIED","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"}],"tags":["credit-notes"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/credit-notes/customer/{id}":{"get":{"summary":"Get customer credit note by id [customer scope]","operationId":"getCreditnotesCustomerId","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"id","in":"path","required":true}],"tags":["credit-notes"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/customer/invoices/{invoiceId}":{"get":{"summary":"Get customer invoice by ID","operationId":"getCustomerInvoicesInvoiceid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["customer"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/admin/list":{"get":{"summary":"List driver registration requests. [admin scope]","operationId":"getDriverregistrationrequestsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","enum":["draft","submitted","needs-correction","under-review","approved","rejected","suspended","expired-docs"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["individual","company"],"x-convert":{"trim":true},"name":"ownerType","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/admin/{requestId}":{"get":{"summary":"Get a single driver registration request. [admin scope]","operationId":"getDriverregistrationrequestsAdminRequestid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/bulk-template":{"get":{"summary":"Download the CSV template for bulk rider import (§2.2). [rider-company scope]","operationId":"getDriverregistrationrequestsRidercompanyBulktemplate","tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/list":{"get":{"summary":"List the caller's company rider profiles with onboarding/compliance status (§12 \"Riders List\"). [rider-company scope]","operationId":"getDriverregistrationrequestsRidercompanyList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","enum":["draft","submitted","needs-correction","under-review","approved","rejected","suspended","expired-docs"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/admin/export":{"get":{"summary":"Export driver wallet balances to Excel (with a blank \"Amount to Pay\" column for re-import) [admin scope]","operationId":"getDriverwalletsAdminExport","parameters":[{"type":"string","default":"-currentBalance","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"string","enum":["ACTIVE","SUSPENDED"],"x-convert":{"trim":true},"name":"status","in":"query","required":false},{"type":"boolean","name":"hasBalance","in":"query","required":false}],"tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/admin/list":{"get":{"summary":"List driver wallets with balances [admin scope]","operationId":"getDriverwalletsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","default":"-currentBalance","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"string","enum":["ACTIVE","SUSPENDED"],"x-convert":{"trim":true},"name":"status","in":"query","required":false},{"type":"boolean","name":"hasBalance","in":"query","required":false}],"tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/admin/statistics":{"get":{"summary":"Aggregate driver wallet statistics [admin scope]","operationId":"getDriverwalletsAdminStatistics","tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/admin/transactions":{"get":{"summary":"List wallet transactions across all drivers (earnings and payments) [admin scope]","operationId":"getDriverwalletsAdminTransactions","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","default":"-transactionDate","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query","required":false},{"type":"string","enum":["EARNING","PAYMENT"],"x-convert":{"trim":true},"name":"type","in":"query","required":false},{"type":"string","format":"date-time","name":"fromDate","in":"query","required":false},{"type":"string","format":"date-time","name":"toDate","in":"query","required":false}],"tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/driver/me":{"get":{"summary":"Get driver wallet balance and summary [driver scope]. Defaults to current month if no dates provided.","operationId":"getDriverwalletsDriverMe","parameters":[{"type":"boolean","default":true,"name":"includeTransactions","in":"query"},{"type":"integer","default":20,"minimum":1,"maximum":100,"name":"transactionLimit","in":"query"},{"type":"integer","default":0,"minimum":0,"name":"transactionOffset","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/invoices/admin/export-data":{"get":{"summary":"Export invoices as Excel .[admin scope]","operationId":"getInvoicesAdminExportdata","parameters":[{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","enum":["STORE_TO_CUSTOMER","RWIQHA_TO_CUSTOMER","RWIQHA_TO_STORE"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"string","enum":["PENDING","PAID","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","format":"date","name":"fromDate","in":"query"},{"type":"string","format":"date","name":"toDate","in":"query"}],"tags":["invoices"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/notification-subscribers/admin/list":{"get":{"summary":"List notifications subscribers. [admin scope]","operationId":"getNotificationsubscribersAdminList","parameters":[{"type":"number","default":1,"name":"page","in":"query"},{"type":"number","default":10,"name":"limit","in":"query"},{"type":"boolean","default":false,"name":"isUser","in":"query"}],"tags":["notification-subscribers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/export":{"get":{"summary":"Download offers as an editable pricing sheet, optionally for one store. The same file imports back through /api/offers/admin/import. [admin scope]","operationId":"getOffersAdminExport","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query"},{"type":"boolean","name":"isActive","in":"query"}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/export-data":{"get":{"summary":"Export offers as Excel .[admin scope]","operationId":"getOffersAdminExportdata","parameters":[{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"productId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query"},{"type":"boolean","name":"isActive","in":"query"},{"type":"string","format":"date","name":"fromDate","in":"query"},{"type":"string","format":"date","name":"toDate","in":"query"}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/fix":{"get":{"summary":"Seed offers .[admin scope]","operationId":"getOffersAdminFix","tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/get-calculations":{"get":{"summary":"Get offers calculations .[admin scope]","operationId":"getOffersAdminGetcalculations","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query"},{"type":"boolean","name":"isActive","in":"query","required":false},{"type":"number","name":"maxPrice","in":"query","required":false},{"type":"number","name":"minPrice","in":"query","required":false}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/list":{"get":{"summary":"List offers .[admin scope]","operationId":"getOffersAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query"},{"type":"boolean","name":"isActive","in":"query","required":false},{"type":"number","name":"maxPrice","in":"query","required":false},{"type":"number","name":"minPrice","in":"query","required":false},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/seed":{"get":{"summary":"Seed offers .[admin scope]","operationId":"getOffersAdminSeed","tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/customer/list":{"get":{"summary":"List store offers .[Customer scope]","operationId":"getOffersCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":1000,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query"},{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"collectionFormat":"multi","x-alternatives":[{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"collectionFormat":"multi","name":"ids"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}],"name":"ids","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"categories","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"category","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"searchJoin","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"with","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"language","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"limit","in":"query"},{"type":"number","minimum":-90,"maximum":90,"name":"latitude","in":"query"},{"type":"number","minimum":-180,"maximum":180,"name":"longitude","in":"query"}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/store-owner/export":{"get":{"summary":"Download this store's offers as an editable pricing sheet. The same file imports back through /api/offers/store-owner/import. [store-owner scope]","operationId":"getOffersStoreownerExport","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query"},{"type":"boolean","name":"isActive","in":"query"}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/store-owner/list":{"get":{"summary":"List store offers .[STORE OWNER scope]","operationId":"getOffersStoreownerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query"}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/active":{"get":{"summary":"Live board of every in-flight order, with stage and timing. [admin scope]","operationId":"getOrdersAdminActive","parameters":[{"type":"integer","default":200,"minimum":1,"maximum":200,"name":"limit","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/export-data":{"get":{"summary":"Export orders as Excel .[admin scope]","operationId":"getOrdersAdminExportdata","parameters":[{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","processing","accepted-by-store","out-for-delivery","cancelled","refunded","failed","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"},{"type":"string","format":"date","name":"fromDate","in":"query"},{"type":"string","format":"date","name":"toDate","in":"query"}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/get-calculations":{"get":{"summary":"Get orders calculations .[admin scope]","operationId":"getOrdersAdminGetcalculations","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","processing","accepted-by-store","out-for-delivery","cancelled","refunded","failed","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/list":{"get":{"summary":"List orders .[admin scope]","operationId":"getOrdersAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","processing","accepted-by-store","out-for-delivery","cancelled","refunded","failed","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/search":{"get":{"summary":"Search orders by customer name/phone, order customId, or purchase order customId [admin scope]","operationId":"getOrdersAdminSearch","parameters":[{"type":"string","minLength":1,"maxLength":50,"x-convert":{"trim":true},"name":"query","in":"query","required":true}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/customer/list":{"get":{"summary":"add to cart. [CUSTOMER scope]","operationId":"getOrdersCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/driver/list":{"get":{"summary":"List orders .[admin scope]","operationId":"getOrdersDriverList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","enum":["pending","processing","accepted-by-store","out-for-delivery","cancelled","refunded","failed","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcel-assignments/admin/rejections":{"get":{"summary":"Per-rider offer acceptance and rejection reasons. [admin scope]","operationId":"getParcelassignmentsAdminRejections","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"string","enum":["too-far","vehicle-issue","already-busy","store-closed","customer-area-restricted","end-of-shift","other"],"x-convert":{"trim":true},"name":"reason","in":"query"}],"tags":["parcel-assignments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcel-incidents/admin/list":{"get":{"summary":"List parcel incidents. [admin scope]","operationId":"getParcelincidentsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"},{"type":"string","enum":["open","resolved"],"x-convert":{"trim":true},"name":"status","in":"query"}],"tags":["parcel-incidents"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/admin/export-data":{"get":{"summary":"Export parcels as Excel .[admin scope]","operationId":"getParcelsAdminExportdata","parameters":[{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"},{"type":"string","enum":["pending","accepted","rejected","picked-up","delivered","failed","cancelled","returned"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","format":"date","name":"fromDate","in":"query"},{"type":"string","format":"date","name":"toDate","in":"query"}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/admin/list":{"get":{"summary":"List parcels .[admin scope]","operationId":"getParcelsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","accepted","rejected","picked-up","delivered","failed","cancelled","returned"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/admin/stats":{"get":{"summary":"Get parcel statistics [admin scope]","operationId":"getParcelsAdminStats","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/driver/list":{"get":{"summary":"List parcels .[admin scope]","operationId":"getParcelsDriverList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","enum":["pending","accepted","rejected","picked-up","delivered","failed","cancelled","returned"],"x-convert":{"trim":true},"name":"status","in":"query"}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/partner-cases/admin/list":{"get":{"summary":"Escalation cases from all rider companies - the Rwiqha support queue. [admin scope]","operationId":"getPartnercasesAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":20,"minimum":1,"maximum":100,"name":"page_size","in":"query"},{"type":"string","enum":["open","in-progress","resolved","rejected"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["rider-transfer","order-issue","payout-dispute","settlement-dispute","other"],"x-convert":{"trim":true},"name":"category","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"query"},{"type":"boolean","default":false,"name":"openOnly","in":"query"}],"tags":["partner-cases"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/partner-cases/rider-company/list":{"get":{"summary":"The company's escalation cases with status and thread. [rider-company scope]","operationId":"getPartnercasesRidercompanyList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":20,"minimum":1,"maximum":100,"name":"page_size","in":"query"},{"type":"string","enum":["open","in-progress","resolved","rejected"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["rider-transfer","order-issue","payout-dispute","settlement-dispute","other"],"x-convert":{"trim":true},"name":"category","in":"query"}],"tags":["partner-cases"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payment-refunds/admin/list":{"get":{"summary":"List user Payment Refunds .[admin scope]","operationId":"getPaymentrefundsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"query"},{"type":"string","enum":["success","failed"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"}],"tags":["payment-refunds"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payment-refunds/admin/{id}":{"get":{"summary":"Get payment refund by id [admin scope]","operationId":"getPaymentrefundsAdminId","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"id","in":"path","required":true}],"tags":["payment-refunds"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payment-refunds/customer/list":{"get":{"summary":"List user Payment Refunds .[customer scope]","operationId":"getPaymentrefundsCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"query"}],"tags":["payment-refunds"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payment-refunds/customer/{id}":{"get":{"summary":"Get payment refund by id [customer scope]","operationId":"getPaymentrefundsCustomerId","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"id","in":"path","required":true}],"tags":["payment-refunds"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payments/customer/saved-cards":{"get":{"summary":"The authenticated customer's saved cards. [CUSTOMER scope]","operationId":"getPaymentsCustomerSavedcards","tags":["payments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/export":{"get":{"summary":"Export the payouts list to Excel, honouring the current list filters [admin scope]","operationId":"getPayoutsAdminExport","parameters":[{"type":"string","enum":["DRAFT","PENDING","APPROVED","TRANSFERRED","ON_HOLD","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/list":{"get":{"summary":"Get all payouts for admin with pagination and filters","operationId":"getPayoutsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","enum":["DRAFT","PENDING","APPROVED","TRANSFERRED","ON_HOLD","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/statistics":{"get":{"summary":"Get payout statistics for admin dashboard","operationId":"getPayoutsAdminStatistics","parameters":[{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/{payoutId}":{"get":{"summary":"Get payout by ID for admin","operationId":"getPayoutsAdminPayoutid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"payoutId","in":"path","required":true}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/store-owner/statistics":{"get":{"summary":"Get payout statistics for store owner dashboard","operationId":"getPayoutsStoreownerStatistics","parameters":[{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/store-owner/{payoutId}":{"get":{"summary":"Get payout by ID for store owner","operationId":"getPayoutsStoreownerPayoutid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"payoutId","in":"path","required":true}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/export":{"get":{"summary":"Export products to Excel. [admin scope]","operationId":"getProductsAdminExport","parameters":[{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query","required":false},{"type":"boolean","name":"isDeleted","in":"query","required":false},{"type":"string","format":"date-time","name":"fromDate","in":"query","required":false},{"type":"string","format":"date-time","name":"toDate","in":"query","required":false}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/list":{"get":{"summary":"List Products .[admin scope]","operationId":"getProductsAdminList","parameters":[{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query","required":false},{"type":"boolean","name":"isActive","in":"query","required":false},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/search":{"get":{"summary":"Search Products by name [admin scope]","operationId":"getProductsAdminSearch","parameters":[{"type":"string","minLength":1,"maxLength":100,"x-convert":{"trim":true},"name":"search","in":"query","required":true},{"type":"integer","default":10,"minimum":1,"maximum":50,"name":"limit","in":"query"}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/seed":{"get":{"summary":"Seed product. [admin scope]","operationId":"getProductsAdminSeed","tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/store-owner/list":{"get":{"summary":"List Products and Categories .[store owner scope]","operationId":"getProductsStoreownerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"query"},{"type":"boolean","default":false,"name":"hasOffers","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/admin/export-data":{"get":{"summary":"Export purchase orders as Excel .[admin scope]","operationId":"getPurchaseordersAdminExportdata","parameters":[{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","rejected","failed","accepted","driver-assigned","in-delivery","cancelled","returned","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","format":"date","name":"fromDate","in":"query"},{"type":"string","format":"date","name":"toDate","in":"query"}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/admin/get-calculations":{"get":{"summary":"Get purchase orders calculations .[admin scope]","operationId":"getPurchaseordersAdminGetcalculations","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","rejected","failed","accepted","driver-assigned","in-delivery","cancelled","returned","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/admin/list":{"get":{"summary":"List purchase orders .[admin scope]","operationId":"getPurchaseordersAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","rejected","failed","accepted","driver-assigned","in-delivery","cancelled","returned","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","format":"date","name":"fromDate","in":"query"},{"type":"string","format":"date","name":"toDate","in":"query"}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/store-owner/count":{"get":{"summary":"Show purchase orders count per status .[store-owner scope]","operationId":"getPurchaseordersStoreownerCount","tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/store-owner/count-unread":{"get":{"summary":"List purchase orders .[store-owner scope]","operationId":"getPurchaseordersStoreownerCountunread","tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/store-owner/list":{"get":{"summary":"List purchase orders .[store-owner scope]","operationId":"getPurchaseordersStoreownerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","name":"sort","in":"query"},{"type":"string","format":"date-time","name":"from","in":"query"},{"type":"string","format":"date-time","name":"to","in":"query"},{"type":"string","enum":["pending","rejected","failed","accepted","driver-assigned","in-delivery","cancelled","returned","delivered"],"name":"status","in":"query","required":false}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/customer/list":{"get":{"summary":"list push notifications. [CUSTOMER scope]","operationId":"getPushnotificationsCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"}],"tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/customer/mark-as-read-all":{"get":{"summary":"Mark all push notifications as read. [CUSTOMER scope]","operationId":"getPushnotificationsCustomerMarkasreadall","tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/driver/list":{"get":{"summary":"list push notifications. [DRIVER scope]","operationId":"getPushnotificationsDriverList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"}],"tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/driver/mark-as-read-all":{"get":{"summary":"Mark all push notifications as read. [DRIVER scope]","operationId":"getPushnotificationsDriverMarkasreadall","tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/store-owner/list":{"get":{"summary":"list push notifications. [STORE_OWNER scope]","operationId":"getPushnotificationsStoreownerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"}],"tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/store-owner/mark-as-read-all":{"get":{"summary":"Mark all push notifications as read. [STORE_OWNER scope]","operationId":"getPushnotificationsStoreownerMarkasreadall","tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/accept-invite/{token}":{"get":{"summary":"Validate a company invitation token and return the company summary for the acceptance screen. [no auth scope]","operationId":"getRidercompaniesAcceptinviteToken","parameters":[{"type":"string","minLength":20,"maxLength":200,"x-convert":{"trim":true},"name":"token","in":"path","required":true}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/list":{"get":{"summary":"List rider companies [admin scope]","operationId":"getRidercompaniesAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"string","enum":["invited","setup-required","active","suspended","terminated"],"x-convert":{"trim":true},"name":"status","in":"query","required":false},{"type":"string","enum":["draft","pending-signature","active","suspended","expired"],"x-convert":{"trim":true},"name":"contractStatus","in":"query","required":false},{"type":"string","x-convert":{"trim":true},"name":"city","in":"query","required":false}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/rider-company/dashboard-summary":{"get":{"summary":"Fleet KPIs for the company home dashboard (§3.1). [rider-company scope]","operationId":"getRidercompaniesRidercompanyDashboardsummary","tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/rider-company/live-riders":{"get":{"summary":"Live rider cards for the fleet table/map. Delta poll with ?since={serverTime}; full snapshot without it. [rider-company scope]","operationId":"getRidercompaniesRidercompanyLiveriders","parameters":[{"type":"integer","default":0,"minimum":0,"name":"since","in":"query"}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/rider-company/my-company":{"get":{"summary":"Get the caller's company profile, contract status and readiness [rider-company scope]","operationId":"getRidercompaniesRidercompanyMycompany","tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/rider-company/readiness-checklist":{"get":{"summary":"Recompute and return the company go-live checklist (§2.1 Go Live) [rider-company scope]","operationId":"getRidercompaniesRidercompanyReadinesschecklist","tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/rider-company/reports":{"get":{"summary":"Company performance report for a period: acceptance, completion, SLA, settlement, per-rider. [rider-company scope]","operationId":"getRidercompaniesRidercompanyReports","parameters":[{"type":"string","format":"date-time","name":"fromDate","in":"query","required":true},{"type":"string","format":"date-time","name":"toDate","in":"query","required":true}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-exceptions/admin/list":{"get":{"summary":"List rider exceptions across all companies, escalations first-class (§9). [admin scope]","operationId":"getRiderexceptionsAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","enum":["open","acknowledged","resolved","escalated"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["not-accepting","stale-gps","stalled-order","doc-restricted"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"query"},{"type":"boolean","default":false,"name":"escalatedOnly","in":"query"}],"tags":["rider-exceptions"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-exceptions/rider-company/list":{"get":{"summary":"List the caller's company operational exceptions (§3.1 \"Exceptions\"). [rider-company scope]","operationId":"getRiderexceptionsRidercompanyList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","enum":["open","acknowledged","resolved","escalated"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","enum":["not-accepting","stale-gps","stalled-order","doc-restricted"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"boolean","default":true,"name":"liveOnly","in":"query"}],"tags":["rider-exceptions"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/service-zones/admin/list":{"get":{"summary":"List service zones with polygons [admin scope]","operationId":"getServicezonesAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":100,"minimum":1,"maximum":500,"name":"page_size","in":"query"},{"type":"string","default":"city","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"string","x-convert":{"trim":true},"name":"city","in":"query","required":false},{"type":"boolean","name":"isActive","in":"query","required":false}],"tags":["service-zones"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/settings/customer/list":{"get":{"summary":"List home pagee types .[customer scope]","operationId":"getSettingsCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","default":"home-page","x-convert":{"trim":true},"name":"type_slug","in":"query"},{"type":"string","default":"language","x-convert":{"trim":true},"name":"with","in":"query"},{"type":"string","default":"ar","x-convert":{"trim":true},"name":"language","in":"query"}],"tags":["settings"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/store-owner/invoices/{invoiceId}":{"get":{"summary":"Get store owner invoice by ID","operationId":"getStoreownerInvoicesInvoiceid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["store-owner"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/export":{"get":{"summary":"Export stores to Excel. [admin scope]","operationId":"getStoresAdminExport","parameters":[{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"boolean","name":"isActive","in":"query","required":false},{"type":"string","enum":["NOT_SUBMITTED","PENDING","APPROVED","REJECTED"],"x-convert":{"trim":true},"name":"verificationStatus","in":"query","required":false},{"type":"string","enum":["VISIBLE","HIDDEN"],"x-convert":{"trim":true},"name":"appVisibility","in":"query","required":false},{"type":"string","format":"date-time","name":"fromDate","in":"query","required":false},{"type":"string","format":"date-time","name":"toDate","in":"query","required":false}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/list":{"get":{"summary":"list stores. [admin scope]","operationId":"getStoresAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"},{"type":"boolean","name":"isActive","in":"query","required":false},{"type":"string","enum":["NOT_SUBMITTED","PENDING","APPROVED","REJECTED"],"x-convert":{"trim":true},"name":"verificationStatus","in":"query","required":false},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"string","description":"Filter by whether the store currently shows up in the customer app","enum":["VISIBLE","HIDDEN"],"x-convert":{"trim":true},"name":"appVisibility","in":"query","required":false}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/search":{"get":{"summary":"Search Stores by name [admin scope]","operationId":"getStoresAdminSearch","parameters":[{"type":"string","minLength":1,"maxLength":100,"x-convert":{"trim":true},"name":"search","in":"query","required":true},{"type":"integer","default":10,"minimum":1,"maximum":50,"name":"limit","in":"query"}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/stats":{"get":{"summary":"list stores. [admin scope]","operationId":"getStoresAdminStats","tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/customer/all":{"get":{"summary":"list nearest stores. [visitor scope]","operationId":"getStoresCustomerAll","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":5,"minimum":1,"name":"page_size","in":"query"},{"type":"number","minimum":-180,"maximum":180,"name":"longitude","in":"query"},{"type":"number","minimum":-90,"maximum":90,"name":"latitude","in":"query"}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/customer/get-default-store":{"get":{"summary":"list nearest stores. [customer scope]","operationId":"getStoresCustomerGetdefaultstore","tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/legal-documents":{"get":{"summary":"View this store's legal documents and verification status. [STORE-OWNER scope]","operationId":"getStoresStoreownerLegaldocuments","tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Upload a legal document (CR or VAT). Re-uploadable until approved; an approved document is locked (admin only). [STORE-OWNER scope]","operationId":"putStoresStoreownerLegaldocuments","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model20"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/view":{"get":{"summary":"View store owner store. [store owner scope]","operationId":"getStoresStoreownerView","tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/types/customer/list":{"get":{"summary":"List home pagee types .[customer scope]","operationId":"getTypesCustomerList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","default":"home-page","x-convert":{"trim":true},"name":"type_slug","in":"query"},{"type":"string","default":"language","x-convert":{"trim":true},"name":"with","in":"query"},{"type":"string","default":"ar","x-convert":{"trim":true},"name":"language","in":"query"}],"tags":["types"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/export-data":{"get":{"summary":"Export users as Excel .[admin scope]","operationId":"getUsersAdminExportdata","parameters":[{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query"},{"type":"array","x-constraint":{"single":true},"items":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"collectionFormat":"multi","name":"roles","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"boolean","name":"isActive","in":"query"},{"type":"string","format":"date","name":"fromDate","in":"query"},{"type":"string","format":"date","name":"toDate","in":"query"}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/list":{"get":{"summary":"list store oweners. [admin scope]","operationId":"getUsersAdminList","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"array","x-constraint":{"single":true},"items":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"collectionFormat":"multi","name":"roles","in":"query","required":false},{"type":"boolean","name":"isActive","in":"query","required":false},{"type":"string","x-convert":{"trim":true},"name":"search","in":"query","required":false},{"type":"string","enum":["busy","available","offline"],"x-convert":{"trim":true},"name":"driverAvailability","in":"query","required":false}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/permissions-catalog":{"get":{"summary":"Get the grouped store-operator permission catalog. [admin scope]","operationId":"getUsersAdminPermissionscatalog","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/rider-company/me":{"get":{"summary":"Get the caller's profile and effective permissions for the rider-company panel [rider-company scope]","operationId":"getUsersRidercompanyMe","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/rider-company/permissions-catalog":{"get":{"summary":"The rider-company permission catalog and role presets, for rendering the staff permission matrix [rider-company + admin scopes]","operationId":"getUsersRidercompanyPermissionscatalog","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/rider-company/staff":{"get":{"summary":"List the caller's company staff with their permissions [rider-company scope]","operationId":"getUsersRidercompanyStaff","parameters":[{"type":"boolean","default":true,"name":"includeInactive","in":"query"}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"post":{"summary":"Add a company staff member (dispatcher/HR/finance/…) by mobile number, bound to the caller's company. Company-admin only [rider-company scope]","operationId":"postUsersRidercompanyStaff","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model123"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/me":{"get":{"summary":"Get the current panel user (scope + permissions). [store panel scope]","operationId":"getUsersStoreownerMe","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/operators":{"get":{"summary":"List the operators (staff) bound to the caller's store. [store owner scope]","operationId":"getUsersStoreownerOperators","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"post":{"summary":"Add a store operator (staff) by mobile number, bound to the caller's store. [store owner scope]","operationId":"postUsersStoreownerOperators","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model126"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/permissions-catalog":{"get":{"summary":"Get the grouped store-operator permission catalog for rendering the permission matrix. [store panel scope]","operationId":"getUsersStoreownerPermissionscatalog","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/invoices/{invoiceId}/pdf":{"get":{"summary":"Download admin invoice PDF","operationId":"getAdminInvoicesInvoiceidPdf","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca/certificate":{"get":{"summary":"Get Rwiqha ZATCA certificate information","operationId":"getAdminSettingsZatcaCertificate","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Update Rwiqha ZATCA certificate","operationId":"putAdminSettingsZatcaCertificate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model29"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"delete":{"summary":"Delete Rwiqha ZATCA certificate","operationId":"deleteAdminSettingsZatcaCertificate","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca/certificate-status":{"get":{"summary":"Get ZATCA certificate status","operationId":"getAdminSettingsZatcaCertificatestatus","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca/compliance-status":{"get":{"summary":"Get current ZATCA compliance test status and results","operationId":"getAdminSettingsZatcaCompliancestatus","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca/invoices":{"get":{"summary":"List Rwiqha ZATCA invoices","operationId":"getAdminSettingsZatcaInvoices","parameters":[{"type":"number","minimum":1,"name":"page_no","in":"query","required":false},{"type":"number","minimum":1,"maximum":100,"name":"page_size","in":"query","required":false},{"type":"string","enum":["PENDING","REPORTED","CLEARED","FAILED","CANCELLED"],"name":"status","in":"query","required":false},{"type":"string","x-format":{"isoDate":true},"name":"fromDate","in":"query","required":false},{"type":"string","x-format":{"isoDate":true},"name":"toDate","in":"query","required":false}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/admin/driver/{userId}":{"get":{"summary":"A driver's payout account and the full history of changes to it. [admin scope]","operationId":"getBankbeneficiariesAdminDriverUserid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"userId","in":"path","required":true}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"put":{"summary":"Set a driver's payout account on their behalf. Recorded in history as a team change and the driver is notified. [admin scope]","operationId":"putBankbeneficiariesAdminDriverUserid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"userId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model31"}}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"delete":{"summary":"Withdraw a driver's payout account on their behalf. The row is retired, never deleted — the change history and audit trail stand. [admin scope]","operationId":"deleteBankbeneficiariesAdminDriverUserid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"userId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model189"}}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/checkout/{storeId}":{"get":{"summary":"View customer cart. [CUSTOMER scope]","operationId":"getCartsCustomerCheckoutStoreid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"type":"string","x-convert":{"trim":true},"name":"moyasarPaymentId","in":"query","required":true}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/view/{storeId}":{"get":{"summary":"View customer cart. [CUSTOMER scope]","operationId":"getCartsCustomerViewStoreid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/admin/get-by-id/{categoryId}":{"get":{"summary":"get category by id. [admin scope]","operationId":"getCategoriesAdminGetbyidCategoryid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"path","required":true}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/customer/page-by-slug/{slug}":{"get":{"summary":"Get a parent category page (siblings + sub-categories + one offer per product). [customer scope]","operationId":"getCategoriesCustomerPagebyslugSlug","parameters":[{"type":"string","x-convert":{"trim":true},"name":"slug","in":"path","required":true}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/customer/seed/initial":{"get":{"summary":"Seed Categories .[customer scope]","operationId":"getCategoriesCustomerSeedInitial","tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-payout-requests/admin/{requestId}/beneficiary-iban":{"get":{"summary":"Reveal the full beneficiary IBAN for an approved/processing payout request (audited). [admin scope]","operationId":"getCompanypayoutrequestsAdminRequestidBeneficiaryiban","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true}],"tags":["company-payout-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-wallets/admin/{companyId}/transactions":{"get":{"summary":"A company's settlement ledger [admin scope]","operationId":"getCompanywalletsAdminCompanyidTransactions","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true},{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"maximum":200,"name":"page_size","in":"query"},{"type":"string","enum":["EARNING","CLEARING","ADJUSTMENT","PAYOUT_REQUEST","PAYOUT_PAID","PAYOUT_REVERSAL"],"x-convert":{"trim":true},"name":"type","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["company-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/admin/batches/{batchId}":{"get":{"summary":"Get a bulk coupon batch and its individual codes. [admin scope]","operationId":"getCouponsAdminBatchesBatchid","description":"Returns the batch summary alongside a paginated page of the codes it contains, each with its own redemption count. A batch is a view over the coupons sharing a batchId — every code listed here is an ordinary coupon and can be opened at /coupons/admin/{couponId}.","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"batchId","in":"path","required":true},{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"batchSequence","x-convert":{"trim":true},"name":"sort","in":"query"}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/{profileId}/view":{"get":{"summary":"Get a rider profile: identity, documents, approval history, corrections (§12 \"Rider Detail\"). [rider-company scope]","operationId":"getDriverregistrationrequestsRidercompanyProfileidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"profileId","in":"path","required":true}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/admin/by-driver/{driverId}":{"get":{"summary":"Get driver wallet by driver ID with transaction history filtered by date range [admin scope]","operationId":"getDriverwalletsAdminBydriverDriverid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"path","required":true},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/driver/me/transactions":{"get":{"summary":"Get driver wallet transaction history [driver scope]. Defaults to current month if no dates provided.","operationId":"getDriverwalletsDriverMeTransactions","parameters":[{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":20,"minimum":1,"maximum":100,"name":"page_size","in":"query"},{"type":"string","default":"-transactionDate","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","format":"date-time","name":"fromDate","in":"query"},{"type":"string","format":"date-time","name":"toDate","in":"query"}],"tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/get-by-id/{offerId}":{"get":{"summary":"get offer by id. [admin scope]","operationId":"getOffersAdminGetbyidOfferid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"offerId","in":"path","required":true}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/customer/get-by-id/{offerId}":{"get":{"summary":"get offer by id. [CUSTOMER scope]","operationId":"getOffersCustomerGetbyidOfferid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"offerId","in":"path","required":true},{"type":"string","x-convert":{"trim":true},"name":"storeId","in":"query"}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/customer/get-by-slug/{slug}":{"get":{"summary":"get offer by slug. [CUSTOMER scope]","operationId":"getOffersCustomerGetbyslugSlug","parameters":[{"type":"string","x-convert":{"trim":true},"name":"slug","in":"path","required":true}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/store-owner/get-by-id/{offerId}":{"get":{"summary":"get offer by id. [STORE OWNER scope]","operationId":"getOffersStoreownerGetbyidOfferid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"offerId","in":"path","required":true}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/view":{"get":{"summary":"List orders .[admin scope]","operationId":"getOrdersAdminOrderidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","processing","accepted-by-store","out-for-delivery","cancelled","refunded","failed","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/timeline":{"get":{"summary":"Operational milestones and elapsed times for one order .[admin scope]","operationId":"getOrdersAdminOrderidTimeline","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/notes":{"get":{"summary":"Operations notes across every parcel of one order, oldest first. [admin scope]","operationId":"getOrdersAdminOrderidNotes","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/customer/view/{orderId}":{"get":{"summary":"View order. [CUSTOMER scope]","operationId":"getOrdersCustomerViewOrderid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcel-incidents/admin/{incidentId}/view":{"get":{"summary":"View a parcel incident. [admin scope]","operationId":"getParcelincidentsAdminIncidentidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"incidentId","in":"path","required":true}],"tags":["parcel-incidents"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/admin/{parcelId}/view":{"get":{"summary":"List parcels .[admin scope]","operationId":"getParcelsAdminParcelidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true},{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","accepted","rejected","picked-up","delivered","failed","cancelled","returned"],"x-convert":{"trim":true},"name":"status","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"query"}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/driver/{parcelId}/view":{"get":{"summary":"view parcel. [DRIVER scope]","operationId":"getParcelsDriverParcelidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/{payoutId}/export":{"get":{"summary":"Download a single payout as an Excel statement (summary + line items) [admin scope]","operationId":"getPayoutsAdminPayoutidExport","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"payoutId","in":"path","required":true}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/store-owner/{payoutId}/export":{"get":{"summary":"Download one of the store's own payouts as an Excel statement [store panel scope]","operationId":"getPayoutsStoreownerPayoutidExport","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"payoutId","in":"path","required":true}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/get-by-id/{productId}":{"get":{"summary":"get product by id. [admin scope]","operationId":"getProductsAdminGetbyidProductid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"productId","in":"path","required":true}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/{productId}/usage-check":{"get":{"summary":"Check if product is used in active offers. [admin scope]","operationId":"getProductsAdminProductidUsagecheck","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"productId","in":"path","required":true}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/store-owner/get-by-id/{productId}":{"get":{"summary":"list nearest stores. [customer scope]","operationId":"getProductsStoreownerGetbyidProductid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"productId","in":"path","required":true}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/admin/{purchaseOrderId}/view":{"get":{"summary":"View purchase order .[admin scope]","operationId":"getPurchaseordersAdminPurchaseorderidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"purchaseOrderId","in":"path","required":true},{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"query"},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"customerId","in":"query"},{"type":"string","enum":["pending","rejected","failed","accepted","driver-assigned","in-delivery","cancelled","returned","delivered"],"x-convert":{"trim":true},"name":"status","in":"query"}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/store-owner/{purchaseOrderId}/view":{"get":{"summary":"View purchase order .[store-owner scope]","operationId":"getPurchaseordersStoreownerPurchaseorderidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"purchaseOrderId","in":"path","required":true}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/{companyId}/live-riders":{"get":{"summary":"Live rider cards for one company (admin cross-company view). ?since for deltas. [admin scope]","operationId":"getRidercompaniesAdminCompanyidLiveriders","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true},{"type":"integer","default":0,"minimum":0,"name":"since","in":"query"}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/{companyId}/view":{"get":{"summary":"Get a rider company with full profile, contract, readiness and invitation state [admin scope]","operationId":"getRidercompaniesAdminCompanyidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/service-zones/admin/{zoneId}/view":{"get":{"summary":"Get a service zone with its polygon [admin scope]","operationId":"getServicezonesAdminZoneidView","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"zoneId","in":"path","required":true}],"tags":["service-zones"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/store-owner/invoices/{invoiceId}/pdf":{"get":{"summary":"Download store owner invoice PDF","operationId":"getStoreownerInvoicesInvoiceidPdf","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["store-owner"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/get-by-id/{storeId}":{"get":{"summary":"get store by id. [admin scope]","operationId":"getStoresAdminGetbyidStoreid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/customer/get-by-id/{storeId}":{"get":{"summary":"list nearest stores. [customer scope]","operationId":"getStoresCustomerGetbyidStoreid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"type":"number","name":"latitude","in":"query"},{"type":"number","name":"longitude","in":"query"}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/customer/page-by-slug/{slug}":{"get":{"summary":"Get a store page by slug (store + category tree of offers). [customer scope]","operationId":"getStoresCustomerPagebyslugSlug","parameters":[{"type":"string","x-convert":{"trim":true},"name":"slug","in":"path","required":true}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/customer/set-default-store/{storeId}":{"get":{"summary":"list nearest stores. [customer scope]","operationId":"getStoresCustomerSetdefaultstoreStoreid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/activation/checklist":{"get":{"summary":"Get activation readiness checklist without toggling state. [STORE-OWNER scope]","operationId":"getStoresStoreownerActivationChecklist","tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/settings/view":{"get":{"summary":"view store settings. [store-owner scope]","operationId":"getStoresStoreownerSettingsView","tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/types/customer/list/{slug}":{"get":{"summary":"View home page types .[customer scope]","operationId":"getTypesCustomerListSlug","parameters":[{"type":"string","x-convert":{"trim":true},"name":"slug","in":"path","required":true},{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"},{"type":"string","default":"home-page","x-convert":{"trim":true},"name":"type_slug","in":"query"},{"type":"string","default":"language","x-convert":{"trim":true},"name":"with","in":"query"},{"type":"string","default":"ar","x-convert":{"trim":true},"name":"language","in":"query"}],"tags":["types"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/driver/{driverId}/location":{"get":{"summary":"Get driver current location","operationId":"getUsersDriverDriveridLocation","parameters":[{"type":"string","x-convert":{"trim":true},"name":"driverId","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/stores/list":{"get":{"summary":"List stores owned by the authenticated store-owner. [store-owner scope]","operationId":"getUsersStoreownerStoresList","tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/web/invoices/{invoiceId}/pdf":{"get":{"summary":"Get invoice PDF signed URL via signed web link. [web scope]","operationId":"getWebInvoicesInvoiceidPdf","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["web"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/web/orders/view/{orderId}":{"get":{"summary":"View order via signed web link. [web scope]","operationId":"getWebOrdersViewOrderid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"cid","in":"query","required":true}],"tags":["web"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/zatca/invoices/{invoiceNumber}/pdf-by-number":{"get":{"summary":"Get ZATCA invoice PDF by invoice number","operationId":"getZatcaInvoicesInvoicenumberPdfbynumber","parameters":[{"type":"string","x-convert":{"trim":true},"name":"invoiceNumber","in":"path","required":true},{"type":"string","x-convert":{"trim":true},"name":"storeId","in":"query","required":false}],"tags":["zatca"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/zatca/invoices/{invoiceId}/pdf":{"get":{"summary":"Get ZATCA invoice PDF","operationId":"getZatcaInvoicesInvoiceidPdf","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["zatca"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca/invoices/{invoiceId}":{"get":{"summary":"Get Rwiqha ZATCA invoice details","operationId":"getAdminSettingsZatcaInvoicesInvoiceid","parameters":[{"type":"string","name":"invoiceId","in":"path","required":true}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/admin/driver/{userId}/iban":{"get":{"summary":"Reveal a driver's full payout IBAN (audited). [admin scope]","operationId":"getBankbeneficiariesAdminDriverUseridIban","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"userId","in":"path","required":true}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/admin/batches/{batchId}/export":{"get":{"summary":"Export a bulk coupon batch as Excel. [admin scope]","operationId":"getCouponsAdminBatchesBatchidExport","description":"Every code in the batch with its own redemption count, in sequence order — the sheet that gets handed to the company.","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"batchId","in":"path","required":true}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/list/by-category/{categoryId}":{"get":{"summary":"List Products by category .[admin scope]","operationId":"getProductsAdminListBycategoryCategoryid","parameters":[{"type":"string","x-convert":{"trim":true},"name":"categoryId","in":"path","required":true},{"type":"integer","default":1,"minimum":1,"name":"page_no","in":"query"},{"type":"integer","default":30,"minimum":1,"name":"page_size","in":"query"},{"type":"string","default":"-created_at","x-convert":{"trim":true},"name":"sort","in":"query"}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/zatca/compliance-status":{"get":{"summary":"Get store ZATCA compliance status and certificate information","operationId":"getStoresAdminStoreidZatcaCompliancestatus","parameters":[{"type":"string","x-convert":{"trim":true},"name":"storeId","in":"path","required":true}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/zatca/invoices":{"get":{"summary":"List store ZATCA invoices","operationId":"getStoresAdminStoreidZatcaInvoices","parameters":[{"type":"string","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"type":"number","minimum":1,"name":"page_no","in":"query","required":false},{"type":"number","minimum":1,"maximum":100,"name":"page_size","in":"query","required":false},{"type":"string","enum":["PENDING","REPORTED","CLEARED","FAILED","CANCELLED"],"x-convert":{"trim":true},"name":"status","in":"query","required":false},{"type":"string","x-format":{"isoDate":true},"x-convert":{"trim":true},"name":"fromDate","in":"query","required":false},{"type":"string","x-format":{"isoDate":true},"x-convert":{"trim":true},"name":"toDate","in":"query","required":false}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/stores/{storeId}/operators":{"get":{"summary":"List the operators (staff) bound to a store. [admin scope]","operationId":"getUsersAdminStoresStoreidOperators","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"post":{"summary":"Add a store operator (staff) to a store. [admin scope]","operationId":"postUsersAdminStoresStoreidOperators","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model159"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/driver/{driverId}/location/history":{"get":{"summary":"Get driver location history","operationId":"getUsersDriverDriveridLocationHistory","parameters":[{"type":"string","x-convert":{"trim":true},"name":"driverId","in":"path","required":true},{"type":"string","x-convert":{"trim":true},"name":"parcelId","in":"query","required":false},{"type":"string","format":"date","name":"startDate","in":"query","required":false},{"type":"string","format":"date","name":"endDate","in":"query","required":false},{"type":"integer","default":100,"minimum":1,"maximum":1000,"name":"limit","in":"query"}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/zatca/invoices/{invoiceId}":{"get":{"summary":"Get store ZATCA invoice details","operationId":"getStoresAdminStoreidZatcaInvoicesInvoiceid","parameters":[{"type":"string","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"type":"string","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/set-push-notification-token":{"put":{"summary":"update user push notification token","operationId":"putUsersSetpushnotificationtoken","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model2"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/update-availability":{"put":{"summary":"update driver availability. [driver scope]","operationId":"putUsersUpdateavailability","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model3"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/update-profile":{"put":{"operationId":"putUsersUpdateprofile","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model4"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/banners/admin/{bannerId}":{"put":{"summary":"Update a homepage marketing banner. [admin scope]","operationId":"putBannersAdminBannerid","description":"Partial — only the fields sent are changed. Activating or rescheduling here busts the public cache immediately, so the customer app reflects it on the next request.","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"bannerId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model14"}}],"tags":["banners"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"delete":{"summary":"Delete a homepage marketing banner. [admin scope]","operationId":"deleteBannersAdminBannerid","description":"A hard delete, unlike coupons: nothing references a banner — no order, invoice or usage record — so there is no history to keep readable. To take one down without losing it, set `isActive: false` via update instead.","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"bannerId","in":"path","required":true}],"tags":["banners"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/customer/mark-as-read":{"put":{"summary":"Mark a push notification as read. [CUSTOMER scope]","operationId":"putPushnotificationsCustomerMarkasread","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model15"}}],"tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/driver/mark-as-read":{"put":{"summary":"Mark a push notification as read. [DRIVER scope]","operationId":"putPushnotificationsDriverMarkasread","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model16"}}],"tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/push-notifications/store-owner/mark-as-read":{"put":{"summary":"Mark a push notification as read. [STORE_OWNER scope]","operationId":"putPushnotificationsStoreownerMarkasread","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model17"}}],"tags":["push-notifications"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/rider-company/legal-documents":{"put":{"summary":"Upload a company legal document (CR / VAT / signed contract copy). Re-uploadable until approved; an approved document is locked (admin only). [rider-company-admin scope]","operationId":"putRidercompaniesRidercompanyLegaldocuments","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model18"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/bank-details":{"put":{"summary":"Update the store's bank details (where its payouts are sent). [STORE-OWNER scope]","operationId":"putStoresStoreownerBankdetails","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model19"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/update":{"put":{"summary":"update store. [STORE-OWNER scope]","operationId":"putStoresStoreownerUpdate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model21"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/upload-cover":{"put":{"summary":"Upload store cover image URL. [STORE-OWNER scope]","operationId":"putStoresStoreownerUploadcover","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model22"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/upload-logo":{"put":{"summary":"Upload store logo URL. [STORE-OWNER scope]","operationId":"putStoresStoreownerUploadlogo","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model23"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/update/{id}":{"put":{"operationId":"putUsersUpdateId","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"id","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model25"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/addresses/admin/update/{addressId}":{"put":{"summary":"Updates a user address. [admin scope]","operationId":"putAddressesAdminUpdateAddressid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"addressId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model26"}}],"tags":["addresses"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/addresses/customer/update/{addressId}":{"put":{"summary":"Updates a customer address. [customer scope]","operationId":"putAddressesCustomerUpdateAddressid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"addressId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model27"}}],"tags":["addresses"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/invoices/{invoiceId}/status":{"put":{"summary":"Update invoice status","operationId":"putAdminInvoicesInvoiceidStatus","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model28"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca/egsunit":{"put":{"summary":"Update Rwiqha ZATCA EGS Unit Info and related settings","operationId":"putAdminSettingsZatcaEgsunit","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model30"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/admin/{categoryId}/update":{"put":{"summary":"update category. [admin scope]","operationId":"putCategoriesAdminCategoryidUpdate","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model32"}}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/admin/{couponId}/update":{"put":{"summary":"Updates a discount coupon. [admin scope]","operationId":"putCouponsAdminCouponidUpdate","description":"Edits take effect on carts that have not been paid for yet — a cart holding this coupon picks up the new terms on its next reprice. Orders already placed keep the terms they were charged under. `usedCount` is not editable: it is the redemption record, not a setting.","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"couponId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model33"}}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/{offerId}/update":{"put":{"summary":"update offer. [admin scope]","operationId":"putOffersAdminOfferidUpdate","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"offerId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model34"}}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/store-owner/{offerId}/update":{"put":{"summary":"update offer. [store owner scope]","operationId":"putOffersStoreownerOfferidUpdate","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"offerId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model35"}}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/update-status":{"put":{"summary":"add order. [admin scope]","operationId":"putOrdersAdminOrderidUpdatestatus","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model36"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/assign-driver":{"put":{"summary":"add order. [admin scope]","operationId":"putOrdersAdminOrderidAssigndriver","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model37"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/driver/{orderId}/update-status":{"put":{"summary":"update order status. [DRIVER scope]","operationId":"putOrdersDriverOrderidUpdatestatus","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model38"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/admin/{parcelId}/assign-driver":{"put":{"summary":"Assign driver to parcel. [admin scope]","operationId":"putParcelsAdminParcelidAssigndriver","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model39"}}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/admin/{parcelId}/update-status":{"put":{"summary":"add parcel. [admin scope]","operationId":"putParcelsAdminParcelidUpdatestatus","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model40"}}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/driver/{parcelId}/reject":{"put":{"summary":"reject parcel request. [DRIVER scope]","operationId":"putParcelsDriverParcelidReject","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model41"}}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/driver/{parcelId}/delivered":{"put":{"summary":"update parcel as delivered. [DRIVER scope]","operationId":"putParcelsDriverParcelidDelivered","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model42"}}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/driver/{parcelId}/pickup":{"put":{"summary":"update parcel as picked up. [DRIVER scope]","operationId":"putParcelsDriverParcelidPickup","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model43"}}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/driver/{parcelId}/accept":{"put":{"summary":"update parcel as accepted. [DRIVER scope]","operationId":"putParcelsDriverParcelidAccept","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model44"}}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/{payoutId}/release":{"put":{"summary":"Release a payout from hold, returning it to the approval queue [admin scope]","operationId":"putPayoutsAdminPayoutidRelease","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"payoutId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model45"}}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/{payoutId}/transfer":{"put":{"summary":"Mark an approved payout as transferred (APPROVED -> TRANSFERRED), recording the bank reference","operationId":"putPayoutsAdminPayoutidTransfer","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"payoutId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model46"}}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/{payoutId}/approve":{"put":{"summary":"Approve a pending payout (PENDING -> APPROVED), clearing it for bank transfer","operationId":"putPayoutsAdminPayoutidApprove","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"payoutId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model47"}}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/{payoutId}/cancel":{"put":{"summary":"Cancel a payout","operationId":"putPayoutsAdminPayoutidCancel","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"payoutId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model48"}}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/{productId}/update":{"put":{"summary":"update product. [admin scope]","operationId":"putProductsAdminProductidUpdate","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"productId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model49"}}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/admin/{purchaseOrderId}/update-status":{"put":{"summary":"add order. [admin scope]","operationId":"putPurchaseordersAdminPurchaseorderidUpdatestatus","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"purchaseOrderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model50"}}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/admin/{purchaseOrderId}/reject":{"put":{"summary":"Reject order status. [admin scope]","operationId":"putPurchaseordersAdminPurchaseorderidReject","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"purchaseOrderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model51"}}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/store-owner/{purchaseOrderId}/reject":{"put":{"summary":"reject order status. [store-owner scope]","operationId":"putPurchaseordersStoreownerPurchaseorderidReject","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"purchaseOrderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model52"}}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/zatca":{"put":{"summary":"Update Store ZATCA Settings","operationId":"putStoresAdminStoreidZatca","parameters":[{"type":"string","name":"storeId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model53"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/legal-documents":{"put":{"summary":"Admin uploads a legal document (CR or VAT) on behalf of a store. [admin scope]","operationId":"putStoresAdminStoreidLegaldocuments","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model54"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/update":{"put":{"summary":"update store. [admin scope]","operationId":"putStoresAdminStoreidUpdate","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model55"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/bank-details":{"put":{"summary":"Update a store's bank details (where its payouts are sent). [ADMIN scope]","operationId":"putStoresAdminStoreidBankdetails","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model56"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/activation/requirements":{"put":{"summary":"Fill activation-required fields. Per-field write-once: any field already set returns 403 and must be changed by admin. [STORE-OWNER scope]","operationId":"putStoresStoreownerActivationRequirements","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model57"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/settings/update":{"put":{"summary":"update store settings. [STORE-OWNER scope]","operationId":"putStoresStoreownerSettingsUpdate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model58"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests":{"post":{"summary":"Apply to join as a driver. Creates a pending request for admin review. [no auth scope]","operationId":"postDriverregistrationrequests","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model60"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/core/test-email":{"post":{"summary":"Test email functionality. [admin scope]","operationId":"postCoreTestemail","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model61"}}],"tags":["core"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/accept-invite":{"post":{"summary":"Accept a company invitation: create the company-admin account, consume the single-use token and sign in. [no auth scope]","operationId":"postRidercompaniesAcceptinvite","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model62"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/delete-account":{"post":{"summary":"Verify OTP and soft-delete account. [no auth scope]","operationId":"postUsersDeleteaccount","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model63"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/register":{"post":{"summary":"User register and request otp. [no auth scope]","operationId":"postUsersRegister","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model64"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/request-delete-otp":{"post":{"summary":"Request OTP for account deletion. [no auth scope]","operationId":"postUsersRequestdeleteotp","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model65"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/request-login-otp":{"post":{"summary":"User request otp. [no auth scope]","operationId":"postUsersRequestloginotp","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model66"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/test-notification":{"post":{"summary":"User request otp. [no auth scope]","operationId":"postUsersTestnotification","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model67"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/test-notification-flexible":{"post":{"summary":"Flexible test notification endpoint supporting all user types and data fields. [no auth scope]","operationId":"postUsersTestnotificationflexible","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model68"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/test-sms":{"post":{"summary":"Send a test SMS to a phone number. [no auth scope]","operationId":"postUsersTestsms","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model69"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/verify-login-otp":{"post":{"summary":"User verify otp. [no auth scope]","operationId":"postUsersVerifyloginotp","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model70"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/addresses/admin/create":{"post":{"summary":"Creates an address. [admin scope]","operationId":"postAddressesAdminCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model71"}}],"tags":["addresses"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/addresses/customer/create":{"post":{"summary":"Creates an address. [customer scope]","operationId":"postAddressesCustomerCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model72"}}],"tags":["addresses"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/driver/scan-iban":{"post":{"summary":"Extract a Saudi IBAN from an uploaded image. Read-only — returns a suggestion, saves nothing. [driver scope]","operationId":"postBankbeneficiariesDriverScaniban","tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/rider-company/submit":{"post":{"summary":"Submit or replace the company bank beneficiary. Replacing verified details locks payouts until re-verification (§6.1). [rider-company scope, bank:manage]","operationId":"postBankbeneficiariesRidercompanySubmit","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model73"}}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/banners/admin/create":{"post":{"summary":"Create a homepage marketing banner. [admin scope]","operationId":"postBannersAdminCreate","description":"Images are uploaded first through `GET /api/core/upload` (signed R2 URL, PUT the raw bytes, then send the returned publicUrl as image.original). There is no upload endpoint here. A new banner is inactive until explicitly activated.","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model74"}}],"tags":["banners"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/add-to-cart":{"post":{"summary":"add to cart. [CUSTOMER scope]","operationId":"postCartsCustomerAddtocart","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model75"}}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/apply-coupon":{"post":{"summary":"Apply a discount coupon to the cart. [CUSTOMER scope]","operationId":"postCartsCustomerApplycoupon","description":"Works for both public and private coupons — a private one is simply never listed, so the customer has to know the code. On success the cart is repriced and returned with the coupon attached. The coupon is revalidated on every subsequent reprice and is dropped silently if it stops qualifying, so clients must read `cart.coupon` from each response rather than assuming it sticks. Call /sync afterwards to mint a payment session for the new total.","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model76"}}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/calculate":{"post":{"summary":"Recalculate cart totals and delivery fees without creating a payment. [CUSTOMER scope]","operationId":"postCartsCustomerCalculate","description":"Call this while the customer is reviewing the checkout page — on open, and whenever the address, items or notes change. It performs exactly the same calculation as /sync but never mints a payment session. Once a checkoutId has been minted via /sync it must NOT be called again: repricing a cart the customer is about to pay for makes the captured amount disagree with the cart total, and checkout then fails after the money has been taken. Call /sync with hyperpayPaymentMethod as the last request before opening the payment sheet.","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model78"}}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/remove-from-cart":{"post":{"summary":"remove from cart. [CUSTOMER scope]","operationId":"postCartsCustomerRemovefromcart","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model79"}}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/save-payment":{"post":{"summary":"Save customer cart. [CUSTOMER scope]","operationId":"postCartsCustomerSavepayment","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model80"}}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/sync":{"post":{"summary":"Sync customer cart. [CUSTOMER scope]","operationId":"postCartsCustomerSync","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model82"}}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/admin/create":{"post":{"summary":"Creates a category. [admin scope]","operationId":"postCategoriesAdminCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model83"}}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-payout-requests/rider-company/create":{"post":{"summary":"Request a payout of cleared balance (omit amount for the full available balance). Validates beneficiary, contract, lock, minimum and balance. [rider-company scope]","operationId":"postCompanypayoutrequestsRidercompanyCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model84"}}],"tags":["company-payout-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/admin/create":{"post":{"summary":"Creates a discount coupon. [admin scope]","operationId":"postCouponsAdminCreate","description":"An empty or omitted `usersIds` makes the coupon available to every customer; a non-empty one restricts it to exactly those customers. `isVisible: false` keeps the coupon off the customer-facing list so it can only be redeemed by typing the code.","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model85"}}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/coupons/admin/create-bulk":{"post":{"summary":"Generates a batch of discount coupons. [admin scope]","operationId":"postCouponsAdminCreatebulk","description":"Creates `batch.count` individual coupons that share one configuration and one batchId. Codes are generated as prefix + zero-padded sequence + 4 random characters, e.g. ACME001K7X4 — the padding width follows the batch size so every code is the same length. Each code is an ordinary coupon and carries the usage limits in its own right.","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model86"}}],"tags":["coupons"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/admin/bulk-approve":{"post":{"summary":"Approve multiple submitted rider profiles at once (low-risk batches, §9). Every approval is individually audited. [admin scope]","operationId":"postDriverregistrationrequestsAdminBulkapprove","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model87"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/bulk-import":{"post":{"summary":"Bulk-import rider profiles as drafts with row-level validation and duplicate detection (§2.2). Documents are attached afterwards; a rider stays incomplete until mandatory files exist. [rider-company scope]","operationId":"postDriverregistrationrequestsRidercompanyBulkimport","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model89"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/create":{"post":{"summary":"Create a rider profile as a draft. \"Added\" is not \"approved\" — the company submits, Rwiqha verifies (§2.2). [rider-company scope]","operationId":"postDriverregistrationrequestsRidercompanyCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model90"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/admin/import-payments":{"post":{"summary":"Upload a filled export sheet to record driver payments in bulk [admin scope]","operationId":"postDriverwalletsAdminImportpayments","tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/admin/pay-bulk":{"post":{"summary":"Pay the full outstanding balance of several drivers at once [admin scope]","operationId":"postDriverwalletsAdminPaybulk","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model91"}}],"tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/internal/cron/auto-reject-expired-purchase-orders":{"post":{"summary":"Cloud Scheduler trigger: auto-reject expired pending purchase orders.","operationId":"postInternalCronAutorejectexpiredpurchaseorders","tags":["internal"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/internal/cron/close-payout-cycle":{"post":{"summary":"Cloud Scheduler trigger: close the payout cycle and send store payouts to the admin for approval.","operationId":"postInternalCronClosepayoutcycle","parameters":[{"type":"boolean","default":false,"name":"force","in":"query"}],"tags":["internal"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/internal/cron/mark-inactive-drivers-offline":{"post":{"summary":"Cloud Scheduler trigger: mark drivers with a stale location offline.","operationId":"postInternalCronMarkinactivedriversoffline","tags":["internal"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/internal/cron/release-expired-stock":{"post":{"summary":"Cloud Scheduler trigger: release expired stock reservations.","operationId":"postInternalCronReleaseexpiredstock","tags":["internal"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/internal/cron/sweep-waiting-parcels":{"post":{"summary":"Cloud Scheduler trigger: re-dispatch parcels still waiting for a rider.","operationId":"postInternalCronSweepwaitingparcels","tags":["internal"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/notification-subscribers/customer/live-activity-token":{"post":{"summary":"Register iOS Live Activity push tokens (push-to-start + per-activity). [CUSTOMER scope]","operationId":"postNotificationsubscribersCustomerLiveactivitytoken","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model92"}}],"tags":["notification-subscribers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/notification-subscribers/customer/set-token":{"post":{"summary":"register notification subscription. [CUSTOMER scope]","operationId":"postNotificationsubscribersCustomerSettoken","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model93"}}],"tags":["notification-subscribers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/notification-subscribers/driver/set-token":{"post":{"summary":"register notification subscription. [DRIVER scope]","operationId":"postNotificationsubscribersDriverSettoken","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model94"}}],"tags":["notification-subscribers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/notification-subscribers/store-owner/set-token":{"post":{"summary":"register notification subscription. [STORE_OWNER scope]","operationId":"postNotificationsubscribersStoreownerSettoken","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model95"}}],"tags":["notification-subscribers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/create":{"post":{"summary":"Creates an offer. [admin scope]","operationId":"postOffersAdminCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model96"}}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/import":{"post":{"summary":"Upload an edited pricing sheet to update stock and status in bulk, across any store. Rows carrying a price are rejected: sellers own their prices. [admin scope]","operationId":"postOffersAdminImport","tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/store-owner/create":{"post":{"summary":"Creates an offer. [store owner scope]","operationId":"postOffersStoreownerCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model97"}}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/store-owner/import":{"post":{"summary":"Upload an edited pricing sheet to update prices and stock in bulk. Rows are matched on offerId and fail individually. [store-owner scope]","operationId":"postOffersStoreownerImport","tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/create":{"post":{"summary":"add order. [admin scope]","operationId":"postOrdersAdminCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model99"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcel-incidents/driver/create":{"post":{"summary":"Create a parcel incident. [driver scope]","operationId":"postParcelincidentsDriverCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model100"}}],"tags":["parcel-incidents"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/admin/create":{"post":{"summary":"add parcel. [admin scope]","operationId":"postParcelsAdminCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model101"}}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/partner-cases/rider-company/create":{"post":{"summary":"Open an escalation case to Rwiqha (rider transfer, order issue, payout/settlement dispute). Order references only - never customer data. [rider-company scope]","operationId":"postPartnercasesRidercompanyCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model103"}}],"tags":["partner-cases"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payouts/admin/close-cycle":{"post":{"summary":"Close the payout cycle now, without waiting for the next scheduled boundary [admin scope]","operationId":"postPayoutsAdminClosecycle","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model104"}}],"tags":["payouts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/create":{"post":{"summary":"Creates a product. [admin scope]","operationId":"postProductsAdminCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model105"}}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/store-owner/create":{"post":{"summary":"Creates a product. [store owner scope]","operationId":"postProductsStoreownerCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model106"}}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/create-and-invite":{"post":{"summary":"Create a rider company record and email a single-use invitation to its authorized representative [admin scope]","operationId":"postRidercompaniesAdminCreateandinvite","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model107"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/service-zones/admin/create":{"post":{"summary":"Create a service zone (named GeoJSON polygon inside a city) [admin scope]","operationId":"postServicezonesAdminCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model110"}}],"tags":["service-zones"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/create":{"post":{"summary":"Creates a store. [admin scope]","operationId":"postStoresAdminCreate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model111"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/create-store":{"post":{"summary":"create store. [STORE_OWNER scope]","operationId":"postStoresStoreownerCreatestore","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model112"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/assign-roles":{"post":{"operationId":"postUsersAdminAssignroles","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model114"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/assign-store":{"post":{"operationId":"postUsersAdminAssignstore","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model115"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/create-user":{"post":{"operationId":"postUsersAdminCreateuser","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model117"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/request-login-otp":{"post":{"summary":"Admin request otp. [no auth scope]","operationId":"postUsersAdminRequestloginotp","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model118"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/customer/request-login-otp":{"post":{"summary":"Customer request otp. [no auth scope]","operationId":"postUsersCustomerRequestloginotp","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model119"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/driver/request-login-otp":{"post":{"summary":"User request otp. Tells an unregistered driver to register instead. [no auth scope]","operationId":"postUsersDriverRequestloginotp","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model120"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/rider-company/login":{"post":{"summary":"Rider-company panel login with email + password. Scope resolves to admin or staff from the account roles. [no auth scope]","operationId":"postUsersRidercompanyLogin","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model121"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/login":{"post":{"operationId":"postUsersStoreownerLogin","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model124"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/register":{"post":{"operationId":"postUsersStoreownerRegister","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model127"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/request-login-otp":{"post":{"summary":"Store owner request otp. [no auth scope]","operationId":"postUsersStoreownerRequestloginotp","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model128"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/invoices/preview":{"post":{"summary":"Generate a preview of invoice settings","operationId":"postAdminSettingsInvoicesPreview","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model129"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca/generate-certificate":{"post":{"summary":"Generate ZATCA certificate request using OTP","operationId":"postAdminSettingsZatcaGeneratecertificate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model130"}}],"tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/admin/settings/zatca/run-compliance-test":{"post":{"summary":"Run comprehensive ZATCA compliance tests for simulation device registration","operationId":"postAdminSettingsZatcaRuncompliancetest","tags":["admin"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/bank-beneficiaries/admin/{beneficiaryId}/{action}":{"post":{"summary":"Verify or reject a bank beneficiary. Verifying makes it the payout-executing beneficiary and lifts the payout lock (§6.1). [admin scope]","operationId":"postBankbeneficiariesAdminBeneficiaryidAction","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"beneficiaryId","in":"path","required":true},{"type":"string","enum":["verify","reject"],"x-convert":{"trim":true},"name":"action","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model131"}}],"tags":["bank-beneficiaries"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-payout-requests/admin/{requestId}/{action}":{"post":{"summary":"Finance workflow: review / approve / process / paid (payment reference required) / reject / fail. Reject/fail return the amount to available. [admin scope]","operationId":"postCompanypayoutrequestsAdminRequestidAction","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true},{"type":"string","enum":["review","approve","process","paid","reject","fail"],"x-convert":{"trim":true},"name":"action","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model132"}}],"tags":["company-payout-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-payout-requests/rider-company/{requestId}/cancel":{"post":{"summary":"Cancel a payout request before Rwiqha approves it; the amount returns to available. [rider-company scope]","operationId":"postCompanypayoutrequestsRidercompanyRequestidCancel","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model133"}}],"tags":["company-payout-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/company-wallets/admin/{companyId}/adjust":{"post":{"summary":"Apply a signed adjustment to a company wallet (positive = bonus, negative = deduction). Reason + reference required. [admin scope]","operationId":"postCompanywalletsAdminCompanyidAdjust","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model134"}}],"tags":["company-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/admin/{requestId}/{action}":{"post":{"summary":"Suspend or unsuspend a rider (platform authority). [admin scope]","operationId":"postDriverregistrationrequestsAdminRequestidAction","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true},{"type":"string","enum":["suspend","unsuspend"],"x-convert":{"trim":true},"name":"action","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model135"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/admin/{requestId}/request-correction":{"post":{"summary":"Return a rider profile with field-level correction requests (§2.2 \"Needs Correction\"). [admin scope]","operationId":"postDriverregistrationrequestsAdminRequestidRequestcorrection","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model137"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/driver/{requestId}/documents":{"post":{"summary":"Add or replace a document on the rider's own registration request. Takes the public URL of a file already uploaded via GET /api/core/upload, not the file itself. [driver scope]","operationId":"postDriverregistrationrequestsDriverRequestidDocuments","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model138"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/{profileId}/{action}":{"post":{"summary":"Temporarily deactivate or reactivate a company rider. Companies can only lift their own suspensions. [rider-company scope]","operationId":"postDriverregistrationrequestsRidercompanyProfileidAction","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"profileId","in":"path","required":true},{"type":"string","enum":["deactivate","reactivate"],"x-convert":{"trim":true},"name":"action","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model139"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/{profileId}/documents":{"post":{"summary":"Add or replace a rider document. On an approved profile the new file goes to pending-verification (§5.3). [rider-company scope]","operationId":"postDriverregistrationrequestsRidercompanyProfileidDocuments","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"profileId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model140"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/{profileId}/submit":{"post":{"summary":"Submit a rider profile for Rwiqha review. Validates mandatory fields and documents (§2.2). [rider-company scope]","operationId":"postDriverregistrationrequestsRidercompanyProfileidSubmit","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"profileId","in":"path","required":true}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-wallets/admin/{driverId}/pay":{"post":{"summary":"Record a payment to a driver (full or partial) [admin scope]","operationId":"postDriverwalletsAdminDriveridPay","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"driverId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model141"}}],"tags":["driver-wallets"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/force-status":{"post":{"summary":"Force an order, its purchase order and its parcel to a given state. [admin scope]","operationId":"postOrdersAdminOrderidForcestatus","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model142"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/nudge-driver":{"post":{"summary":"Send the assigned rider a push notification about a late order. [admin scope]","operationId":"postOrdersAdminOrderidNudgedriver","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model143"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/cancel":{"post":{"summary":"Cancel an order with refund and stock restoration. [admin scope]","operationId":"postOrdersAdminOrderidCancel","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model144"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/admin/{orderId}/note":{"post":{"summary":"Append an operations note to an order. [admin scope]","operationId":"postOrdersAdminOrderidNote","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model145"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/orders/customer/cancel/{orderId}":{"post":{"summary":"Cancel order by customer. Includes payment refund and ZATCA invoice cancellation if applicable. [CUSTOMER scope]","operationId":"postOrdersCustomerCancelOrderid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"orderId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model146"}}],"tags":["orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/admin/{parcelId}/note":{"post":{"summary":"Append an operations note to a parcel. [admin scope]","operationId":"postParcelsAdminParcelidNote","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"parcelId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model147"}}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/parcels/driver/test-notification/{userId}":{"post":{"summary":"Test endpoint to send parcel notification to specific driver","operationId":"postParcelsDriverTestnotificationUserid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"userId","in":"path","required":true}],"tags":["parcels"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/partner-cases/admin/{caseId}/{action}":{"post":{"summary":"Reply to, take, resolve or reject a partner case. [admin scope]","operationId":"postPartnercasesAdminCaseidAction","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"caseId","in":"path","required":true},{"type":"string","enum":["reply","take","resolve","reject"],"x-convert":{"trim":true},"name":"action","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model148"}}],"tags":["partner-cases"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/partner-cases/rider-company/{caseId}/reply":{"post":{"summary":"Add a message to an open case thread. [rider-company scope]","operationId":"postPartnercasesRidercompanyCaseidReply","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"caseId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model149"}}],"tags":["partner-cases"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/store-owner/{purchaseOrderId}/accept":{"post":{"summary":"update order status. [store-owner scope]","operationId":"postPurchaseordersStoreownerPurchaseorderidAccept","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"purchaseOrderId","in":"path","required":true}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/purchase-orders/store-owner/{purchaseOrderId}/unread":{"post":{"summary":"update order status. [store-owner scope]","operationId":"postPurchaseordersStoreownerPurchaseorderidUnread","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"purchaseOrderId","in":"path","required":true}],"tags":["purchase-orders"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/{companyId}/resend-invite":{"post":{"summary":"Re-issue the company invitation (invalidates the previous link). Optionally to a different email [admin scope]","operationId":"postRidercompaniesAdminCompanyidResendinvite","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model150"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-exceptions/admin/{exceptionId}/resolve":{"post":{"summary":"Manually resolve a rider exception (§5 \"Closure\" — manual close where intervention was required). [admin scope]","operationId":"postRiderexceptionsAdminExceptionidResolve","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"exceptionId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model151"}}],"tags":["rider-exceptions"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-exceptions/rider-company/{exceptionId}/{action}":{"post":{"summary":"Acknowledge, annotate or escalate a rider exception. [rider-company scope]","operationId":"postRiderexceptionsRidercompanyExceptionidAction","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"exceptionId","in":"path","required":true},{"type":"string","enum":["acknowledge","add-note","escalate"],"x-convert":{"trim":true},"name":"action","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model152"}}],"tags":["rider-exceptions"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/driver/location/update":{"post":{"summary":"Update driver location and broadcast to tracking clients","operationId":"postUsersDriverLocationUpdate","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model153"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/stores/select":{"post":{"summary":"Select the active store for a multi-store owner. Returns a fresh JWT bound to that storeId. [store-owner scope]","operationId":"postUsersStoreownerStoresSelect","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model154"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/zatca/invoices/{invoiceId}/send-email":{"post":{"summary":"Send or resend ZATCA invoice email with PDF attachment","operationId":"postZatcaInvoicesInvoiceidSendemail","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model155"}}],"tags":["zatca"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/zatca/invoices/{invoiceId}/regenerate-pdf":{"post":{"summary":"Regenerate ZATCA invoice PDF","operationId":"postZatcaInvoicesInvoiceidRegeneratepdf","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"invoiceId","in":"path","required":true}],"tags":["zatca"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/{companyId}/status/{action}":{"post":{"summary":"Suspend, reactivate or terminate a rider company [admin scope]","operationId":"postRidercompaniesAdminCompanyidStatusAction","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true},{"type":"string","enum":["suspend","reactivate","terminate"],"x-convert":{"trim":true},"name":"action","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model156"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/zatca/generate-certificate":{"post":{"summary":"Generate ZATCA certificate request for store using OTP","operationId":"postStoresAdminStoreidZatcaGeneratecertificate","parameters":[{"type":"string","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model157"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/banners/admin/reorder":{"patch":{"summary":"Set the display order of homepage banners in one atomic write. [admin scope]","operationId":"patchBannersAdminReorder","description":"Send the full intended order. Applied as a single bulkWrite so the customer list is never observed mid-reorder, and the public cache is busted on completion.","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model161"}}],"tags":["banners"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/rider-company/{profileId}":{"patch":{"summary":"Edit a rider profile while it is a draft or returned for correction (§2.2). [rider-company scope]","operationId":"patchDriverregistrationrequestsRidercompanyProfileid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"profileId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model162"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/{companyId}":{"patch":{"summary":"Update a rider company profile, operating zones, capacity and settlement config [admin scope]","operationId":"patchRidercompaniesAdminCompanyid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model164"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/rider-company/profile":{"patch":{"summary":"Update the company business profile (legal data, contacts). Company-admin only [rider-company scope]","operationId":"patchRidercompaniesRidercompanyProfile","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model166"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/service-zones/admin/{zoneId}":{"patch":{"summary":"Update a service zone (name, city, polygon, active flag) [admin scope]","operationId":"patchServicezonesAdminZoneid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"zoneId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model169"}}],"tags":["service-zones"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/store-owner/activation":{"patch":{"summary":"Activate or deactivate store. [STORE-OWNER scope]","operationId":"patchStoresStoreownerActivation","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model170"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/admin/{requestId}/review-document":{"patch":{"summary":"Approve or reject a rider document. Approving a re-uploaded document on an expired-docs profile restores rider eligibility without recreating the profile (§5.3). [admin scope]","operationId":"patchDriverregistrationrequestsAdminRequestidReviewdocument","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model171"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/driver-registration-requests/admin/{requestId}/review":{"patch":{"summary":"Accept or reject a driver registration request. Accepting activates the driver. [admin scope]","operationId":"patchDriverregistrationrequestsAdminRequestidReview","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"requestId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model172"}}],"tags":["driver-registration-requests"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/bulk/status":{"patch":{"summary":"Activate or deactivate products. [admin scope]","operationId":"patchProductsAdminBulkStatus","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model173"}}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/{productId}/deactivate":{"patch":{"summary":"Deactivate a product. [admin scope]","operationId":"patchProductsAdminProductidDeactivate","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"productId","in":"path","required":true}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/{productId}/activate":{"patch":{"summary":"Activate a product. [admin scope]","operationId":"patchProductsAdminProductidActivate","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"productId","in":"path","required":true}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/{companyId}/review-legal-document":{"patch":{"summary":"Approve or reject an uploaded company legal document (CR / VAT / contract copy) [admin scope]","operationId":"patchRidercompaniesAdminCompanyidReviewlegaldocument","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model174"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/rider-companies/admin/{companyId}/contract":{"patch":{"summary":"Update a rider company contract status and dates. Only an Active contract allows rider activation [admin scope]","operationId":"patchRidercompaniesAdminCompanyidContract","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"companyId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model175"}}],"tags":["rider-companies"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/activation":{"patch":{"summary":"Launch (activate) or deactivate a store. Activation requires approved CR + VAT documents. [admin scope]","operationId":"patchStoresAdminStoreidActivation","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model176"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/rider-company/staff/{staffId}":{"patch":{"summary":"Update a staff member's name, permissions (or preset) or active flag. Company-admin only [rider-company scope]","operationId":"patchUsersRidercompanyStaffStaffid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"staffId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model178"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"delete":{"summary":"Remove a staff member from the company: unbind the tenant and drop the staff role. The underlying account (customer/driver roles) survives. Company-admin only [rider-company scope]","operationId":"deleteUsersRidercompanyStaffStaffid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"staffId","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/operators/{operatorId}":{"patch":{"summary":"Activate or deactivate an operator (staff) of the caller's store. [store owner scope]","operationId":"patchUsersStoreownerOperatorsOperatorid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"operatorId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model179"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"delete":{"summary":"Soft-delete an operator (staff) of the caller's store. [store owner scope]","operationId":"deleteUsersStoreownerOperatorsOperatorid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"operatorId","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payments/customer/saved-cards/{cardId}/set-default":{"patch":{"summary":"Make one of the customer's saved cards the default. [CUSTOMER scope]","operationId":"patchPaymentsCustomerSavedcardsCardidSetdefault","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"cardId","in":"path","required":true}],"tags":["payments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/users/{userId}/phone":{"patch":{"summary":"Change a user's mobile number (store owner, operator, or the admin's own). [admin scope]","operationId":"patchUsersAdminUsersUseridPhone","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"userId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model180"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/store-owner/operators/{operatorId}/permissions":{"patch":{"summary":"Replace the granted permissions of an operator of the caller's store. [store owner scope]","operationId":"patchUsersStoreownerOperatorsOperatoridPermissions","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"operatorId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model182"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/legal-documents/{type}/review":{"patch":{"summary":"Approve or reject a store legal document. Rejecting auto-deactivates the store. [admin scope]","operationId":"patchStoresAdminStoreidLegaldocumentsTypeReview","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"type":"string","enum":["CR","VAT"],"x-convert":{"trim":true},"name":"type","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model183"}}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/stores/{storeId}/operators/{operatorId}":{"patch":{"summary":"Activate or deactivate a store operator. [admin scope]","operationId":"patchUsersAdminStoresStoreidOperatorsOperatorid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"operatorId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model184"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}},"delete":{"summary":"Soft-delete a store operator. [admin scope]","operationId":"deleteUsersAdminStoresStoreidOperatorsOperatorid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"operatorId","in":"path","required":true}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/users/admin/stores/{storeId}/operators/{operatorId}/permissions":{"patch":{"summary":"Replace the granted permissions of a store operator. [admin scope]","operationId":"patchUsersAdminStoresStoreidOperatorsOperatoridPermissions","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true},{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"operatorId","in":"path","required":true},{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model186"}}],"tags":["users"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/carts/customer/remove-coupon":{"delete":{"summary":"Remove the applied discount coupon from the cart. [CUSTOMER scope]","operationId":"deleteCartsCustomerRemovecoupon","description":"Reprices the cart at full price and returns it with `coupon: null`. Call /sync afterwards so the payment session is minted for the restored total.","parameters":[{"in":"body","name":"body","schema":{"$ref":"#/definitions/Model188"}}],"tags":["carts"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/categories/admin/{categoryId}":{"delete":{"summary":"delete category. [admin scope]","operationId":"deleteCategoriesAdminCategoryid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"categoryId","in":"path","required":true}],"tags":["categories"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/admin/{offerId}":{"delete":{"summary":"delete offer. [admin scope]","operationId":"deleteOffersAdminOfferid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"offerId","in":"path","required":true}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/offers/store-owner/{offerId}":{"delete":{"summary":"delete offer. [STORE OWNER scope]","operationId":"deleteOffersStoreownerOfferid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"offerId","in":"path","required":true}],"tags":["offers"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/products/admin/{productId}":{"delete":{"summary":"delete product. [admin scope]","operationId":"deleteProductsAdminProductid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"productId","in":"path","required":true}],"tags":["products"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}":{"delete":{"summary":"delete store. [admin scope]","operationId":"deleteStoresAdminStoreid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"storeId","in":"path","required":true}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/addresses/admin/delete/{addressId}":{"delete":{"summary":"Deletes a user address. [admin scope]","operationId":"deleteAddressesAdminDeleteAddressid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"addressId","in":"path","required":true}],"tags":["addresses"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/addresses/customer/delete/{addressId}":{"delete":{"summary":"Deletes a customer address. [customer scope]","operationId":"deleteAddressesCustomerDeleteAddressid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"addressId","in":"path","required":true}],"tags":["addresses"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/payments/customer/saved-cards/{cardId}":{"delete":{"summary":"Remove one of the customer's saved cards, revoking its gateway token. [CUSTOMER scope]","operationId":"deletePaymentsCustomerSavedcardsCardid","parameters":[{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true},"name":"cardId","in":"path","required":true}],"tags":["payments"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}},"/stores/admin/{storeId}/zatca/certificate":{"delete":{"summary":"Delete store ZATCA certificate","operationId":"deleteStoresAdminStoreidZatcaCertificate","parameters":[{"type":"string","x-convert":{"trim":true},"name":"storeId","in":"path","required":true}],"tags":["stores"],"responses":{"default":{"schema":{"type":"string"},"description":"Successful"}}}}},"definitions":{"Model1":{"type":"object","properties":{"legalName":{"type":"string","minLength":2,"maxLength":200,"x-convert":{"trim":true}},"iban":{"type":"string","maxLength":40,"x-convert":{"trim":true}},"proofFileUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"proofFileName":{"type":"string","maxLength":200,"x-convert":{"trim":true}}},"required":["legalName","iban"]},"Model2":{"type":"object","properties":{"token":{"type":"string"},"subscription":{"type":"string"},"deviceId":{"type":"string","x-convert":{"trim":true}}}},"status":{"type":"string","enum":["busy","available","offline"],"x-convert":{"trim":true}},"Model3":{"type":"object","properties":{"status":{"$ref":"#/definitions/status"}},"required":["status"]},"gender":{"type":"string","enum":["male","female"],"x-convert":{"trim":true}},"user":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":50,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"trim":true}},"phone":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"birthDate":{"type":"string","format":"date"},"gender":{"$ref":"#/definitions/gender"}},"required":["name"]},"Model4":{"type":"object","properties":{"user":{"$ref":"#/definitions/user"}},"required":["user"]},"language":{"type":"string","enum":["ar","en"],"x-convert":{"trim":true}},"theme":{"type":"string","enum":["light","dark"],"x-convert":{"trim":true}},"numberFormat":{"type":"string","enum":["arabic","english"],"x-convert":{"trim":true}},"Model5":{"type":"object","properties":{"language":{"$ref":"#/definitions/language"},"theme":{"$ref":"#/definitions/theme"},"timezone":{"type":"string","x-convert":{"trim":true}},"dateFormat":{"type":"string","x-convert":{"trim":true}},"itemsPerPage":{"type":"string","x-convert":{"trim":true}},"numberFormat":{"$ref":"#/definitions/numberFormat"},"enableAnimations":{"type":"boolean"},"autoTheme":{"type":"boolean"},"emailNotifications":{"type":"boolean"},"browserNotifications":{"type":"boolean"},"soundNotifications":{"type":"boolean"}},"required":["language","theme","timezone"]},"invoiceFormat":{"type":"string","enum":["pdf","docx","html"],"x-convert":{"trim":true}},"invoiceTemplate":{"type":"string","enum":["modern","classic","minimal"],"x-convert":{"trim":true}},"Model6":{"type":"object","properties":{"invoiceFormat":{"$ref":"#/definitions/invoiceFormat"},"invoiceTemplate":{"$ref":"#/definitions/invoiceTemplate"},"invoicePrefix":{"type":"string","pattern":"^[A-Z0-9-]+$","x-convert":{"trim":true}},"nextInvoiceNumber":{"type":"number","minimum":1},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatExempt":{"type":"boolean"},"showVatDetails":{"type":"boolean"},"vatIncluded":{"type":"boolean"},"autoSubmit":{"type":"boolean"},"generateQRCode":{"type":"boolean"},"validateInvoices":{"type":"boolean"},"submitTimeout":{"type":"number","minimum":5,"maximum":180},"retryAttempts":{"type":"number","minimum":1,"maximum":10},"emailInvoices":{"type":"boolean"},"archiveInvoices":{"type":"boolean"},"dailyBackup":{"type":"boolean"},"retentionPeriod":{"type":"number","minimum":1,"maximum":50},"monthlyInvoiceLimit":{"type":"number","minimum":1,"maximum":100000}},"required":["invoiceFormat","invoiceTemplate","invoicePrefix","nextInvoiceNumber","vatRate","vatExempt","showVatDetails","vatIncluded","autoSubmit","generateQRCode","validateInvoices","submitTimeout","retryAttempts","emailInvoices","archiveInvoices","dailyBackup","retentionPeriod","monthlyInvoiceLimit"]},"Model7":{"type":"object","properties":{"emailNotifications":{"type":"boolean"},"smsNotifications":{"type":"boolean"},"pushNotifications":{"type":"boolean"},"invoiceNotifications":{"type":"boolean"},"systemNotifications":{"type":"boolean"},"notificationTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$","x-convert":{"trim":true}}},"required":["emailNotifications","smsNotifications","pushNotifications","invoiceNotifications","systemNotifications","notificationTime"]},"discountType":{"type":"string","enum":["percentage","fixed"],"x-convert":{"trim":true}},"Model8":{"type":"object","properties":{"enabled":{"type":"boolean"},"codePrefix":{"type":"string","pattern":"^[A-Z0-9]{2,8}$","x-convert":{"case":"upper","trim":true}},"discountType":{"$ref":"#/definitions/discountType"},"discountValue":{"type":"number"},"maxDiscountAmount":{"type":"number","x-constraint":{"greater":0}},"minOrderAmount":{"type":"number","x-constraint":{"greater":0}},"perUserUsageLimit":{"type":"integer","x-constraint":{"greater":0}},"totalUsageLimit":{"type":"integer","x-constraint":{"greater":0}},"firstOrderOnly":{"type":"boolean","default":false}},"required":["enabled","codePrefix","discountType","discountValue"]},"Model9":{"type":"object","properties":{"cycleDays":{"type":"integer","minimum":1,"maximum":90},"cycleAnchor":{"type":"string","format":"date-time"},"minPayoutAmount":{"type":"number","minimum":0}},"required":["cycleDays","cycleAnchor","minPayoutAmount"]},"Model10":{"type":"object","properties":{"firstOrderFreeDelivery":{"type":"boolean"}},"required":["firstOrderFreeDelivery"]},"docExpiryReminderDays":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"integer","minimum":1,"maximum":365}},"Model11":{"type":"object","properties":{"offerTimeoutSeconds":{"type":"integer","minimum":15,"maximum":600},"waveSize":{"type":"integer","minimum":1,"maximum":20},"staleLocationMinutes":{"type":"integer","minimum":1,"maximum":120},"consecutiveRejectionThreshold":{"type":"integer","minimum":1,"maximum":50},"rejectionWindowMinutes":{"type":"integer","minimum":5,"maximum":1440},"stalledAcceptedMinutes":{"type":"integer","minimum":5,"maximum":1440},"stalledPickedUpMinutes":{"type":"integer","minimum":5,"maximum":1440},"docExpiryReminderDays":{"$ref":"#/definitions/docExpiryReminderDays"}}},"passwordPolicy":{"type":"string","enum":["basic","medium","strong"],"x-convert":{"trim":true}},"Model12":{"type":"object","properties":{"twoFactorAuth":{"type":"boolean"},"sessionTimeout":{"type":"number","minimum":1,"maximum":1440},"passwordPolicy":{"$ref":"#/definitions/passwordPolicy"},"loginAttempts":{"type":"number","minimum":1,"maximum":10},"ipWhitelist":{"type":"boolean"},"auditLog":{"type":"boolean"}},"required":["twoFactorAuth","sessionTimeout","passwordPolicy","loginAttempts","ipWhitelist","auditLog"]},"version":{"type":"string","enum":["V1","V2"]},"businessAddress":{"type":"object","properties":{"additionalNumber":{"type":"string"},"streetName":{"type":"string"},"buildingNumber":{"type":"string"},"plotIdentification":{"type":"string"},"cityName":{"type":"string"},"postalZone":{"type":"string"},"countryCode":{"type":"string","default":"SA"},"district":{"type":"string"}},"required":["streetName","buildingNumber","cityName","postalZone"]},"identityType":{"type":"string","enum":["CRN","MOM","MLS","700","SAG","NAT","GCC","IQA","PAS","OTH"]},"businessIdentity":{"type":"object","properties":{"identityType":{"$ref":"#/definitions/identityType"},"identityNumber":{"type":"string"}},"required":["identityType","identityNumber"]},"invoiceType":{"type":"string","enum":["TAX_INVOICE","STANDARD","SIMPLIFIED"]},"Model13":{"type":"object","properties":{"version":{"$ref":"#/definitions/version"},"vatNumber":{"type":"string","minLength":15},"vatRegistrationDate":{"type":"string","x-format":{"isoDate":true}},"organizationUnitName":{"type":"string"},"organizationName":{"type":"string"},"businessCategory":{"type":"string"},"industryCode":{"type":"string"},"businessName":{"type":"string"},"businessAddress":{"$ref":"#/definitions/businessAddress"},"businessIdentity":{"$ref":"#/definitions/businessIdentity"},"isProductionEnabled":{"type":"boolean","default":false},"countryName":{"type":"string"},"invoiceType":{"$ref":"#/definitions/invoiceType"},"location":{"type":"string"},"industry":{"type":"string"}},"required":["version","vatNumber","vatRegistrationDate","businessCategory","industryCode","businessName","businessAddress","businessIdentity"]},"image":{"type":"object","properties":{"original":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"thumbnail":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}}},"required":["original"]},"altText":{"type":"object","properties":{"en":{"type":"string","default":"","x-convert":{"trim":true}},"ar":{"type":"string","default":"","x-convert":{"trim":true}}}},"Model14":{"type":"object","properties":{"image":{"$ref":"#/definitions/image"},"altText":{"$ref":"#/definitions/altText"},"sortOrder":{"type":"integer","default":0,"minimum":0},"isActive":{"type":"boolean","default":false},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"link":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}}}},"Model15":{"type":"object","properties":{"pushNotificationId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}}},"Model16":{"type":"object","properties":{"pushNotificationId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}}},"Model17":{"type":"object","properties":{"pushNotificationId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}}},"documentType":{"type":"string","enum":["cr","vat","contractCopy"],"x-convert":{"trim":true}},"Model18":{"type":"object","properties":{"documentType":{"$ref":"#/definitions/documentType"},"documentUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","x-convert":{"trim":true}}},"required":["documentType","documentUrl"]},"bankDetails":{"type":"object","properties":{"bankName":{"type":"string","x-convert":{"trim":true}},"iban":{"type":"string","pattern":"^SA\\d{22}$","x-convert":{"trim":true}},"swiftCode":{"type":"string","x-convert":{"trim":true}},"beneficiaryName":{"type":"string","x-convert":{"trim":true}}}},"Model19":{"type":"object","properties":{"bankDetails":{"$ref":"#/definitions/bankDetails"}},"required":["bankDetails"]},"type":{"type":"string","enum":["CR","VAT"],"x-convert":{"trim":true}},"Model20":{"type":"object","properties":{"type":{"$ref":"#/definitions/type"},"documentUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","x-convert":{"trim":true}}},"required":["type","documentUrl"]},"name":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}},"required":["ar","en"]},"location":{"type":"object","properties":{"longitude":{"type":"number","minimum":-180,"maximum":180},"latitude":{"type":"number","minimum":-90,"maximum":90}},"required":["longitude","latitude"]},"store":{"type":"object","properties":{"name":{"$ref":"#/definitions/name"},"location":{"$ref":"#/definitions/location"},"address":{"type":"string","x-convert":{"trim":true}},"phone":{"type":"string","x-convert":{"trim":true}}},"required":["name","address"]},"Model21":{"type":"object","properties":{"store":{"$ref":"#/definitions/store"}},"required":["store"]},"Model22":{"type":"object","properties":{"coverImageUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}}},"required":["coverImageUrl"]},"Model23":{"type":"object","properties":{"logoUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}}},"required":["logoUrl"]},"Model24":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"roles":{"type":"array","items":{"$ref":"#/definitions/Model24"}},"storeIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"user1":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":50,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"trim":true}},"phone":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"birthDate":{"type":"string","format":"date"},"gender":{"$ref":"#/definitions/gender"},"roles":{"$ref":"#/definitions/roles"},"isActive":{"type":"boolean"},"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"storeIds":{"$ref":"#/definitions/storeIds"},"password":{"type":"string","minLength":6,"maxLength":30,"x-convert":{"trim":true}}}},"Model25":{"type":"object","properties":{"user":{"$ref":"#/definitions/user1"},"reason":{"type":"string","minLength":3,"maxLength":500,"x-convert":{"trim":true}}},"required":["user"]},"location1":{"type":"object","properties":{"latitude":{"type":"number","minimum":-180,"maximum":180},"longitude":{"type":"number","minimum":-90,"maximum":90}},"required":["latitude","longitude"]},"formattedAddress":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}},"required":["ar"]},"Model26":{"type":"object","properties":{"name":{"type":"string","default":"Home","x-convert":{"trim":true}},"location":{"$ref":"#/definitions/location1"},"formattedAddress":{"$ref":"#/definitions/formattedAddress"},"streetAddress":{"type":"string","x-convert":{"trim":true}},"isLastSelectedAddress":{"type":"boolean"},"city":{"type":"string","x-convert":{"trim":true}},"state":{"type":"string","x-convert":{"trim":true}},"country":{"type":"string","x-convert":{"trim":true}},"zip":{"type":"string","x-convert":{"trim":true}},"address":{"type":"string","x-convert":{"trim":true}},"details":{"type":"string","x-convert":{"trim":true}},"isDefault":{"type":"boolean"}}},"location2":{"type":"object","properties":{"latitude":{"type":"number","minimum":-180,"maximum":180},"longitude":{"type":"number","minimum":-90,"maximum":90}},"required":["latitude","longitude"]},"Model27":{"type":"object","properties":{"name":{"type":"string","default":"Home","x-convert":{"trim":true}},"location":{"$ref":"#/definitions/location2"},"formattedAddress":{"$ref":"#/definitions/formattedAddress"},"streetAddress":{"type":"string","x-convert":{"trim":true}},"isLastSelectedAddress":{"type":"boolean"},"city":{"type":"string","x-convert":{"trim":true}},"state":{"type":"string","x-convert":{"trim":true}},"country":{"type":"string","x-convert":{"trim":true}},"zip":{"type":"string","x-convert":{"trim":true}},"address":{"type":"string","x-convert":{"trim":true}},"details":{"type":"string","x-convert":{"trim":true}},"isDefault":{"type":"boolean"}}},"status1":{"type":"string","enum":["PENDING","PAID","CANCELLED"],"x-convert":{"trim":true}},"Model28":{"type":"object","properties":{"status":{"$ref":"#/definitions/status1"},"notes":{"type":"string","x-convert":{"trim":true}}},"required":["status"]},"type1":{"type":"string","enum":["SIMULATION","PRODUCTION"]},"Model29":{"type":"object","properties":{"type":{"$ref":"#/definitions/type1"},"serialNumber":{"type":"string"},"certificateContent":{"type":"string"},"binarySecurityToken":{"type":"string"},"privateKey":{"type":"string"},"requestId":{"type":"string"},"apiSecret":{"type":"string"},"validUntil":{"type":"string","x-format":{"isoDate":true}}},"required":["type","serialNumber","certificateContent","binarySecurityToken","privateKey","requestId","apiSecret","validUntil"]},"businessCategory":{"type":"string","enum":["RETAIL_TRADE","WHOLESALE_TRADE","MANUFACTURING","SERVICES","CONSTRUCTION","AGRICULTURE","TECHNOLOGY","HEALTHCARE","EDUCATION","TRANSPORTATION","HOSPITALITY","FINANCE","REAL_ESTATE","OTHER"]},"industryCode":{"type":"string","enum":["47","46","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","41","42","43","49","50","51","52","53","55","56","58","59","60","61","62","63","64","65","66"]},"egsUnitInfo":{"type":"object","properties":{"customId":{"type":"string"},"model":{"type":"string"},"crnNumber":{"type":"string"},"branchName":{"type":"string"},"branchIndustry":{"type":"string"}}},"location3":{"type":"object","properties":{"city":{"type":"string"},"street":{"type":"string"},"building":{"type":"string"},"postalZone":{"type":"string"},"additionalNumber":{"type":"string"},"citySubdivisionName":{"type":"string"},"plotIdentification":{"type":"string"},"countryCode":{"type":"string"}}},"Model30":{"type":"object","properties":{"version":{"$ref":"#/definitions/version"},"vatNumber":{"type":"string","minLength":15},"vatRegistrationDate":{"type":"string","x-format":{"isoDate":true}},"businessCategory":{"$ref":"#/definitions/businessCategory"},"industryCode":{"$ref":"#/definitions/industryCode"},"businessName":{"type":"string"},"businessIdentity":{"$ref":"#/definitions/businessIdentity"},"egsUnitInfo":{"$ref":"#/definitions/egsUnitInfo"},"location":{"$ref":"#/definitions/location3"}},"required":["egsUnitInfo"]},"Model31":{"type":"object","properties":{"legalName":{"type":"string","minLength":2,"maxLength":200,"x-convert":{"trim":true}},"iban":{"type":"string","maxLength":40,"x-convert":{"trim":true}},"proofFileUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"proofFileName":{"type":"string","maxLength":200,"x-convert":{"trim":true}}},"required":["legalName","iban"]},"name1":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}},"required":["ar"]},"description":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}}},"type2":{"type":"string","enum":["percentage","fixed"],"x-convert":{"trim":true}},"margin":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"$ref":"#/definitions/type2"},"value":{"type":"number"}},"required":["enabled","type","value"]},"image1":{"type":"object","properties":{"original":{"type":"string","x-convert":{"trim":true}},"thumbnail":{"type":"string","x-convert":{"trim":true}},"__typename":{"type":"string","x-convert":{"trim":true}},"slug":{"type":"string","x-convert":{"trim":true}}}},"children":{"type":"array","items":{"type":"string"}},"category":{"type":"object","properties":{"name":{"$ref":"#/definitions/name1"},"description":{"$ref":"#/definitions/description"},"slug":{"type":"string","x-convert":{"trim":true}},"parentId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"isDeleted":{"type":"boolean"},"isActive":{"type":"boolean"},"isNRelated":{"type":"boolean"},"margin":{"$ref":"#/definitions/margin"},"image":{"$ref":"#/definitions/image1"},"icon":{"type":"string","x-convert":{"trim":true}},"details":{"type":"string","x-convert":{"trim":true}},"_id":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"children":{"$ref":"#/definitions/children"},"addedBy":{"type":"string","x-convert":{"trim":true}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"__v":{"type":"number"},"checked":{"type":"boolean"}},"required":["name"]},"Model32":{"type":"object","properties":{"category":{"$ref":"#/definitions/category"}},"required":["category"]},"name2":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","default":"","x-convert":{"trim":true}}},"required":["ar"]},"description1":{"type":"object","properties":{"ar":{"type":"string","default":"","x-convert":{"trim":true}},"en":{"type":"string","default":"","x-convert":{"trim":true}}}},"usersIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"coupon":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z0-9_-]{3,32}$","x-convert":{"case":"upper","trim":true}},"name":{"$ref":"#/definitions/name2"},"description":{"$ref":"#/definitions/description1"},"discountType":{"$ref":"#/definitions/discountType"},"discountValue":{"type":"number"},"maxDiscountAmount":{"type":"number","x-constraint":{"greater":0}},"minOrderAmount":{"type":"number","x-constraint":{"greater":0}},"firstOrderOnly":{"type":"boolean"},"isVisible":{"type":"boolean"},"usersIds":{"$ref":"#/definitions/usersIds"},"startsAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"totalUsageLimit":{"type":"integer","x-constraint":{"greater":0}},"perUserUsageLimit":{"type":"integer","x-constraint":{"greater":0}},"isActive":{"type":"boolean"}}},"Model33":{"type":"object","properties":{"coupon":{"$ref":"#/definitions/coupon"}},"required":["coupon"]},"offer":{"type":"object","properties":{"availableQuantity":{"type":"number","x-constraint":{"sign":"positive"}},"isActive":{"type":"boolean","default":true}},"required":["availableQuantity"]},"Model34":{"type":"object","properties":{"offer":{"$ref":"#/definitions/offer"}},"required":["offer"]},"offer1":{"type":"object","properties":{"price":{"type":"number","maximum":1000000,"x-constraint":{"sign":"positive"}},"availableQuantity":{"type":"integer","minimum":0},"isActive":{"type":"boolean"}},"required":["price","availableQuantity"]},"Model35":{"type":"object","properties":{"offer":{"$ref":"#/definitions/offer1"}},"required":["offer"]},"status2":{"type":"string","enum":["pending","processing","accepted-by-store","out-for-delivery","cancelled","refunded","failed","delivered"],"x-convert":{"trim":true}},"Model36":{"type":"object","properties":{"status":{"$ref":"#/definitions/status2"}},"required":["status"]},"Model37":{"type":"object","properties":{"driverId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["driverId"]},"status3":{"type":"string","enum":["delivered","cancelled"],"x-convert":{"trim":true}},"Model38":{"type":"object","properties":{"status":{"$ref":"#/definitions/status3"}},"required":["status"]},"Model39":{"type":"object","properties":{"driverId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"force":{"type":"boolean","default":false}},"required":["driverId"]},"status4":{"type":"string","enum":["pending","accepted","rejected","picked-up","delivered","failed","cancelled","returned"],"x-convert":{"trim":true}},"Model40":{"type":"object","properties":{"status":{"$ref":"#/definitions/status4"},"notes":{"type":"string","x-convert":{"trim":true}}},"required":["status"]},"Model41":{"type":"object","properties":{"location":{"$ref":"#/definitions/location"},"reason":{"type":"string","maxLength":500,"x-convert":{"trim":true}},"reasonNote":{"type":"string","maxLength":500,"x-convert":{"trim":true}}},"required":["reason","reasonNote"]},"Model42":{"type":"object","properties":{"location":{"$ref":"#/definitions/location"},"deliveryImage":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}}}},"Model43":{"type":"object","properties":{"location":{"$ref":"#/definitions/location"},"pickupImage":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}}}},"Model44":{"type":"object","properties":{"location":{"$ref":"#/definitions/location"}}},"Model45":{"type":"object"},"Model46":{"type":"object","properties":{"paymentReference":{"type":"string","x-convert":{"trim":true}},"paymentMethod":{"type":"string","default":"BANK_TRANSFER","x-convert":{"trim":true}}},"required":["paymentReference"]},"Model47":{"type":"object","properties":{"notes":{"type":"string","x-convert":{"trim":true}}}},"Model48":{"type":"object","properties":{"reason":{"type":"string","x-convert":{"trim":true}}}},"name3":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}},"required":["ar"]},"images":{"type":"array","items":{"type":"string","x-convert":{"trim":true}}},"videos":{"type":"array","items":{"type":"string","x-convert":{"trim":true}}},"product":{"type":"object","properties":{"name":{"$ref":"#/definitions/name3"},"categoryId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"description":{"$ref":"#/definitions/description"},"images":{"$ref":"#/definitions/images"},"videos":{"$ref":"#/definitions/videos"},"suggestedPrice":{"type":"number"},"isActive":{"type":"boolean"}},"required":["name","categoryId","description"]},"Model49":{"type":"object","properties":{"product":{"$ref":"#/definitions/product"}},"required":["product"]},"status5":{"type":"string","enum":["pending","rejected","failed","accepted","driver-assigned","in-delivery","cancelled","returned","delivered"],"x-convert":{"trim":true}},"Model50":{"type":"object","properties":{"status":{"$ref":"#/definitions/status5"}},"required":["status"]},"Model51":{"type":"object","properties":{"reason":{"type":"string","x-convert":{"trim":true}}},"required":["reason"]},"Model52":{"type":"object","properties":{"reason":{"type":"string","x-convert":{"trim":true}}}},"Model53":{"type":"object","properties":{"version":{"$ref":"#/definitions/version"},"vatNumber":{"type":"string"},"vatRegistrationDate":{"type":"string"},"businessCategory":{"type":"string"},"industryCode":{"type":"string"},"isProductionEnabled":{"type":"boolean"},"egsUnitInfo":{"$ref":"#/definitions/egsUnitInfo"},"location":{"type":"string"}},"required":["vatNumber","vatRegistrationDate","businessCategory","industryCode","location"]},"Model54":{"type":"object","properties":{"type":{"$ref":"#/definitions/type"},"documentUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","x-convert":{"trim":true}}},"required":["type","documentUrl"]},"formattedAddress1":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}}},"store1":{"type":"object","properties":{"name":{"$ref":"#/definitions/name"},"location":{"$ref":"#/definitions/location"},"address":{"type":"string","x-convert":{"trim":true}},"formattedAddress":{"$ref":"#/definitions/formattedAddress1"},"storeOwnerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"logo":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"coverImage":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"phone":{"type":"string","x-convert":{"trim":true}},"isActive":{"type":"boolean"}},"required":["name","address","storeOwnerId"]},"Model55":{"type":"object","properties":{"store":{"$ref":"#/definitions/store1"}},"required":["store"]},"Model56":{"type":"object","properties":{"bankDetails":{"$ref":"#/definitions/bankDetails"}},"required":["bankDetails"]},"location4":{"type":"object","properties":{"city":{"type":"string","minLength":2,"maxLength":100,"x-convert":{"trim":true}},"streetName":{"type":"string","minLength":2,"maxLength":100,"x-convert":{"trim":true}},"citySubdivisionName":{"type":"string","minLength":2,"maxLength":100,"x-convert":{"trim":true}},"buildingNumber":{"type":"string","pattern":"^\\d{4}$","x-constraint":{"length":4},"x-convert":{"trim":true}},"postalZone":{"type":"string"}}},"egsUnitInfo1":{"type":"object","properties":{"branchName":{"type":"string","minLength":2,"maxLength":200,"x-convert":{"trim":true}},"crnNumber":{"type":"string"},"branchIndustry":{"type":"string","minLength":2,"maxLength":100,"x-convert":{"trim":true}}}},"zatca":{"type":"object","properties":{"vatNumber":{"type":"string"},"vatRegistrationDate":{"type":"string","format":"date-time"},"location":{"$ref":"#/definitions/location4"},"egsUnitInfo":{"$ref":"#/definitions/egsUnitInfo1"}}},"Model57":{"type":"object","properties":{"location":{"$ref":"#/definitions/location"},"zatca":{"$ref":"#/definitions/zatca"}}},"store2":{"type":"object","properties":{"logo":{"type":"string","x-convert":{"trim":true}},"coverImage":{"type":"string","x-convert":{"trim":true}}}},"Model58":{"type":"object","properties":{"store":{"$ref":"#/definitions/store2"}},"required":["store"]},"type3":{"type":"string","enum":["national-id","driving-license"],"x-convert":{"trim":true}},"Model59":{"type":"object","properties":{"type":{"$ref":"#/definitions/type3"},"fileUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","maxLength":200,"x-convert":{"trim":true}},"issueDate":{"type":"string","format":"date-time"},"expiryDate":{"type":"string","format":"date-time"}},"required":["type","fileUrl"]},"documents":{"type":"array","maxItems":10,"items":{"$ref":"#/definitions/Model59"}},"Model60":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"name":{"type":"string","minLength":2,"maxLength":50,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}},"documents":{"$ref":"#/definitions/documents"}},"required":["phoneNumber","name"]},"emailType":{"type":"string","enum":["order_placed","order_delivered","invoice_generated","payout_completed"],"x-convert":{"trim":true}},"language1":{"type":"string","default":"ar","enum":["ar","en"],"x-convert":{"trim":true}},"testData":{"type":"object","default":{},"properties":{"orderId":{"type":"string","default":"TEST-12345","x-convert":{"trim":true}},"orderTotal":{"type":"number","default":150},"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"addressId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"trackingNumber":{"type":"string","default":"TRK-67890","x-convert":{"trim":true}},"invoiceNumber":{"type":"string","default":"INV-2024-001","x-convert":{"trim":true}},"invoiceAmount":{"type":"number","default":150},"payoutReference":{"type":"string","default":"PAY-2024-001","x-convert":{"trim":true}},"payoutAmount":{"type":"number","default":1500},"paymentMethod":{"type":"string","default":"Bank Transfer","x-convert":{"trim":true}},"language":{"$ref":"#/definitions/language1"}}},"Model61":{"type":"object","properties":{"emailType":{"$ref":"#/definitions/emailType"},"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"testData":{"$ref":"#/definitions/testData"}},"required":["emailType","userId"]},"Model62":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":200,"x-convert":{"trim":true}},"name":{"type":"string","minLength":2,"maxLength":120,"x-convert":{"trim":true}},"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"password":{"type":"string","minLength":8,"maxLength":64,"x-convert":{"trim":true}}},"required":["token","name","phoneNumber","password"]},"scope":{"type":"string","default":"customer","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"Model63":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"otp":{"type":"string","default":"000000","x-constraint":{"length":6},"x-convert":{"trim":true}},"scope":{"$ref":"#/definitions/scope"},"purpose":{"type":"string","x-convert":{"trim":true}}},"required":["phoneNumber","otp","scope"]},"Model64":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"trim":true}},"name":{"type":"string","x-convert":{"trim":true}}},"required":["phoneNumber","email","name"]},"userType":{"type":"string","enum":["driver","customer","admin","store-owner"],"x-convert":{"trim":true}},"Model65":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"userType":{"$ref":"#/definitions/userType"}},"required":["phoneNumber","userType"]},"Model66":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}}},"required":["phoneNumber"]},"userType1":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"notification":{"type":"object","properties":{"title":{"type":"string","x-convert":{"trim":true}},"body":{"type":"string","x-convert":{"trim":true}}},"required":["title","body"]},"Model67":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"userType":{"$ref":"#/definitions/userType1"},"notification":{"$ref":"#/definitions/notification"}},"required":["userType","notification"]},"userType2":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"data":{"type":"object","properties":{"orderId":{"type":"string","x-convert":{"trim":true}},"purchaseOrderId":{"type":"string","x-convert":{"trim":true}},"parcelId":{"type":"string","x-convert":{"trim":true}},"storeId":{"type":"string","x-convert":{"trim":true}}}},"Model68":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"userType":{"$ref":"#/definitions/userType2"},"title":{"type":"string","x-convert":{"trim":true},"x-alternatives":[{"type":"string","x-convert":{"trim":true}},{"$ref":"#/x-alt-definitions/title"}]},"body":{"type":"string","x-convert":{"trim":true},"x-alternatives":[{"type":"string","x-convert":{"trim":true}},{"$ref":"#/x-alt-definitions/body"}]},"data":{"$ref":"#/definitions/data"}},"required":["userId","userType","title","body"]},"Model69":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"message":{"type":"string","x-convert":{"trim":true}},"senderId":{"type":"string","x-convert":{"trim":true}}},"required":["phoneNumber"]},"scope1":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"role":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"Model70":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"otp":{"type":"string","default":"000000","x-constraint":{"length":6},"x-convert":{"trim":true}},"scope":{"$ref":"#/definitions/scope1"},"role":{"$ref":"#/definitions/role"},"purpose":{"type":"string","x-convert":{"trim":true}}},"required":["phoneNumber","otp"]},"Model71":{"type":"object","properties":{"name":{"type":"string","default":"Home","minLength":2,"x-convert":{"trim":true}},"storeOwnerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"location":{"$ref":"#/definitions/location"},"formattedAddress":{"$ref":"#/definitions/formattedAddress"},"streetAddress":{"type":"string","x-convert":{"trim":true}},"city":{"type":"string","x-convert":{"trim":true}},"state":{"type":"string","x-convert":{"trim":true}},"country":{"type":"string","x-convert":{"trim":true}},"zip":{"type":"string","x-convert":{"trim":true}},"address":{"type":"string","x-convert":{"trim":true}},"details":{"type":"string","x-convert":{"trim":true}},"isDefault":{"type":"boolean","default":true},"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}}},"location5":{"type":"object","properties":{"latitude":{"type":"number","minimum":-180,"maximum":180},"longitude":{"type":"number","minimum":-90,"maximum":90}},"required":["latitude","longitude"]},"Model72":{"type":"object","properties":{"name":{"type":"string","default":"Home","x-convert":{"trim":true}},"storeOwnerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"location":{"$ref":"#/definitions/location5"},"formattedAddress":{"$ref":"#/definitions/formattedAddress"},"streetAddress":{"type":"string","x-convert":{"trim":true}},"isLastSelectedAddress":{"type":"boolean"},"city":{"type":"string","x-convert":{"trim":true}},"state":{"type":"string","x-convert":{"trim":true}},"country":{"type":"string","x-convert":{"trim":true}},"zip":{"type":"string","x-convert":{"trim":true}},"address":{"type":"string","x-convert":{"trim":true}},"details":{"type":"string","x-convert":{"trim":true}},"isDefault":{"type":"boolean","default":true}},"required":["location"]},"Model73":{"type":"object","properties":{"legalName":{"type":"string","minLength":2,"maxLength":200,"x-convert":{"trim":true}},"bankName":{"type":"string","minLength":2,"maxLength":120,"x-convert":{"trim":true}},"iban":{"type":"string","maxLength":40,"x-convert":{"trim":true}},"proofFileUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"proofFileName":{"type":"string","maxLength":200,"x-convert":{"trim":true}}},"required":["legalName","bankName","iban"]},"Model74":{"type":"object","properties":{"image":{"$ref":"#/definitions/image"},"altText":{"$ref":"#/definitions/altText"},"sortOrder":{"type":"integer","default":0,"minimum":0},"isActive":{"type":"boolean","default":false},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"link":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}}},"required":["image"]},"Model75":{"type":"object","properties":{"offerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"addressId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["offerId","storeId"]},"Model76":{"type":"object","properties":{"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"code":{"type":"string","maxLength":32,"x-convert":{"trim":true}}},"required":["storeId","code"]},"Model77":{"type":"object","properties":{"offerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"quantity":{"type":"number"},"productId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["offerId","quantity","productId"]},"items":{"type":"array","items":{"$ref":"#/definitions/Model77"}},"Model78":{"type":"object","properties":{"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"addressId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"items":{"$ref":"#/definitions/items"},"notes":{"type":"string","x-convert":{"trim":true}}},"required":["storeId","addressId"]},"Model79":{"type":"object","properties":{"offerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["offerId","storeId"]},"Model80":{"type":"object","properties":{"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"moyasarPaymentId":{"type":"string","x-convert":{"trim":true}}},"required":["storeId","moyasarPaymentId"]},"Model81":{"type":"object","properties":{"offerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"quantity":{"type":"number"},"productId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["offerId","quantity","productId"]},"items1":{"type":"array","items":{"$ref":"#/definitions/Model81"}},"hyperpayPaymentMethod":{"type":"string","enum":["mada","applepay","visa","master"],"x-convert":{"trim":true}},"Model82":{"type":"object","properties":{"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"addressId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"items":{"$ref":"#/definitions/items1"},"notes":{"type":"string","x-convert":{"trim":true}},"hyperpayPaymentMethod":{"$ref":"#/definitions/hyperpayPaymentMethod"},"createRegistration":{"type":"boolean"},"registrationId":{"type":"string","maxLength":64,"x-convert":{"trim":true}}},"required":["storeId","addressId"]},"category1":{"type":"object","properties":{"name":{"$ref":"#/definitions/name"},"description":{"$ref":"#/definitions/description"},"isActive":{"type":"boolean"},"isNRelated":{"type":"boolean"},"parentId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["name"]},"Model83":{"type":"object","properties":{"category":{"$ref":"#/definitions/category1"}},"required":["category"]},"Model84":{"type":"object","properties":{"amount":{"type":"number","x-constraint":{"precision":2,"sign":"positive"}},"notes":{"type":"string","maxLength":500,"x-convert":{"trim":true}}}},"name4":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","default":"","x-convert":{"trim":true}}},"required":["ar"]},"coupon1":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z0-9_-]{3,32}$","x-convert":{"case":"upper","trim":true}},"name":{"$ref":"#/definitions/name4"},"description":{"$ref":"#/definitions/description1"},"discountType":{"$ref":"#/definitions/discountType"},"discountValue":{"type":"number"},"maxDiscountAmount":{"type":"number","x-constraint":{"greater":0}},"minOrderAmount":{"type":"number","x-constraint":{"greater":0}},"firstOrderOnly":{"type":"boolean"},"isVisible":{"type":"boolean"},"usersIds":{"$ref":"#/definitions/usersIds"},"startsAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"totalUsageLimit":{"type":"integer","x-constraint":{"greater":0}},"perUserUsageLimit":{"type":"integer","x-constraint":{"greater":0}},"isActive":{"type":"boolean"}},"required":["code","name","discountType","discountValue"]},"Model85":{"type":"object","properties":{"coupon":{"$ref":"#/definitions/coupon1"}},"required":["coupon"]},"name5":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","default":"","x-convert":{"trim":true}}},"required":["ar"]},"coupon2":{"type":"object","properties":{"name":{"$ref":"#/definitions/name5"},"description":{"$ref":"#/definitions/description1"},"discountType":{"$ref":"#/definitions/discountType"},"discountValue":{"type":"number"},"maxDiscountAmount":{"type":"number","x-constraint":{"greater":0}},"minOrderAmount":{"type":"number","x-constraint":{"greater":0}},"firstOrderOnly":{"type":"boolean"},"isVisible":{"type":"boolean"},"usersIds":{"$ref":"#/definitions/usersIds"},"startsAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"totalUsageLimit":{"type":"integer","x-constraint":{"greater":0}},"perUserUsageLimit":{"type":"integer","x-constraint":{"greater":0}},"isActive":{"type":"boolean"}},"required":["name","discountType","discountValue"]},"batch":{"type":"object","properties":{"companyName":{"type":"string","maxLength":120,"x-convert":{"trim":true}},"codePrefix":{"type":"string","pattern":"^[A-Z0-9]{2,12}$","x-convert":{"case":"upper","trim":true}},"sequenceStart":{"type":"integer","default":1,"minimum":0},"count":{"type":"integer","minimum":1,"maximum":1000}},"required":["companyName","codePrefix","count"]},"Model86":{"type":"object","properties":{"coupon":{"$ref":"#/definitions/coupon2"},"batch":{"$ref":"#/definitions/batch"}},"required":["coupon","batch"]},"requestIds":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"Model87":{"type":"object","properties":{"requestIds":{"$ref":"#/definitions/requestIds"}},"required":["requestIds"]},"Model88":{"type":"object"},"rows":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/definitions/Model88"}},"Model89":{"type":"object","properties":{"rows":{"$ref":"#/definitions/rows"}},"required":["rows"]},"identity":{"type":"object","properties":{"nationality":{"type":"string","maxLength":80,"x-convert":{"trim":true}},"dateOfBirth":{"type":"string","format":"date-time"},"nationalIdNumber":{"type":"string","maxLength":30,"x-convert":{"trim":true}},"nationalIdExpiry":{"type":"string","format":"date-time"}}},"license":{"type":"object","properties":{"number":{"type":"string","maxLength":40,"x-convert":{"trim":true}},"type":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"expiry":{"type":"string","format":"date-time"}}},"vehicle":{"type":"object","properties":{"type":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"make":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"model":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"plateNumber":{"type":"string","maxLength":20,"x-convert":{"trim":true}},"ownershipStatus":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"registrationExpiry":{"type":"string","format":"date-time"},"insuranceExpiry":{"type":"string","format":"date-time"}}},"zoneIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"emergencyContact":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"x-convert":{"trim":true}},"phone":{"type":"string","maxLength":20,"x-convert":{"trim":true}}}},"operationalProfile":{"type":"object","properties":{"preferredCity":{"type":"string","maxLength":100,"x-convert":{"trim":true}},"zoneIds":{"$ref":"#/definitions/zoneIds"},"emergencyContact":{"$ref":"#/definitions/emergencyContact"}}},"Model90":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"name":{"type":"string","minLength":2,"maxLength":120,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}},"companyEmployeeId":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"identity":{"$ref":"#/definitions/identity"},"license":{"$ref":"#/definitions/license"},"vehicle":{"$ref":"#/definitions/vehicle"},"operationalProfile":{"$ref":"#/definitions/operationalProfile"}},"required":["phoneNumber","name"]},"driverIds":{"type":"array","minItems":1,"items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"Model91":{"type":"object","properties":{"driverIds":{"$ref":"#/definitions/driverIds"},"paymentMethod":{"type":"string","x-convert":{"trim":true}},"paymentReference":{"type":"string","x-convert":{"trim":true}},"notes":{"type":"string","x-convert":{"trim":true}}},"required":["driverIds"]},"platform":{"type":"string","default":"ios","enum":["ios"],"x-convert":{"trim":true}},"notificationService":{"type":"string","default":"apns","enum":["apns"],"x-convert":{"trim":true}},"appLocale":{"type":"string","enum":["ar","en"],"x-convert":{"trim":true}},"Model92":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"orderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"activityToken":{"type":"string","x-convert":{"trim":true}},"pushToStartToken":{"type":"string","x-convert":{"trim":true}},"firebaseToken":{"type":"string","x-convert":{"trim":true}},"platform":{"$ref":"#/definitions/platform"},"notificationService":{"$ref":"#/definitions/notificationService"},"isRTL":{"type":"boolean"},"appLocale":{"$ref":"#/definitions/appLocale"}},"required":["userId"]},"keys":{"type":"object","properties":{"p256dh":{"type":"string","x-convert":{"trim":true}},"auth":{"type":"string","x-convert":{"trim":true}}},"required":["p256dh","auth"]},"notificationService1":{"type":"string","enum":["firebase","apn","web"],"x-convert":{"trim":true}},"Model93":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"endpoint":{"type":"string","x-convert":{"trim":true}},"expirationTime":{"type":"string","x-convert":{"trim":true}},"keys":{"$ref":"#/definitions/keys"},"firebaseToken":{"type":"string","x-convert":{"trim":true}},"notificationService":{"$ref":"#/definitions/notificationService1"}},"required":["notificationService"]},"notificationService2":{"type":"string","enum":["firebase","apn","web"],"x-convert":{"trim":true}},"Model94":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"endpoint":{"type":"string","x-convert":{"trim":true}},"expirationTime":{"type":"string","x-convert":{"trim":true}},"keys":{"$ref":"#/definitions/keys"},"firebaseToken":{"type":"string","x-convert":{"trim":true}},"notificationService":{"$ref":"#/definitions/notificationService2"}},"required":["notificationService"]},"notificationService3":{"type":"string","enum":["firebase","apn","web"],"x-convert":{"trim":true}},"Model95":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"endpoint":{"type":"string","x-convert":{"trim":true}},"expirationTime":{"type":"string","x-convert":{"trim":true}},"keys":{"$ref":"#/definitions/keys"},"firebaseToken":{"type":"string","x-convert":{"trim":true}},"notificationService":{"$ref":"#/definitions/notificationService3"}},"required":["notificationService"]},"offer2":{"type":"object","properties":{"price":{"type":"number","x-constraint":{"sign":"positive"}},"productId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"availableQuantity":{"type":"number","x-constraint":{"sign":"positive"}},"isActive":{"type":"boolean","default":true}},"required":["price","productId","storeId","availableQuantity"]},"Model96":{"type":"object","properties":{"offer":{"$ref":"#/definitions/offer2"}},"required":["offer"]},"offer3":{"type":"object","properties":{"price":{"type":"number","maximum":1000000,"x-constraint":{"sign":"positive"}},"availableQuantity":{"type":"integer","minimum":0},"productId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"isActive":{"type":"boolean","default":true}},"required":["price","availableQuantity","productId"]},"Model97":{"type":"object","properties":{"offer":{"$ref":"#/definitions/offer3"}},"required":["offer"]},"Model98":{"type":"object","properties":{"offerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"quantity":{"type":"number"}},"required":["offerId","quantity"]},"items2":{"type":"array","items":{"$ref":"#/definitions/Model98"}},"status6":{"type":"string","default":"pending","enum":["pending","processing","accepted-by-store","out-for-delivery","cancelled","refunded","failed","delivered"],"x-convert":{"trim":true}},"order":{"type":"object","properties":{"customerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"items":{"$ref":"#/definitions/items2"},"status":{"$ref":"#/definitions/status6"}},"required":["customerId","storeId","items"]},"Model99":{"type":"object","properties":{"order":{"$ref":"#/definitions/order"}},"required":["order"]},"photos":{"type":"array","items":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}}},"Model100":{"type":"object","properties":{"parcelId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"voiceNoteUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"photos":{"$ref":"#/definitions/photos"}},"required":["parcelId","voiceNoteUrl"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"],"x-convert":{"trim":true}},"Model101":{"type":"object","properties":{"driverId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"purchaseOrderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"deliveryInstructions":{"type":"string","x-convert":{"trim":true}},"priority":{"$ref":"#/definitions/priority"}},"required":["purchaseOrderId"]},"category2":{"type":"string","enum":["rider-transfer","order-issue","payout-dispute","settlement-dispute","other"],"x-convert":{"trim":true}},"Model102":{"type":"object","properties":{"fileUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","maxLength":200,"x-convert":{"trim":true}}},"required":["fileUrl"]},"attachments":{"type":"array","maxItems":10,"items":{"$ref":"#/definitions/Model102"}},"Model103":{"type":"object","properties":{"category":{"$ref":"#/definitions/category2"},"subject":{"type":"string","minLength":3,"maxLength":200,"x-convert":{"trim":true}},"description":{"type":"string","minLength":3,"maxLength":4000,"x-convert":{"trim":true}},"riderId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"orderRef":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"transactionId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"attachments":{"$ref":"#/definitions/attachments"}},"required":["category","subject","description"]},"Model104":{"type":"object"},"name6":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}},"required":["ar"]},"product1":{"type":"object","properties":{"name":{"$ref":"#/definitions/name6"},"categoryId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"description":{"$ref":"#/definitions/description"},"images":{"$ref":"#/definitions/images"},"videos":{"$ref":"#/definitions/videos"},"suggestedPrice":{"type":"number"},"isActive":{"type":"boolean","default":true}},"required":["name","categoryId","description"]},"Model105":{"type":"object","properties":{"product":{"$ref":"#/definitions/product1"}},"required":["product"]},"name7":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}},"required":["ar"]},"product2":{"type":"object","properties":{"name":{"$ref":"#/definitions/name7"},"categoryId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"description":{"$ref":"#/definitions/description"},"images":{"$ref":"#/definitions/images"},"videos":{"$ref":"#/definitions/videos"},"suggestedPrice":{"type":"number"}},"required":["name","categoryId","description"]},"Model106":{"type":"object","properties":{"product":{"$ref":"#/definitions/product2"}},"required":["product"]},"legalName":{"type":"object","properties":{"en":{"type":"string","minLength":2,"maxLength":200,"x-convert":{"trim":true}},"ar":{"type":"string","minLength":2,"maxLength":200,"x-convert":{"trim":true}}},"required":["en","ar"]},"authorizedRep":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"x-convert":{"trim":true}},"phone":{"type":"string","maxLength":20,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}},"title":{"type":"string","maxLength":120,"x-convert":{"trim":true}}}},"Model107":{"type":"object","properties":{"legalName":{"$ref":"#/definitions/legalName"},"invitedEmail":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}},"crNumber":{"type":"string","maxLength":50,"x-convert":{"trim":true}},"vatNumber":{"type":"string","maxLength":50,"x-convert":{"trim":true}},"city":{"type":"string","maxLength":100,"x-convert":{"trim":true}},"address":{"type":"string","maxLength":500,"x-convert":{"trim":true}},"authorizedRep":{"$ref":"#/definitions/authorizedRep"}},"required":["legalName","invitedEmail"]},"name8":{"type":"object","properties":{"en":{"type":"string","minLength":2,"maxLength":120,"x-convert":{"trim":true}},"ar":{"type":"string","minLength":2,"maxLength":120,"x-convert":{"trim":true}}},"required":["en","ar"]},"type4":{"type":"string","default":"Polygon","enum":["Polygon"],"x-convert":{"trim":true}},"Model108":{"type":"array","x-constraint":{"length":2},"items":{"type":"number"}},"Model109":{"type":"array","minItems":4,"items":{"$ref":"#/definitions/Model108"}},"coordinates":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/Model109"}},"polygon":{"type":"object","properties":{"type":{"$ref":"#/definitions/type4"},"coordinates":{"$ref":"#/definitions/coordinates"}},"required":["coordinates"]},"type5":{"type":"string","default":"Point","enum":["Point"],"x-convert":{"trim":true}},"coordinates1":{"type":"array","x-constraint":{"length":2},"items":{"type":"number"}},"center":{"type":"object","properties":{"type":{"$ref":"#/definitions/type5"},"coordinates":{"$ref":"#/definitions/coordinates1"}},"required":["coordinates"]},"Model110":{"type":"object","properties":{"name":{"$ref":"#/definitions/name8"},"city":{"type":"string","minLength":2,"maxLength":100,"x-convert":{"trim":true}},"polygon":{"$ref":"#/definitions/polygon"},"center":{"$ref":"#/definitions/center"},"isActive":{"type":"boolean","default":true}},"required":["name","city","polygon"]},"cr":{"type":"object","properties":{"documentUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","x-convert":{"trim":true}}},"required":["documentUrl"]},"vat":{"type":"object","properties":{"documentUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","x-convert":{"trim":true}}},"required":["documentUrl"]},"legalDocuments":{"type":"object","properties":{"cr":{"$ref":"#/definitions/cr"},"vat":{"$ref":"#/definitions/vat"}}},"Model111":{"type":"object","properties":{"name":{"$ref":"#/definitions/name"},"storeOwnerId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"location":{"$ref":"#/definitions/location"},"address":{"type":"string","x-convert":{"trim":true}},"logo":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"coverImage":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"phone":{"type":"string","x-convert":{"trim":true}},"legalDocuments":{"$ref":"#/definitions/legalDocuments"},"isActive":{"type":"boolean"}},"required":["name","storeOwnerId","address"]},"name9":{"type":"object","properties":{"ar":{"type":"string","minLength":2,"maxLength":200,"x-convert":{"trim":true}},"en":{"type":"string","minLength":2,"maxLength":200,"x-convert":{"trim":true}}},"required":["ar","en"]},"store3":{"type":"object","properties":{"location":{"$ref":"#/definitions/location"},"logo":{"type":"string","x-convert":{"trim":true}},"coverImage":{"type":"string","x-convert":{"trim":true}},"name":{"$ref":"#/definitions/name9"},"description":{"type":"string","x-convert":{"trim":true}},"phone":{"type":"string","x-convert":{"trim":true}}},"required":["name"]},"Model112":{"type":"object","properties":{"store":{"$ref":"#/definitions/store3"}},"required":["store"]},"Model113":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"roles1":{"type":"array","items":{"$ref":"#/definitions/Model113"}},"Model114":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"roles":{"$ref":"#/definitions/roles1"}},"required":["userId","roles"]},"Model115":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["userId","storeId"]},"Model116":{"type":"string","enum":["admin","store-owner","store-operator","customer","driver","rider-company-admin","rider-company-staff"],"x-convert":{"trim":true}},"roles2":{"type":"array","items":{"$ref":"#/definitions/Model116"}},"user2":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":50,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"trim":true}},"phone":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"birthDate":{"type":"string","format":"date"},"roles":{"$ref":"#/definitions/roles2"},"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"storeIds":{"$ref":"#/definitions/storeIds"}},"required":["name","email","phone","roles"]},"Model117":{"type":"object","properties":{"user":{"$ref":"#/definitions/user2"}},"required":["user"]},"Model118":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}}},"required":["phoneNumber"]},"Model119":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}}},"required":["phoneNumber"]},"Model120":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}}},"required":["phoneNumber"]},"Model121":{"type":"object","properties":{"email":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}},"password":{"type":"string","minLength":6,"maxLength":64,"x-convert":{"trim":true}}},"required":["email","password"]},"preset":{"type":"string","enum":["operations-manager","dispatcher","onboarding","finance","auditor"],"x-convert":{"trim":true}},"Model122":{"type":"string","enum":["fleet:read","fleet:live","fleet:map","riders:read","riders:create","riders:edit","riders:submit","riders:deactivate","exceptions:manage","cases:manage","finance:read","bank:manage","payouts:request","users:manage","reports:read"],"x-convert":{"trim":true}},"permissions":{"type":"array","items":{"$ref":"#/definitions/Model122"}},"Model123":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"name":{"type":"string","minLength":1,"maxLength":120,"x-convert":{"trim":true}},"preset":{"$ref":"#/definitions/preset"},"permissions":{"$ref":"#/definitions/permissions"}},"required":["phoneNumber","name"]},"Model124":{"type":"object","properties":{"email":{"type":"string","x-format":{"email":true},"x-convert":{"trim":true}},"password":{"type":"string","minLength":6,"maxLength":50,"x-convert":{"trim":true}}},"required":["email","password"]},"Model125":{"type":"string","enum":["orders:read","orders:accept","orders:reject","offers:read","offers:create","offers:edit","offers:delete","payouts:read","invoices:read","settings:read","settings:edit"],"x-convert":{"trim":true}},"permissions1":{"type":"array","items":{"$ref":"#/definitions/Model125"}},"Model126":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"name":{"type":"string","minLength":1,"maxLength":120,"x-convert":{"trim":true}},"permissions":{"$ref":"#/definitions/permissions1"}},"required":["phoneNumber","name"]},"user3":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":50,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"trim":true}},"phone":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"password":{"type":"string","minLength":6,"maxLength":50,"x-convert":{"trim":true}}},"required":["name","email","phone","password"]},"Model127":{"type":"object","properties":{"user":{"$ref":"#/definitions/user3"}},"required":["user"]},"Model128":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}}},"required":["phoneNumber"]},"Model129":{"type":"object","properties":{"invoiceFormat":{"$ref":"#/definitions/invoiceFormat"},"invoiceTemplate":{"$ref":"#/definitions/invoiceTemplate"},"invoicePrefix":{"type":"string","pattern":"^[A-Z0-9-]+$","x-convert":{"trim":true}},"nextInvoiceNumber":{"type":"number","minimum":1},"vatRate":{"type":"number","minimum":0,"maximum":100},"vatExempt":{"type":"boolean"},"showVatDetails":{"type":"boolean"},"vatIncluded":{"type":"boolean"},"autoSubmit":{"type":"boolean"},"generateQRCode":{"type":"boolean"},"validateInvoices":{"type":"boolean"},"submitTimeout":{"type":"number","minimum":5,"maximum":180},"retryAttempts":{"type":"number","minimum":1,"maximum":10},"emailInvoices":{"type":"boolean"},"archiveInvoices":{"type":"boolean"},"dailyBackup":{"type":"boolean"},"retentionPeriod":{"type":"number","minimum":1,"maximum":50},"monthlyInvoiceLimit":{"type":"number","minimum":1,"maximum":100000}}},"Model130":{"type":"object","properties":{"otp":{"type":"string","description":"OTP received from ZATCA"}},"required":["otp"]},"Model131":{"type":"object","properties":{"rejectionReason":{"type":"string","maxLength":500,"x-convert":{"trim":true}}}},"Model132":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"x-convert":{"trim":true}},"paymentReference":{"type":"string","maxLength":120,"x-convert":{"trim":true}}}},"Model133":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"x-convert":{"trim":true}}}},"Model134":{"type":"object","properties":{"amount":{"type":"number"},"reason":{"type":"string","minLength":3,"maxLength":500,"x-convert":{"trim":true}},"reference":{"type":"string","maxLength":120,"x-convert":{"trim":true}}},"required":["amount","reason","reference"]},"Model135":{"type":"object","properties":{"reason":{"type":"string","maxLength":1000,"x-convert":{"trim":true}}}},"Model136":{"type":"object","properties":{"field":{"type":"string","maxLength":120,"x-convert":{"trim":true}},"reason":{"type":"string","minLength":2,"maxLength":500,"x-convert":{"trim":true}}},"required":["field","reason"]},"corrections":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/Model136"}},"Model137":{"type":"object","properties":{"corrections":{"$ref":"#/definitions/corrections"}},"required":["corrections"]},"type6":{"type":"string","enum":["national-id","driving-license"],"x-convert":{"trim":true}},"Model138":{"type":"object","properties":{"type":{"$ref":"#/definitions/type6"},"fileUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","maxLength":200,"x-convert":{"trim":true}},"issueDate":{"type":"string","format":"date-time"},"expiryDate":{"type":"string","format":"date-time"}},"required":["type","fileUrl"]},"Model139":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"x-convert":{"trim":true}}}},"type7":{"type":"string","enum":["national-id","driving-license","vehicle-registration","insurance","other"],"x-convert":{"trim":true}},"Model140":{"type":"object","properties":{"type":{"$ref":"#/definitions/type7"},"fileUrl":{"type":"string","x-format":{"uri":true},"x-convert":{"trim":true}},"fileName":{"type":"string","maxLength":200,"x-convert":{"trim":true}},"issueDate":{"type":"string","format":"date-time"},"expiryDate":{"type":"string","format":"date-time"}},"required":["type","fileUrl"]},"Model141":{"type":"object","properties":{"amount":{"type":"number","x-constraint":{"precision":2,"sign":"positive"}},"payFull":{"type":"boolean"},"paymentMethod":{"type":"string","x-convert":{"trim":true}},"paymentReference":{"type":"string","x-convert":{"trim":true}},"notes":{"type":"string","x-convert":{"trim":true}}}},"status7":{"type":"string","enum":["delivered","failed","out-for-delivery","accepted-by-store"],"x-convert":{"trim":true}},"Model142":{"type":"object","properties":{"status":{"$ref":"#/definitions/status7"},"reason":{"type":"string","minLength":3,"maxLength":500,"x-convert":{"trim":true}}},"required":["status","reason"]},"Model143":{"type":"object","properties":{"message":{"type":"string","maxLength":280,"x-convert":{"trim":true}}}},"Model144":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"x-convert":{"trim":true}}},"required":["reason"]},"Model145":{"type":"object","properties":{"note":{"type":"string","minLength":1,"maxLength":1000,"x-convert":{"trim":true}},"parcelId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["note"]},"Model146":{"type":"object","properties":{"reason":{"type":"string","description":"Reason for cancellation","maxLength":500,"x-convert":{"trim":true}}}},"Model147":{"type":"object","properties":{"note":{"type":"string","minLength":1,"maxLength":1000,"x-convert":{"trim":true}}},"required":["note"]},"Model148":{"type":"object","properties":{"text":{"type":"string","maxLength":4000,"x-convert":{"trim":true}},"resolution":{"type":"string","maxLength":2000,"x-convert":{"trim":true}}}},"Model149":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000,"x-convert":{"trim":true}}},"required":["text"]},"Model150":{"type":"object","properties":{"invitedEmail":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}}}},"Model151":{"type":"object","properties":{"note":{"type":"string","maxLength":1000,"x-convert":{"trim":true}}}},"Model152":{"type":"object","properties":{"disposition":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"text":{"type":"string","maxLength":1000,"x-convert":{"trim":true}}}},"Model153":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"accuracy":{"type":"number","minimum":0},"heading":{"type":"number","minimum":0,"maximum":360},"speed":{"type":"number","minimum":0}},"required":["latitude","longitude"]},"Model154":{"type":"object","properties":{"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["storeId"]},"Model155":{"type":"object","properties":{"recipientEmail":{"type":"string","x-format":{"email":true},"x-convert":{"trim":true}}}},"Model156":{"type":"object","properties":{"reason":{"type":"string","maxLength":1000,"x-convert":{"trim":true}}}},"Model157":{"type":"object","properties":{"otp":{"type":"string","description":"OTP received from ZATCA","x-convert":{"trim":true}},"isProduction":{"type":"boolean","description":"Is production mode","default":false}},"required":["otp"]},"Model158":{"type":"string","enum":["orders:read","orders:accept","orders:reject","offers:read","offers:create","offers:edit","offers:delete","payouts:read","invoices:read","settings:read","settings:edit"],"x-convert":{"trim":true}},"permissions2":{"type":"array","items":{"$ref":"#/definitions/Model158"}},"Model159":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}},"name":{"type":"string","minLength":1,"maxLength":120,"x-convert":{"trim":true}},"permissions":{"$ref":"#/definitions/permissions2"}},"required":["phoneNumber","name"]},"Model160":{"type":"object","properties":{"_id":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}},"sortOrder":{"type":"integer","minimum":0}},"required":["_id","sortOrder"]},"order1":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/Model160"}},"Model161":{"type":"object","properties":{"order":{"$ref":"#/definitions/order1"}},"required":["order"]},"Model162":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}},"companyEmployeeId":{"type":"string","maxLength":60,"x-convert":{"trim":true}},"identity":{"$ref":"#/definitions/identity"},"license":{"$ref":"#/definitions/license"},"vehicle":{"$ref":"#/definitions/vehicle"},"operationalProfile":{"$ref":"#/definitions/operationalProfile"}}},"Model163":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"x-convert":{"trim":true}},"phone":{"type":"string","maxLength":20,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}},"title":{"type":"string","maxLength":120,"x-convert":{"trim":true}}}},"operationsContacts":{"type":"array","items":{"$ref":"#/definitions/Model163"}},"operatingCities":{"type":"array","items":{"type":"string","maxLength":100,"x-convert":{"trim":true}}},"operatingZoneIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"settlementConfig":{"type":"object","properties":{"clearingWindowDays":{"type":"integer","minimum":0},"minPayoutAmount":{"type":"number","minimum":0}}},"Model164":{"type":"object","properties":{"legalName":{"$ref":"#/definitions/legalName"},"crNumber":{"type":"string","maxLength":50,"x-convert":{"trim":true}},"vatNumber":{"type":"string","maxLength":50,"x-convert":{"trim":true}},"city":{"type":"string","maxLength":100,"x-convert":{"trim":true}},"address":{"type":"string","maxLength":500,"x-convert":{"trim":true}},"authorizedRep":{"$ref":"#/definitions/authorizedRep"},"operationsContacts":{"$ref":"#/definitions/operationsContacts"},"operatingCities":{"$ref":"#/definitions/operatingCities"},"operatingZoneIds":{"$ref":"#/definitions/operatingZoneIds"},"capacityLimit":{"type":"integer","minimum":0},"settlementConfig":{"$ref":"#/definitions/settlementConfig"}}},"Model165":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"x-convert":{"trim":true}},"phone":{"type":"string","maxLength":20,"x-convert":{"trim":true}},"email":{"type":"string","x-format":{"email":true},"x-convert":{"case":"lower","trim":true}},"title":{"type":"string","maxLength":120,"x-convert":{"trim":true}}}},"operationsContacts1":{"type":"array","items":{"$ref":"#/definitions/Model165"}},"Model166":{"type":"object","properties":{"legalName":{"$ref":"#/definitions/legalName"},"crNumber":{"type":"string","maxLength":50,"x-convert":{"trim":true}},"vatNumber":{"type":"string","maxLength":50,"x-convert":{"trim":true}},"city":{"type":"string","maxLength":100,"x-convert":{"trim":true}},"address":{"type":"string","maxLength":500,"x-convert":{"trim":true}},"authorizedRep":{"$ref":"#/definitions/authorizedRep"},"operationsContacts":{"$ref":"#/definitions/operationsContacts1"}}},"name10":{"type":"object","properties":{"en":{"type":"string","minLength":2,"maxLength":120,"x-convert":{"trim":true}},"ar":{"type":"string","minLength":2,"maxLength":120,"x-convert":{"trim":true}}},"required":["en","ar"]},"type8":{"type":"string","default":"Polygon","enum":["Polygon"],"x-convert":{"trim":true}},"Model167":{"type":"array","x-constraint":{"length":2},"items":{"type":"number"}},"Model168":{"type":"array","minItems":4,"items":{"$ref":"#/definitions/Model167"}},"coordinates2":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/Model168"}},"polygon1":{"type":"object","properties":{"type":{"$ref":"#/definitions/type8"},"coordinates":{"$ref":"#/definitions/coordinates2"}},"required":["coordinates"]},"type9":{"type":"string","default":"Point","enum":["Point"],"x-convert":{"trim":true}},"coordinates3":{"type":"array","x-constraint":{"length":2},"items":{"type":"number"}},"center1":{"type":"object","properties":{"type":{"$ref":"#/definitions/type9"},"coordinates":{"$ref":"#/definitions/coordinates3"}},"required":["coordinates"]},"Model169":{"type":"object","properties":{"name":{"$ref":"#/definitions/name10"},"city":{"type":"string","minLength":2,"maxLength":100,"x-convert":{"trim":true}},"polygon":{"$ref":"#/definitions/polygon1"},"center":{"$ref":"#/definitions/center1"},"isActive":{"type":"boolean"},"isDeleted":{"type":"boolean"}}},"Model170":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"]},"documentType1":{"type":"string","enum":["national-id","driving-license","vehicle-registration","insurance","other"],"x-convert":{"trim":true}},"status8":{"type":"string","enum":["approved","rejected"],"x-convert":{"trim":true}},"Model171":{"type":"object","properties":{"documentType":{"$ref":"#/definitions/documentType1"},"status":{"$ref":"#/definitions/status8"},"rejectionReason":{"type":"string","maxLength":500,"x-convert":{"trim":true}}},"required":["documentType","status","rejectionReason"]},"status9":{"type":"string","enum":["approved","accepted","rejected"],"x-convert":{"trim":true}},"Model172":{"type":"object","properties":{"status":{"$ref":"#/definitions/status9"},"rejectionReason":{"type":"string","minLength":2,"maxLength":1000,"x-convert":{"trim":true}}},"required":["status","rejectionReason"]},"productIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"Model173":{"type":"object","properties":{"productIds":{"$ref":"#/definitions/productIds"},"isActive":{"type":"boolean"}},"required":["productIds","isActive"]},"status10":{"type":"string","enum":["APPROVED","REJECTED"],"x-convert":{"trim":true}},"Model174":{"type":"object","properties":{"documentType":{"$ref":"#/definitions/documentType"},"status":{"$ref":"#/definitions/status10"},"rejectionReason":{"type":"string","maxLength":1000,"x-convert":{"trim":true}}},"required":["documentType","status","rejectionReason"]},"status11":{"type":"string","enum":["draft","pending-signature","active","suspended","expired"],"x-convert":{"trim":true}},"Model175":{"type":"object","properties":{"status":{"$ref":"#/definitions/status11"},"effectiveAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"rateCardRef":{"type":"string","maxLength":200,"x-convert":{"trim":true}},"notes":{"type":"string","maxLength":2000,"x-convert":{"trim":true}}}},"Model176":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"]},"Model177":{"type":"string","enum":["fleet:read","fleet:live","fleet:map","riders:read","riders:create","riders:edit","riders:submit","riders:deactivate","exceptions:manage","cases:manage","finance:read","bank:manage","payouts:request","users:manage","reports:read"],"x-convert":{"trim":true}},"permissions3":{"type":"array","items":{"$ref":"#/definitions/Model177"}},"Model178":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"x-convert":{"trim":true}},"preset":{"$ref":"#/definitions/preset"},"permissions":{"$ref":"#/definitions/permissions3"},"isActive":{"type":"boolean"}}},"Model179":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"]},"Model180":{"type":"object","properties":{"phoneNumber":{"type":"string","pattern":"^5\\d{8}$","x-convert":{"trim":true}}},"required":["phoneNumber"]},"Model181":{"type":"string","enum":["orders:read","orders:accept","orders:reject","offers:read","offers:create","offers:edit","offers:delete","payouts:read","invoices:read","settings:read","settings:edit"],"x-convert":{"trim":true}},"permissions4":{"type":"array","items":{"$ref":"#/definitions/Model181"}},"Model182":{"type":"object","properties":{"permissions":{"$ref":"#/definitions/permissions4"}},"required":["permissions"]},"status12":{"type":"string","enum":["APPROVED","REJECTED"],"x-convert":{"trim":true}},"Model183":{"type":"object","properties":{"status":{"$ref":"#/definitions/status12"},"rejectionReason":{"type":"string","minLength":2,"maxLength":1000,"x-convert":{"trim":true}}},"required":["status","rejectionReason"]},"Model184":{"type":"object","properties":{"isActive":{"type":"boolean"}},"required":["isActive"]},"Model185":{"type":"string","enum":["orders:read","orders:accept","orders:reject","offers:read","offers:create","offers:edit","offers:delete","payouts:read","invoices:read","settings:read","settings:edit"],"x-convert":{"trim":true}},"permissions5":{"type":"array","items":{"$ref":"#/definitions/Model185"}},"Model186":{"type":"object","properties":{"permissions":{"$ref":"#/definitions/permissions5"}},"required":["permissions"]},"Model187":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500,"x-convert":{"trim":true}}}},"Model188":{"type":"object","properties":{"storeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","x-convert":{"trim":true}}},"required":["storeId"]},"Model189":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500,"x-convert":{"trim":true}}},"required":["reason"]}},"x-alt-definitions":{"title":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}},"required":["ar"]},"body":{"type":"object","properties":{"ar":{"type":"string","x-convert":{"trim":true}},"en":{"type":"string","x-convert":{"trim":true}}},"required":["ar"]}}}