{
    "openapi": "3.1.0",
    "info": {
        "title": "Mcduffcare Limited",
        "version": "1.0.0",
        "description": "Backend API powering **Apelisoltech Limited's** e-commerce\nplatform(s) \u2014 a single Laravel codebase\ndeployed independently across multiple storefronts (e.g. `mcduffcare Limited`,\n`House of Booch`), each with its own database, domain, and enabled module set.\n\nThis document describes the full module surface the backend\nsupports. Not every module is necessarily active on every\ndeployment \u2014 check the storefront's own docs instance for the\nendpoints actually live on that store.\n\n---\n\n## 1. Modules\n\nThe backend is organized into independent modules. Each module owns\nits own routes, models, and (where relevant) queue jobs.\n\n| Module | Responsibility |\n|---|---|\n| **Catalog** | Products, categories, collections, variants, attributes, pricing |\n| **Inventory** | Stock levels, warehouses\/locations, low-stock alerts |\n| **Cart** | Guest & authenticated cart, line items, totals, coupon application |\n| **Checkout & Orders** | Order creation, status lifecycle, order history |\n| **Payments** | Payment provider integration(s), transaction records, refunds |\n| **Shipping** | Rates, zones, carriers, fulfillment status |\n| **Customers & Auth** | Registration, login, addresses, account management (Sanctum-based) |\n| **Reviews & Ratings** | Product reviews, moderation |\n| **Promotions** | Discount codes, campaigns, bundle pricing |\n| **AI** | AI-assisted product recommendations, AI-powered search\/chat support, content generation (e.g. product descriptions), and AI-driven ordering \u2014 see note below |\n| **Notifications** | Order\/status emails, SMS, in-app notifications |\n| **Reporting & Analytics** | Sales, inventory, and customer reports |\n| **Admin** | Store configuration, staff accounts, module\/feature toggles |\n\n### A note on the AI module\nAI-related endpoints (recommendations, AI chat support, AI-generated\ncontent, AI-driven ordering) are part of the shared codebase but may\nbe **enabled or disabled per storefront** depending on\nplan\/configuration. Where a capability is disabled on a given\ndeployment, its endpoints are not registered and therefore will not\nappear in that store's docs.\n\nThe AI module is not limited to read-only\/advisory actions \u2014 where\nenabled, it can act on a customer's behalf through the same\nunderlying flows a human customer would use, including:\n\n- Building\/updating a cart from a natural-language request\n- **Placing an order** (going through the normal Checkout & Orders\n  flow \u2014 same validation, stock checks, and payment steps as a\n  manually placed order)\n- Checking order status and tracking\n- Applying eligible promotions\/discount codes\n\nAI-initiated actions are always executed as the **authenticated\ncustomer** (or an explicitly scoped service account for\nheadless\/agent integrations) \u2014 they carry the same authorization,\nstock, and payment constraints as any other order, and are logged\nwith an `origin: ai` marker on the resulting order for auditing.\nThe AI service itself does not bypass Checkout & Orders, Payments,\nor Inventory \u2014 it calls into them the same way any other client of\nthis API would.\n\n---\n\n## 2. Multi-store architecture\n\nOne codebase, deployed independently to multiple storefronts. Each\ndeployment has its own:\n\n- Database\n- `.env` (secrets, provider keys, currency, locale)\n- Enabled module\/feature set\n- This generated API documentation, reflecting only what is\n  actually reachable on that deployment\n\n---\n\n## 3. Roles & access\n\n| Role | Access |\n|---|---|\n| **Admin** | Full control \u2014 store configuration, catalog management, order management, staff accounts, reporting |\n| **Staff** | Scoped access assigned by an Admin (e.g. Catalog Manager, Order Fulfilment, Support) |\n| **Customer** | Own account, own cart, own orders, own addresses, reviews on purchased products |\n| **Guest** | Public catalog browsing, guest cart, guest checkout (where enabled) |\n\nAuthorization is enforced at the route\/policy level \u2014 e.g. a\nCustomer cannot view or modify another customer's orders; Staff\nroles are scoped to the modules\/actions assigned to them by an\nAdmin.\n\n---\n\n## 4. Conventions used across this API\n\n- **Auth**: Bearer token via Laravel Sanctum (see the Authorize\n  button in this UI).\n- **Identifiers**: resources are referenced by numeric ID, with\n  slugs used for public-facing catalog lookups where practical\n  (e.g. `\/products\/{slug}`).\n- **Errors**: standard Laravel validation\/error JSON shape \u2014\n  `{ \"message\": \"...\", \"errors\": { \"field\": [\"...\"] } }` for 422,\n  `{ \"message\": \"...\" }` for 401\/403\/404\/500.\n- **Pagination**: list endpoints are paginated (`page`, `per_page`\n  query params), returning Laravel's standard paginator shape.\n- **Money**: amounts are returned as integers in the smallest\n  currency unit (e.g. cents), with an accompanying `currency` code.\n- **Dates**: ISO 8601 (`YYYY-MM-DD` \/ `YYYY-MM-DDTHH:MM:SSZ`).\n\n---\n\nThis API is developed and maintained by **Apelisoltech Limited**,\nand is consumed by the storefront frontend(s) and, where\napplicable, admin dashboards and partner integrations."
    },
    "servers": [
        {
            "url": "https:\/\/api.mcduffcare.co.ke\/api\/v1"
        }
    ],
    "tags": [
        {
            "name": "Authentication",
            "description": "Email\/password authentication: registration, login, 2FA\nchallenge, logout, and password recovery.\n\n| Endpoint | Auth required | Purpose |\n|---|---|---|\n| `POST \/auth\/register` | No | Creates a customer account, returns a token immediately |\n| `POST \/auth\/login` | No | Authenticates by email + password |\n| `POST \/auth\/2fa-challenge` | No | Completes login for accounts with 2FA enabled |\n| `GET \/auth\/profile` | Yes | Returns the authenticated user with their roles |\n| `POST \/auth\/logout` | Yes | Revokes only the token used for this request |\n| `POST \/auth\/logout-all` | Yes | Revokes every token on the account |\n| `POST \/auth\/forgot-password` | No | Emails a signed password-reset link |\n| `POST \/auth\/reset-password` | No | Sets a new password using that link's token |\n\nRegistration self-serves customer accounts only \u2014 staff\/admin\nare created by an administrator, then sign in through this same\n`POST \/auth\/login`. There's no OTP step; a token is returned\nimmediately on register.\n\n`POST \/auth\/login` returns either a token, or\n`{ \"two_factor_required\": true }` if 2FA is enabled \u2014 in the\nlatter case, submit a code to `POST \/auth\/2fa-challenge` to get\nthe actual token. After 5 failed attempts the account locks for\n15 minutes. Password reset goes through a signed emailed link,\nnot a code, and revokes all sessions on success."
        },
        {
            "name": "Social Authentication",
            "description": "Sign-in and sign-up via third-party OAuth providers: `google`,\n`apple`. Every account created this way is a customer \u2014 there's\nno provider path to staff\/admin. A matching email on an existing\naccount logs into it and links the provider, rather than\ncreating a duplicate.\n\n| Endpoint | Flow | Purpose |\n|---|---|---|\n| `GET \/auth\/social\/{provider}\/redirect` | Web | Sends the browser to the provider's consent screen |\n| `GET \/auth\/social\/{provider}\/callback` | Web | Receives the provider's redirect, completes login |\n| `POST \/auth\/social\/token` | Mobile | Exchanges a native SDK token for a bearer token |\n\nThe web flow is a full-page redirect, not an AJAX call \u2014 point\n`window.location` at the redirect endpoint directly. On success it\nredirects again to your frontend's own callback route with `token`\nand `is_new` as query params; on failure it redirects to\n`\/login?error=<message>` instead.\n\nThe mobile flow is for clients that already have a token from the\nprovider's native SDK (Google Sign-In, Sign in with Apple) \u2014 no\nredirect needed. Response shape matches standard login, plus\n`is_new` to distinguish a fresh signup (`201`) from an existing\nlogin (`200`). Requires the provider to actually return an email;\nmissing email fails with a `401` rather than creating an\nunreachable account."
        },
        {
            "name": "Magic Link",
            "description": "Passwordless login via a one-time emailed link.\n\n| Endpoint | Purpose |\n|---|---|\n| `POST \/auth\/magic-link` | Request a login link, valid for 15 minutes |\n| `POST \/auth\/magic-link\/verify` | Exchange the link's token for a bearer token |\n\n`POST \/auth\/magic-link` always responds with the same generic\nmessage whether or not the email exists, and is rate limited to\n3 requests per minute per email. Delivery happens asynchronously\nvia a queued event\/listener, so the response doesn't wait on the\nemail actually sending. Links are single-use and tied to one\nemail address."
        },
        {
            "name": "Two-Factor Authentication",
            "description": "TOTP-based two-factor authentication: setup, confirmation,\ndisabling, and recovery codes.\n\n| Endpoint | Purpose |\n|---|---|\n| `POST \/auth\/2fa\/enable` | Generates a new secret + QR code, recovery codes. Not yet active. |\n| `POST \/auth\/2fa\/confirm` | Verifies the first code from the authenticator app, activates 2FA |\n| `POST \/auth\/2fa\/disable` | Turns 2FA off entirely, requires a valid code |\n| `GET \/auth\/2fa\/recovery-codes` | Returns remaining unused recovery codes, requires a valid code |\n| `POST \/auth\/2fa\/recovery-codes\/regenerate` | Invalidates old codes, issues a new set, requires a valid code |\n\nCovers turning 2FA on\/off and managing recovery codes \u2014 actually\nusing 2FA to complete a login happens at `POST \/auth\/2fa-challenge`\nunder Authentication. Intended for staff\/admin accounts, not\ncustomers, though nothing in the API itself blocks a customer\ntoken from calling these.\n\n`enable` only generates a secret and QR code; 2FA doesn't activate\nuntil `confirm` verifies a real code from the authenticator app.\n`disable` and both recovery-code endpoints all require a fresh\ncode even though the user is already authenticated, since a\nbearer token alone shouldn't be enough to touch 2FA settings."
        },
        {
            "name": "Role Management",
            "description": "Role creation, permission assignment, and assigning roles to\nusers.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/admin\/permissions` | List all permissions, grouped by module |\n| `GET \/admin\/roles` | List roles with their permissions |\n| `POST \/admin\/roles` | Create a role (no permissions yet) |\n| `GET \/admin\/roles\/{role}` | View a role's permissions |\n| `PUT \/admin\/roles\/{role}\/permissions` | Replace a role's permissions |\n| `DELETE \/admin\/roles\/{role}` | Delete a role |\n| `PUT \/admin\/users\/{user}\/role` | Assign a role to a user |\n| `DELETE \/admin\/users\/{user}\/role` | Remove a user's role |\n\nA user holds one role at a time \u2014 assigning a new one replaces\nthe old. The built-in `customer` and `admin` roles can't be\nedited or deleted here, since both are referenced by name\ndirectly in application code."
        },
        {
            "name": "User Management",
            "description": "Admin creation and management of staff\/admin\/customer\naccounts.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/admin\/users` | List users, filterable by `account_type` and `status` |\n| `GET \/admin\/users\/{user}` | View a user with their role |\n| `POST \/admin\/users` | Create a staff or admin account |\n| `PUT \/admin\/users\/{user}` | Update profile fields or status |\n| `POST \/admin\/users\/{user}\/suspend` | Suspend and revoke all sessions |\n| `POST \/admin\/users\/{user}\/reactivate` | Lift a suspension |\n| `DELETE \/admin\/users\/{user}` | Deactivate (soft delete) |\n\n`POST \/admin\/users` is the only way staff\/admin accounts get\ncreated \u2014 there's no public registration for them. No password\nis set directly; an event\/listener emails a password-setup link\ninstead, reusing the standard reset-password flow. An admin\ncannot suspend or delete their own account through this module."
        },
        {
            "name": "Sessions",
            "description": "View and manage the authenticated user's active login sessions\nacross devices.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/auth\/sessions` | List active sessions, most recent first |\n| `DELETE \/auth\/sessions\/other` | Revoke every session except the current one |\n| `DELETE \/auth\/sessions\/{session}` | Revoke a single session by ID |\n\nEach session includes its linked device, IP address, a\nbest-effort location, and `last_active_at`. The session behind\nthe current request is flagged `is_current: true` \u2014 don't offer\na revoke action on it; use `POST \/auth\/logout` to end that one\ninstead. A user can only revoke sessions on their own account."
        },
        {
            "name": "Notifications",
            "description": "Order\/status emails, SMS, and in-app notifications.\n\nThe system sends notifications for order confirmations, status changes,\nand other important events. Notifications can be sent via email, SMS,\nor in-app.\n\nEven we sent welcome emails, password reset emails, and order confirmation emails,\nwe can also send SMS notifications for order status changes and other important events."
        },
        {
            "name": "Branches",
            "description": "Physical store\/branch locations \u2014 code, name, location, and\nactive status.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/ecommerce\/branches` | List branches, optionally `?active=1` for active only |\n| `POST \/ecommerce\/branches` | Create a branch |\n| `GET \/ecommerce\/branches\/{branch}` | View a single branch |\n| `PUT \/ecommerce\/branches\/{branch}` | Update name, location, or phone |\n| `POST \/ecommerce\/branches\/{branch}\/activate` | Reactivate a branch |\n| `POST \/ecommerce\/branches\/{branch}\/deactivate` | Deactivate without deleting |\n| `DELETE \/ecommerce\/branches\/{branch}` | Delete a branch |\n\nA Branch represents one place a sale can happen \u2014 a physical\nstore, a warehouse, a future POS register site, or the online\nstorefront itself. Treating \"online\" as just another Branch\n(rather than a special case) means inventory, payment\nconfiguration, and future order\/channel tagging all work the\nsame way regardless of where a sale actually happened.\n\n### `code` is generated, not supplied\n\n`code` is never accepted from the request. It's generated\nautomatically on creation using a reusable code-generator\nhelper (`generate_unique_code()`) shared with future SKU\/barcode\ngeneration elsewhere in the system \u2014 e.g. `BR-4F9K2A`. The\nalphabet deliberately excludes visually ambiguous characters\n(`0`, `O`, `1`, `I`), since a branch code may end up printed on\nphysical signage, receipts, or POS hardware where a human needs\nto read or key it in reliably. Once generated, `code` is\nimmutable \u2014 `PUT \/ecommerce\/branches\/{branch}` will not change it.\n\n### The \"Online\" branch is not manageable through this API\n\nExactly one branch represents the online storefront, flagged\ninternally via `is_online`. It's created once during initial\nsetup (seeded), not through `POST ecommerce\/branches` or any other\nendpoint here \u2014 `is_online` is intentionally never accepted on\ncreate or update. This prevents more than one branch ever being\nmarked online, which several other parts of the system (payment\nconfiguration resolution, future order\/channel tagging) assume\ncan't happen.\n\n### Deactivate, don't delete, for anything with history\n\n`POST \/ecommerce\/branches\/{branch}\/deactivate` is the preferred way\nto retire a branch that has ever had stock or sales recorded\nagainst it \u2014 it stops the branch appearing in active-only\nlists without breaking historical records that reference it.\n`DELETE` is intended for branches created in error, before any\nreal data is attached to them."
        },
        {
            "name": "Media Configuration",
            "description": "Cloudinary credentials used for all file uploads across the app \u2014\nlogos, product images, and any other media.\n\n| Field | Notes |\n|---|---|\n| `cloud_name` | Cloudinary account identifier |\n| `api_key` | Public API key |\n| `api_secret` | Write-only \u2014 never returned in any response |\n| `is_active` | Whether media uploads are currently enabled |\n| `is_configured` | Computed \u2014 true only once all three credentials are set |\n\nAll three credentials must be sent together on update, even if only\none is changing. Changes take effect immediately \u2014 the next upload\nanywhere in the app uses the new credentials, with no delay or\nextra step required."
        },
        {
            "name": "App Configuration",
            "description": "Global app settings and branding \u2014 used to render header\/footer\nbranding, contact details, and the store location map.\n\n| Field | Notes |\n|---|---|\n| `brand_name` | Store\/company display name |\n| `brand_tagline` | Short tagline shown near the logo |\n| `logo_url` | Set via a dedicated logo upload, not the general update |\n| `primary_color` | Hex color used for buttons\/accents |\n| `support_email` | Public contact email |\n| `support_phone` | Public contact phone, stored in 254 format |\n| `location` | Human-readable store address |\n| `google_maps_url` | Direct link out to Google Maps |\n| `latitude` \/ `longitude` | Map coordinates, if set |\n| `has_map` | Computed \u2014 true only when both coordinates are set |\n\nThere is always exactly one configuration \u2014 updates modify it in\nplace, and only the fields included in a request are changed."
        },
        {
            "name": "Email Configuration",
            "description": "SMTP credentials used for sending transactional emails across the\napp.\n\n| Field | Notes |\n|---|---|\n| `host` | SMTP server hostname |\n| `port` | SMTP port (e.g. 587 for TLS, 465 for SSL) |\n| `username` | SMTP auth username |\n| `password` | Write-only \u2014 never returned in any response |\n| `encryption` | `tls`, `ssl`, or none |\n| `from_address` | Sender email shown to recipients |\n| `from_name` | Sender display name |\n| `is_active` | Whether email sending is currently enabled |\n| `is_configured` | Computed \u2014 true only once host, port, and from_address are set |\n\n`host`, `port`, `username`, `password`, and `from_address` must all\nbe sent together on update, even if only one is changing. Changes\ntake effect immediately \u2014 the next email sent anywhere in the app\nuses the new credentials, with no delay or extra step required."
        },
        {
            "name": "SMS Configuration",
            "description": "Africa's Talking credentials used for sending SMS notifications\nacross the app.\n\n| Field | Notes |\n|---|---|\n| `username` | Africa's Talking account username |\n| `api_key` | Write-only \u2014 never returned in any response |\n| `sender_id` | Optional custom sender name shown to recipients |\n| `is_active` | Whether SMS sending is currently enabled |\n| `is_configured` | Computed \u2014 true only once username and api_key are set |\n\nBoth `username` and `api_key` must be sent together on update, even\nif only one is changing. Changes take effect immediately \u2014 the next\nSMS sent anywhere in the app uses the new credentials, with no delay\nor extra step required."
        },
        {
            "name": "Payment Configuration",
            "description": "M-Pesa (Daraja) credentials used for STK Push payments. The only\nprovider for now \u2014 more will be added alongside these same fields\nlater.\n\n| Field | Notes |\n|---|---|\n| `mpesa_consumer_key` | Daraja app consumer key |\n| `mpesa_consumer_secret` | Write-only \u2014 never returned in any response |\n| `mpesa_shortcode` | Paybill or Till number |\n| `mpesa_shortcode_type` | `paybill` or `till` \u2014 determines the transaction type sent to Daraja |\n| `mpesa_passkey` | Write-only \u2014 never returned in any response |\n| `mpesa_environment` | `sandbox` or `production` |\n| `mpesa_callback_url` | Read-only \u2014 derived automatically|\n| `is_active` | Whether M-Pesa payments are currently enabled |\n| `is_mpesa_configured` | Computed \u2014 true only once all required credentials are set |\n\n`mpesa_consumer_key`, `mpesa_consumer_secret`, `mpesa_shortcode`, and\n`mpesa_passkey` must all be sent together on update, even if only\none is changing. Getting `mpesa_shortcode_type` wrong (till vs\npaybill) is a common source of STK push failures, since Daraja\nexpects a different transaction type for each. The callback URL is\nnot settable \u2014 it always matches this deployment's own domain.\nChanges take effect immediately."
        },
        {
            "name": "Tax Configuration",
            "description": "Store-wide tax rate and how it applies to prices.\n\n| Field | Notes |\n|---|---|\n| `tax_name` | Display label, e.g. \"VAT\" |\n| `tax_rate` | Percentage, e.g. 16.00 for 16% |\n| `prices_include_tax` | Whether stored\/entered prices already include tax, or tax is added on top |\n| `tax_registration_number` | KRA PIN \/ VAT number, shown on receipts |\n| `is_active` | Whether tax is applied at all |\n\n`GET \/settings\/tax-configuration` is public \u2014 the storefront needs `tax_rate`\nand `prices_include_tax` to display prices and \"incl.\/excl. tax\"\nlabeling correctly. Only updating it requires an admin. Changes\ntake effect immediately for every price calculation from the next\nrequest onward."
        },
        {
            "name": "Attributes",
            "description": "Reusable, industry-specific fields that a product can optionally\ncarry, without needing a new database column for every industry\nthis system serves.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/ca\/attributes` | List all attributes, in creation order |\n| `POST \/ca\/attributes` | Create an attribute |\n| `GET \/ca\/attributes\/{attribute}` | View a single attribute |\n| `PUT \/ca\/attributes\/{attribute}` | Update an attribute |\n| `DELETE \/ca\/attributes\/{attribute}` | Delete an attribute (also removes every value recorded against it) |\n\nAn Attribute here is just the **definition** of a field \u2014 its name,\nwhat kind of data it holds, and (for select-style fields) its\nallowed choices. It is not attached to any product by itself. A\nseparate model, `AttributeValue`, is what actually records \"this\nspecific product has this specific value for this attribute\" \u2014 that\npart isn't covered by this endpoint group, since it's set per-product\nwhen creating\/editing a product itself.\n\nThink of it like building a custom form field once, then reusing it\non whichever products actually need it \u2014 most products won't need\nany attributes attached at all.\n\n### `data_type` tells your frontend what input to render\n\n| `data_type` | Render as | Example |\n|---|---|---|\n| `text` | A text input | \"Active Ingredient\" |\n| `number` | A number input | \"Withdrawal Period\" |\n| `boolean` | A toggle\/checkbox | \"Requires Prescription\" |\n| `select` | A single-choice dropdown | \"Dosage Form\" |\n| `multiselect` | A multi-choice checklist | \"Allergens\" |\n\n`options` is only present (and only meaningful) when `data_type` is\n`select` or `multiselect` \u2014 it's the fixed list of choices to render.\n`unit`, when present, is just a display hint (e.g. show \"days\" or\n\"mg\" next to the value) \u2014 it doesn't affect validation or storage.\n\n### Worked example \u2014 a chemist (pharmacy)\n\nA pharmacy admin might define these once:\n\n| Attribute | `data_type` | `options` | `unit` |\n|---|---|---|---|\n| Active Ingredient | `text` | \u2014 | \u2014 |\n| Requires Prescription | `boolean` | \u2014 | \u2014 |\n| Dosage Form | `select` | Tablet, Syrup, Injection | \u2014 |\n\nThen on a specific product \u2014 say, \"Amoxicillin 500mg\" \u2014 the pharmacy\nattaches values against these same three attributes: Active\nIngredient = \"Amoxicillin\", Requires Prescription = true, Dosage\nForm = \"Tablet\". A completely different product in the same store,\nlike a hot water bottle, would carry none of these \u2014 the attributes\nexist, but nothing forces every product to use them.\n\n### Worked example \u2014 Kombuka (a drinks manufacturer)\n\nKombuka, a fictional drinks brand, might instead define:\n\n| Attribute | `data_type` | `options` | `unit` |\n|---|---|---|---|\n| Alcohol Content | `number` | \u2014 | `%` |\n| Allergens | `multiselect` | Sulphites, Nuts, Gluten | \u2014 |\n| Carbonated | `boolean` | \u2014 | \u2014 |\n\nTheir \"Original Kombuka 330ml\" product might carry Alcohol Content =\n`0.5`, Allergens = `[\"Sulphites\"]`, Carbonated = `true`. None of\nthese attributes mean anything to the pharmacy above, and neither\nstore had to touch the database schema to define them \u2014 each store\njust created the attributes it actually needs, once, through this\nsame API.\n\n### Ordering is system-managed, not something your UI needs to offer\n\nThere is no field or endpoint for reordering attributes. A newly\ncreated attribute is simply appended to the end of the list \u2014 your\nadmin UI's \"create attribute\" form doesn't need a position\/order\ninput at all.\n\n### `slug` is generated once and never changes\n\nDon't send a `slug` when creating or updating \u2014 it's derived\nautomatically from `name` the moment an attribute is created, and\nintentionally stays fixed even if the attribute is later renamed\n(so anything already referencing it by slug doesn't silently break)."
        },
        {
            "name": "Categories",
            "description": "Hierarchical product categories used for storefront navigation and\nfiltering.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/ca\/categories` | Public \u2014 category tree, 2 levels deep, each level sorted |\n| `GET \/ca\/categories\/{category}` | Public \u2014 a single category with its children |\n| `POST \/ca\/categories` | Create a category |\n| `PUT \/ca\/categories\/{category}` | Update a category |\n| `DELETE \/ca\/categories\/{category}` | Delete a category |\n| `POST \/ca\/categories\/reorder` | Reorder categories that share the same parent |\n| `POST \/ca\/categories\/{category}\/image` | Upload or replace a category's image\/banner |\n\nA category can optionally have a `parent_id`, letting stores build\na nested structure (e.g. \"Beverages\" \u2192 \"Carbonated\" \u2192 \"Cola\") where\nit's useful, or keep a flat single-level list where it isn't \u2014\nnothing forces a hierarchy to be used.\n\n### `slug` and `sort_order` are both system-managed\n\nDon't send `slug` when creating a category \u2014 it's generated\nautomatically from `name`, and stays fixed even if the category is\nlater renamed, so anything already linking to it by slug (a\nstorefront URL, a saved bookmark) doesn't silently break.\n\n`sort_order` isn't accepted on create or update either. A new\ncategory is simply appended after its existing siblings (or after\nother top-level categories, if it has no parent). To actually\nchange display order, use `POST \/ca\/categories\/reorder` \u2014 send\nthe full list of sibling IDs in the order they should appear;\nposition comes from array order alone.\n\n### Deleting requires an empty subtree first\n\n`DELETE \/ca\/categories\/{category}` fails with a `422` if the\ncategory has any subcategories \u2014 move or delete those first. This\nprevents an entire branch of the category tree from disappearing\nby accident through one delete call.\n\n### Image upload replaces, it doesn't add\n\n`POST \/ca\/categories\/{category}\/image` always replaces whatever\nimage the category had before \u2014 there's only ever one active image\nper category, not a gallery."
        },
        {
            "name": "Tax Classes",
            "description": "Optional, per-product tax rate overrides \u2014 separate from Tax\nConfiguration, which sets the store-wide default rate.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/ca\/tax-classes` | List all tax classes, default first |\n| `POST \/ca\/tax-classes` | Create a tax class |\n| `GET \/ca\/tax-classes\/{taxClass}` | View a single tax class |\n| `PUT \/ca\/tax-classes\/{taxClass}` | Update a tax class |\n| `DELETE \/ca\/tax-classes\/{taxClass}` | Delete a tax class |\n\nMost stores never need this at all \u2014 Tax Configuration's single\ndefault rate covers them. Tax Classes exist for stores with products\nthat are genuinely taxed differently from everything else \u2014 e.g. a\n\"Zero-Rated\" or \"Exempt\" class for specific items, while everything\nelse uses \"Standard Rate.\"\n\n### Exactly one class is always the default\n\nSetting `is_default: true` on create or update automatically unmarks\nwhichever class was previously default \u2014 there's no separate\n\"set default\" action. A product with no tax class of its own falls\nback to whichever class is currently marked default.\n\n### Deletion has two guardrails\n\n`DELETE` fails with a `422` if the class is the current default\n(mark another class default first) or if it's the only tax class\nleft \u2014 every store needs at least one for products to fall back to."
        },
        {
            "name": "Products",
            "description": "Product catalog \u2014 the core of what a store sells, spanning many\nindustries (retail, pharmacy, agrovet, food\/drinks manufacturing).\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/ca\/products` | Public \u2014 filterable list, includes images |\n| `GET \/ca\/products\/{product}` | Public \u2014 full detail: variants, images, attributes |\n| `POST \/ca\/products` | Create a product and its first (default) variant together |\n| `PUT \/ca\/products\/{product}` | Update product-level fields |\n| `DELETE \/ca\/products\/{product}` | Delete a product and all its variants |\n| `POST \/ca\/products\/{product}\/images` | Upload 1\u201310 gallery images at once |\n| `DELETE \/ca\/products\/{product}\/images\/{media}` | Remove a single image |\n| `GET \/ca\/products\/import\/template` | Download the bulk-import spreadsheet template |\n| `POST \/ca\/products\/import` | Upload a filled spreadsheet to bulk-create products |\n| `GET \/ca\/products\/import\/{import}` | Poll a bulk import's progress\/result |\n\nA Product holds the info shared across all its variants \u2014 name,\ndescription, category, tax class, channel visibility, and a handful\nof industry-relevant flags (`is_serialized`, `is_perishable`,\n`is_digital`). It does **not** hold SKU, barcode, or price \u2014 those\nlive on the product's variant(s); see the Product Variants tag.\n\n### Creating a product also creates its first variant\n\n`POST \/ca\/products` requires `price_online` even though pricing\nconceptually belongs to a variant, not the product \u2014 that's because\nevery product needs at least one sellable variant, and this endpoint\ncreates both together in one call. A \"simple\" product (no size\/color\noptions) never needs a second call; a \"variable\" product just adds\nmore variants afterward via the Product Variants endpoints.\n\n### `slug` is generated once and never changes\n\nSame convention as Categories and Attributes \u2014 don't send `slug`;\nit's derived from `name` at creation and stays fixed even if the\nproduct is later renamed, so existing links to it don't break.\n\n### Channel visibility is independent of status\n\n`visible_online` and `visible_pos` are separate flags from `status`\n\u2014 a product can be `active` but deliberately hidden from one\nchannel (e.g. a POS-only clearance item that should never appear on\nthe storefront).\n\n### Images are a gallery, not a single replacement\n\nUnlike a logo or category image, uploading a new product image adds\nto the gallery \u2014 up to 10 per call \u2014 rather than replacing what's\nthere. `is_primary` (applied to the first file in a multi-upload)\nmarks the main image shown in listings.\n\n### Cost price is hidden by default\n\nEvery variant may carry a `cost_price` for margin reporting, but\nit's only included in API responses for users with the\n`pricing.view-cost` permission \u2014 a staff member who can otherwise\nfully manage products won't see it unless specifically granted.\n\n### Bulk import runs in the background\n\n`POST \/ca\/products\/import` doesn't process the file inline \u2014 it\nstores it, fires off a queued job, and responds immediately (`202`)\nwith an import ID and a `poll_url`. Use\n`GET \/ca\/products\/import\/{import}` to check progress; while running,\n`status` is `pending` or `processing`, and once done it's\n`completed` or `failed`.\n\nDownload `GET \/ca\/products\/import\/template` first \u2014 it returns an\n`.xlsx` with the exact column headers expected (a `Products` sheet\nwith one filled example row, plus a `Legend` sheet listing every\nallowed value for columns like `status` and `unit_of_measure`). Fill\nin one row per product and re-upload the same file.\n\nEach row is created through the identical logic `POST \/ca\/products`\nitself uses \u2014 same validation, same auto-generated `slug`\/`sku`,\nsame default-variant creation \u2014 so an import can never create a\nproduct the manual endpoint couldn't. One bad row never stops the\nrest of the file: a failure is recorded against that row number\nwhile every other row keeps processing. Check the finished import's\n`errors` array (`{row, message}` per failure) to see exactly what to\nfix, then re-upload just the corrected rows rather than the whole\nfile again."
        },
        {
            "name": "Product Variants",
            "description": "The actual sellable unit of a product \u2014 SKU, barcode, options\n(size\/color), and every price type live here, not on the Product\nitself.\n\n| Endpoint | Purpose |\n|---|---|\n| `POST \/ca\/products\/{product}\/variants` | Add another variant to a product |\n| `PUT \/ca\/variants\/{variant}` | Update a variant |\n| `DELETE \/ca\/variants\/{variant}` | Delete a variant |\n\nEvery product has at least one variant, created automatically\nalongside the product itself via `POST \/ca\/products` \u2014 there's no\nseparate \"create the first variant\" call. These endpoints are for\nadding *additional* variants to a \"variable\" product (e.g. more\nsizes or colors) and for managing any variant afterward, including\nthe default one.\n\n### SKU is optional, barcode never is generated\n\nLeave `sku` blank to have one generated automatically. `barcode`, if\nprovided, must be a real scanned UPC\/EAN\/Code128 \u2014 there's nothing\nto auto-generate there, since it has to match the physical label.\n\n### Three separate prices, not one price with a markup\n\n`price_online`, `price_instore`, and `price_wholesale` are genuinely\nindependent numbers, not a formula applied to a single base price.\n`price_instore` falls back to `price_online` automatically when left\nunset \u2014 most products sell for the same price both channels; only\nsome need a deliberate difference. `price_wholesale` has no\nfallback \u2014 it's `null` unless explicitly set.\n\n### `cost_price` is restricted\n\nIncluded in responses only for users with the `pricing.view-cost`\npermission. A staff member who can otherwise fully manage products\nand variants won't see margin data unless specifically granted that\npermission \u2014 it's simply omitted from the response, not returned as\n`null`.\n\n### The last variant can't be deleted\n\n`DELETE \/ca\/variants\/{variant}` fails with a `422` if it's the only\nvariant a product has left \u2014 a product needs at least one sellable\nvariant to exist at all. Delete the product itself instead if\nnothing about it should remain purchasable."
        },
        {
            "name": "Inventory",
            "description": "Stock levels per variant per branch, with a full audit trail of\nevery change ever made.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/intr\/stock` | List stock, filterable by `branch_id` \/ `product_variant_id` |\n| `GET \/intr\/stock\/variants\/{variant}` | One variant's stock across every branch |\n| `GET \/intr\/stock\/variants\/{variant}\/movements` | Full movement history for a variant |\n| `POST \/intr\/stock\/initial` | Record initial stock intake |\n\nStock is tracked per (variant, branch) pair \u2014 the same variant can\nhave different quantities at different physical branches, and at\nthe Online branch. `available_quantity` on each stock record is\n`quantity` minus `reserved_quantity` \u2014 the reserved figure isn't\nused by anything yet, but is already in place for when Cart needs\nto soft-hold stock during checkout without permanently decrementing\nit.\n\n### Every change is logged automatically\n\nNothing updates a quantity directly \u2014 internally, every stock\nchange goes through one shared service that also writes a\n`StockMovement` row recording exactly what changed, by how much,\nwho did it, and why. `GET \/intr\/stock\/variants\/{variant}\/movements`\nsurfaces that trail, most recent first \u2014 useful for investigating\n\"why does this number look wrong\" without guessing.\n\n### `POST \/intr\/stock\/initial` adds, it doesn't set\n\nThis endpoint is for entering stock for the first time \u2014 it always\nadds to whatever quantity already exists rather than overwriting\nit. Running it twice by mistake will double the count, not correct\nit. A dedicated way to directly *set* an exact count (for physical\nstock counts\/reconciliation) is a separate, upcoming capability \u2014\ndon't use this endpoint to \"fix\" a number, only to add new stock."
        },
        {
            "name": "Cart",
            "description": "Guest and authenticated shopping cart \u2014 line items, stock\nreservation, and totals. Coupon application isn't implemented yet;\nthat's added once Promotions exists.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/cart` | Get the current cart |\n| `POST \/cart\/items` | Add an item (reserves stock) |\n| `PUT \/cart\/items\/{item}` | Set an item's quantity to a specific value |\n| `DELETE \/cart\/items\/{item}` | Remove an item (releases its reservation) |\n| `DELETE \/cart` | Empty the cart (releases every reservation) |\n\nEvery endpoint here works for both guests and logged-in customers,\nwith no separate \"guest cart\" API \u2014 the same calls, the same\nresponses.\n\n### Identifying a guest cart\n\nCall any cart endpoint with no special headers to start as a\nguest. The response includes a `guest_token` \u2014 store it (e.g.\nlocalStorage) and send it back as `X-Guest-Token` on every\nsubsequent cart request to keep resolving to the same cart. Once\nthe customer is authenticated (a valid bearer token is present),\nthat takes priority automatically \u2014 no need to keep sending\n`X-Guest-Token` at that point.\n\n### Guest carts merge on login\n\nIf a guest with items in their cart then logs in or registers\n(with `X-Guest-Token` sent on that same request), their guest\ncart's items are merged into their account's cart automatically \u2014\nmatching variants combine quantities rather than duplicating.\nNothing else needs to call a separate \"merge\" endpoint.\n\n### Adding an item reserves stock immediately\n\n`POST \/cart\/items` doesn't just record an intent \u2014 it actually\nholds the stock via a reservation, checked against real-time\navailability. If there isn't enough available, the request fails\nwith a `422` rather than letting two customers both \"have\" the\nlast unit in their carts. Removing an item or clearing the cart\nreleases that hold.\n\n### Totals\n\nEvery cart response includes `subtotal`, `tax`, and `total` \u2014\ncomputed live from each line's current price and its product's\ntax class, not cached or snapshotted. Prices in the cart always\nreflect current pricing; a snapshot only happens once an item\nbecomes part of an actual Order at checkout."
        },
        {
            "name": "Checkout & Orders",
            "description": "Order creation, status lifecycle, and order history."
        },
        {
            "name": "POS",
            "description": "In-store point-of-sale integration \u2014 not yet implemented, planned\nfor a future phase once Catalog, Inventory, and Cart are solid.\n\nThe POS terminal is intended to be just another client of this\nsame API \u2014 same stock table, same Orders model \u2014 not a separate\nsystem synced periodically, to avoid online\/in-store stock ever\ndrifting out of sync.\n\nCapabilities to design in from the start once this module is\nbuilt: till\/register + cashier shift management (open\/close,\nX\/Z reports), held\/suspended transactions, split and partial\npayments, manager-approved price overrides, barcode scan-to-add,\ncustomer lookup mid-sale for loyalty, returns\/exchanges against a\npast sale, and offline resilience (local queueing + safe retry\nso a dropped connection can't double-charge or double-decrement\nstock). Orders from this channel share the same Checkout & Orders\nmodel as online orders, tagged `channel: pos` plus POS-specific\nmetadata (register, cashier, till session)."
        },
        {
            "name": "Payments",
            "description": "Payment provider integration, transactions, and refunds."
        },
        {
            "name": "Shipping",
            "description": "Rates, zones, carriers, and fulfillment status."
        },
        {
            "name": "Customers",
            "description": "Customer profile, addresses, and account management."
        },
        {
            "name": "Reviews & Ratings",
            "description": "Product reviews and moderation."
        },
        {
            "name": "Promotions",
            "description": "Discount codes, campaigns, and bundle pricing."
        },
        {
            "name": "Blog",
            "description": "Blog posts, categories, and content management."
        },
        {
            "name": "AI Knowledge & Settings",
            "description": "Admin configuration for the AI agents \u2014 what personality\/rules\nthe system prompt uses, and what factual content (policies, FAQs)\nthe knowledge base injects. Neither is hardcoded in the agent\nclasses; both are read fresh from these tables on every single\nagent request, so changes here take effect immediately, with no\ndeploy or cache-clear step.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET \/admin\/ai\/profiles` | List all AI profiles |\n| `POST \/admin\/ai\/profiles` | Create a profile (inactive by default) |\n| `GET \/admin\/ai\/profiles\/active` | Get the currently active profile |\n| `GET \/admin\/ai\/profiles\/{id}` | View a single profile |\n| `PUT \/admin\/ai\/profiles\/{id}` | Update a profile |\n| `POST \/admin\/ai\/profiles\/{id}\/activate` | Make this profile the active one |\n| `DELETE \/admin\/ai\/profiles\/{id}` | Delete a profile |\n| `GET \/admin\/ai\/knowledge` | List knowledge entries, `?type=` to filter |\n| `POST \/admin\/ai\/knowledge` | Add a knowledge entry (active by default) |\n| `GET \/admin\/ai\/knowledge\/grouped` | Active entries grouped by type |\n| `GET \/admin\/ai\/knowledge\/{id}` | View a single entry |\n| `PUT \/admin\/ai\/knowledge\/{id}` | Update an entry |\n| `POST \/admin\/ai\/knowledge\/{id}\/toggle` | Flip an entry active\/inactive |\n| `DELETE \/admin\/ai\/knowledge\/{id}` | Delete an entry |\n\n### AI Profiles \u2014 the agent's personality and rules\n\nA profile's `prompt` is a JSON object with three parts, assembled\ninto the system prompt in this order:\n\n| Field | Meaning |\n|---|---|\n| `identity` | Who the assistant is \u2014 e.g. \"You are a friendly shopping assistant for...\" |\n| `rules` | Behavioral constraints \u2014 what it must or must never do |\n| `style` | Tone and formatting guidance \u2014 e.g. \"Keep replies short, quote prices in KES\" |\n\nOnly ONE profile is active at a time. Creating a profile never\nswaps it in \u2014 call `activate` explicitly, which atomically\ndeactivates whichever profile was active before. Deleting the\nactive profile leaves nothing active; agents fall back to their\nown hardcoded default instructions rather than failing \u2014 activate\na replacement afterward if that's not the intended state.\n\nRestricted to admin accounts, not staff. A profile shapes an\nagent's actual behavior and guardrails \u2014 including, for the\nshopping agent, the conditions under which it's allowed to place\na paid order \u2014 so editing it carries materially more risk than\neveryday content upkeep.\n\n### Knowledge \u2014 factual content the agent answers from\n\nEach entry is a `type` + `title` + `content` block \u2014 shipping\npolicy, returns policy, FAQs, product category notes, anything\nthe assistant should be able to quote or paraphrase accurately.\n`type` is free text, not a hard-coded enum, but staying consistent\n(`shipping_policy`, `returns_policy`, `faq`, `payment_methods`,\n...) keeps `?type=` filtering and the `grouped` endpoint useful\nfor browsing.\n\nEvery active entry is concatenated into every agent's system\nprompt on every request \u2014 there's no per-agent selection of which\nentries apply to which assistant. Prefer `toggle` over `delete`\nfor anything you might want back later (a seasonal promotion's\nterms, a paused policy) \u2014 toggling off removes it from what\nagents see without losing the content.\n\nOpen to staff as well as admin \u2014 this is closer to everyday\ncontent maintenance (updating a policy, adding an FAQ) than to\nchanging an agent's core behavior, which is why the bar here is\nlower than for AI Profiles."
        },
        {
            "name": "AI Support Agent",
            "description": "AI-powered assistant for customer support AND shopping \u2014 one\nagent, one set of endpoints. The agent decides what a message\nneeds (answer a question, look up an order, search products, add\nto cart, check out) based on the tools available to whoever is\nasking; the frontend never has to classify intent or pick a\ndifferent endpoint for \"help me\" vs \"buy me two of these.\"\n\n| Endpoint | Auth required | Purpose |\n|---|---|---|\n| `POST \/support\/chat` | No | Send a message, get a streamed reply |\n| `GET \/support\/conversations` | Yes | List the user's past conversations |\n| `GET \/support\/conversations\/{conversationId}\/messages` | Yes | Full message history for one conversation |\n| `DELETE \/support\/conversations\/{conversationId}` | Yes | Delete a conversation permanently |\n\n### `POST \/support\/chat` streams, it doesn't return JSON\n\nResponds with Server-Sent Events (`Content-Type:\ntext\/event-stream`), not a normal JSON body. Consume it with\n`EventSource`, or `fetch()` + a `ReadableStream` reader if you\nneed an `Authorization` header. Each frame's `type` field:\n\n| `type` | Meaning |\n|---|---|\n| `text` | Assistant reply text, arrives token-by-token \u2014 append `content` |\n| `reasoning` | Model's internal reasoning, if the provider exposes it \u2014 optional to render |\n| `tool_call` | The assistant is invoking a backend tool \u2014 see below for what to show |\n| `tool_result` | That tool call's result \u2014 usually not shown directly, the assistant explains it in the next `text` frames |\n| `done` | Stream finished |\n\n### What actually happens during a shopping conversation\n\nA message like \"buy me two packets of X\" runs through several\ntool calls in the *same* streamed request \u2014 the customer sees it\nhappen live, not as a single opaque wait:\n\n1. **Search** \u2014 the assistant looks up the real product, price,\nand stock (never invents one). If the customer named something\nambiguous, it asks which product they meant before going\nfurther.\n2. **Add to cart** \u2014 one tool call per distinct item, repeated for\neverything they asked for.\n3. **Summarize** \u2014 once they say they're done, the assistant reads\nback every item and the live total.\n4. **Resolve delivery** \u2014 the assistant checks their saved\nshipping addresses. If they already gave a phone number or\ndelivery details earlier in the SAME conversation, it reuses\nthem rather than asking again; otherwise it uses their default\nsaved address or asks for one.\n5. **Confirm before charging** \u2014 the assistant explicitly restates\nthe items, total, shipping address, and the phone the M-Pesa\nprompt will go to, and waits for a clear \"yes\" before doing\nanything that spends money. It will not place an order on a\nfirst mention of a product.\n6. **Place the order** \u2014 only after that confirmation, an order is\ncreated and an M-Pesa STK Push is sent. The assistant tells the\ncustomer the order number and that the order is NOT paid yet \u2014\nthey still have to approve the prompt on their phone. Poll\n`GET \/orders\/{order}` (Checkout & Orders) separately to see\nwhen payment actually resolves; this endpoint doesn't push\npayment-status updates itself.\n\nUse `tool_call` frames to drive a live status indicator (\"Searching\nproducts\u2026\", \"Adding to cart\u2026\", \"Checking your saved addresses\u2026\")\nrather than leaving the customer staring at a blank gap between\nmessages \u2014 the whole flow happens as one continuous stream, so\nthere's no separate \"checkout mode\" to switch the UI into.\n\n### Guests can chat, but not shop\n\nNo token required to call this endpoint at all \u2014 a guest's\nfirst response echoes an `X-Support-Guest-Token` header\n(same pattern as Cart's `X-Guest-Token`, but a distinct\nidentity \u2014 send it back on every subsequent request), and\ncan browse products and ask general questions answered from the\nknowledge base. They cannot add to cart, check out, or see\naccount\/order data \u2014 those tools simply aren't available to their\nagent instance. If a guest tries to buy something, the assistant\ntells them to log in first and picks the conversation back up\nonce they have (their guest conversation merges into their\naccount automatically on login, as long as `X-Support-Guest-Token`\nis sent on that login\/register request too \u2014 same\n`conversation_id`, no separate merge call needed).\n\n### Rate limiting\n\nEach participant (guest, customer, or staff) is limited to a\nfixed number of messages per minute to protect against hammering\nthe underlying AI provider. Exceeding it returns `429` with a\n`retry_after` (seconds) in the response body \u2014 surface this as a\nbrief \"slow down a moment\" state, not a hard error.\n\n### Conversation continuity\n\nOmit `conversation_id` on the first message of a new chat; send\nthe same one on every message after that so the assistant\nretains context \u2014 including everything decided earlier in a\nshopping flow (items already confirmed, address already given).\nThe SSE stream does not currently emit the conversation's ID\nitself \u2014 for a logged-in user, look it up via\n`GET \/support\/conversations` after the first exchange if you\ndon't already have it client-side.\n\n### Staff\/admin get a different agent automatically\n\nA staff or admin bearer token hitting the exact same\n`POST \/support\/chat` endpoint is routed to an internal agent with\ntools for looking up any customer's account, orders, and payments\nby customer ID \u2014 no shopping tools, since staff aren't buying on\na customer's behalf through this flow. This routing happens\nentirely server-side based on the authenticated user's role;\nthere is no separate admin endpoint to call."
        },
        {
            "name": "Store Locator",
            "description": "A directory of where the product can be bought \u2014 physical retail\npartners (supermarkets, bars\/restaurants) shown on a \"find stores\nnear me\" map, plus online retailers listed separately. This is\nNOT the same thing as Branches: a Branch is a location YOU\noperate (your own storefront, warehouse, future POS register); a\nretail partner is a third-party seller (Carrefour, Naivas, Jumia)\nstocking your product on their own shelves, which you have no\noperational control or live inventory visibility into.\n\n| Endpoint | Auth required | Purpose |\n|---|---|---|\n| `GET \/store-locator\/nearby` | No | Nearby physical locations, distance-sorted |\n| `GET \/store-locator\/partners` | No | All active partners, grouped by channel |\n| `GET \/admin\/store-locator\/partners` | Staff\/Admin | List all partners with locations + logo |\n| `POST \/admin\/store-locator\/partners` | Staff\/Admin | Create a partner |\n| `PUT \/admin\/store-locator\/partners\/{partner}` | Staff\/Admin | Update a partner |\n| `DELETE \/admin\/store-locator\/partners\/{partner}` | Staff\/Admin | Delete a partner (cascades to its locations) |\n| `POST \/admin\/store-locator\/partners\/{partner}\/logo` | Staff\/Admin | Upload\/replace a partner's logo |\n| `POST \/admin\/store-locator\/partners\/{partner}\/locations` | Staff\/Admin | Add a physical location |\n| `PUT \/admin\/store-locator\/locations\/{location}` | Staff\/Admin | Update a location |\n| `DELETE \/admin\/store-locator\/locations\/{location}` | Staff\/Admin | Delete a location |\n\n### Three channels, not all of them have locations\n\n`channel` is one of `supermarket`, `bar_restaurant`, or `online`.\nThe first two are physical \u2014 they get coordinates and appear as\npins in nearby-search results. `online` partners (Jumia, Glovo,\nthe store's own e-commerce site listed as a retailer, etc.) have\nno coordinates at all and can never have a location added \u2014\n`POST ...\/partners\/{partner}\/locations` returns a `422` if you try\non an `online` partner. They only ever appear via\n`GET \/store-locator\/partners`, grouped under `online`, as a logo\nlinking out to `website_url`.\n\n### There is deliberately no stock status\n\nEarlier designs considered an \"In Stock\" \/ \"Low Stock\" badge per\nlocation, but that was dropped \u2014 this system has no live feed\ninto any retail partner's actual shelf inventory, and a\nmanually-entered badge goes stale the moment whoever set it walks\naway. Rather than show a confident-looking number that's quietly\nwrong, this module only ever answers \"does this store carry the\nproduct and where is it\" \u2014 not \"is it currently on the shelf\nright now.\" If a customer needs certainty a specific product is\navailable, direct them to the store directly or to your own\nCart\/Checkout flow, where stock is real and live.\n\n### How \"near me\" actually works, server-side\n\n`GET \/store-locator\/nearby` takes `lat`\/`lng` plus an optional\n`radius_km` (default 25, max 200) and `channel` filter\n(`supermarket` or `bar_restaurant` only \u2014 `online` is rejected\nhere, since it has no coordinates to be \"near\"). Results come\nback nearest-first with a `distance_km` field, computed as true\ngreat-circle distance, not a straight-line approximation.\n\nUnder the hood this uses a MySQL\/MariaDB spatial index\n(`ST_Distance_Sphere` narrowed by a bounding-box `MBRContains`\ncheck first) rather than scanning every location and computing\ndistance row by row \u2014 built this way from the start because the\nlocation count is expected to reach the thousands nationwide, and\na plain Haversine-over-every-row query would get slower as more\nstores are onboarded rather than staying fast.\n\n### Frontend integration \u2014 getting the user's location\n\nThis API does not geocode anything itself \u2014 it only accepts\n`lat`\/`lng` and returns distances from that point. Getting those\ncoordinates is entirely a frontend concern, and there are two\npaths depending on what the user allows:\n\n**1. Browser geolocation (preferred, most accurate)**\n\n```js\n    navigator.geolocation.getCurrentPosition(\n    (position) => {\n        const { latitude, longitude } = position.coords;\n        fetchNearbyStores(latitude, longitude);\n    },\n    (error) => {\n        \/\/ Permission denied, or unsupported \u2014 fall back to (2) below.\n        showManualLocationSearch();\n    },\n    { enableHighAccuracy: true, timeout: 8000 }\n    );\n```\n\nThis requires HTTPS in production (browsers refuse geolocation on\nplain HTTP except on localhost) and always needs a user gesture or\nexplicit permission prompt \u2014 don't call it silently on page load\nwithout the user expecting a location prompt to appear.\n\n**2. Manual address search, via OpenStreetMap's Nominatim\n(fallback, or for a typed-address search box)**\n\nIf geolocation is denied, or you want to offer \"search by area\"\nas well as \"use my location,\" geocode free-text like \"Westlands,\nNairobi\" into coordinates using OpenStreetMap's Nominatim service\n\u2014 no API key required, unlike Google's geocoding API:\n\n```js\n    async function geocodeAddress(query) {\n    const res = await fetch(\n        `https:\/\/nominatim.openstreetmap.org\/search?` +\n        `q=${encodeURIComponent(query)}&format=json&countrycodes=ke&limit=1`,\n        { headers: { 'User-Agent': 'YourAppName\/1.0' } } \/\/ required by Nominatim's usage policy\n    );\n    const [result] = await res.json();\n    if (!result) return null;\n    return { lat: parseFloat(result.lat), lng: parseFloat(result.lon) };\n    }\n```\n\nNominatim's public instance has a strict usage policy \u2014 max 1\nrequest\/second, a descriptive `User-Agent` header is required, and\nit's not meant for high-volume production traffic. For anything\nbeyond light, occasional use, self-host a Nominatim instance or\nuse a paid geocoding provider instead; don't hammer the public\nendpoint from every page load.\n\n**3. Displaying the map itself**\n\nFor the actual map (pins, zoom, \"Interactive Map\" panel in the\ndesign), Leaflet + OpenStreetMap tiles is the direct equivalent of\nGoogle Maps here, also with no API key:\n\n```html\n    <link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet\/dist\/leaflet.css\" \/>\n    <script src=\"https:\/\/unpkg.com\/leaflet\/dist\/leaflet.js\"><\/script>\n```\n\n```js\n    const map = L.map('map').setView([userLat, userLng], 13);\n    L.tileLayer('https:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png', {\n    attribution: '&copy; OpenStreetMap contributors',\n    }).addTo(map);\n\n    nearbyResults.forEach((location) => {\n    L.marker([location.latitude, location.longitude])\n        .addTo(map)\n        .bindPopup(`${location.partner_name} \u2014 ${location.branch_label}`);\n    });\n```\n\nThe `&copy; OpenStreetMap contributors` attribution is not\noptional \u2014 it's a condition of OSM's tile usage policy, not a\nsuggestion.\n\n### Formatting distance below 1 km\n\n`distance_km` from the API is always in kilometers, rounded to 2\ndecimal places (e.g. `0.35`) \u2014 it is never converted to meters\nserver-side, since kilometers is the one consistent unit regardless\nof how close or far a result is. Meter-level display is a\nfrontend formatting choice: showing \"0.35 km\" to a customer standing\n350 meters from a store reads oddly, so convert anything under 1 km\nat render time, not before:\n\n```js\n    function formatDistance(distanceKm) {\n    if (distanceKm < 1) {\n        return `${Math.round(distanceKm * 1000)} m`;\n    }\n    return `${distanceKm.toFixed(1)} km`;\n    }\n\n    \/\/ formatDistance(0.35)  \u2192 \"350 m\"\n    \/\/ formatDistance(1.2)   \u2192 \"1.2 km\"\n    \/\/ formatDistance(12.75) \u2192 \"12.8 km\"\n```\n\nKeep the underlying `distance_km` value as returned for sorting\nand any radius-filter logic \u2014 only the display string should\nbranch on the 1 km threshold, not the value used for\ncomparisons\/sorting.\n\n### Logos are a two-step upload, like a blog post's featured image\n\n`POST \/admin\/store-locator\/partners` does not accept a logo \u2014\ncreate the partner first, then call\n`POST ...\/partners\/{partner}\/logo` separately. Uploading again\nalways replaces the previous logo; there's no gallery, one logo\nper partner.\n\n### Deactivate, don't delete, for anything already public\n\nBoth partners and locations support `is_active`. Deleting a\npartner cascades and permanently removes every location under it\nwith no undo \u2014 prefer setting `is_active: false` on a partner or\nlocation that's temporarily closed, being relocated, or otherwise\nshouldn't show up right now but might come back. Reserve `DELETE`\nfor entries created in error."
        },
        {
            "name": "Reporting & Analytics",
            "description": "Sales, inventory, and customer reports."
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/admin\/ai\/profiles\/active": {
            "get": {
                "operationId": "aiProfile.active",
                "description": "Returns `null` in `data` if nothing is active right now \u2014 a\nvalid state, not an error.",
                "summary": "Get the currently active profile, if any",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/AiProfile"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/ai\/profiles": {
            "get": {
                "operationId": "aiProfile.index",
                "summary": "List all AI profiles, most recently created first",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/AiProfile"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "aiProfile.store",
                "description": "New profiles are inactive by default \u2014 creating one never swaps\nout whichever profile agents are currently using. Call\n`activate` explicitly once you're ready to switch to it.",
                "summary": "Create a new AI profile",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreAiProfileRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AiProfile"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile created successfully"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/ai\/profiles\/{id}": {
            "get": {
                "operationId": "aiProfile.show",
                "summary": "View a single AI profile",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "aiProfile.update",
                "description": "Editing the currently active profile takes effect on the very\nnext agent request \u2014 agents read the active profile fresh\nevery time, there's no publish or cache-clear step.",
                "summary": "Update a profile's name or prompt content",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateAiProfileRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile updated successfully"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "aiProfile.destroy",
                "description": "Deleting the currently active one leaves nothing active \u2014 agents\nfall back to their own hardcoded default instructions rather\nthan failing. Activate a replacement afterward if that's not\nthe intended state.",
                "summary": "Delete an AI profile",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile deleted successfully"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/ai\/profiles\/{id}\/activate": {
            "post": {
                "operationId": "aiProfile.activate",
                "description": "Exactly one profile is active at a time \u2014 activating this one\nautomatically deactivates whichever was active before. There's\nno separate \"deactivate\" action; activate a different profile\ninstead.",
                "summary": "Make this the active profile",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile activated successfully"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/ai\/knowledge\/grouped": {
            "get": {
                "operationId": "aiKnowledge.grouped",
                "description": "Convenience view for an admin UI \u2014 e.g. one collapsible section\nper type instead of a flat list. Only active entries appear,\nmatching what agents actually see.",
                "summary": "All active entries, grouped by type",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/ai\/knowledge": {
            "get": {
                "operationId": "aiKnowledge.index",
                "description": "Filter with `?type=shipping_policy` to see one category only \u2014\nsee `AiKnowledge`'s `TYPE_*` constants for common values, though\n`type` is free text, not a hard-coded enum.",
                "summary": "List knowledge base entries, most recently created first",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/AiKnowledge"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "aiKnowledge.store",
                "description": "Active by default, and picked up by every agent's system prompt\non its very next request \u2014 no publish step. Give it a clear\n`title` (e.g. \"Shipping Policy\") since it's shown to the model\nas a labeled section header.",
                "summary": "Add a new knowledge base entry",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreAiKnowledgeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AiKnowledge"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Knowledge created successfully"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/ai\/knowledge\/{id}": {
            "get": {
                "operationId": "aiKnowledge.show",
                "summary": "View a single knowledge base entry",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "aiKnowledge.update",
                "description": "Changes apply immediately to every agent's next request \u2014 no\ncaching or delay to account for.",
                "summary": "Update a knowledge base entry",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateAiKnowledgeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Knowledge updated successfully"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "aiKnowledge.destroy",
                "summary": "Delete a knowledge base entry permanently",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Knowledge deleted successfully"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/ai\/knowledge\/{id}\/toggle": {
            "post": {
                "operationId": "aiKnowledge.toggle",
                "description": "Prefer this to delete for anything you might want back later\n(a seasonal policy, a paused promotion) \u2014 inactive entries drop\nout of every agent's knowledge base but stay in the table.",
                "summary": "Toggle an entry active\/inactive without deleting it",
                "tags": [
                    "AI Knowledge & Settings"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Knowledge status updated"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/support\/chat": {
            "post": {
                "operationId": "supportChat.stream",
                "description": "Returns a Server-Sent Events (SSE) stream \u2014 `Content-Type:\ntext\/event-stream`. Do NOT use a normal fetch()\/axios call and\nwait for JSON; the response never \"finishes\" in that sense, it\nstreams. Consume it with the browser's native `EventSource`, or\n`fetch()` + `ReadableStream` if you need to send a custom\nAuthorization header (EventSource can't set headers).\n\nEach SSE frame is a `data: {...}\\n\\n` line containing JSON.\nParse each frame's `type` field to know how to handle it:\n\n- `text_delta`  \u2192 assistant reply text, arrives token-by-token.\n                  Append `delta` to the message you're rendering.\n- `tool_call`   \u2192 the assistant is invoking a backend tool.\n                  `tool_name` is the tool, `arguments` is what it\n                  was called with. Drive a live status indicator\n                  off this \u2014 e.g. \"Checking your order...\",\n                  \"Searching products...\", \"Adding to cart...\".\n                  A shopping message may fire several of these\n                  in sequence within one stream \u2014 expected, not\n                  an error.\n- `tool_result` \u2192 the result of that tool call. Usually not\n                  shown directly \u2014 the assistant's next\n                  `text_delta` frames explain it in prose.\n- `stream_end`  \u2192 this leg of the stream is finished. A tool\n                  call triggers a second stream_start\/text\/...\n                  sequence after its tool_result \u2014 only stop\n                  listening on the final `[DONE]` sentinel line.\n\nThe shopping flow (for logged-in customers):\n1. They name products \u2014 the assistant searches and confirms\n   matches before adding anything.\n2. Items get added to cart, one `tool_call` per item.\n3. The assistant reads back the full cart and total.\n4. It resolves shipping \u2014 reusing anything already said earlier\n   in the SAME `conversation_id`, or their default saved\n   address, before asking for new details.\n5. It explicitly restates items, total, address, and phone,\n   and waits for a clear \"yes\" before placing the order \u2014 it\n   will not check out on a first mention of a product.\n6. On success, it gives an order number and says the order is\n   NOT paid yet \u2014 the customer still has to approve the M-Pesa\n   prompt on their phone. Poll `GET \/orders\/{order}` (Checkout\n   & Orders) separately to track when payment actually\n   resolves \u2014 this endpoint doesn't push payment updates.\n\nGuests can chat and search\/browse products, but have no\ncart\/checkout tools \u2014 if a guest tries to buy something, the\nassistant tells them to log in.\n\nRate limiting: each participant (guest, customer, or staff) is\ncapped at a fixed number of messages per minute to protect the\nunderlying AI provider from being hammered. Exceeding it\nreturns `429` with `retry_after` (seconds) in the response\nbody \u2014 surface this as a brief \"slow down a moment\" state, not\na hard error page.\n\nConversation continuity:\n- First message of a new chat: omit `conversation_id`.\n- The `X-Conversation-Id` response header carries the id for\n  this stream immediately.\n- Every message after the first: pass the same `conversation_id`\n  so the assistant remembers prior turns. If a stale\/mismatched\n  id is sent (e.g. after logging out), the backend transparently\n  starts a fresh conversation instead of erroring \u2014 read the\n  (possibly new) id back off `X-Conversation-Id` on every\n  response and use that going forward.\n\nGuest sessions:\n- No login required to use this endpoint at all.\n- Guest identity is resolved primarily from `X-Device-Id` \u2014 a\n  client-generated id sent on every request.\n- `X-Support-Guest-Token` is a secondary\/legacy identity, echoed\n  back on unauthenticated responses.\n- Once a bearer token is present, stop sending either guest\n  header \u2014 auth takes priority automatically.\n- Guest conversations are NOT merged on login \u2014 they're\n  intentionally disposable. Once a guest logs in, their guest\n  session is discarded and they start a fresh conversation as\n  themselves (see AuthController::discardGuestState).\n\nStaff\/admin: a staff or admin bearer token hitting this exact\nsame endpoint is routed server-side to an internal agent with\ntools for looking up any customer's account, orders, and\npayments by customer ID \u2014 no shopping tools. There is no\nseparate admin endpoint to call.",
                "summary": "Send a message and stream the assistant's reply",
                "tags": [
                    "AI Support Agent"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/SupportChatRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "retry_after": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "retry_after"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/support\/conversations": {
            "get": {
                "operationId": "supportChat.conversations",
                "description": "Requires auth \u2014 guests have no listable history. Use this to\npopulate a \"chat history\" sidebar for logged-in users.\n\nReturns conversations newest-first. `data` is a plain array of\nconversation objects; `meta` gives standard pagination info.",
                "summary": "List the logged-in user's past conversations",
                "tags": [
                    "AI Support Agent"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/Conversation"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "per_page",
                                                "total",
                                                "last_page"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/support\/conversations\/{conversationId}\/messages": {
            "get": {
                "operationId": "supportChat.messages",
                "description": "Requires auth. 404s if the conversation doesn't exist or\ndoesn't belong to the authenticated user.",
                "summary": "Get the full message history for one conversation",
                "tags": [
                    "AI Support Agent"
                ],
                "parameters": [
                    {
                        "name": "conversationId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "role": {
                                                        "type": "string"
                                                    },
                                                    "content": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "date-time"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "role",
                                                    "content",
                                                    "created_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/support\/conversations\/{conversationId}": {
            "delete": {
                "operationId": "supportChat.destroy",
                "description": "Requires auth. Permanent. Same 404 behavior as above if the\nconversation isn't theirs.",
                "summary": "Delete a conversation and all its messages",
                "tags": [
                    "AI Support Agent"
                ],
                "parameters": [
                    {
                        "name": "conversationId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Conversation deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/settings\/app-configuration": {
            "get": {
                "operationId": "app-configuration.show",
                "description": "Public \u2014 no authentication required. Call this to render header\/\nfooter branding, contact details, and the store location map.\nReturns brand name, tagline, logo URL, primary color, support\nemail\/phone, location, and map coordinates in one response.",
                "summary": "Get the current app configuration",
                "tags": [
                    "App Configuration"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AppConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "put": {
                "operationId": "app-configuration.update",
                "description": "Admin-only. Send only the fields you want to change \u2014 anything\nomitted keeps its current value. There is always exactly one\nconfiguration, so no ID is needed in the request.",
                "summary": "Update the app configuration",
                "tags": [
                    "App Configuration"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateAppConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AppConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Settings updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/settings\/app-configuration\/upload-logo": {
            "post": {
                "operationId": "app-configuration.upload-logo",
                "description": "Admin-only. Send a single image file (jpg, png, webp, or svg,\nmax 2MB) as multipart form data under the `logo` field. Uploading\na new logo replaces whichever one was active before \u2014 there is\nonly ever one logo at a time. The response's `logo_url` is ready\nto use immediately; no separate step is needed to fetch the new\nlogo afterward.",
                "summary": "Upload or replace the store logo",
                "tags": [
                    "App Configuration"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UploadLogoRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AppConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Logo updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/attributes": {
            "get": {
                "operationId": "attribute.index",
                "description": "Ordering is system-managed \u2014 there's no manual \"arrange\" step or\nendpoint. A newly created attribute always appears last.",
                "summary": "List all attributes, in creation order",
                "tags": [
                    "Attributes"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/AttributeResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "attribute.store",
                "description": "`slug` and ordering position are generated automatically \u2014 don't\nsend either. `options` is required only when `data_type` is\n`select` or `multiselect`.",
                "summary": "Create an attribute",
                "tags": [
                    "Attributes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreAttributeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AttributeResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Attribute created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/attributes\/{attribute}": {
            "get": {
                "operationId": "attribute.show",
                "summary": "View a single attribute",
                "tags": [
                    "Attributes"
                ],
                "parameters": [
                    {
                        "name": "attribute",
                        "in": "path",
                        "required": true,
                        "description": "The attribute ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AttributeResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "attribute.update",
                "description": "Send only the fields you want to change. Renaming an attribute\ndoes not change its `slug` \u2014 the slug stays stable once set.",
                "summary": "Update an attribute",
                "tags": [
                    "Attributes"
                ],
                "parameters": [
                    {
                        "name": "attribute",
                        "in": "path",
                        "required": true,
                        "description": "The attribute ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateAttributeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AttributeResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Attribute updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "attribute.destroy",
                "description": "Also removes every value recorded against it on any product.",
                "summary": "Delete an attribute",
                "tags": [
                    "Attributes"
                ],
                "parameters": [
                    {
                        "name": "attribute",
                        "in": "path",
                        "required": true,
                        "description": "The attribute ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Attribute deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/register": {
            "post": {
                "operationId": "auth.register",
                "description": "Creates a new customer account and returns a bearer token\nimmediately \u2014 there is no email OTP verification step. Only\ncustomer accounts can self-register; staff and admin accounts\nare created by an administrator.\n\nIf the request carries `X-Guest-Token`, any guest cart\nassociated with it is merged into the new account. Guest\nsupport-chat sessions (identified by `X-Device-Id`) are NOT\nmerged \u2014 they're intentionally disposable and are discarded\nonce the account is created.",
                "summary": "Register (customer only)",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/RegisterRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "$ref": "#\/components\/schemas\/UserResource"
                                                },
                                                "token": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "user",
                                                "token"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Registration successful."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/auth\/login": {
            "post": {
                "operationId": "auth.login",
                "description": "Authenticates with email and password. If 2FA is enabled, returns\n`two_factor_required: true` instead of a token \u2014 complete via\n`POST \/auth\/2fa-challenge`. Account locks for 15 minutes after\n5 failed attempts within a rate-limit window.\n\nIf the request carries `X-Guest-Token`, any guest cart is\nmerged into the authenticated account. Guest support-chat\nsessions are discarded, not merged. Not applicable when\n`two_factor_required` is returned \u2014 that happens on the\nfollow-up `POST \/auth\/2fa-challenge` call instead, once auth\nactually completes.",
                "summary": "Login",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/LoginRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "user": {
                                                            "$ref": "#\/components\/schemas\/UserResource"
                                                        },
                                                        "token": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "user",
                                                        "token"
                                                    ]
                                                },
                                                "meta": {
                                                    "type": "object",
                                                    "properties": {
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Login successful."
                                                        }
                                                    },
                                                    "required": [
                                                        "message"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "two_factor_required": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "two_factor_required"
                                                    ]
                                                },
                                                "meta": {
                                                    "type": "object",
                                                    "properties": {
                                                        "message": {
                                                            "type": "string",
                                                            "const": "Enter your authenticator code to complete login."
                                                        }
                                                    },
                                                    "required": [
                                                        "message"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/auth\/2fa-challenge": {
            "post": {
                "operationId": "auth.twoFactorChallenge",
                "description": "If the request carries `X-Guest-Token`, any guest cart is\nmerged into the account once the challenge succeeds. Guest\nsupport-chat sessions are discarded, not merged.",
                "summary": "Complete 2FA login challenge",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/TwoFactorChallengeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "$ref": "#\/components\/schemas\/UserResource"
                                                },
                                                "token": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "user",
                                                "token"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Login successful."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/auth\/forgot-password": {
            "post": {
                "operationId": "auth.forgotPassword",
                "description": "Sends a signed reset link via email. Always returns a generic\nsuccess message \u2014 never reveals whether the email exists.",
                "summary": "Request password reset link",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/EmailRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "If that email is registered, a reset link has been sent."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/auth\/reset-password": {
            "post": {
                "operationId": "auth.resetPassword",
                "summary": "Reset password using the token from the emailed reset link.\nRevokes all existing sessions on success",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/ResetPasswordRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Password reset successful. Please log in with your new password."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/auth\/logout": {
            "post": {
                "operationId": "auth.logout",
                "summary": "Logout (current device)",
                "tags": [
                    "Authentication"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Logged out successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/logout-all": {
            "post": {
                "operationId": "auth.logoutAll",
                "summary": "Logout everywhere (all devices)",
                "tags": [
                    "Authentication"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Logged out from all devices."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/profile": {
            "get": {
                "operationId": "auth.profile",
                "summary": "Authenticated user profile",
                "tags": [
                    "Authentication"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/blog\/posts": {
            "get": {
                "operationId": "blogPost.index",
                "description": "Unlike the public blog listing, this includes drafts and\nscheduled posts \u2014 it's the admin view, not the storefront one.\n\nFilters (all optional, combine freely):\n- `status` \u2014 `draft`, `published`, or `scheduled`\n- `category_id` \u2014 a single category ID\n- `search` \u2014 matches against title and content\n\n`per_page` defaults to 20. Response `meta` carries standard\npagination info (`page`, `per_page`, `total`, `last_page`) for\nbuilding a paged admin table.",
                "summary": "List all posts, regardless of status",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "blogPost.store",
                "description": "`author` is always the requesting admin\/staff account \u2014 there's\nno field to set it to someone else, even for an admin creating\na post on another writer's behalf.\n\nDon't send `slug` \u2014 it's generated automatically from `title`\nand stays fixed even if the title is later edited, so any link\nalready shared to the post doesn't break.\n\n`status` defaults to `draft` if omitted. Creating a post never\npublishes it \u2014 use `POST \/admin\/blog\/{post}\/publish` for that,\neven if you pass `status: published` here it will not appear\non the public listing until published through that endpoint.",
                "summary": "Create a post",
                "tags": [
                    "Blog"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreBlogPostRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminBlogPostResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Post created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/blog\/posts\/{post}": {
            "get": {
                "operationId": "blogPost.show",
                "description": "Includes `category`, `author`, `tags`, and `media` \u2014 the public\nendpoint's response is intentionally lighter than this one.",
                "summary": "Get a single post with full detail",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "post",
                        "in": "path",
                        "required": true,
                        "description": "The post ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminBlogPostResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "blogPost.update",
                "description": "Works on a post in any status \u2014 editing a published post\nupdates it in place immediately, there's no draft\/live\nversioning. `slug` still can't be set directly here; it only\never changes if you explicitly need that (not exposed by this\nendpoint at all \u2014 contact an engineer if a slug genuinely needs\nto change, since anything already linking to the old one would\nbreak).",
                "summary": "Update a post's content, title, category, or tags",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "post",
                        "in": "path",
                        "required": true,
                        "description": "The post ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateBlogPostRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminBlogPostResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Post updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "blogPost.destroy",
                "description": "No undo \u2014 the frontend should confirm with the user before\ncalling this, especially for a published post that may already\nbe indexed by search engines or linked externally.",
                "summary": "Delete a post permanently",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "post",
                        "in": "path",
                        "required": true,
                        "description": "The post ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Post deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/blog\/posts\/{post}\/publish": {
            "post": {
                "operationId": "blogPost.publish",
                "description": "Omit `published_at` to publish right now. Provide a future\ndate\/time to schedule it instead \u2014 the post's `status` becomes\n`published` immediately, but it's still excluded from the\npublic listing until `published_at` actually arrives. This\nmeans `status = published` alone doesn't tell you whether a\npost is publicly visible yet \u2014 check `published_at` against\nthe current time too if your admin UI needs to distinguish\n\"live now\" from \"scheduled.\"",
                "summary": "Publish a post, immediately or on a future date",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "post",
                        "in": "path",
                        "required": true,
                        "description": "The post ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/PublishBlogPostRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminBlogPostResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Post published."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/blog\/posts\/{post}\/unpublish": {
            "post": {
                "operationId": "blogPost.unpublish",
                "description": "Immediately removes it from the public listing, regardless of\nwhether it was already live or still waiting on a scheduled\ndate. `published_at` is cleared \u2014 republishing afterward\nrequires setting a new date (or omitting one to go live\nimmediately again), it does not resume the old schedule.",
                "summary": "Revert a published or scheduled post back to draft",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "post",
                        "in": "path",
                        "required": true,
                        "description": "The post ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminBlogPostResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Post moved back to draft."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/blog\/posts\/{post}\/featured-image": {
            "post": {
                "operationId": "blogPost.uploadFeaturedImage",
                "description": "Always replaces whatever image was there before \u2014 there's only\never one featured image per post, not a gallery (unlike Product\nimages, which do support multiple). Takes effect immediately,\nincluding on an already-published post.",
                "summary": "Upload or replace the post's featured image",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "post",
                        "in": "path",
                        "required": true,
                        "description": "The post ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UploadFeaturedImageRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminBlogPostResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Featured image updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/blog\/categories": {
            "get": {
                "operationId": "blogCategory.index",
                "summary": "List all blog categories",
                "tags": [
                    "Blog"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/BlogCategoryResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "blogCategory.store",
                "summary": "Create a new blog category",
                "tags": [
                    "Blog"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreBlogCategoryRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BlogCategoryResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/blog\/categories\/{category}": {
            "put": {
                "operationId": "blogCategory.update",
                "summary": "Update a blog category",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "description": "The category ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateBlogCategoryRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BlogCategoryResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "blogCategory.destroy",
                "summary": "Delete a blog category",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "description": "The category ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Category deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/blog\/tags": {
            "get": {
                "operationId": "blogTag.index",
                "summary": "List all blog tags",
                "tags": [
                    "Blog"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/BlogTagResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "blogTag.store",
                "summary": "Create a new blog tag",
                "tags": [
                    "Blog"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreBlogTagRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BlogTagResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/blog\/tags\/{tag}": {
            "put": {
                "operationId": "blogTag.update",
                "summary": "Update a blog tag",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "tag",
                        "in": "path",
                        "required": true,
                        "description": "The tag ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateBlogTagRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BlogTagResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "blogTag.destroy",
                "summary": "Delete a blog tag",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "tag",
                        "in": "path",
                        "required": true,
                        "description": "The tag ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Tag deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/blog\/posts": {
            "get": {
                "operationId": "blog.index",
                "description": "Public \u2014 no authentication required. Filter via query params:\n`category_id`, `tag_id`, `search` (matches title), `per_page`.\nOnly posts with status=published AND a `published_at` that has\nalready arrived are ever returned \u2014 a scheduled future post\nstays invisible until its time comes.",
                "summary": "List published blog posts",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/blog\/posts\/{slug}": {
            "get": {
                "operationId": "blog.show",
                "description": "Increments its view count\non each call.",
                "summary": "View a single published post by slug",
                "tags": [
                    "Blog"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BlogPostResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            }
        },
        "\/blog\/categories": {
            "get": {
                "operationId": "blog.categories",
                "summary": "List all blog categories",
                "tags": [
                    "Blog"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/BlogCategoryResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/blog\/tags": {
            "get": {
                "operationId": "blog.tags",
                "summary": "List all blog tags",
                "tags": [
                    "Blog"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/BlogTagResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/ecommerce\/branches": {
            "get": {
                "operationId": "branch.index",
                "description": "Pass `?active=1` to return only active branches; omit it to\nreturn all branches regardless of status.",
                "summary": "List branches",
                "tags": [
                    "Branches"
                ],
                "parameters": [
                    {
                        "name": "active",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/BranchResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "branch.store",
                "description": "Only `name` and `location` are required; `phone` is optional.\nDon't send a `code` \u2014 one is generated automatically (e.g.\n`BR4F9K2A`) and returned in the response.",
                "summary": "Create a branch",
                "tags": [
                    "Branches"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreBranchRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BranchResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Branch created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ecommerce\/branches\/{branch}": {
            "get": {
                "operationId": "branch.show",
                "description": "Returns the branch's code, name, location, phone, and active\nstatus.",
                "summary": "View a single branch",
                "tags": [
                    "Branches"
                ],
                "parameters": [
                    {
                        "name": "branch",
                        "in": "path",
                        "required": true,
                        "description": "The branch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BranchResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "branch.update",
                "description": "Send only the fields you want to change:\n- name\n- location\n- phone\n\n`code` is not editable and won't be accepted here.",
                "summary": "Update a branch",
                "tags": [
                    "Branches"
                ],
                "parameters": [
                    {
                        "name": "branch",
                        "in": "path",
                        "required": true,
                        "description": "The branch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateBranchRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BranchResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Branch updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "branch.destroy",
                "description": "Permanently removes the branch. This cannot be undone \u2014 use\ndeactivate instead if the branch might be needed again later.",
                "summary": "Delete a branch",
                "tags": [
                    "Branches"
                ],
                "parameters": [
                    {
                        "name": "branch",
                        "in": "path",
                        "required": true,
                        "description": "The branch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Branch deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ecommerce\/branches\/{branch}\/activate": {
            "post": {
                "operationId": "branch.activate",
                "description": "Sets the branch's status to active. Safe to call even if the\nbranch is already active \u2014 it simply confirms the active state\nrather than returning an error.",
                "summary": "Activate a branch",
                "tags": [
                    "Branches"
                ],
                "parameters": [
                    {
                        "name": "branch",
                        "in": "path",
                        "required": true,
                        "description": "The branch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BranchResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Branch activated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ecommerce\/branches\/{branch}\/deactivate": {
            "post": {
                "operationId": "branch.deactivate",
                "description": "Sets the branch's status to inactive \u2014 it stops appearing in\n`?active=1` listings but its record and history are preserved.\nSafe to call even if the branch is already inactive.",
                "summary": "Deactivate a branch without deleting it",
                "tags": [
                    "Branches"
                ],
                "parameters": [
                    {
                        "name": "branch",
                        "in": "path",
                        "required": true,
                        "description": "The branch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/BranchResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Branch deactivated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/cart": {
            "get": {
                "operationId": "cart.show",
                "summary": "Get the current cart",
                "tags": [
                    "Cart"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CartResource"
                                        },
                                        "meta": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "delete": {
                "operationId": "cart.clear",
                "summary": "Empty the cart entirely",
                "tags": [
                    "Cart"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CartResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Cart cleared."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/cart\/items": {
            "post": {
                "operationId": "cart.addItem",
                "summary": "Add an item to the cart",
                "tags": [
                    "Cart"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/AddCartItemRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CartResource"
                                        },
                                        "meta": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/cart\/items\/{item}": {
            "put": {
                "operationId": "cart.updateItem",
                "summary": "Update a cart item's quantity to a specific value",
                "tags": [
                    "Cart"
                ],
                "parameters": [
                    {
                        "name": "item",
                        "in": "path",
                        "required": true,
                        "description": "The item ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateCartItemRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CartResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Cart item updated."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": "This item does not belong to your cart."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            },
            "delete": {
                "operationId": "cart.removeItem",
                "summary": "Remove an item from the cart, releasing its stock reservation",
                "tags": [
                    "Cart"
                ],
                "parameters": [
                    {
                        "name": "item",
                        "in": "path",
                        "required": true,
                        "description": "The item ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CartResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Item removed from cart."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": "This item does not belong to your cart."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            }
        },
        "\/cart\/discount": {
            "post": {
                "operationId": "cart.applyDiscount",
                "description": "Requires being logged in \u2014 discount codes have per-customer\nusage limits, so there's no meaningful way to validate one\nagainst an anonymous guest. This is a preview, not a\ncommitment: the code isn't actually \"used up\" yet. The final,\nauthoritative check happens at checkout; a code valid here can\nstill fail at that point if it expires or gets exhausted by\nsomeone else in the meantime.",
                "summary": "Apply a discount code to the cart",
                "tags": [
                    "Cart"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/ApplyDiscountCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CartResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Discount code applied."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Please log in to apply a discount code."
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "cart.removeDiscount",
                "summary": "Remove whatever discount code is currently applied",
                "tags": [
                    "Cart"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CartResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Discount code removed."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/cart\/merge": {
            "post": {
                "operationId": "cart.mergeGuest",
                "summary": "Merge an anonymous cart after an authentication flow that cannot carry\ncustom headers, such as an OAuth browser redirect",
                "tags": [
                    "Cart"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CartResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Guest cart merged successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "A guest cart token is required."
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/categories": {
            "get": {
                "operationId": "category.index",
                "description": "Public \u2014 no authentication required, since the storefront needs\nthis to render navigation\/filtering. Returns top-level categories\nwith their subcategories nested inside, each level already sorted.",
                "summary": "List categories as a tree",
                "tags": [
                    "Categories"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/CategoryResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "post": {
                "operationId": "category.store",
                "description": "Don't send `slug` or `sort_order` \u2014 both are generated\nautomatically. A new category is appended after its existing\nsiblings (or after other top-level categories, if `parent_id` is\nomitted).",
                "summary": "Create a category",
                "tags": [
                    "Categories"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreCategoryRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CategoryResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Category created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/categories\/{category}": {
            "get": {
                "operationId": "category.show",
                "summary": "View a single category",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "description": "The category ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CategoryResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            },
            "put": {
                "operationId": "category.update",
                "description": "Send only the fields you want to change. Renaming a category\ndoes not change its `slug`.",
                "summary": "Update a category",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "description": "The category ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateCategoryRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CategoryResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Category updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "category.destroy",
                "description": "Fails if the category has any subcategories \u2014 move or delete\nthose first.",
                "summary": "Delete a category",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "description": "The category ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Category deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/admin\/categories": {
            "get": {
                "operationId": "category.adminIndex",
                "tags": [
                    "Categories"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/CategoryResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/admin\/categories\/{category}": {
            "get": {
                "operationId": "category.adminShow",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "description": "The category ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CategoryResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/categories\/reorder": {
            "post": {
                "operationId": "category.reorder",
                "description": "Send the full list of category IDs that share the same parent,\nin the order they should appear. Position is taken from array\norder alone, not from any field in the request body.",
                "summary": "Reorder categories",
                "tags": [
                    "Categories"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/ReorderCategoriesRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Categories reordered successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/categories\/{category}\/image": {
            "post": {
                "operationId": "category.uploadImage",
                "description": "Replaces any previously uploaded image \u2014 there is only ever one\nactive image per category.",
                "summary": "Upload or replace a category's image\/banner",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "description": "The category ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UploadCategoryImageRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CategoryResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Category image updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/orders": {
            "get": {
                "operationId": "admin.order.index",
                "description": "Filter via query params: `status`, `payment_status`,\n`branch_id`, `user_id`, `search` (matches order number), `from`\n\/ `to` (created_at date range, `YYYY-MM-DD`).",
                "summary": "List every order across all customers",
                "tags": [
                    "Checkout & Orders"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "payment_status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/orders\/{order}": {
            "get": {
                "operationId": "admin.order.show",
                "summary": "View a single order with full customer and item detail",
                "tags": [
                    "Checkout & Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "description": "The order ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminOrderResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/orders\/{order}\/processing": {
            "post": {
                "operationId": "order.markProcessing",
                "tags": [
                    "Checkout & Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "description": "The order ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminOrderResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Order marked as processing."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/orders\/{order}\/ship": {
            "post": {
                "operationId": "order.markShipped",
                "description": "Requires a `carrier_id`; `tracking_number` is optional. Only\nvalid from `paid` or `processing` status. Fires a notification\nto the customer.",
                "summary": "Mark an order as shipped",
                "tags": [
                    "Checkout & Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "description": "The order ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/MarkShippedRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminOrderResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Order marked as shipped."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/orders\/{order}\/deliver": {
            "post": {
                "operationId": "order.markDelivered",
                "description": "Only valid from `shipped` status.\nFires a notification to the customer.",
                "summary": "Mark an order as delivered",
                "tags": [
                    "Checkout & Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "description": "The order ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminOrderResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Order marked as delivered."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/checkout": {
            "post": {
                "operationId": "checkout.initiate",
                "description": "Creates the order and sends an M-Pesa STK Push\nprompt to the customer's phone.\n\nRequires authentication (shipping details are saved against the\naccount). Pick a previously saved `shipping_address_id`; add a\nnew one first via `POST \/shipping-addresses` if needed.\nDelivery cost is resolved automatically from that address's\ncounty \u2014 matched against the store's configured shipping zones\n\u2014 so there's no separate shipping rate to choose.\n\nThis does NOT complete the payment \u2014 it only sends the prompt.\nThe customer approves it on their phone, M-Pesa calls back\nasynchronously, and the order's status updates from that\ncallback. Poll `GET \/orders\/{order}` to see when it resolves.",
                "summary": "Start checkout",
                "tags": [
                    "Checkout & Orders"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/InitiateCheckoutRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/OrderResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Check your phone to complete payment."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/orders": {
            "get": {
                "operationId": "checkout.order.index",
                "summary": "List the authenticated customer's own orders, most recent\nfirst",
                "tags": [
                    "Checkout & Orders"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/orders\/{order}": {
            "get": {
                "operationId": "checkout.order.show",
                "summary": "View a single order \u2014 including live `status`\/`payment_status`,\nuseful for polling right after checkout while waiting on the\nM-Pesa callback to resolve",
                "tags": [
                    "Checkout & Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "description": "The order ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/OrderResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/settings\/email-configuration\/test": {
            "post": {
                "operationId": "communicationTest.email",
                "tags": [
                    "CommunicationTest"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/TestEmailConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "channel": {
                                                    "type": "string"
                                                },
                                                "destination": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "provider": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "provider_reference": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sent_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                }
                                            },
                                            "required": [
                                                "channel",
                                                "destination",
                                                "status",
                                                "provider",
                                                "provider_reference",
                                                "sent_at"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/settings\/sms-configuration\/test": {
            "post": {
                "operationId": "communicationTest.sms",
                "tags": [
                    "CommunicationTest"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/TestSmsConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "channel": {
                                                    "type": "string"
                                                },
                                                "destination": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "provider": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "provider_reference": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sent_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                }
                                            },
                                            "required": [
                                                "channel",
                                                "destination",
                                                "status",
                                                "provider",
                                                "provider_reference",
                                                "sent_at"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/customers": {
            "get": {
                "operationId": "customer.index",
                "description": "with order stats \u2014 `total_orders`,\n`total_spent` (sum of paid orders only), and `last_order_at`.\n\nDistinct from `GET \/admin\/users?account_type=customer` (which\nstill works and returns the same underlying accounts) \u2014 this\nendpoint adds the aggregate order data a customer-management\nscreen actually needs, rather than just the bare account.\n\nFilter via query params: `search` (matches name, email, or\nphone), `status`.",
                "summary": "List customers",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/customers\/{customer}": {
            "get": {
                "operationId": "customer.show",
                "summary": "View a single customer with their order stats and recent order\nhistory",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CustomerResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/settings\/email-configuration": {
            "get": {
                "operationId": "emailConfiguration.show",
                "description": "Admin-only. Returns `host`, `port`, `username`, `encryption`,\n`from_address`, `from_name`, `is_active`, and `is_configured`.\n`password` is never included in the response \u2014 check\n`is_configured` to know whether email sending is ready to work.",
                "summary": "View the current SMTP configuration",
                "tags": [
                    "Email Configuration"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/EmailConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "emailConfiguration.update",
                "description": "Admin-only. Requires `host`, `port`, `username`, `password`, and\n`from_address` together \u2014 send all of them even if only one is\nchanging. Takes effect immediately: the very next email sent\nanywhere in the app uses these credentials.",
                "summary": "Update the SMTP configuration",
                "tags": [
                    "Email Configuration"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateEmailConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/EmailConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Email configuration updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/intr\/stock": {
            "get": {
                "operationId": "stock.index",
                "description": "Filter by `branch_id` and\/or `product_variant_id` via query\nparams. Without filters, returns every stock record across every\nbranch \u2014 likely to be large for a big catalog, so filtering is\nstrongly recommended for real use.",
                "summary": "List stock levels",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "product_variant_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/low": {
            "get": {
                "operationId": "stock.lowStock",
                "description": "Optionally filter by `branch_id`.",
                "summary": "List every stock record currently at or below its configured\nreorder point. Records with no reorder point set are never\nincluded, regardless of how low their quantity is",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/StockResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/variants\/{variant}": {
            "get": {
                "operationId": "stock.forVariant",
                "description": "Useful for a single \"where is this in stock\" screen without\nneeding to query per branch.",
                "summary": "View a variant's stock across every branch",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "description": "The variant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/StockResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/variants\/{variant}\/movements": {
            "get": {
                "operationId": "stock.movements",
                "summary": "View the movement history (audit trail) for a variant at a\nspecific branch, most recent first",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "description": "The variant ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/initial": {
            "post": {
                "operationId": "stock.recordInitial",
                "description": "Used to set up stock for the first time \u2014 e.g. entering how\nmany units exist when a product is first added to a branch.\nThis always adds to whatever is already there rather than\noverwriting it; if stock already exists and you need to correct\nthe count instead, that's a Stock Adjustment (a separate,\nupcoming endpoint), not this one.",
                "summary": "Record initial stock for a variant at a branch",
                "tags": [
                    "Inventory"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/RecordInitialStockRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockMovementResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Stock recorded successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/adjust": {
            "post": {
                "operationId": "stock.adjust",
                "description": "Send the actual quantity you counted, not a delta \u2014 the system\ncalculates the difference against whatever is currently on\nrecord and logs it as a reason-coded Adjustment. Works whether\nthe correction goes up or down.",
                "summary": "Correct stock to a specific counted quantity \u2014 the general\n\"fix a count\" workflow, requiring a reason",
                "tags": [
                    "Inventory"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/AdjustStockRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockMovementResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Stock adjusted successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/intr\/stock\/reorder-point": {
            "post": {
                "operationId": "stock.setReorderPoint",
                "description": "Once set, that stock record is included in\n`GET \/admin\/stock\/low` whenever its quantity drops to or below\nthis number, and triggers a one-time low-stock notification to\nadmins the moment it crosses that threshold. Pass `null` to\nremove the alert entirely for this variant\/branch.",
                "summary": "Set (or clear) the reorder point for a variant at a branch",
                "tags": [
                    "Inventory"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/SetReorderPointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Reorder point updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/intr\/stock\/batches\/expiring": {
            "get": {
                "operationId": "stockBatch.expiringSoon",
                "description": "Useful for a daily \"what's about to expire\" dashboard\/report.",
                "summary": "List batches expiring within the next N days, across every\nvariant and branch. Defaults to 30 days if `days` is omitted",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "days",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 30
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/StockBatchResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/variants\/{variant}\/batches": {
            "get": {
                "operationId": "stockBatch.forVariant",
                "description": "Optionally filter by `branch_id`. Batches with no expiry date\nare listed last.",
                "summary": "List a variant's batches, soonest-expiring first",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "description": "The variant ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/StockBatchResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/batches": {
            "post": {
                "operationId": "stockBatch.receive",
                "description": "Creates the batch record and increases the variant's total stock\nat the given branch in the same call \u2014 there's no separate step\nto \"also update stock\" afterward. `expiry_date` and\n`manufactured_date` are optional; omit them for stock that isn't\nactually batch\/expiry-tracked.",
                "summary": "Receive a new batch of stock",
                "tags": [
                    "Inventory"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/ReceiveStockBatchRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockBatchResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Stock batch received successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/intr\/stock\/batches\/{batch}\/write-off": {
            "post": {
                "operationId": "stockBatch.writeOff",
                "description": "typically because it has expired. Zeroes the batch and reduces the\nvariant's total stock at that branch to match, recorded as an\n\"expired\" stock movement for the audit trail.",
                "summary": "Write off whatever quantity remains in a batch",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "batch",
                        "in": "path",
                        "required": true,
                        "description": "The batch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/WriteOffBatchRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockBatchResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Batch written off successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/transfers": {
            "get": {
                "operationId": "stockTransfer.index",
                "description": "Filter by `status`, `from_branch_id`, or `to_branch_id` via\nquery params.",
                "summary": "List stock transfers",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from_branch_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to_branch_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "stockTransfer.store",
                "description": "Starts in `pending` status \u2014 nothing moves yet, this just\nrecords the plan. `from_branch_id` and `to_branch_id` must be\ndifferent. Available source stock is checked now and checked\nagain when the transfer is shipped.",
                "summary": "Create a transfer",
                "tags": [
                    "Inventory"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreStockTransferRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockTransferResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Transfer created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/transfers\/{transfer}": {
            "get": {
                "operationId": "stockTransfer.show",
                "summary": "View a single transfer",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "transfer",
                        "in": "path",
                        "required": true,
                        "description": "The transfer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockTransferResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/transfers\/{transfer}\/ship": {
            "post": {
                "operationId": "stockTransfer.ship",
                "description": "Deducts every item from the source branch's stock and marks the\ntransfer `in_transit`. Fails with a `422` if the source branch\ndoesn't have enough of any item \u2014 nothing is partially shipped.",
                "summary": "Ship a pending transfer",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "transfer",
                        "in": "path",
                        "required": true,
                        "description": "The transfer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockTransferResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Transfer shipped successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/transfers\/{transfer}\/receive": {
            "post": {
                "operationId": "stockTransfer.receive",
                "description": "Adds every item to the destination branch's stock and marks the\ntransfer `completed`.",
                "summary": "Receive an in-transit transfer",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "transfer",
                        "in": "path",
                        "required": true,
                        "description": "The transfer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockTransferResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Transfer received successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/intr\/stock\/transfers\/{transfer}\/cancel": {
            "post": {
                "operationId": "stockTransfer.cancel",
                "description": "Works on a pending OR in-transit transfer. If it was already\nshipped, the earlier deduction from the source branch is\nautomatically reversed \u2014 the stock isn't lost. A completed\ntransfer can't be cancelled; reverse it with a new transfer in\nthe other direction instead.",
                "summary": "Cancel a transfer",
                "tags": [
                    "Inventory"
                ],
                "parameters": [
                    {
                        "name": "transfer",
                        "in": "path",
                        "required": true,
                        "description": "The transfer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CancelStockTransferRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/StockTransferResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Transfer cancelled successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/locations\/counties": {
            "get": {
                "operationId": "county.index",
                "description": "The list is public reference data used by delivery-address and\nshipping-zone forms. Values returned here are the only county names\naccepted by those APIs after normalization.",
                "summary": "List Kenya's canonical counties",
                "tags": [
                    "Locations"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/auth\/magic-link": {
            "post": {
                "operationId": "magicLink.send",
                "description": "Issues a one-time login link, valid for 15 minutes, if the email\nbelongs to an existing account. Delivery is asynchronous \u2014 this\nfires an event that a queued listener turns into an actual email,\nso the response returns before delivery completes. Always returns\nthe same generic response regardless of whether the email exists,\nto avoid leaking account existence. Rate limited to 3 requests per\nminute per email.",
                "summary": "Request a magic link",
                "tags": [
                    "Magic Link"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/EmailRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "If that email is registered, a login link has been sent."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/auth\/magic-link\/verify": {
            "post": {
                "operationId": "magicLink.verify",
                "description": "Exchanges the emailed token for a bearer token. The link is\nsingle-use and expires after 15 minutes.",
                "summary": "Verify a magic link and log in",
                "tags": [
                    "Magic Link"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/MagicLinkVerifyRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "$ref": "#\/components\/schemas\/UserResource"
                                                },
                                                "token": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "user",
                                                "token"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Login successful."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/settings\/media-configuration": {
            "get": {
                "operationId": "mediaConfiguration.show",
                "description": "Admin-only. Returns `cloud_name`, `api_key`, `is_active`, and\n`is_configured`. `api_secret` is never included in the response\n\u2014 check `is_configured` to know whether uploads are ready to\nwork, rather than trying to infer it from the other fields.",
                "summary": "View the current media storage configuration",
                "tags": [
                    "Media Configuration"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MediaConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "mediaConfiguration.update",
                "description": "Admin-only. Requires `cloud_name`, `api_key`, and `api_secret`\ntogether \u2014 send all three even if only one is changing. Takes\neffect immediately: the very next file upload anywhere in the\napp uses these new credentials, no delay or extra step needed.",
                "summary": "Update the media storage configuration",
                "tags": [
                    "Media Configuration"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateMediaConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/MediaConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Media configuration updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/media": {
            "get": {
                "operationId": "mediaLibrary.index",
                "tags": [
                    "Media Library"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 255
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "image",
                                "document"
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "image_count": {
                                                    "type": "string"
                                                },
                                                "document_count": {
                                                    "type": "string"
                                                },
                                                "storage_bytes": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total",
                                                "image_count",
                                                "document_count",
                                                "storage_bytes"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "mediaLibrary.store",
                "tags": [
                    "Media Library"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UploadMediaLibraryAssetsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/MediaLibraryAssetResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Media uploaded successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/media\/{mediaLibraryAsset}": {
            "delete": {
                "operationId": "mediaLibrary.destroy",
                "tags": [
                    "Media Library"
                ],
                "parameters": [
                    {
                        "name": "mediaLibraryAsset",
                        "in": "path",
                        "required": true,
                        "description": "The media library asset ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Media deleted successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/notification-deliveries\/{delivery}\/retry": {
            "post": {
                "operationId": "notificationDelivery.retry",
                "tags": [
                    "NotificationDelivery"
                ],
                "parameters": [
                    {
                        "name": "delivery",
                        "in": "path",
                        "required": true,
                        "description": "The delivery ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "channel": {
                                                    "type": "string"
                                                },
                                                "destination": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "attempt_count": {
                                                    "type": "integer"
                                                },
                                                "provider": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "provider_reference": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "provider_status": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "error_message": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "accepted_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                },
                                                "delivered_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                },
                                                "failed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type",
                                                "channel",
                                                "destination",
                                                "status",
                                                "attempt_count",
                                                "provider",
                                                "provider_reference",
                                                "provider_status",
                                                "error_message",
                                                "accepted_at",
                                                "delivered_at",
                                                "failed_at",
                                                "created_at"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Notification delivery queued for retry."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Only failed notification deliveries can be retried."
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/notifications": {
            "get": {
                "operationId": "notifications.index",
                "description": "Returns a paginated list of notifications for the authenticated user,\nordered newest first. The `unread_count` in meta can be used to render\na notification badge.",
                "summary": "List notifications",
                "tags": [
                    "Notifications"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/Notification"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "unread_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "unread_count",
                                                "page",
                                                "per_page",
                                                "total",
                                                "last_page"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/notifications\/read-all": {
            "patch": {
                "operationId": "notifications.read-all",
                "description": "Bulk-marks every unread notification for the authenticated user.\nReturns the count of notifications that were updated.",
                "summary": "Mark all notifications as read",
                "tags": [
                    "Notifications"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "marked": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "marked"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/notifications\/{id}\/read": {
            "patch": {
                "operationId": "notifications.read",
                "description": "Sets `read_at` to the current timestamp. Idempotent \u2014 calling on an\nalready-read notification returns the existing `read_at` without updating it.\nReturns 404 if the notification does not belong to the authenticated user.",
                "summary": "Mark a notification as read",
                "tags": [
                    "Notifications"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "read_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "read_at"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/pos\/catalog": {
            "get": {
                "operationId": "pos.catalog",
                "tags": [
                    "POS"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/pos\/sales": {
            "get": {
                "operationId": "pos.index",
                "tags": [
                    "POS"
                ],
                "parameters": [
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cashier_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "pos.store",
                "tags": [
                    "POS"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StorePosSaleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminOrderResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "enum": [
                                                        "Sale completed successfully.",
                                                        "M-Pesa payment prompt sent."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/admin\/pos\/sales\/{order}": {
            "get": {
                "operationId": "pos.show",
                "tags": [
                    "POS"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "description": "The order ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminOrderResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/settings\/payment-configuration": {
            "get": {
                "operationId": "paymentConfiguration.show",
                "description": "Admin-only. This is what any branch without its own override\nuses. Returns M-Pesa's shortcode, environment, the callback URL\nDaraja should be configured to call, and `is_mpesa_configured`.\n`mpesa_consumer_secret` and `mpesa_passkey` are never included.",
                "summary": "View the store-wide default payment configuration",
                "tags": [
                    "Payment Configuration"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/PaymentConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "paymentConfiguration.update",
                "description": "Admin-only. Requires `mpesa_consumer_key`, `mpesa_consumer_secret`,\n`mpesa_shortcode`, and `mpesa_passkey` together \u2014 send them even\nif only one is changing. Takes effect immediately for every\nbranch that doesn't have its own override.",
                "summary": "Update the store-wide default payment configuration",
                "tags": [
                    "Payment Configuration"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdatePaymentConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/PaymentConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Payment configuration updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/settings\/payment-configuration\/branches\/{branch}": {
            "get": {
                "operationId": "paymentConfiguration.showForBranch",
                "description": "Admin-only. Returns the branch's own override if it has one,\notherwise the store-wide default \u2014 the same resolution used when\nthat branch actually takes a payment.",
                "summary": "View a specific branch's payment configuration",
                "tags": [
                    "Payment Configuration"
                ],
                "parameters": [
                    {
                        "name": "branch",
                        "in": "path",
                        "required": true,
                        "description": "The branch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/PaymentConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "paymentConfiguration.updateForBranch",
                "description": "Admin-only. Creates an override specific to this branch \u2014 from\nthis point on, the branch stops using the store-wide default and\nuses these credentials instead. Use `DELETE` on this endpoint to\nremove the override and revert the branch back to the default.",
                "summary": "Set or replace a branch's own payment configuration",
                "tags": [
                    "Payment Configuration"
                ],
                "parameters": [
                    {
                        "name": "branch",
                        "in": "path",
                        "required": true,
                        "description": "The branch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdatePaymentConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/PaymentConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Payment configuration updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "paymentConfiguration.destroyForBranch",
                "description": "Admin-only. The branch immediately falls back to using the\nstore-wide default again.",
                "summary": "Remove a branch's payment configuration override",
                "tags": [
                    "Payment Configuration"
                ],
                "parameters": [
                    {
                        "name": "branch",
                        "in": "path",
                        "required": true,
                        "description": "The branch ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/PaymentConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Payment configuration reverted to the store-wide default."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/payments": {
            "get": {
                "operationId": "payment.index",
                "description": "Each order has exactly one payment attempt in this system today\n(M-Pesa STK Push only) \u2014 this is that transaction record, not a\nseparate ledger. Filter via query params: `status` (pending,\ncompleted, failed), `method`, `search` (matches receipt number\nor phone), `from` \/ `to` (date range on `created_at`).",
                "summary": "List payment transactions across all orders",
                "tags": [
                    "Payments"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "method",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/payments\/mpesa\/callback": {
            "post": {
                "operationId": "mpesaCallback.handle",
                "description": "Called by Safaricom's Daraja platform, not by your frontend \u2014\nthis is the URL registered as the STK push `CallBackURL`\n(see Payment Configuration's `mpesa_callback_url`). Always\nresponds `{\"ResultCode\": 0, \"ResultDesc\": \"Success\"}` regardless\nof the payment outcome \u2014 that response only acknowledges\nreceipt to Daraja, it isn't a judgment on whether payment\nsucceeded. The actual outcome updates the matching order's\n`status`\/`payment_status` \u2014 poll `GET \/orders\/{order}` from the\nfrontend to observe it.",
                "summary": "M-Pesa STK Push callback",
                "tags": [
                    "Payments"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ResultCode": {
                                            "type": "integer"
                                        },
                                        "ResultDesc": {
                                            "type": "string",
                                            "const": "Success"
                                        }
                                    },
                                    "required": [
                                        "ResultCode",
                                        "ResultDesc"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/ca\/products\/{product}\/variants": {
            "post": {
                "operationId": "productVariant.store",
                "description": "Used for \"variable\" products that need more than one sellable\noption (e.g. different sizes\/colors) \u2014 the product's first\nvariant is already created alongside the product itself; this\nadds additional ones. Don't send `sku` to have one generated\nautomatically.",
                "summary": "Add a variant to a product",
                "tags": [
                    "Product Variants"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreProductVariantRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductVariantResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Variant added successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/variants\/{variant}": {
            "put": {
                "operationId": "productVariant.update",
                "summary": "Update a variant's SKU, barcode, options, pricing, or active\nstatus",
                "tags": [
                    "Product Variants"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "description": "The variant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateProductVariantRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductVariantResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Variant updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "productVariant.destroy",
                "description": "Fails if this is the product's only remaining variant \u2014 delete\nthe product itself instead if nothing should be sellable anymore.",
                "summary": "Delete a variant",
                "tags": [
                    "Product Variants"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "description": "The variant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Variant deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/products": {
            "get": {
                "operationId": "product.index",
                "description": "Public \u2014 no authentication required. Only products with\nstatus=active are meant for public browsing; pass filters as\nquery params: `category_id`, `status`, `visible_online`,\n`visible_pos`, `search`, `per_page`. Each variant's\n`available_quantity`\/`in_stock` reflect stock at one specific\nbranch \u2014 pass `?branch_id=` to check a physical branch (e.g. for\nPOS), or omit it to default to the Online branch, the right\ncontext for storefront browsing.",
                "summary": "List products",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "post": {
                "operationId": "product.store",
                "description": "This also creates the product's default variant in the same\ncall. `price_online` is required and belongs to that default\nvariant, not the product itself. Don't send `slug`; it's\ngenerated automatically from `name`. For a \"variable\" product,\nthis is just its first variant.",
                "summary": "Create a product",
                "tags": [
                    "Products"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreProductRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Product created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/products\/import\/template": {
            "get": {
                "operationId": "productImport.template",
                "description": "Returns an .xlsx file with the exact column headers the import\nexpects, a filled-in example row, and a second sheet listing\nevery allowed value for columns like `status` or\n`unit_of_measure`. Fill in one row per product and re-upload via\n`POST \/ca\/products\/import`.",
                "summary": "Download the bulk-import spreadsheet template",
                "tags": [
                    "Products"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        },
                        "headers": {
                            "Content-Disposition": {
                                "required": true,
                                "schema": {
                                    "type": "string"
                                },
                                "example": "attachment; filename=product-import-template.xlsx"
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/admin\/products": {
            "get": {
                "operationId": "product.adminIndex",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/admin\/products\/{product}": {
            "get": {
                "operationId": "product.adminShow",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/products\/{product}": {
            "put": {
                "operationId": "product.update",
                "description": "This are the fields to be updated:\n - name, category, status, channel\n - visibility, etc. Variant-level fields (price, SKU, barcode)\n - are updated via the variants endpoint, not here.",
                "summary": "Update a product's shared info",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateProductRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Product updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "product.destroy",
                "summary": "Delete a product and all its variants",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Product deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "get": {
                "operationId": "product.show",
                "description": "with its variants, category, tax class,\nimages, and any attribute values attached. Same `?branch_id=`\nquery param as the listing endpoint controls which branch's\nstock each variant's `available_quantity`\/`in_stock` reflects.",
                "summary": "View a single product",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            }
        },
        "\/ca\/products\/{product}\/images": {
            "post": {
                "operationId": "product.uploadImage",
                "description": "Adds to the gallery rather than replacing it \u2014 a product can have\nmany images, up to 10 per call. Send them as `images[]` in\nmultipart form data. Set `is_primary: true` to make the FIRST\nimage in the array the main image shown in listings; doing so\nunmarks any previous primary image. Any additional images in the\nsame call are added as regular gallery images, not primary.",
                "summary": "Upload one or more images to a product's gallery",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UploadProductImageRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/products\/{product}\/images\/from-library": {
            "post": {
                "operationId": "product.attachMedia",
                "summary": "Attach existing Media Manager images to a product without re-uploading them",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/AttachProductMediaRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Media attached successfully."
                                                },
                                                "attached_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "attached_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/products\/{product}\/images\/{media}\/primary": {
            "put": {
                "operationId": "product.setPrimaryImage",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "media",
                        "in": "path",
                        "required": true,
                        "description": "The media ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Primary product image updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/products\/{product}\/images\/{media}": {
            "delete": {
                "operationId": "product.destroyImage",
                "description": "If the removed image was the primary one, the next image (by\nsort order) is automatically promoted to primary \u2014 handled by\nMediaService, same as any other media deletion in the system.",
                "summary": "Remove a single image from a product's gallery",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "media",
                        "in": "path",
                        "required": true,
                        "description": "The media ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Image deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/products\/import": {
            "post": {
                "operationId": "productImport.import",
                "description": "Processing happens in the background \u2014 this returns immediately\nwith an import ID. Poll `GET \/ca\/products\/import\/{import}` to\ntrack progress. A row failing (e.g. a missing required field, an\nunknown category slug) does not stop the rest of the file from\nimporting \u2014 check the `errors` array on the finished import for\nexactly which rows failed and why.",
                "summary": "Upload a filled-in spreadsheet to bulk-create products",
                "tags": [
                    "Products"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/ImportProductsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductImportResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Import started. We'll process it in the background \u2014 check back for progress."
                                                },
                                                "poll_url": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "poll_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/products\/import\/{import}": {
            "get": {
                "operationId": "productImport.show",
                "summary": "Check the progress\/result of a bulk import",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "import",
                        "in": "path",
                        "required": true,
                        "description": "The import ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProductImportResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/discount-codes": {
            "get": {
                "operationId": "discountCode.index",
                "description": "Filter via `?is_active=1` or `?search=`\n(matches code or name).",
                "summary": "List discount codes",
                "tags": [
                    "Promotions"
                ],
                "parameters": [
                    {
                        "name": "is_active",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "discountCode.store",
                "description": "`code` is stored uppercase automatically regardless of the\ncasing sent. Leave `category_id` blank for a store-wide code;\nset it to restrict the discount to only products in that\ncategory. `max_discount_amount` only matters for `percentage`\ncodes \u2014 it caps how much a percentage discount can be worth in\nabsolute terms.",
                "summary": "Create a discount code",
                "tags": [
                    "Promotions"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreDiscountCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DiscountCodeResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Discount code created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/discount-codes\/{discountCode}": {
            "get": {
                "operationId": "discountCode.show",
                "summary": "Get a discount code by ID",
                "tags": [
                    "Promotions"
                ],
                "parameters": [
                    {
                        "name": "discountCode",
                        "in": "path",
                        "required": true,
                        "description": "The discount code ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DiscountCodeResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "discountCode.update",
                "summary": "Update a discount code",
                "tags": [
                    "Promotions"
                ],
                "parameters": [
                    {
                        "name": "discountCode",
                        "in": "path",
                        "required": true,
                        "description": "The discount code ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateDiscountCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DiscountCodeResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Discount code updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "discountCode.destroy",
                "summary": "Delete a discount code. Past redemptions\/orders that used it\nkeep their snapshotted `discount_code`\/`discount_amount` \u2014 this\ndoesn't rewrite order history",
                "tags": [
                    "Promotions"
                ],
                "parameters": [
                    {
                        "name": "discountCode",
                        "in": "path",
                        "required": true,
                        "description": "The discount code ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Discount code deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/discount-codes\/{discountCode}\/toggle": {
            "post": {
                "operationId": "discountCode.toggleActive",
                "summary": "Toggle active status of a discount code",
                "tags": [
                    "Promotions"
                ],
                "parameters": [
                    {
                        "name": "discountCode",
                        "in": "path",
                        "required": true,
                        "description": "The discount code ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DiscountCodeResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Discount code updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/reports\/dashboard": {
            "get": {
                "operationId": "report.dashboard",
                "tags": [
                    "Report"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "day",
                                "month"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period": {
                                                    "type": "object",
                                                    "properties": {
                                                        "from": {
                                                            "type": "string"
                                                        },
                                                        "to": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "from",
                                                        "to"
                                                    ]
                                                },
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "revenue": {
                                                            "type": "number"
                                                        },
                                                        "revenue_change_percent": {
                                                            "type": "number"
                                                        },
                                                        "orders": {
                                                            "type": "string"
                                                        },
                                                        "orders_change_percent": {
                                                            "type": "number"
                                                        },
                                                        "active_customers": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        },
                                                        "new_customers": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        },
                                                        "low_stock_items": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        }
                                                    },
                                                    "required": [
                                                        "revenue",
                                                        "revenue_change_percent",
                                                        "orders",
                                                        "orders_change_percent",
                                                        "active_customers",
                                                        "new_customers",
                                                        "low_stock_items"
                                                    ]
                                                },
                                                "sales_trend": {
                                                    "type": "string"
                                                },
                                                "recent_orders": {
                                                    "type": "string"
                                                },
                                                "top_products": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "product_name": {
                                                                "type": "string"
                                                            },
                                                            "units_sold": {
                                                                "type": "integer"
                                                            },
                                                            "revenue": {
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "product_name",
                                                            "units_sold",
                                                            "revenue"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "period",
                                                "summary",
                                                "sales_trend",
                                                "recent_orders",
                                                "top_products"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/reports\/sales": {
            "get": {
                "operationId": "report.sales",
                "tags": [
                    "Report"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "day",
                                "month"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period": {
                                                    "type": "object",
                                                    "properties": {
                                                        "from": {
                                                            "type": "string"
                                                        },
                                                        "to": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "from",
                                                        "to"
                                                    ]
                                                },
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "gross_revenue": {
                                                            "type": "number"
                                                        },
                                                        "subtotal": {
                                                            "type": "number"
                                                        },
                                                        "discounts": {
                                                            "type": "number"
                                                        },
                                                        "tax": {
                                                            "type": "number"
                                                        },
                                                        "shipping": {
                                                            "type": "number"
                                                        },
                                                        "orders": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        },
                                                        "average_order_value": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "gross_revenue",
                                                        "subtotal",
                                                        "discounts",
                                                        "tax",
                                                        "shipping",
                                                        "orders",
                                                        "average_order_value"
                                                    ]
                                                },
                                                "series": {
                                                    "type": "string"
                                                },
                                                "by_channel": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "period",
                                                "summary",
                                                "series",
                                                "by_channel"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/reports\/inventory": {
            "get": {
                "operationId": "report.inventory",
                "tags": [
                    "Report"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "day",
                                "month"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "stock_units": {
                                                            "type": "integer"
                                                        },
                                                        "available_units": {
                                                            "type": "integer"
                                                        },
                                                        "reserved_units": {
                                                            "type": "integer"
                                                        },
                                                        "low_stock_items": {
                                                            "type": "string"
                                                        },
                                                        "inventory_cost_value": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "stock_units",
                                                        "available_units",
                                                        "reserved_units",
                                                        "low_stock_items",
                                                        "inventory_cost_value"
                                                    ]
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "product_name": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "string",
                                                                        "enum": [
                                                                            "Deleted product"
                                                                        ]
                                                                    }
                                                                ]
                                                            },
                                                            "sku": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "string",
                                                                        "enum": [
                                                                            "N\/A"
                                                                        ]
                                                                    }
                                                                ]
                                                            },
                                                            "branch_name": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "string",
                                                                        "enum": [
                                                                            "Unknown branch"
                                                                        ]
                                                                    }
                                                                ]
                                                            },
                                                            "quantity": {
                                                                "type": "integer"
                                                            },
                                                            "reserved_quantity": {
                                                                "type": "integer"
                                                            },
                                                            "available_quantity": {
                                                                "type": "string"
                                                            },
                                                            "reorder_point": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "is_low_stock": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "product_name",
                                                            "sku",
                                                            "branch_name",
                                                            "quantity",
                                                            "reserved_quantity",
                                                            "available_quantity",
                                                            "reorder_point",
                                                            "is_low_stock"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "items"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/reports\/customers": {
            "get": {
                "operationId": "report.customers",
                "tags": [
                    "Report"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "branch_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "day",
                                "month"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_customers": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        },
                                                        "new_customers": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        },
                                                        "purchasing_customers": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        },
                                                        "repeat_customers": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        }
                                                    },
                                                    "required": [
                                                        "total_customers",
                                                        "new_customers",
                                                        "purchasing_customers",
                                                        "repeat_customers"
                                                    ]
                                                },
                                                "top_customers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "orders": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            },
                                                            "revenue": {
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "email",
                                                            "orders",
                                                            "revenue"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "top_customers"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/reviews": {
            "get": {
                "operationId": "admin.review.index",
                "description": "Filter by `status` (defaults to showing all statuses if\nomitted \u2014 pass `?status=pending` for the actual moderation\nqueue) and `product_id`.",
                "summary": "List reviews for moderation",
                "tags": [
                    "Reviews & Ratings"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "product_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/reviews\/{review}\/approve": {
            "post": {
                "operationId": "review.approve",
                "description": "Making it publicly visible and recalculating\nthe product's rating average\/count.",
                "summary": "Approve a review",
                "tags": [
                    "Reviews & Ratings"
                ],
                "parameters": [
                    {
                        "name": "review",
                        "in": "path",
                        "required": true,
                        "description": "The review ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminReviewResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Review approved."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/reviews\/{review}\/reject": {
            "post": {
                "operationId": "review.reject",
                "description": "An optional `reason` is stored for the\ncustomer's reference. If the review was previously approved,\nthe product's rating stats are recalculated to exclude it.",
                "summary": "Reject a review",
                "tags": [
                    "Reviews & Ratings"
                ],
                "parameters": [
                    {
                        "name": "review",
                        "in": "path",
                        "required": true,
                        "description": "The review ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/RejectReviewRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/AdminReviewResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Review rejected."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/reviews\/{review}": {
            "delete": {
                "operationId": "admin.review.destroy",
                "description": "(as opposed to rejecting it, which keeps a record).",
                "summary": "Delete a review outright",
                "tags": [
                    "Reviews & Ratings"
                ],
                "parameters": [
                    {
                        "name": "review",
                        "in": "path",
                        "required": true,
                        "description": "The review ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Review deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/products\/{product}\/reviews": {
            "post": {
                "operationId": "review.store",
                "description": "Requires a completed (paid) order containing this product \u2014 you\ncan't review something you haven't bought. One review per\nproduct per customer. New reviews start as pending and aren't\npublicly visible until an admin approves them.",
                "summary": "Leave a review for a product",
                "tags": [
                    "Reviews & Ratings"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreReviewRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ReviewResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Review submitted. It will be visible once approved."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "get": {
                "operationId": "catalog.review.index",
                "description": "Public \u2014 no authentication required. Only approved reviews are\never visible here; pending and rejected reviews are an admin-only\nconcern.",
                "summary": "List a product's approved reviews, most recent first",
                "tags": [
                    "Reviews & Ratings"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "description": "The product ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ReviewResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            }
        },
        "\/ca\/reviews\/{review}": {
            "put": {
                "operationId": "review.update",
                "description": "Editing resets it back to pending \u2014 the changed content needs\nre-moderation before it's publicly visible again.",
                "summary": "Update your own review",
                "tags": [
                    "Reviews & Ratings"
                ],
                "parameters": [
                    {
                        "name": "review",
                        "in": "path",
                        "required": true,
                        "description": "The review ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateReviewRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ReviewResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Review updated. It will be re-reviewed before showing publicly again."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "catalog.review.destroy",
                "summary": "Delete your own review",
                "tags": [
                    "Reviews & Ratings"
                ],
                "parameters": [
                    {
                        "name": "review",
                        "in": "path",
                        "required": true,
                        "description": "The review ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Review deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/permissions": {
            "get": {
                "operationId": "role.availablePermissions",
                "description": "Grouping is derived from each permission's dot-prefix (e.g.\n`products.view` groups under `products`) \u2014 this is a naming\nconvention, not a separate database column, so a new module's\npermissions are grouped automatically as soon as they're seeded.\nIntended for rendering a checklist in the role-creation UI.",
                "summary": "List every permission in the system, grouped by module",
                "tags": [
                    "Role Management"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/roles": {
            "get": {
                "operationId": "role.index",
                "summary": "List all roles with their permissions",
                "tags": [
                    "Role Management"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/RoleResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "role.store",
                "description": "Only the name is set here \u2014 a freshly created role has zero\npermissions until `PUT \/admin\/roles\/{role}\/permissions` is called.\nRole names must be unique.",
                "summary": "Create a new role",
                "tags": [
                    "Role Management"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreRoleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/RoleResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Role created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/roles\/{role}": {
            "get": {
                "operationId": "role.show",
                "summary": "View a single role with its permissions",
                "tags": [
                    "Role Management"
                ],
                "parameters": [
                    {
                        "name": "role",
                        "in": "path",
                        "required": true,
                        "description": "The role ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/RoleResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "role.destroy",
                "description": "Users currently holding this role simply lose the permissions it\ngranted \u2014 their account itself is untouched. The built-in\n`customer` and `admin` roles can never be deleted through this\nendpoint, since both are referenced by name directly in\napplication code (registration assigns `customer`; the admin\nbypass checks `hasRole('admin')`).",
                "summary": "Delete a role",
                "tags": [
                    "Role Management"
                ],
                "parameters": [
                    {
                        "name": "role",
                        "in": "path",
                        "required": true,
                        "description": "The role ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Role deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/roles\/{role}\/permissions": {
            "put": {
                "operationId": "role.syncPermissions",
                "description": "This is a full replace, not a merge \u2014 permissions not included in\nthe request are removed from the role. The `customer` and `admin`\nroles are protected and cannot be edited through this endpoint:\n`customer` is intentionally kept permission-less (public browsing\nis governed by authentication, not RBAC \u2014 see the Authentication\ntag), and `admin` bypasses permission checks entirely, so editing\neither here would have no real effect.",
                "summary": "Replace a role's permissions with the given set",
                "tags": [
                    "Role Management"
                ],
                "parameters": [
                    {
                        "name": "role",
                        "in": "path",
                        "required": true,
                        "description": "The role ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/SyncPermissionsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/RoleResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Role permissions updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/users\/{user}\/role": {
            "put": {
                "operationId": "role.assignToUser",
                "description": "A user holds exactly one role at a time in this system \u2014 assigning\na new role removes whichever one they had before, rather than\nadding to it.",
                "summary": "Assign a role to a user, replacing any role they currently hold",
                "tags": [
                    "Role Management"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "The user ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/AssignRoleRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Role assigned successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "role.removeFromUser",
                "summary": "Remove a role from a user, leaving them with no role at all",
                "tags": [
                    "Role Management"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "The user ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "role",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Role removed successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/settings\/sms-configuration": {
            "get": {
                "operationId": "smsConfiguration.show",
                "description": "Admin-only. Returns `username`, `sender_id`, `is_active`, and\n`is_configured`. `api_key` is never included in the response \u2014\ncheck `is_configured` to know whether SMS sending is ready to\nwork.",
                "summary": "View the current SMS provider configuration",
                "tags": [
                    "SMS Configuration"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SmsConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "smsConfiguration.update",
                "description": "Admin-only. Requires `username` and `api_key` together \u2014 send\nboth even if only one is changing. Takes effect immediately: the\nvery next SMS sent anywhere in the app uses these credentials.",
                "summary": "Update the SMS provider configuration",
                "tags": [
                    "SMS Configuration"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateSmsConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SmsConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "SMS configuration updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/auth\/sessions": {
            "get": {
                "operationId": "sessions.index",
                "description": "Returns the authenticated user's currently active sessions \u2014 meaning\nanything not yet revoked and not past its expiry \u2014 sorted with the\nmost recently used session first. Each entry carries its linked\ndevice, the IP address it was opened from, and a best-effort\ncity\/country resolved at the time of login, alongside\n`last_active_at` for gauging how recently it was touched.\n\nThe entry matching the token used to make this very request is\nmarked `is_current: true`. Frontends should treat that one\ndifferently \u2014 hide or disable its revoke control and route ending\nit through `POST \/auth\/logout` instead, since revoking your own\nactive session here would just orphan the request mid-flight.",
                "summary": "List active sessions",
                "tags": [
                    "Sessions"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/UserSessionResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/sessions\/others": {
            "delete": {
                "operationId": "sessions.destroy-others",
                "description": "A single call that revokes every session belonging to the user\nexcept the one currently making the request \u2014 each revoked session\nalso has its underlying access token deleted, so those devices are\nlocked out immediately rather than merely flagged. The session\nyou're on right now is left untouched. The response reports how\nmany sessions were closed out.\n\nPoint users here right after a password change, or the moment they\nflag a \"new device\" login notice they don't recognize \u2014 it's the\nfastest way to shut out anything they didn't authorize.",
                "summary": "Sign out every other device",
                "tags": [
                    "Sessions"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/sessions\/{session}": {
            "delete": {
                "operationId": "sessions.destroy",
                "description": "Targets a single session by ID, revokes it, and deletes its access\ntoken \u2014 the device on the other end will get a `401 Unauthorized`\nthe next time it tries to use that token. A user may only act on\nsessions tied to their own account; anything else is rejected with\na `403`. This endpoint isn't meant for closing the session you're\ncurrently using \u2014 for that, call `POST \/auth\/logout` instead.",
                "summary": "End one specific session",
                "tags": [
                    "Sessions"
                ],
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "description": "The session ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Session revoked."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": "This session does not belong to you."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/shipping-zones": {
            "get": {
                "operationId": "shippingZone.index",
                "summary": "List all shipping zones",
                "tags": [
                    "Shipping"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ShippingZoneResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "shippingZone.store",
                "description": "Set `is_default: true` to make this the fallback zone for any\ncounty not explicitly listed anywhere \u2014 doing so automatically\nunmarks whichever zone was previously default. Every store\nneeds exactly one default zone for checkout to always resolve\na rate, even for an address in a county nobody's configured yet.",
                "summary": "Create a shipping zone",
                "tags": [
                    "Shipping"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreShippingZoneRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShippingZoneResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/shipping-zones\/{zone}": {
            "put": {
                "operationId": "shippingZone.update",
                "description": "Updates attributes on an existing shipping zone, resolved via route model binding.\nRequires \"update\" permission on the specific ShippingZone instance.",
                "summary": "Update a shipping zone",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone to update.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateShippingZoneRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShippingZoneResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "shippingZone.destroy",
                "description": "Fails if it's the current default \u2014 mark another\nzone default first.",
                "summary": "Delete a shipping zone",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone to delete.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/shipping-rates": {
            "get": {
                "operationId": "shippingRate.index",
                "summary": "List all shipping rates",
                "tags": [
                    "Shipping"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ShippingRateResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "shippingRate.store",
                "description": "`free_shipping_threshold`, if set, means orders whose subtotal\nmeets or exceeds it ship free using this rate \u2014 leave it blank\nfor a rate that's always paid.",
                "summary": "Create a shipping rate under a zone",
                "tags": [
                    "Shipping"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreShippingRateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShippingRateResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/shipping-rates\/{rate}": {
            "put": {
                "operationId": "shippingRate.update",
                "description": "`free_shipping_threshold`, if set, means orders whose subtotal\nmeets or exceeds it ship free using this rate \u2014 leave it blank\nfor a rate that's always paid.",
                "summary": "Update a shipping rate",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "rate",
                        "in": "path",
                        "required": true,
                        "description": "The rate ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateShippingRateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShippingRateResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "shippingRate.destroy",
                "description": "Fails if the rate is referenced by any order.",
                "summary": "Delete a shipping rate",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "rate",
                        "in": "path",
                        "required": true,
                        "description": "The rate ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/carriers": {
            "get": {
                "operationId": "carrier.index",
                "description": "Returns all shipping carriers available in the system.\nRequires \"viewAny\" permission on the Carrier model.",
                "summary": "List all carriers",
                "tags": [
                    "Shipping"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/CarrierResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "carrier.store",
                "description": "Registers a new shipping carrier with the given attributes.\nRequires \"create\" permission on the Carrier model.",
                "summary": "Create a carrier",
                "tags": [
                    "Shipping"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreCarrierRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CarrierResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/carriers\/{carrier}": {
            "put": {
                "operationId": "carrier.update",
                "description": "Updates attributes on an existing carrier, resolved via route model binding.\nRequires \"update\" permission on the specific Carrier instance.",
                "summary": "Update a carrier",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "carrier",
                        "in": "path",
                        "required": true,
                        "description": "The carrier to update.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateCarrierRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CarrierResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "carrier.destroy",
                "description": "Permanently removes a carrier from the system.\nRequires \"delete\" permission on the specific Carrier instance.",
                "summary": "Delete a carrier",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "carrier",
                        "in": "path",
                        "required": true,
                        "description": "The carrier to delete.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/shipping-addresses": {
            "get": {
                "operationId": "shippingAddress.index",
                "summary": "List the authenticated customer's saved shipping addresses,\ndefault first",
                "tags": [
                    "Shipping"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ShippingAddressResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "shippingAddress.store",
                "description": "The first address a customer saves automatically becomes their\ndefault; after that, set `is_default: true` explicitly to make\na new one the default \u2014 doing so unmarks whichever was default\nbefore.",
                "summary": "Save a new shipping address",
                "tags": [
                    "Shipping"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreShippingAddressRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShippingAddressResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Shipping address saved."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/shipping-addresses\/{address}": {
            "put": {
                "operationId": "shippingAddress.update",
                "description": "Editing an address never changes past\norders \u2014 those keep the shipping details as they were at the\ntime of that order.",
                "summary": "Update a saved address",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "address",
                        "in": "path",
                        "required": true,
                        "description": "The address ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateShippingAddressRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ShippingAddressResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Shipping address updated."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "shippingAddress.destroy",
                "description": "If it was the default, another saved\naddress (if any) is automatically promoted to default.",
                "summary": "Delete a saved address",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "address",
                        "in": "path",
                        "required": true,
                        "description": "The address ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Shipping address deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/shipping-rates": {
            "get": {
                "operationId": "shipping.rates",
                "description": "Public \u2014 no authentication required. Pass `?county=Nairobi` to\nget every active rate for that county's zone. If the county\nisn't explicitly covered by any zone, the store's default zone\nis used instead \u2014 this endpoint always returns something usable\nas long as a default zone has been configured, rather than an\nempty list for an unlisted county.",
                "summary": "List available shipping rates for a county",
                "tags": [
                    "Shipping"
                ],
                "parameters": [
                    {
                        "name": "county",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ShippingRateResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/provider-callbacks\/africastalking\/sms\/delivery-report": {
            "post": {
                "operationId": "notification.smsDeliveryReport",
                "tags": [
                    "SmsDeliveryReport"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "messageId": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "status": {
                                        "type": "string",
                                        "maxLength": 80
                                    },
                                    "failureReason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "const": "accepted"
                                        }
                                    },
                                    "required": [
                                        "status"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": ""
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/auth\/social\/{provider}\/redirect": {
            "get": {
                "operationId": "socialite.redirect",
                "description": "Redirects the browser to the provider's OAuth consent screen.\nSupported providers: `google`, `apple`. Always signs the user up\nor in as a customer account.",
                "summary": "OAuth redirect (web flow)",
                "tags": [
                    "Social Authentication"
                ],
                "parameters": [
                    {
                        "name": "provider",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                },
                "security": []
            }
        },
        "\/auth\/social\/{provider}\/callback": {
            "get": {
                "operationId": "socialite.callback",
                "description": "Handles the provider's redirect after user consent, then redirects\nto the frontend callback URL with a bearer token and `is_new` flag.",
                "summary": "OAuth callback (web flow)",
                "tags": [
                    "Social Authentication"
                ],
                "parameters": [
                    {
                        "name": "provider",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/auth\/social\/token": {
            "post": {
                "operationId": "socialite.token",
                "description": "Accepts an access token from the provider's native SDK (e.g.\nGoogle Sign-In on iOS\/Android) and exchanges it for a bearer\ntoken. Returns `is_new: true` if this created a new account.",
                "summary": "OAuth token exchange (mobile flow)",
                "tags": [
                    "Social Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/SocialiteRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/store-locator\/nearby": {
            "get": {
                "operationId": "storeLocator.nearby",
                "description": "Public, no auth. `radius_km` defaults to 25. Distance is\ncomputed as true great-circle distance (not straight-line),\nreturned as `distance_km` on each result (rounded to 2 decimal\nplaces), already sorted nearest-first.\n\nEach result carries partner info (`partner_name`,\n`partner_logo_url`, `partner_channel`) as flat fields rather\nthan a nested `partner` object \u2014 this endpoint is built for\nspeed over thousands of candidate rows, so it selects those as\nplain columns instead of eager-loading the full relation.",
                "summary": "Find retail locations near a given point",
                "tags": [
                    "Store Locator"
                ],
                "parameters": [
                    {
                        "name": "lat",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "number",
                            "minimum": -90,
                            "maximum": 90
                        }
                    },
                    {
                        "name": "lng",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "number",
                            "minimum": -180,
                            "maximum": 180
                        }
                    },
                    {
                        "name": "radius_km",
                        "in": "query",
                        "schema": {
                            "type": [
                                "number",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 200
                        }
                    },
                    {
                        "name": "channel",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "supermarket",
                                "bar_restaurant"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/RetailPartnerLocationResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/store-locator\/partners": {
            "get": {
                "operationId": "storeLocator.partners",
                "description": "grouped by channel\n(supermarket \/ online \/ bar_restaurant) \u2014 powers the static\n\"Available at major retailers nationwide\" logo strips.\n\n`data` is an object keyed by channel name, not a flat array \u2014\ne.g. `{ \"supermarket\": [...], \"online\": [...], \"bar_restaurant\": [...] }`.\nA channel with no active partners is simply absent from the\nobject rather than present as an empty array.",
                "summary": "All active retail partners",
                "tags": [
                    "Store Locator"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "array",
                                                "items": {
                                                    "$ref": "#\/components\/schemas\/RetailPartnerResource"
                                                }
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/admin\/store-locator\/partners": {
            "get": {
                "operationId": "retailPartner.index",
                "description": "Not paginated \u2014 the number of distinct partner brands (Carrefour,\nNaivas, Jumia, etc.) is expected to stay small even at national\nscale, unlike their individual physical locations, which can run\ninto the thousands and are managed separately per partner via\nthe location endpoints below.",
                "summary": "List all retail partners, with their locations and logo",
                "tags": [
                    "Store Locator"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/RetailPartnerResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "retailPartner.store",
                "description": "`channel` determines how this partner behaves elsewhere in the\nsystem:\n- `supermarket` \/ `bar_restaurant` \u2014 can have physical locations\n  added via `POST \/admin\/store-locator\/partners\/{partner}\/locations`\n  and will appear in nearby-search results.\n- `online` \u2014 cannot have physical locations at all (enforced on\n  the location endpoint, not here); `website_url` is required\n  for this channel since it's the only way customers reach it.\n\nLogo is not set here \u2014 upload it separately via\n`POST \/admin\/store-locator\/partners\/{partner}\/logo` once the\npartner exists, same two-step pattern as a blog post's featured\nimage. `slug` is generated automatically from `name` and isn't\naccepted as input.",
                "summary": "Create a retail partner (the brand, not a physical location)",
                "tags": [
                    "Store Locator"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreRetailPartnerRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/RetailPartnerResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Retail partner created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/store-locator\/partners\/{partner}": {
            "put": {
                "operationId": "retailPartner.update",
                "description": "Changing `channel` does NOT retroactively validate or remove\nexisting locations \u2014 e.g. switching a partner from `supermarket`\nto `online` after it already has locations will leave those\nlocation rows in place, orphaned from the channel's intended\nbehavior. Check for existing locations before changing channel\naway from `supermarket`\/`bar_restaurant` if that matters for\nyour admin workflow.\n\nSetting `is_active: false` removes the partner (and, by\nextension, its locations) from public results without deleting\nanything \u2014 prefer this over `destroy` for a partner you might\nreinstate later.",
                "summary": "Update a retail partner's name, channel, website, or active status",
                "tags": [
                    "Store Locator"
                ],
                "parameters": [
                    {
                        "name": "partner",
                        "in": "path",
                        "required": true,
                        "description": "The partner ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateRetailPartnerRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/RetailPartnerResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Retail partner updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "retailPartner.destroy",
                "description": "Cascades \u2014 every physical location belonging to this partner is\ndeleted along with it, not just hidden. No undo. Prefer\n`PUT ...\/partners\/{partner}` with `is_active: false` unless this\npartner was created in error and should never have existed.",
                "summary": "Delete a retail partner permanently",
                "tags": [
                    "Store Locator"
                ],
                "parameters": [
                    {
                        "name": "partner",
                        "in": "path",
                        "required": true,
                        "description": "The partner ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Retail partner deleted successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/store-locator\/partners\/{partner}\/logo": {
            "post": {
                "operationId": "retailPartner.uploadLogo",
                "description": "Always replaces whatever logo was there before \u2014 one logo per\npartner, not a gallery, same convention as a blog post's\nfeatured image. Takes effect immediately everywhere the partner\nis shown, including the public\n`GET \/store-locator\/partners` listing.",
                "summary": "Upload or replace the partner's logo",
                "tags": [
                    "Store Locator"
                ],
                "parameters": [
                    {
                        "name": "partner",
                        "in": "path",
                        "required": true,
                        "description": "The partner ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UploadRetailPartnerLogoRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/RetailPartnerResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Retail partner logo updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/store-locator\/partners\/{partner}\/locations": {
            "post": {
                "operationId": "retailPartnerLocation.store",
                "description": "Only valid for partners with `channel` of `supermarket` or\n`bar_restaurant` \u2014 fails with a `422` for an `online` partner,\nsince those have no physical presence to add. Both channels are\ntreated identically here and both appear as full pins in the\nnearby-search map, not as a text-only listing.\n\n`latitude`\/`longitude` are required and drive the actual\ngeospatial search \u2014 get them from a real source (Google Maps\npin-drop, geocoding a typed address) rather than approximating,\nsince accuracy directly determines whether this location shows\nup correctly in a customer's \"near me\" results.",
                "summary": "Add a physical location to a retail partner",
                "tags": [
                    "Store Locator"
                ],
                "parameters": [
                    {
                        "name": "partner",
                        "in": "path",
                        "required": true,
                        "description": "The partner ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreRetailPartnerLocationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/RetailPartnerLocationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Store location added successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/store-locator\/locations\/{location}": {
            "put": {
                "operationId": "retailPartnerLocation.update",
                "description": "Updating `latitude`\/`longitude` immediately changes where this\nlocation appears in nearby-search results \u2014 there's no approval\nstep or delay. Setting `is_active: false` removes it from\npublic results without deleting the record, useful for a store\nthat's temporarily closed or being relocated.",
                "summary": "Update a location's label, address fields, coordinates, or\nactive status",
                "tags": [
                    "Store Locator"
                ],
                "parameters": [
                    {
                        "name": "location",
                        "in": "path",
                        "required": true,
                        "description": "The location ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateRetailPartnerLocationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/RetailPartnerLocationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Store location updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "retailPartnerLocation.destroy",
                "description": "No undo. Prefer `PUT ...\/locations\/{location}` with\n`is_active: false` for a store that's closed temporarily or\nbeing relocated \u2014 use this only for a location entered in error\nor permanently and definitively gone.",
                "summary": "Delete a physical location permanently",
                "tags": [
                    "Store Locator"
                ],
                "parameters": [
                    {
                        "name": "location",
                        "in": "path",
                        "required": true,
                        "description": "The location ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Store location deleted successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ca\/tax-classes": {
            "get": {
                "operationId": "tax-classes.index",
                "summary": "List all tax classes, default first",
                "tags": [
                    "Tax Classes"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/TaxClassResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "tax-classes.store",
                "description": "Set `is_default: true` to make this the class every product\nwithout its own tax class falls back to \u2014 doing so automatically\nunmarks whichever class was previously default. A store almost\nalways has one class named something like \"Standard Rate\" marked\ndefault, plus optionally others like \"Zero-Rated\" or \"Exempt\".",
                "summary": "Create a tax class",
                "tags": [
                    "Tax Classes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreTaxClassRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TaxClassResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Tax class created successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/ca\/tax-classes\/{taxClass}": {
            "get": {
                "operationId": "tax-classes.show",
                "summary": "View a single tax class",
                "tags": [
                    "Tax Classes"
                ],
                "parameters": [
                    {
                        "name": "taxClass",
                        "in": "path",
                        "required": true,
                        "description": "The tax class ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TaxClassResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "tax-classes.update",
                "description": "Setting `is_default: true` here also unmarks the previous default.",
                "summary": "Update a tax class",
                "tags": [
                    "Tax Classes"
                ],
                "parameters": [
                    {
                        "name": "taxClass",
                        "in": "path",
                        "required": true,
                        "description": "The tax class ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateTaxClassRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TaxClassResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Tax class updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "tax-classes.destroy",
                "description": "Fails if this is the current default (mark another class default\nfirst) or if it's the only tax class remaining \u2014 every store\nneeds at least one for products to fall back to.",
                "summary": "Delete a tax class",
                "tags": [
                    "Tax Classes"
                ],
                "parameters": [
                    {
                        "name": "taxClass",
                        "in": "path",
                        "required": true,
                        "description": "The tax class ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Tax class deleted."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/settings\/tax-configuration": {
            "put": {
                "operationId": "tax-configuration.update",
                "description": "Admin-only. Send only the fields you want to change. Takes effect\nimmediately \u2014 every price calculation from the next request\nonward uses the new rate\/mode.",
                "summary": "Update the tax configuration",
                "tags": [
                    "Tax Configuration"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateTaxConfigurationRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TaxConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Tax configuration updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "get": {
                "operationId": "tax-configuration.show",
                "description": "Public \u2014 no authentication required. The storefront needs\n`tax_rate` and `prices_include_tax` to display prices and any\n\"incl.\/excl. tax\" labeling correctly.",
                "summary": "Get the current tax configuration",
                "tags": [
                    "Tax Configuration"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/TaxConfigurationResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/auth\/2fa\/enable": {
            "post": {
                "operationId": "twoFactor.enable",
                "description": "Generates a TOTP secret and provisioning URI for QR code display,\nplus single-use recovery codes. 2FA is not active until confirmed.",
                "summary": "Enable 2FA",
                "tags": [
                    "Two-Factor Authentication"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "secret": {
                                                    "type": "string"
                                                },
                                                "qr_url": {
                                                    "type": "string"
                                                },
                                                "recovery_codes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "user": {
                                                    "$ref": "#\/components\/schemas\/UserResource"
                                                }
                                            },
                                            "required": [
                                                "secret",
                                                "qr_url",
                                                "recovery_codes",
                                                "user"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Scan the QR code, then confirm with a code."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Two-factor authentication is already enabled."
                                        },
                                        "errors": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/2fa\/confirm": {
            "post": {
                "operationId": "twoFactor.confirm",
                "summary": "Confirm 2FA setup",
                "tags": [
                    "Two-Factor Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/TwoFactorCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "$ref": "#\/components\/schemas\/UserResource"
                                                }
                                            },
                                            "required": [
                                                "user"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Two-factor authentication is now active."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/2fa\/disable": {
            "post": {
                "operationId": "twoFactor.disable",
                "summary": "Disable 2FA. Requires a valid TOTP code",
                "tags": [
                    "Two-Factor Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/TwoFactorCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "$ref": "#\/components\/schemas\/UserResource"
                                                }
                                            },
                                            "required": [
                                                "user"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Two-factor authentication has been disabled."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/2fa\/recovery-codes": {
            "get": {
                "operationId": "twoFactor.recoveryCodes",
                "summary": "Get remaining recovery codes. Requires a valid TOTP code",
                "tags": [
                    "Two-Factor Authentication"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 6,
                            "maxLength": 6
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "recovery_codes": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "recovery_codes"
                                            ]
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/2fa\/recovery-codes\/regenerate": {
            "post": {
                "operationId": "twoFactor.regenerateRecoveryCodes",
                "summary": "Regenerate recovery codes, invalidating old ones. Requires a valid TOTP code",
                "tags": [
                    "Two-Factor Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/TwoFactorCodeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "recovery_codes": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "recovery_codes"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "New recovery codes generated. Previous codes are now invalid."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/users": {
            "get": {
                "operationId": "user.index",
                "description": "Returns every user account regardless of type \u2014 customer, staff,\nand admin all live in the same table. Filter with the\n`account_type` query param to narrow to one type (e.g. only staff),\nand `status` to narrow to active\/suspended\/deactivated accounts.\nPaginated via `per_page` (default 20).",
                "summary": "List users",
                "tags": [
                    "User Management"
                ],
                "parameters": [
                    {
                        "name": "account_type",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "user.store",
                "description": "There is no public registration path for staff\/admin accounts \u2014\nthis endpoint is the only way they get created. No password is set\nhere; instead, creating the account fires a `StaffAccountCreated`\nevent that a queued listener turns into an emailed password-setup\nlink, using the same signed-token flow as the standard password\nreset endpoint. The new hire sets their own password on first\naccess rather than the admin choosing (and therefore knowing) it.\n\nA `role` must be supplied and must already exist \u2014 this endpoint\ndoes not create roles on the fly. Use `POST \/admin\/roles` first if\nthe role doesn't exist yet.",
                "summary": "Create a staff or admin account",
                "tags": [
                    "User Management"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CreateStaffUserRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Account created. A password-setup link has been emailed to the user."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/admin\/users\/{user}": {
            "get": {
                "operationId": "user.show",
                "description": "Includes the user's currently assigned role(s) in the response.",
                "summary": "View a single user",
                "tags": [
                    "User Management"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "The user ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        },
                                        "meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "user.update",
                "description": "All fields are optional \u2014 only what's included in the request body\nis changed. Does not touch password, role, or account_type; those\nare handled by dedicated endpoints (password reset, role assignment,\nsuspension\/reactivation), and account_type is fixed at creation.",
                "summary": "Update a user's profile fields",
                "tags": [
                    "User Management"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "The user ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateUserRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "User updated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "user.destroy",
                "description": "This is a soft delete \u2014 the record and its history (orders,\naudit trail, etc.) are preserved, just excluded from normal\nqueries. All active sessions are revoked first. An admin cannot\ndeactivate their own account through this endpoint, for the same\nreason self-suspension is blocked.",
                "summary": "Deactivate (soft-delete) a user",
                "tags": [
                    "User Management"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "The user ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "null"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "User deactivated."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/users\/{user}\/suspend": {
            "post": {
                "operationId": "user.suspend",
                "description": "Every active session\/token for the user is revoked immediately \u2014\na suspension takes effect mid-session, not just on next login. An\noptional `reason` in the request body is stored against the\naccount for audit purposes.\n\nAn admin cannot suspend their own account through this endpoint \u2014\ndoing so would revoke their own active session with no guarantee\nanother admin is available to undo it.",
                "summary": "Suspend a user",
                "tags": [
                    "User Management"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "The user ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "User suspended successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/users\/{user}\/reactivate": {
            "post": {
                "operationId": "user.reactivate",
                "description": "Clears the suspension timestamp, reason, and the reference to who\nsuspended it. Does not automatically restore any session the user\nhad before suspension \u2014 they'll need to log in again.",
                "summary": "Reactivate a previously suspended account",
                "tags": [
                    "User Management"
                ],
                "parameters": [
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "description": "The user ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UserResource"
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "User reactivated successfully."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "token"
            }
        },
        "schemas": {
            "AddCartItemRequest": {
                "type": "object",
                "properties": {
                    "product_variant_id": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1
                    }
                },
                "required": [
                    "product_variant_id",
                    "quantity"
                ],
                "title": "AddCartItemRequest"
            },
            "AdjustStockRequest": {
                "type": "object",
                "properties": {
                    "product_variant_id": {
                        "type": "string"
                    },
                    "branch_id": {
                        "type": "string"
                    },
                    "actual_quantity": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "reason": {
                        "$ref": "#\/components\/schemas\/StockAdjustmentReason"
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    }
                },
                "required": [
                    "product_variant_id",
                    "branch_id",
                    "actual_quantity",
                    "reason"
                ],
                "title": "AdjustStockRequest"
            },
            "AdminBlogPostResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "excerpt": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "content": {
                        "type": "string"
                    },
                    "featured_image_url": {
                        "type": "string"
                    },
                    "category": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "slug"
                        ]
                    },
                    "author": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/BlogTagResource"
                        }
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "views_count": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string"
                    },
                    "seo_title": {
                        "type": "string"
                    },
                    "seo_description": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "title",
                    "slug",
                    "excerpt",
                    "content",
                    "featured_image_url",
                    "published_at",
                    "views_count",
                    "status",
                    "seo_title",
                    "seo_description",
                    "created_at",
                    "updated_at"
                ],
                "title": "AdminBlogPostResource"
            },
            "AdminOrderResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "order_number": {
                        "type": "string"
                    },
                    "channel": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    "online"
                                ]
                            }
                        ]
                    },
                    "status": {
                        "type": "string"
                    },
                    "customer": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": "string"
                            },
                            "phone": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "email",
                            "phone"
                        ]
                    },
                    "walk_in_customer": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "phone": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "name",
                            "phone"
                        ]
                    },
                    "cashier": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "branch": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "shipping": {
                        "type": "object",
                        "properties": {
                            "recipient_name": {
                                "type": "string"
                            },
                            "phone": {
                                "type": "string"
                            },
                            "county": {
                                "type": "string"
                            },
                            "town": {
                                "type": "string"
                            },
                            "address_line": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "recipient_name",
                            "phone",
                            "county",
                            "town",
                            "address_line"
                        ]
                    },
                    "subtotal": {
                        "type": "number"
                    },
                    "discount_code": {
                        "type": "string"
                    },
                    "discount_amount": {
                        "type": "number"
                    },
                    "tax": {
                        "type": "number"
                    },
                    "shipping_cost": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    },
                    "payment": {
                        "type": "object",
                        "properties": {
                            "method": {
                                "type": "string"
                            },
                            "status": {
                                "type": "string"
                            },
                            "receipt_number": {
                                "type": "string"
                            },
                            "phone": {
                                "type": "string"
                            },
                            "paid_at": {
                                "type": "string"
                            },
                            "failure_reason": {
                                "type": "string"
                            },
                            "amount_tendered": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "change_due": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "method",
                            "status",
                            "receipt_number",
                            "phone",
                            "paid_at",
                            "failure_reason",
                            "amount_tendered",
                            "change_due"
                        ]
                    },
                    "fulfillment": {
                        "type": "object",
                        "properties": {
                            "carrier": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "id",
                                    "name"
                                ]
                            },
                            "tracking_number": {
                                "type": "string"
                            },
                            "shipped_at": {
                                "type": "string"
                            },
                            "delivered_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "tracking_number",
                            "shipped_at",
                            "delivered_at"
                        ]
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/OrderItemResource"
                        }
                    },
                    "notification_deliveries": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "order_number",
                    "channel",
                    "status",
                    "customer",
                    "walk_in_customer",
                    "branch",
                    "shipping",
                    "subtotal",
                    "discount_code",
                    "discount_amount",
                    "tax",
                    "shipping_cost",
                    "total",
                    "payment",
                    "fulfillment",
                    "created_at"
                ],
                "title": "AdminOrderResource"
            },
            "AdminReviewResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "product": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "customer": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "email"
                        ]
                    },
                    "rating": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "comment": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "rejection_reason": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "product",
                    "customer",
                    "rating",
                    "title",
                    "comment",
                    "status",
                    "rejection_reason",
                    "created_at"
                ],
                "title": "AdminReviewResource"
            },
            "AiKnowledge": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/AiKnowledgeType"
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "content": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "type",
                    "title",
                    "content",
                    "is_active",
                    "created_at",
                    "updated_at"
                ],
                "title": "AiKnowledge"
            },
            "AiKnowledgeType": {
                "type": "string",
                "enum": [
                    "faq",
                    "shipping_policy",
                    "returns_policy",
                    "payment_methods",
                    "warranty",
                    "product_category",
                    "general"
                ],
                "title": "AiKnowledgeType"
            },
            "AiProfile": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "prompt": {
                        "type": "array",
                        "items": {}
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "prompt",
                    "is_active",
                    "created_at",
                    "updated_at"
                ],
                "title": "AiProfile"
            },
            "AppConfigurationResource": {
                "type": "object",
                "properties": {
                    "brand_name": {
                        "type": "string"
                    },
                    "brand_tagline": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "logo_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "primary_color": {
                        "type": "string"
                    },
                    "support_email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "support_phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "location": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "google_maps_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "latitude": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "longitude": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "has_map": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "brand_name",
                    "brand_tagline",
                    "logo_url",
                    "primary_color",
                    "support_email",
                    "support_phone",
                    "location",
                    "google_maps_url",
                    "latitude",
                    "longitude",
                    "has_map",
                    "updated_at"
                ],
                "title": "AppConfigurationResource"
            },
            "ApplyDiscountCodeRequest": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "maxLength": 50
                    }
                },
                "required": [
                    "code"
                ],
                "title": "ApplyDiscountCodeRequest"
            },
            "AssignRoleRequest": {
                "type": "object",
                "properties": {
                    "role": {
                        "type": "string"
                    }
                },
                "required": [
                    "role"
                ],
                "title": "AssignRoleRequest"
            },
            "AttachProductMediaRequest": {
                "type": "object",
                "properties": {
                    "is_primary": {
                        "type": "boolean"
                    },
                    "asset_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "minItems": 1,
                        "maxItems": 10
                    }
                },
                "required": [
                    "asset_ids"
                ],
                "title": "AttachProductMediaRequest"
            },
            "AttributeResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "data_type": {
                        "type": "string"
                    },
                    "options": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "unit": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "slug",
                    "data_type",
                    "options",
                    "unit",
                    "is_active",
                    "created_at"
                ],
                "title": "AttributeResource"
            },
            "BlogCategoryResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "posts_count": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "created_at"
                ],
                "title": "BlogCategoryResource"
            },
            "BlogPostResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "excerpt": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "content": {
                        "type": "string"
                    },
                    "featured_image_url": {
                        "type": "string"
                    },
                    "category": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "slug"
                        ]
                    },
                    "author": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/BlogTagResource"
                        }
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "views_count": {
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "title",
                    "slug",
                    "excerpt",
                    "content",
                    "featured_image_url",
                    "published_at",
                    "views_count"
                ],
                "title": "BlogPostResource"
            },
            "BlogTagResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "posts_count": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "slug",
                    "created_at"
                ],
                "title": "BlogTagResource"
            },
            "BranchResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "location": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "is_online": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "code",
                    "name",
                    "location",
                    "phone",
                    "is_active",
                    "is_online",
                    "created_at",
                    "updated_at"
                ],
                "title": "BranchResource"
            },
            "CancelStockTransferRequest": {
                "type": "object",
                "properties": {
                    "reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    }
                },
                "title": "CancelStockTransferRequest"
            },
            "CarrierResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "phone",
                    "is_active"
                ],
                "title": "CarrierResource"
            },
            "CartItemResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "variant": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "sku": {
                                "type": "string"
                            },
                            "product": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "id",
                                    "name"
                                ]
                            },
                            "price_online": {
                                "type": "number"
                            }
                        },
                        "required": [
                            "id",
                            "sku",
                            "product",
                            "price_online"
                        ]
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "line_total": {
                        "type": "number"
                    }
                },
                "required": [
                    "id",
                    "variant",
                    "quantity",
                    "line_total"
                ],
                "title": "CartItemResource"
            },
            "CartResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "branch_id": {
                        "type": "string"
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/CartItemResource"
                        }
                    },
                    "item_count": {
                        "type": "string"
                    },
                    "subtotal": {
                        "type": "string"
                    },
                    "discount_code": {
                        "type": "string"
                    },
                    "discount": {
                        "type": "string"
                    },
                    "tax": {
                        "type": "string"
                    },
                    "total": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "branch_id",
                    "subtotal",
                    "discount_code",
                    "discount",
                    "tax",
                    "total",
                    "updated_at"
                ],
                "title": "CartResource"
            },
            "CategoryResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "parent_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "image_url": {
                        "type": "string"
                    },
                    "sort_order": {
                        "type": "integer"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "children": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/CategoryResource"
                        }
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "parent_id",
                    "name",
                    "slug",
                    "description",
                    "image_url",
                    "sort_order",
                    "is_active",
                    "created_at"
                ],
                "title": "CategoryResource"
            },
            "Conversation": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "participant_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "participant_id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "participant_type",
                    "participant_id",
                    "title",
                    "created_at",
                    "updated_at"
                ],
                "title": "Conversation"
            },
            "CreateStaffUserRequest": {
                "type": "object",
                "properties": {
                    "first_name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "last_name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 30
                    },
                    "account_type": {
                        "type": "string",
                        "enum": [
                            "staff",
                            "admin"
                        ]
                    },
                    "role": {
                        "type": "string"
                    }
                },
                "required": [
                    "first_name",
                    "last_name",
                    "email",
                    "account_type",
                    "role"
                ],
                "title": "CreateStaffUserRequest"
            },
            "CustomerResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "total_orders": {
                        "type": "integer"
                    },
                    "total_spent": {
                        "type": "number"
                    },
                    "last_order_at": {
                        "type": "string"
                    },
                    "recent_orders": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/OrderResource"
                        }
                    },
                    "email_verified_at": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "email",
                    "phone",
                    "status",
                    "total_orders",
                    "total_spent",
                    "last_order_at",
                    "email_verified_at",
                    "created_at"
                ],
                "title": "CustomerResource"
            },
            "DiscountCodeResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/DiscountType"
                    },
                    "value": {
                        "type": "number"
                    },
                    "category": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "min_order_amount": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "max_discount_amount": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "usage_limit": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "usage_limit_per_customer": {
                        "type": "integer"
                    },
                    "times_used": {
                        "type": "integer"
                    },
                    "starts_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "code",
                    "name",
                    "description",
                    "type",
                    "value",
                    "min_order_amount",
                    "max_discount_amount",
                    "usage_limit",
                    "usage_limit_per_customer",
                    "times_used",
                    "starts_at",
                    "expires_at",
                    "is_active",
                    "created_at"
                ],
                "title": "DiscountCodeResource"
            },
            "DiscountType": {
                "type": "string",
                "enum": [
                    "percentage",
                    "fixed_amount"
                ],
                "title": "DiscountType"
            },
            "EmailConfigurationResource": {
                "type": "object",
                "properties": {
                    "host": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "port": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "username": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "encryption": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "from_address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "from_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "is_configured": {
                        "type": "boolean"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "host",
                    "port",
                    "username",
                    "encryption",
                    "from_address",
                    "from_name",
                    "is_active",
                    "is_configured",
                    "updated_at"
                ],
                "title": "EmailConfigurationResource"
            },
            "EmailRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    }
                },
                "required": [
                    "email"
                ],
                "title": "EmailRequest"
            },
            "ImportProductsRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "maxLength": 10240
                    }
                },
                "required": [
                    "file"
                ],
                "title": "ImportProductsRequest"
            },
            "InitiateCheckoutRequest": {
                "type": "object",
                "properties": {
                    "shipping_address_id": {
                        "type": "string"
                    },
                    "payment_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Optional \u2014 defaults to the shipping address's phone if\nomitted. Lets a customer pay from a different line than\nthe one receiving the delivery.",
                        "maxLength": 20
                    }
                },
                "required": [
                    "shipping_address_id"
                ],
                "title": "InitiateCheckoutRequest"
            },
            "KenyanCounty": {
                "type": "string",
                "enum": [
                    "Mombasa",
                    "Kwale",
                    "Kilifi",
                    "Tana River",
                    "Lamu",
                    "Taita-Taveta",
                    "Garissa",
                    "Wajir",
                    "Mandera",
                    "Marsabit",
                    "Isiolo",
                    "Meru",
                    "Tharaka-Nithi",
                    "Embu",
                    "Kitui",
                    "Machakos",
                    "Makueni",
                    "Nyandarua",
                    "Nyeri",
                    "Kirinyaga",
                    "Murang'a",
                    "Kiambu",
                    "Turkana",
                    "West Pokot",
                    "Samburu",
                    "Trans Nzoia",
                    "Uasin Gishu",
                    "Elgeyo-Marakwet",
                    "Nandi",
                    "Baringo",
                    "Laikipia",
                    "Nakuru",
                    "Narok",
                    "Kajiado",
                    "Kericho",
                    "Bomet",
                    "Kakamega",
                    "Vihiga",
                    "Bungoma",
                    "Busia",
                    "Siaya",
                    "Kisumu",
                    "Homa Bay",
                    "Migori",
                    "Kisii",
                    "Nyamira",
                    "Nairobi"
                ],
                "title": "KenyanCounty"
            },
            "LoginRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "password": {
                        "type": "string"
                    }
                },
                "required": [
                    "email",
                    "password"
                ],
                "title": "LoginRequest"
            },
            "MagicLinkVerifyRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "token": {
                        "type": "string"
                    }
                },
                "required": [
                    "email",
                    "token"
                ],
                "title": "MagicLinkVerifyRequest"
            },
            "MarkShippedRequest": {
                "type": "object",
                "properties": {
                    "carrier_id": {
                        "type": "string"
                    },
                    "tracking_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    }
                },
                "required": [
                    "carrier_id"
                ],
                "title": "MarkShippedRequest"
            },
            "MediaConfigurationResource": {
                "type": "object",
                "properties": {
                    "cloud_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "api_key": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "is_configured": {
                        "type": "boolean"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "cloud_name",
                    "api_key",
                    "is_active",
                    "is_configured",
                    "updated_at"
                ],
                "title": "MediaConfigurationResource"
            },
            "MediaLibraryAssetResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "original_name": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "cloud_name": {
                        "type": "string"
                    },
                    "resource_type": {
                        "type": "string"
                    },
                    "mime_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "file_size_bytes": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "width": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "height": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "usage_count": {
                        "type": "integer"
                    },
                    "uploaded_by": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "original_name",
                    "url",
                    "cloud_name",
                    "resource_type",
                    "mime_type",
                    "file_size_bytes",
                    "width",
                    "height",
                    "created_at"
                ],
                "title": "MediaLibraryAssetResource"
            },
            "Notification": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "user_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "subject_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "subject_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "audience": {
                        "type": "string"
                    },
                    "dedupe_key": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "locale": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notification_type": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "body": {
                        "type": "string"
                    },
                    "payload": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "action_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "read_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "user_id",
                    "subject_type",
                    "subject_id",
                    "audience",
                    "dedupe_key",
                    "locale",
                    "notification_type",
                    "title",
                    "body",
                    "payload",
                    "action_url",
                    "read_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "Notification"
            },
            "OrderItemResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "product": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "slug"
                        ]
                    },
                    "product_name": {
                        "type": "string"
                    },
                    "sku": {
                        "type": "string"
                    },
                    "options": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "unit_price": {
                        "type": "number"
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "line_total": {
                        "type": "number"
                    },
                    "review": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "rating": {
                                "type": "integer"
                            },
                            "status": {
                                "$ref": "#\/components\/schemas\/ReviewStatus"
                            }
                        },
                        "required": [
                            "id",
                            "rating",
                            "status"
                        ]
                    }
                },
                "required": [
                    "id",
                    "product",
                    "product_name",
                    "sku",
                    "options",
                    "unit_price",
                    "quantity",
                    "line_total",
                    "review"
                ],
                "title": "OrderItemResource"
            },
            "OrderResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "order_number": {
                        "type": "string"
                    },
                    "channel": {
                        "type": "string"
                    },
                    "branch": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/OrderStatus"
                    },
                    "shipping": {
                        "type": "object",
                        "properties": {
                            "recipient_name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "phone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "county": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "town": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "address_line": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "recipient_name",
                            "phone",
                            "county",
                            "town",
                            "address_line"
                        ]
                    },
                    "subtotal": {
                        "type": "number"
                    },
                    "discount_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "discount_amount": {
                        "type": "number"
                    },
                    "tax": {
                        "type": "number"
                    },
                    "shipping_cost": {
                        "type": "number"
                    },
                    "total": {
                        "type": "number"
                    },
                    "payment": {
                        "type": "object",
                        "properties": {
                            "method": {
                                "type": "string"
                            },
                            "status": {
                                "$ref": "#\/components\/schemas\/PaymentStatus"
                            },
                            "receipt_number": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "paid_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "failure_reason": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "method",
                            "status",
                            "receipt_number",
                            "paid_at",
                            "failure_reason"
                        ]
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/OrderItemResource"
                        }
                    },
                    "fulfillment": {
                        "type": "object",
                        "properties": {
                            "carrier": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "id",
                                    "name"
                                ]
                            },
                            "tracking_number": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "shipped_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "delivered_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        },
                        "required": [
                            "tracking_number",
                            "shipped_at",
                            "delivered_at"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "order_number",
                    "channel",
                    "status",
                    "shipping",
                    "subtotal",
                    "discount_code",
                    "discount_amount",
                    "tax",
                    "shipping_cost",
                    "total",
                    "payment",
                    "fulfillment",
                    "created_at"
                ],
                "title": "OrderResource"
            },
            "OrderStatus": {
                "type": "string",
                "enum": [
                    "pending_payment",
                    "paid",
                    "processing",
                    "shipped",
                    "delivered",
                    "cancelled",
                    "failed"
                ],
                "title": "OrderStatus"
            },
            "PaymentConfigurationResource": {
                "type": "object",
                "properties": {
                    "branch_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_branch_override": {
                        "type": "boolean"
                    },
                    "mpesa_consumer_key": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "mpesa_shortcode": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "mpesa_shortcode_type": {
                        "type": "string"
                    },
                    "mpesa_environment": {
                        "type": "string"
                    },
                    "mpesa_callback_url": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "is_mpesa_configured": {
                        "type": "boolean"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "branch_id",
                    "is_branch_override",
                    "mpesa_consumer_key",
                    "mpesa_shortcode",
                    "mpesa_shortcode_type",
                    "mpesa_environment",
                    "mpesa_callback_url",
                    "is_active",
                    "is_mpesa_configured",
                    "updated_at"
                ],
                "title": "PaymentConfigurationResource"
            },
            "PaymentStatus": {
                "type": "string",
                "enum": [
                    "pending",
                    "completed",
                    "failed"
                ],
                "title": "PaymentStatus"
            },
            "ProductImportResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "original_filename": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "total_rows": {
                        "type": "integer"
                    },
                    "success_count": {
                        "type": "integer"
                    },
                    "failed_count": {
                        "type": "integer"
                    },
                    "errors": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "is_finished": {
                        "type": "boolean"
                    },
                    "started_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "finished_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "original_filename",
                    "status",
                    "total_rows",
                    "success_count",
                    "failed_count",
                    "errors",
                    "is_finished",
                    "started_at",
                    "finished_at"
                ],
                "title": "ProductImportResource"
            },
            "ProductResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "rating_average": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "rating_count": {
                        "type": "integer"
                    },
                    "unit_of_measure": {
                        "$ref": "#\/components\/schemas\/UnitOfMeasure"
                    },
                    "product_type": {
                        "$ref": "#\/components\/schemas\/ProductType"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/ProductStatus"
                    },
                    "visible_online": {
                        "type": "boolean"
                    },
                    "visible_pos": {
                        "type": "boolean"
                    },
                    "is_serialized": {
                        "type": "boolean"
                    },
                    "is_perishable": {
                        "type": "boolean"
                    },
                    "is_digital": {
                        "type": "boolean"
                    },
                    "category": {
                        "$ref": "#\/components\/schemas\/CategoryResource"
                    },
                    "tax_class": {
                        "$ref": "#\/components\/schemas\/TaxClassResource"
                    },
                    "variants": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/ProductVariantResource"
                        }
                    },
                    "images": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "url": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "media_library_asset_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "is_primary": {
                                    "type": "boolean"
                                },
                                "sort_order": {
                                    "type": "integer"
                                }
                            },
                            "required": [
                                "id",
                                "url",
                                "media_library_asset_id",
                                "is_primary",
                                "sort_order"
                            ]
                        }
                    },
                    "attributes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "attribute": {
                                    "type": "string"
                                },
                                "slug": {
                                    "type": "string"
                                },
                                "value": {
                                    "type": "string"
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "attribute",
                                "slug",
                                "value",
                                "unit"
                            ]
                        }
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "rating_average",
                    "rating_count",
                    "unit_of_measure",
                    "product_type",
                    "status",
                    "visible_online",
                    "visible_pos",
                    "is_serialized",
                    "is_perishable",
                    "is_digital",
                    "created_at"
                ],
                "title": "ProductResource"
            },
            "ProductStatus": {
                "type": "string",
                "enum": [
                    "draft",
                    "active",
                    "archived"
                ],
                "title": "ProductStatus"
            },
            "ProductType": {
                "type": "string",
                "enum": [
                    "simple",
                    "variable",
                    "bundle"
                ],
                "title": "ProductType"
            },
            "ProductVariantResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "sku": {
                        "type": "string"
                    },
                    "barcode": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "options": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "price_online": {
                        "type": "number"
                    },
                    "price_instore": {
                        "type": "number"
                    },
                    "price_instore_override": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "price_instore_with_tax": {
                        "type": "number"
                    },
                    "price_wholesale": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "cost_price": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "available_quantity": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "integer",
                                "enum": [
                                    0
                                ]
                            }
                        ]
                    },
                    "in_stock": {
                        "type": "boolean"
                    },
                    "stock_branch_id": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "sku",
                    "barcode",
                    "options",
                    "price_online",
                    "price_instore",
                    "price_instore_override",
                    "price_instore_with_tax",
                    "price_wholesale",
                    "available_quantity",
                    "in_stock",
                    "stock_branch_id",
                    "is_default",
                    "is_active",
                    "created_at"
                ],
                "title": "ProductVariantResource"
            },
            "PublishBlogPostRequest": {
                "type": "object",
                "properties": {
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "title": "PublishBlogPostRequest"
            },
            "ReceiveStockBatchRequest": {
                "type": "object",
                "properties": {
                    "product_variant_id": {
                        "type": "string"
                    },
                    "branch_id": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "batch_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "manufactured_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "expiry_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    }
                },
                "required": [
                    "product_variant_id",
                    "branch_id",
                    "quantity"
                ],
                "title": "ReceiveStockBatchRequest"
            },
            "RecordInitialStockRequest": {
                "type": "object",
                "properties": {
                    "product_variant_id": {
                        "type": "string"
                    },
                    "branch_id": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    }
                },
                "required": [
                    "product_variant_id",
                    "branch_id",
                    "quantity"
                ],
                "title": "RecordInitialStockRequest"
            },
            "RegisterRequest": {
                "type": "object",
                "properties": {
                    "first_name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "last_name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 30
                    },
                    "password": {
                        "type": "string"
                    },
                    "password_confirmation": {
                        "type": "string"
                    }
                },
                "required": [
                    "first_name",
                    "last_name",
                    "email",
                    "password",
                    "password_confirmation"
                ],
                "title": "RegisterRequest"
            },
            "RejectReviewRequest": {
                "type": "object",
                "properties": {
                    "reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    }
                },
                "title": "RejectReviewRequest"
            },
            "ReorderCategoriesRequest": {
                "type": "object",
                "properties": {
                    "category_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "category_ids"
                ],
                "title": "ReorderCategoriesRequest"
            },
            "ResetPasswordRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "token": {
                        "type": "string"
                    },
                    "password": {
                        "type": "string"
                    },
                    "password_confirmation": {
                        "type": "string"
                    }
                },
                "required": [
                    "email",
                    "token",
                    "password",
                    "password_confirmation"
                ],
                "title": "ResetPasswordRequest"
            },
            "RetailPartnerChannel": {
                "type": "string",
                "enum": [
                    "supermarket",
                    "online",
                    "bar_restaurant"
                ],
                "title": "RetailPartnerChannel"
            },
            "RetailPartnerLocationResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "retail_partner_id": {
                        "type": "integer"
                    },
                    "branch_label": {
                        "type": "string"
                    },
                    "county": {
                        "type": "string"
                    },
                    "town": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "latitude": {
                        "type": "number"
                    },
                    "longitude": {
                        "type": "number"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "partner": {
                        "description": "Present when loaded via admin CRUD (eager-loaded relation).",
                        "$ref": "#\/components\/schemas\/RetailPartnerResource"
                    },
                    "partner_name": {
                        "type": "string",
                        "description": "Present when this came from StoreLocatorService::nearby(),\nwhich selects these as flat aliased columns rather than\neager-loading the relation \u2014 cheaper for a query that may\nreturn thousands of candidate rows before the bounding box\nnarrows them down."
                    },
                    "partner_logo_url": {
                        "type": "string"
                    },
                    "partner_channel": {
                        "type": "string"
                    },
                    "distance_km": {
                        "type": "number"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "retail_partner_id",
                    "branch_label",
                    "county",
                    "town",
                    "latitude",
                    "longitude",
                    "is_active",
                    "created_at"
                ],
                "title": "RetailPartnerLocationResource"
            },
            "RetailPartnerResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "channel": {
                        "type": "string"
                    },
                    "website_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "logo_url": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "locations": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/RetailPartnerLocationResource"
                        }
                    },
                    "locations_count": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "slug",
                    "channel",
                    "website_url",
                    "logo_url",
                    "is_active",
                    "created_at"
                ],
                "title": "RetailPartnerResource"
            },
            "ReviewResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "rating": {
                        "type": "integer"
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_verified_purchase": {
                        "type": "boolean"
                    },
                    "customer_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "rating",
                    "title",
                    "comment",
                    "is_verified_purchase",
                    "created_at"
                ],
                "title": "ReviewResource"
            },
            "ReviewStatus": {
                "type": "string",
                "enum": [
                    "pending",
                    "approved",
                    "rejected"
                ],
                "title": "ReviewStatus"
            },
            "RoleResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "guard_name": {
                        "type": "string"
                    },
                    "permissions": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "guard_name",
                    "permissions",
                    "created_at",
                    "updated_at"
                ],
                "title": "RoleResource"
            },
            "SetReorderPointRequest": {
                "type": "object",
                "properties": {
                    "product_variant_id": {
                        "type": "string"
                    },
                    "branch_id": {
                        "type": "string"
                    },
                    "reorder_point": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    }
                },
                "required": [
                    "product_variant_id",
                    "branch_id",
                    "reorder_point"
                ],
                "title": "SetReorderPointRequest"
            },
            "ShippingAddressResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "recipient_name": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "county": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "town": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address_line": {
                        "type": "string"
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "recipient_name",
                    "phone",
                    "county",
                    "town",
                    "address_line",
                    "is_default",
                    "created_at"
                ],
                "title": "ShippingAddressResource"
            },
            "ShippingRateResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "cost": {
                        "type": "number"
                    },
                    "free_shipping_threshold": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "estimated_days_min": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "estimated_days_max": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "zone": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "cost",
                    "free_shipping_threshold",
                    "estimated_days_min",
                    "estimated_days_max",
                    "is_active"
                ],
                "title": "ShippingRateResource"
            },
            "ShippingZoneResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "counties": {
                        "type": "array",
                        "items": {}
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "rates": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/ShippingRateResource"
                        }
                    }
                },
                "required": [
                    "id",
                    "name",
                    "counties",
                    "is_default",
                    "is_active"
                ],
                "title": "ShippingZoneResource"
            },
            "SmsConfigurationResource": {
                "type": "object",
                "properties": {
                    "username": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sender_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "is_configured": {
                        "type": "boolean"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "username",
                    "sender_id",
                    "is_active",
                    "is_configured",
                    "updated_at"
                ],
                "title": "SmsConfigurationResource"
            },
            "SocialiteRequest": {
                "type": "object",
                "properties": {
                    "provider": {
                        "type": "string",
                        "enum": [
                            "google",
                            "apple"
                        ]
                    },
                    "token": {
                        "type": "string"
                    }
                },
                "required": [
                    "provider",
                    "token"
                ],
                "title": "SocialiteRequest"
            },
            "StockAdjustmentReason": {
                "type": "string",
                "enum": [
                    "damage",
                    "theft",
                    "recount",
                    "expiry",
                    "internal_use",
                    "other"
                ],
                "title": "StockAdjustmentReason"
            },
            "StockBatchResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "batch_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "initial_quantity": {
                        "type": "integer"
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "manufactured_date": {
                        "type": "string"
                    },
                    "expiry_date": {
                        "type": "string"
                    },
                    "is_expired": {
                        "type": "boolean"
                    },
                    "received_at": {
                        "type": "string"
                    },
                    "branch": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "variant": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "sku": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "sku"
                        ]
                    }
                },
                "required": [
                    "id",
                    "batch_number",
                    "initial_quantity",
                    "quantity",
                    "manufactured_date",
                    "expiry_date",
                    "is_expired",
                    "received_at",
                    "branch",
                    "variant"
                ],
                "title": "StockBatchResource"
            },
            "StockMovementResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/StockMovementType"
                    },
                    "quantity_change": {
                        "type": "integer"
                    },
                    "quantity_after": {
                        "type": "integer"
                    },
                    "branch": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "variant": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "sku": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "sku"
                        ]
                    },
                    "reference_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reference_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_by": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "type",
                    "quantity_change",
                    "quantity_after",
                    "branch",
                    "variant",
                    "reference_type",
                    "reference_id",
                    "notes",
                    "created_at"
                ],
                "title": "StockMovementResource"
            },
            "StockMovementType": {
                "type": "string",
                "enum": [
                    "initial",
                    "sale",
                    "restock",
                    "adjustment",
                    "transfer_in",
                    "transfer_out",
                    "damage",
                    "expired",
                    "return"
                ],
                "title": "StockMovementType"
            },
            "StockResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "branch": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "code": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "code"
                        ]
                    },
                    "variant": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "sku": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "sku"
                        ]
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "reserved_quantity": {
                        "type": "integer"
                    },
                    "available_quantity": {
                        "type": "string"
                    },
                    "reorder_point": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "is_low_stock": {
                        "type": "boolean"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "branch",
                    "variant",
                    "quantity",
                    "reserved_quantity",
                    "available_quantity",
                    "reorder_point",
                    "is_low_stock",
                    "updated_at"
                ],
                "title": "StockResource"
            },
            "StockTransferItemResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "variant": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "sku": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "sku"
                        ]
                    },
                    "quantity": {
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "variant",
                    "quantity"
                ],
                "title": "StockTransferItemResource"
            },
            "StockTransferResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "transfer_number": {
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/StockTransferStatus"
                    },
                    "from_branch": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "to_branch": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/StockTransferItemResource"
                        }
                    },
                    "initiated_by": {
                        "type": "string"
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "shipped_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "completed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "cancelled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "transfer_number",
                    "status",
                    "from_branch",
                    "to_branch",
                    "notes",
                    "shipped_at",
                    "completed_at",
                    "cancelled_at",
                    "created_at"
                ],
                "title": "StockTransferResource"
            },
            "StockTransferStatus": {
                "type": "string",
                "enum": [
                    "pending",
                    "in_transit",
                    "completed",
                    "cancelled"
                ],
                "title": "StockTransferStatus"
            },
            "StoreAiKnowledgeRequest": {
                "type": "object",
                "properties": {
                    "type": {
                        "$ref": "#\/components\/schemas\/AiKnowledgeType"
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "content": {
                        "type": "string"
                    }
                },
                "required": [
                    "type",
                    "content"
                ],
                "title": "StoreAiKnowledgeRequest"
            },
            "StoreAiProfileRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "prompt": {
                        "type": "object",
                        "properties": {
                            "identity": {
                                "type": "string"
                            },
                            "rules": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "maxLength": 1000
                                },
                                "minItems": 1
                            },
                            "style": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "maxLength": 500
                                },
                                "minItems": 1
                            }
                        },
                        "required": [
                            "identity",
                            "rules",
                            "style"
                        ]
                    }
                },
                "required": [
                    "name",
                    "prompt"
                ],
                "title": "StoreAiProfileRequest"
            },
            "StoreAttributeRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "data_type": {
                        "type": "string",
                        "enum": [
                            "text",
                            "number",
                            "boolean",
                            "select",
                            "multiselect"
                        ]
                    },
                    "unit": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "options": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 100
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "name",
                    "data_type"
                ],
                "title": "StoreAttributeRequest"
            },
            "StoreBlogCategoryRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 120
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreBlogCategoryRequest"
            },
            "StoreBlogPostRequest": {
                "type": "object",
                "properties": {
                    "blog_category_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "title": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "excerpt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000
                    },
                    "content": {
                        "type": "string"
                    },
                    "seo_title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "seo_description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    },
                    "tag_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "title",
                    "content"
                ],
                "title": "StoreBlogPostRequest"
            },
            "StoreBlogTagRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 80
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreBlogTagRequest"
            },
            "StoreBranchRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "location": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 30
                    },
                    "is_online": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "name",
                    "location"
                ],
                "title": "StoreBranchRequest"
            },
            "StoreCarrierRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreCarrierRequest"
            },
            "StoreCategoryRequest": {
                "type": "object",
                "properties": {
                    "parent_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreCategoryRequest"
            },
            "StoreDiscountCodeRequest": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "maxLength": 50
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/DiscountType"
                    },
                    "value": {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 100
                    },
                    "category_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "min_order_amount": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "max_discount_amount": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "usage_limit": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1
                    },
                    "usage_limit_per_customer": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "starts_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "code",
                    "name",
                    "type",
                    "value"
                ],
                "title": "StoreDiscountCodeRequest"
            },
            "StorePosSaleRequest": {
                "type": "object",
                "properties": {
                    "branch_id": {
                        "type": "string"
                    },
                    "customer_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "customer_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 150
                    },
                    "customer_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20
                    },
                    "payment_method": {
                        "type": "string",
                        "enum": [
                            "cash",
                            "mpesa"
                        ]
                    },
                    "payment_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20
                    },
                    "amount_tendered": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "product_variant_id": {
                                    "type": "string"
                                },
                                "quantity": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 10000
                                }
                            },
                            "required": [
                                "product_variant_id",
                                "quantity"
                            ]
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "branch_id",
                    "payment_method",
                    "items"
                ],
                "title": "StorePosSaleRequest"
            },
            "StoreProductRequest": {
                "type": "object",
                "properties": {
                    "category_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tax_class_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "unit_of_measure": {
                        "$ref": "#\/components\/schemas\/UnitOfMeasure"
                    },
                    "product_type": {
                        "$ref": "#\/components\/schemas\/ProductType"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/ProductStatus"
                    },
                    "visible_online": {
                        "type": "boolean"
                    },
                    "visible_pos": {
                        "type": "boolean"
                    },
                    "is_serialized": {
                        "type": "boolean"
                    },
                    "is_perishable": {
                        "type": "boolean"
                    },
                    "is_digital": {
                        "type": "boolean"
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The product's default variant \u2014 required for every\nproduct, since \"simple\" products never get a separate\nvariant-creation call. For \"variable\" products, this is\njust the first variant; add more via the variants endpoint.",
                        "maxLength": 100
                    },
                    "barcode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "price_online": {
                        "type": "number",
                        "minimum": 0
                    },
                    "price_instore": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "price_wholesale": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "cost_price": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    }
                },
                "required": [
                    "name",
                    "price_online"
                ],
                "title": "StoreProductRequest"
            },
            "StoreProductVariantRequest": {
                "type": "object",
                "properties": {
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "barcode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "options": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "price_online": {
                        "type": "number",
                        "minimum": 0
                    },
                    "price_instore": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "price_wholesale": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "cost_price": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "price_online"
                ],
                "title": "StoreProductVariantRequest"
            },
            "StoreRetailPartnerLocationRequest": {
                "type": "object",
                "properties": {
                    "branch_label": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "county": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "town": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "latitude": {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 90
                    },
                    "longitude": {
                        "type": "number",
                        "minimum": -180,
                        "maximum": 180
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "branch_label",
                    "county",
                    "latitude",
                    "longitude"
                ],
                "title": "StoreRetailPartnerLocationRequest"
            },
            "StoreRetailPartnerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "channel": {
                        "$ref": "#\/components\/schemas\/RetailPartnerChannel"
                    },
                    "website_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "name",
                    "channel"
                ],
                "title": "StoreRetailPartnerRequest"
            },
            "StoreReviewRequest": {
                "type": "object",
                "properties": {
                    "rating": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 5
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 150
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000
                    }
                },
                "required": [
                    "rating"
                ],
                "title": "StoreReviewRequest"
            },
            "StoreRoleRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 100
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreRoleRequest"
            },
            "StoreShippingAddressRequest": {
                "type": "object",
                "properties": {
                    "recipient_name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "phone": {
                        "type": "string",
                        "maxLength": 20
                    },
                    "county": {
                        "$ref": "#\/components\/schemas\/KenyanCounty"
                    },
                    "town": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "address_line": {
                        "type": "string",
                        "maxLength": 500
                    },
                    "is_default": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "recipient_name",
                    "phone",
                    "county",
                    "address_line"
                ],
                "title": "StoreShippingAddressRequest"
            },
            "StoreShippingRateRequest": {
                "type": "object",
                "properties": {
                    "shipping_zone_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "cost": {
                        "type": "number",
                        "minimum": 0
                    },
                    "free_shipping_threshold": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "estimated_days_min": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "estimated_days_max": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "shipping_zone_id",
                    "name",
                    "cost"
                ],
                "title": "StoreShippingRateRequest"
            },
            "StoreShippingZoneRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "counties": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#\/components\/schemas\/KenyanCounty"
                        }
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreShippingZoneRequest"
            },
            "StoreStockTransferRequest": {
                "type": "object",
                "properties": {
                    "from_branch_id": {
                        "type": "string"
                    },
                    "to_branch_id": {
                        "type": "string"
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "product_variant_id": {
                                    "type": "string"
                                },
                                "quantity": {
                                    "type": "integer",
                                    "minimum": 1
                                }
                            },
                            "required": [
                                "product_variant_id",
                                "quantity"
                            ]
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "from_branch_id",
                    "to_branch_id",
                    "items"
                ],
                "title": "StoreStockTransferRequest"
            },
            "StoreTaxClassRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                    },
                    "is_default": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "name",
                    "rate"
                ],
                "title": "StoreTaxClassRequest"
            },
            "SupportChatRequest": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string",
                        "maxLength": 5000
                    },
                    "conversation_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "message"
                ],
                "title": "SupportChatRequest"
            },
            "SyncPermissionsRequest": {
                "type": "object",
                "properties": {
                    "permissions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "minItems": 1
                    }
                },
                "required": [
                    "permissions"
                ],
                "title": "SyncPermissionsRequest"
            },
            "TaxClassResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "rate": {
                        "type": "number"
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "rate",
                    "is_default",
                    "created_at"
                ],
                "title": "TaxClassResource"
            },
            "TaxConfigurationResource": {
                "type": "object",
                "properties": {
                    "tax_name": {
                        "type": "string"
                    },
                    "tax_rate": {
                        "type": "number"
                    },
                    "prices_include_tax": {
                        "type": "boolean"
                    },
                    "tax_registration_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "tax_name",
                    "tax_rate",
                    "prices_include_tax",
                    "tax_registration_number",
                    "is_active",
                    "updated_at"
                ],
                "title": "TaxConfigurationResource"
            },
            "TestEmailConfigurationRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255
                    }
                },
                "required": [
                    "email"
                ],
                "title": "TestEmailConfigurationRequest"
            },
            "TestSmsConfigurationRequest": {
                "type": "object",
                "properties": {
                    "phone": {
                        "type": "string",
                        "minLength": 12,
                        "maxLength": 12
                    }
                },
                "required": [
                    "phone"
                ],
                "title": "TestSmsConfigurationRequest"
            },
            "TwoFactorChallengeRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "minLength": 6,
                        "maxLength": 6
                    },
                    "recovery_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "email"
                ],
                "title": "TwoFactorChallengeRequest"
            },
            "TwoFactorCodeRequest": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "minLength": 6,
                        "maxLength": 6
                    }
                },
                "required": [
                    "code"
                ],
                "title": "TwoFactorCodeRequest"
            },
            "UnitOfMeasure": {
                "type": "string",
                "enum": [
                    "each",
                    "kg",
                    "g",
                    "litre",
                    "ml",
                    "pack"
                ],
                "title": "UnitOfMeasure"
            },
            "UpdateAiKnowledgeRequest": {
                "type": "object",
                "properties": {
                    "type": {
                        "$ref": "#\/components\/schemas\/AiKnowledgeType"
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "content": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateAiKnowledgeRequest"
            },
            "UpdateAiProfileRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "prompt": {
                        "type": "object",
                        "properties": {
                            "identity": {
                                "type": "string"
                            },
                            "rules": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "maxLength": 1000
                                },
                                "minItems": 1
                            },
                            "style": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "maxLength": 500
                                },
                                "minItems": 1
                            }
                        }
                    }
                },
                "title": "UpdateAiProfileRequest"
            },
            "UpdateAppConfigurationRequest": {
                "type": "object",
                "properties": {
                    "brand_name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "brand_tagline": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "logo_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 500
                    },
                    "primary_color": {
                        "type": "string",
                        "maxLength": 20
                    },
                    "support_email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 255
                    },
                    "support_phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 30
                    },
                    "location": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "google_maps_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 500
                    },
                    "latitude": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": -90,
                        "maximum": 90
                    },
                    "longitude": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": -180,
                        "maximum": 180
                    }
                },
                "title": "UpdateAppConfigurationRequest"
            },
            "UpdateAttributeRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "data_type": {
                        "type": "string",
                        "enum": [
                            "text",
                            "number",
                            "boolean",
                            "select",
                            "multiselect"
                        ]
                    },
                    "unit": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "options": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 100
                        },
                        "minItems": 1
                    }
                },
                "title": "UpdateAttributeRequest"
            },
            "UpdateBlogCategoryRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 120
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000
                    }
                },
                "title": "UpdateBlogCategoryRequest"
            },
            "UpdateBlogPostRequest": {
                "type": "object",
                "properties": {
                    "blog_category_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "title": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "excerpt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000
                    },
                    "content": {
                        "type": "string"
                    },
                    "seo_title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "seo_description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    },
                    "tag_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "title": "UpdateBlogPostRequest"
            },
            "UpdateBlogTagRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 80
                    }
                },
                "required": [
                    "name"
                ],
                "title": "UpdateBlogTagRequest"
            },
            "UpdateBranchRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "location": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 30
                    },
                    "is_online": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateBranchRequest"
            },
            "UpdateCarrierRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateCarrierRequest"
            },
            "UpdateCartItemRequest": {
                "type": "object",
                "properties": {
                    "quantity": {
                        "type": "integer",
                        "minimum": 1
                    }
                },
                "required": [
                    "quantity"
                ],
                "title": "UpdateCartItemRequest"
            },
            "UpdateCategoryRequest": {
                "type": "object",
                "properties": {
                    "parent_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateCategoryRequest"
            },
            "UpdateDiscountCodeRequest": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "maxLength": 50
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/DiscountType"
                    },
                    "value": {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 100
                    },
                    "category_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "min_order_amount": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "max_discount_amount": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "usage_limit": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1
                    },
                    "usage_limit_per_customer": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "starts_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateDiscountCodeRequest"
            },
            "UpdateEmailConfigurationRequest": {
                "type": "object",
                "properties": {
                    "host": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "port": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 65535
                    },
                    "username": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "password": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "encryption": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "tls",
                            "ssl",
                            ""
                        ]
                    },
                    "from_address": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 255
                    },
                    "from_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateEmailConfigurationRequest"
            },
            "UpdateMediaConfigurationRequest": {
                "type": "object",
                "properties": {
                    "cloud_name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "api_key": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "api_secret": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateMediaConfigurationRequest"
            },
            "UpdatePaymentConfigurationRequest": {
                "type": "object",
                "properties": {
                    "mpesa_consumer_key": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "mpesa_consumer_secret": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "mpesa_shortcode": {
                        "type": "string",
                        "maxLength": 20
                    },
                    "mpesa_shortcode_type": {
                        "type": "string",
                        "enum": [
                            "paybill",
                            "till"
                        ]
                    },
                    "mpesa_passkey": {
                        "type": "string",
                        "maxLength": 500
                    },
                    "mpesa_environment": {
                        "type": "string",
                        "enum": [
                            "sandbox",
                            "production"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdatePaymentConfigurationRequest"
            },
            "UpdateProductRequest": {
                "type": "object",
                "properties": {
                    "category_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tax_class_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "unit_of_measure": {
                        "$ref": "#\/components\/schemas\/UnitOfMeasure"
                    },
                    "product_type": {
                        "$ref": "#\/components\/schemas\/ProductType"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/ProductStatus"
                    },
                    "visible_online": {
                        "type": "boolean"
                    },
                    "visible_pos": {
                        "type": "boolean"
                    },
                    "is_serialized": {
                        "type": "boolean"
                    },
                    "is_perishable": {
                        "type": "boolean"
                    },
                    "is_digital": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateProductRequest"
            },
            "UpdateProductVariantRequest": {
                "type": "object",
                "properties": {
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "barcode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "options": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "price_online": {
                        "type": "number",
                        "minimum": 0
                    },
                    "price_instore": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "price_wholesale": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "cost_price": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateProductVariantRequest"
            },
            "UpdateRetailPartnerLocationRequest": {
                "type": "object",
                "properties": {
                    "branch_label": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "county": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "town": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "latitude": {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 90
                    },
                    "longitude": {
                        "type": "number",
                        "minimum": -180,
                        "maximum": 180
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateRetailPartnerLocationRequest"
            },
            "UpdateRetailPartnerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "channel": {
                        "$ref": "#\/components\/schemas\/RetailPartnerChannel"
                    },
                    "website_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri"
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateRetailPartnerRequest"
            },
            "UpdateReviewRequest": {
                "type": "object",
                "properties": {
                    "rating": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 5
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 150
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000
                    }
                },
                "title": "UpdateReviewRequest"
            },
            "UpdateShippingAddressRequest": {
                "type": "object",
                "properties": {
                    "recipient_name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "phone": {
                        "type": "string",
                        "maxLength": 20
                    },
                    "county": {
                        "$ref": "#\/components\/schemas\/KenyanCounty"
                    },
                    "town": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "address_line": {
                        "type": "string",
                        "maxLength": 500
                    },
                    "is_default": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateShippingAddressRequest"
            },
            "UpdateShippingRateRequest": {
                "type": "object",
                "properties": {
                    "shipping_zone_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "cost": {
                        "type": "number",
                        "minimum": 0
                    },
                    "free_shipping_threshold": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "estimated_days_min": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "estimated_days_max": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateShippingRateRequest"
            },
            "UpdateShippingZoneRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 150
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "counties": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#\/components\/schemas\/KenyanCounty"
                        }
                    }
                },
                "title": "UpdateShippingZoneRequest"
            },
            "UpdateSmsConfigurationRequest": {
                "type": "object",
                "properties": {
                    "username": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "api_key": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "sender_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateSmsConfigurationRequest"
            },
            "UpdateTaxClassRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                    },
                    "is_default": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateTaxClassRequest"
            },
            "UpdateTaxConfigurationRequest": {
                "type": "object",
                "properties": {
                    "tax_name": {
                        "type": "string",
                        "maxLength": 50
                    },
                    "tax_rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                    },
                    "prices_include_tax": {
                        "type": "boolean"
                    },
                    "tax_registration_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "is_active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateTaxConfigurationRequest"
            },
            "UpdateUserRequest": {
                "type": "object",
                "properties": {
                    "first_name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "last_name": {
                        "type": "string",
                        "maxLength": 100
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 255
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 30
                    }
                },
                "title": "UpdateUserRequest"
            },
            "UploadCategoryImageRequest": {
                "type": "object",
                "properties": {
                    "image": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "maxLength": 2048
                    }
                },
                "required": [
                    "image"
                ],
                "title": "UploadCategoryImageRequest"
            },
            "UploadFeaturedImageRequest": {
                "type": "object",
                "properties": {
                    "image": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "maxLength": 4096
                    }
                },
                "required": [
                    "image"
                ],
                "title": "UploadFeaturedImageRequest"
            },
            "UploadLogoRequest": {
                "type": "object",
                "properties": {
                    "logo": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "maxLength": 2048
                    }
                },
                "required": [
                    "logo"
                ],
                "title": "UploadLogoRequest"
            },
            "UploadMediaLibraryAssetsRequest": {
                "type": "object",
                "properties": {
                    "files": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "binary",
                            "contentMediaType": "application\/octet-stream",
                            "maxLength": 10240
                        },
                        "minItems": 1,
                        "maxItems": 10
                    }
                },
                "required": [
                    "files"
                ],
                "title": "UploadMediaLibraryAssetsRequest"
            },
            "UploadProductImageRequest": {
                "type": "object",
                "properties": {
                    "is_primary": {
                        "type": "boolean"
                    },
                    "images": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "binary",
                            "contentMediaType": "application\/octet-stream",
                            "maxLength": 4096
                        },
                        "minItems": 1,
                        "maxItems": 10
                    }
                },
                "required": [
                    "images"
                ],
                "title": "UploadProductImageRequest"
            },
            "UploadRetailPartnerLogoRequest": {
                "type": "object",
                "properties": {
                    "image": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "maxLength": 4096
                    }
                },
                "required": [
                    "image"
                ],
                "title": "UploadRetailPartnerLogoRequest"
            },
            "UserDeviceResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "user_id": {
                        "type": "string"
                    },
                    "device_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "device_fingerprint": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "ip_address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "user_agent": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "trusted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_seen_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "revoked_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "is_trusted": {
                        "type": "boolean"
                    },
                    "user": {
                        "$ref": "#\/components\/schemas\/UserResource"
                    },
                    "sessions": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/UserSessionResource"
                        }
                    },
                    "sessions_count": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "user_id",
                    "device_name",
                    "device_fingerprint",
                    "ip_address",
                    "user_agent",
                    "trusted_at",
                    "last_seen_at",
                    "revoked_at",
                    "is_active",
                    "is_trusted",
                    "created_at",
                    "updated_at"
                ],
                "title": "UserDeviceResource"
            },
            "UserResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "public_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "avatar_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "account_type": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "roles": {
                        "anyOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "permissions": {
                                            "anyOf": [
                                                {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "name",
                                        "permissions"
                                    ]
                                }
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "email_verified_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "two_factor_enabled": {
                        "type": "boolean"
                    },
                    "must_change_password": {
                        "type": "boolean"
                    },
                    "timezone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "locale": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "devices": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/UserDeviceResource"
                        }
                    },
                    "sessions": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/UserSessionResource"
                        }
                    }
                },
                "required": [
                    "id",
                    "public_id",
                    "name",
                    "first_name",
                    "last_name",
                    "email",
                    "phone",
                    "avatar_url",
                    "account_type",
                    "status",
                    "roles",
                    "email_verified_at",
                    "two_factor_enabled",
                    "must_change_password",
                    "timezone",
                    "locale",
                    "created_at"
                ],
                "title": "UserResource"
            },
            "UserSessionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "user_id": {
                        "type": "string"
                    },
                    "device_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "ip_address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "user_agent": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "location": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_active_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "revoked_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "is_current": {
                        "type": "boolean"
                    },
                    "user": {
                        "$ref": "#\/components\/schemas\/UserResource"
                    },
                    "device": {
                        "$ref": "#\/components\/schemas\/UserDeviceResource"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "user_id",
                    "device_id",
                    "ip_address",
                    "user_agent",
                    "country",
                    "city",
                    "location",
                    "last_active_at",
                    "expires_at",
                    "revoked_at",
                    "is_active",
                    "is_current",
                    "created_at"
                ],
                "title": "UserSessionResource"
            },
            "WriteOffBatchRequest": {
                "type": "object",
                "properties": {
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    }
                },
                "title": "WriteOffBatchRequest"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}