{
    "openapi": "3.1.2",
    "info": {
        "title": "Saleya Integration API",
        "version": "1",
        "description": "Connect an ERP, accounting system, marketplace or your own service to a store. Every request carries an app token, and the token determines the store."
    },
    "servers": [
        {
            "url": "https://api.saleya.app/v1"
        }
    ],
    "security": [
        {
            "apiToken": []
        }
    ],
    "tags": [
        {
            "name": "Me",
            "x-displayName": "App and token",
            "description": "Who the token speaks for: the app, its scopes, locations and rate limits. The first call of an integration: it shows the token works and which scopes it lacks."
        },
        {
            "name": "Store",
            "x-displayName": "Store",
            "description": "What every other response is read with: the currency of money amounts, the time zone of calendar dates and the languages of the content."
        },
        {
            "name": "Locations",
            "x-displayName": "Locations",
            "description": "Locations of the store: shops, warehouses, kitchens and pickup points. Stock, orders and pickup refer to them."
        },
        {
            "name": "Categories",
            "x-displayName": "Categories",
            "description": "Catalog categories as a flat list: the tree is built by parent_id. Created, changed, archived and matched by external ID."
        },
        {
            "name": "Products",
            "x-displayName": "Products",
            "description": "Product cards: names, descriptions, categories, options and photos. Variants have their own endpoints; a product is created and written together with them."
        },
        {
            "name": "Variants",
            "x-displayName": "Variants",
            "description": "What is actually sold and stocked: SKU, barcodes, prices, the unit and how it is sold. Variants change under the version of their product card."
        },
        {
            "name": "ProductMedia",
            "x-displayName": "Product photos",
            "description": "The gallery of a product: add a photo by URL, reorder, choose the main one, remove."
        },
        {
            "name": "MediaImports",
            "x-displayName": "Photo downloads",
            "description": "Photos added by URL are downloaded in the background; a download shows its status and the reason of a failure."
        },
        {
            "name": "ModifierGroups",
            "x-displayName": "Modifier groups",
            "description": "Choices for an item: sauces, extras, portion size. The group sets the selection bounds, options set surcharge and composition."
        },
        {
            "name": "ProductModifierGroups",
            "x-displayName": "Product modifiers",
            "description": "Which modifier groups a product has, in order, with its selection rule and option surcharges by variant."
        },
        {
            "name": "RecommendationRules",
            "x-displayName": "Recommendation rules",
            "description": "What to offer next to the products of a category or collection, by priority: the own list of the product, then rules top to bottom, then automatic picks."
        },
        {
            "name": "TaxClasses",
            "x-displayName": "Tax classes",
            "description": "Tax classes of the store that products refer to by tax_class_id: the kind of tax and its rate, which each sale keeps."
        },
        {
            "name": "PriceLists",
            "x-displayName": "Price lists",
            "description": "Location and wholesale price lists: a percentage over the base price or over cost, with rounding. Fixed prices and surcharges have their own feeds."
        },
        {
            "name": "PriceListItems",
            "x-displayName": "Price list fixed prices",
            "description": "Fixed variant prices in price lists that override the list rule: the price in the price list currency and in store money."
        },
        {
            "name": "PriceListModifierItems",
            "x-displayName": "Price list fixed surcharges",
            "description": "Fixed modifier option surcharges in price lists: for one variant of the item or for all, in the price list currency and in store money."
        },
        {
            "name": "InventoryLevels",
            "x-displayName": "Stock",
            "description": "Stock of a variant at a location: read the levels, set the on-hand quantity after a count, receive or write off goods."
        },
        {
            "name": "StockMovements",
            "x-displayName": "Stock movements",
            "description": "Journal of a location's physical stock: sales, receipts, write-offs, stocktakes, transfers and their reversals. Append-only."
        },
        {
            "name": "Lots",
            "x-displayName": "Lots",
            "description": "Product lots: number from the package, expiry date and availability. Stock movements and document lines point to the lot."
        },
        {
            "name": "LocationTransfers",
            "x-displayName": "Location transfers",
            "description": "Transfers of goods between store locations: a posted document with lines. A mistake is undone by a reverse transfer."
        },
        {
            "name": "Stocktakes",
            "x-displayName": "Stock counts",
            "description": "Stock counts of a location: coverage, blind counting and status from draft to posted. Lines come in a feed of their own."
        },
        {
            "name": "StocktakeLines",
            "x-displayName": "Stock count lines",
            "description": "What a count found: expected and counted quantity per item and lot, the variance, the adjustment applied and the location on-hand after posting."
        },
        {
            "name": "WriteOffReasons",
            "x-displayName": "Write-off reasons",
            "description": "Reasons of the store a write-off names: the reason decides the accounting kind and whether a comment is needed."
        },
        {
            "name": "Orders",
            "x-displayName": "Orders",
            "description": "Orders of every channel: items, totals, status and payment. The feed returns changes in commit order; status changes follow the rules of the store."
        },
        {
            "name": "OrderStatuses",
            "x-displayName": "Order statuses",
            "description": "Status list of the store with its own statuses, the lasting meaning of each and the allowed transitions."
        },
        {
            "name": "DraftOrders",
            "x-displayName": "Draft orders",
            "description": "An order prepared by the app: priced live by the catalog, discounts and delivery, it shows what prevents placing it and becomes an order on completion."
        },
        {
            "name": "Payments",
            "x-displayName": "Payments",
            "description": "Payment attempts of orders and their outcome. Manual payments waiting for money are confirmed here."
        },
        {
            "name": "Refunds",
            "x-displayName": "Refunds",
            "description": "Refunds of orders: calculate first, then refund items and delivery; the money goes back by the payment methods, the goods go back to stock."
        },
        {
            "name": "DeliveryMethods",
            "x-displayName": "Delivery methods",
            "description": "Delivery methods of the store: the list that orders and draft orders refer to by delivery_method_id."
        },
        {
            "name": "ManualPaymentMethods",
            "x-displayName": "Manual payment methods",
            "description": "Manual payment methods of the store, such as a bank transfer, that orders and payments refer to."
        },
        {
            "name": "Customers",
            "x-displayName": "Customers",
            "description": "Customers of the store with their contacts, marketing consent and address book. All of it is personal data under the customers:read scope."
        },
        {
            "name": "CustomerAddresses",
            "x-displayName": "Customer addresses",
            "description": "The address book of a customer: add, change, make the main one, delete."
        },
        {
            "name": "CustomerFiscalProfiles",
            "x-displayName": "Customer tax details",
            "description": "Tax details of a customer: receipts and invoices of new orders of the customer are issued under them."
        },
        {
            "name": "CustomerGroups",
            "x-displayName": "Customer groups",
            "description": "Manual customer groups that discounts and broadcasts target: VIP, wholesale, staff. Membership is the group_ids field of a customer."
        },
        {
            "name": "LegalEntities",
            "x-displayName": "Legal entities",
            "description": "The store legal entities: tax ID and tax status, issuers of fiscal documents. Fiscal documents and tax periods refer to them."
        },
        {
            "name": "FiscalDocuments",
            "x-displayName": "Fiscal documents",
            "description": "Sales invoices, credit and debit notes as the tax authority issued them: number, date, tax, annulment and PDF."
        },
        {
            "name": "TaxPeriods",
            "x-displayName": "Tax periods",
            "description": "Tax accounting months of legal entities: a closed period is filed, and its data no longer changes. Argentine stores only."
        },
        {
            "name": "TaxWithholdings",
            "x-displayName": "Withholdings and perceptions",
            "description": "Tax withheld from the store, which it credits, and tax the store withheld from suppliers, which it remits; the store certificates in PDF."
        },
        {
            "name": "MoneyAccounts",
            "x-displayName": "Money accounts",
            "description": "Accounts where the store money comes in and goes out: cash, bank, acquiring, wallet. The balance is in the account currency."
        },
        {
            "name": "MoneyCategories",
            "x-displayName": "Money categories",
            "description": "Tree of income and expense categories. A system category is identified by system_code, not by its name."
        },
        {
            "name": "MoneyTransactions",
            "x-displayName": "Money transactions",
            "description": "Journal of income and expenses by account: posting amount, posting record and primary document."
        },
        {
            "name": "MoneyTransfers",
            "x-displayName": "Transfers between accounts",
            "description": "Money transfer from one account to another with a fee: create, update and delete. Transfer legs are money transactions with transfer_id."
        },
        {
            "name": "ExchangeRates",
            "x-displayName": "Accounting day rates",
            "description": "Rate of a currency to the store currency on a date, used by the money journal for foreign-currency accounts; for revaluation and reconciliation."
        },
        {
            "name": "PosShifts",
            "x-displayName": "Register shifts",
            "description": "Register shifts with cash drawer reconciliation for each currency: opening float, expected, counted, difference and float left behind."
        },
        {
            "name": "PosCashMovements",
            "x-displayName": "Cash drawer movements",
            "description": "The shift drawer journal: cash sales and refunds, pay-ins, pay-outs, safe drops, change and reversals. Append-only."
        },
        {
            "name": "PosCashReasons",
            "x-displayName": "Pay-in and pay-out reasons",
            "description": "Reasons that name a cash pay-in or pay-out from the drawer, with the category the money journal posts the movement to."
        },
        {
            "name": "GiftCards",
            "x-displayName": "Gift cards",
            "description": "The store gift cards: face value, balance and the store liability for each card. The card code is not stored or returned."
        },
        {
            "name": "GiftCardTransactions",
            "x-displayName": "Gift card activity",
            "description": "Gift card activity entries: issue, redemption, refund to the card, adjustment, void and block. Append-only."
        },
        {
            "name": "CustomerAccounts",
            "x-displayName": "Customer accounts",
            "description": "The store receivables book: each customer balance, credit limit, payment terms and a statement for a period with due dates."
        },
        {
            "name": "CustomerAccountEntries",
            "x-displayName": "Customer account entries",
            "description": "Receivables book entries: sale on account, payment, return, write-off, offset, withholding and reversal. Append-only."
        },
        {
            "name": "Suppliers",
            "x-displayName": "Suppliers",
            "description": "Supplier directory: tax details, purchase currency, payment term and settlement mode, plus balance and statement. Contact person and notes are not exposed."
        },
        {
            "name": "SupplierBills",
            "x-displayName": "Supplier bills",
            "description": "Payables: invoices, debit and credit notes, debts for deliveries without an invoice — with VAT by rate, perceptions and lines."
        },
        {
            "name": "SupplierBillPayments",
            "x-displayName": "Supplier bill payments",
            "description": "What settled a supplier bill and by how much: money, offset, credit note, advance, journal expense or outside the system."
        },
        {
            "name": "SettlementAgreements",
            "x-displayName": "Offset agreements",
            "description": "The basis of an offset: parties, bilateral or three-party offset, contract number and date, term and the schedule of recurring offsets."
        },
        {
            "name": "SettlementOffsets",
            "x-displayName": "Offsets",
            "description": "An offset document: what a customer owes the store against what the store owes a supplier. A voided offset stays with status voided."
        },
        {
            "name": "SettlementOffsetLines",
            "x-displayName": "Offset lines",
            "description": "What exactly was offset: an order or the customer account debt and a supplier bill, with the settlements the offset created."
        },
        {
            "name": "PurchaseOrders",
            "x-displayName": "Purchase orders",
            "description": "What the store ordered from a supplier: lines with ordered, confirmed and received quantities, price and promised delivery date."
        },
        {
            "name": "GoodsReceipts",
            "x-displayName": "Goods receipts",
            "description": "Goods received from a supplier: lines with the delivery note price and cost, before-and-after corrections. A reversal sets voided_at."
        },
        {
            "name": "SupplierReturns",
            "x-displayName": "Supplier returns",
            "description": "Goods shipped back to a supplier: lines and the expected and received compensation — a credit note, replacement goods or money."
        },
        {
            "name": "ConsignmentSettlements",
            "x-displayName": "Consignment settlements",
            "description": "Statements of consignment goods sold over a period, the basis of the supplier invoice: sections, lines and totals."
        },
        {
            "name": "Uploads",
            "x-displayName": "Uploads",
            "description": "A large file sent in chunks: the server counts received bytes, so a broken upload continues from there. The input of a bulk operation."
        },
        {
            "name": "BulkOperations",
            "x-displayName": "Bulk operations",
            "description": "Thousands of records in one request: set stock, write products, export orders. The result is NDJSON, one line per input line, downloaded in ranges."
        },
        {
            "name": "Events",
            "x-displayName": "Events",
            "description": "What changed in the store over the last 30 days, with the record as it is now. The same events go to webhook endpoints."
        },
        {
            "name": "WebhookEndpoints",
            "x-displayName": "Webhook endpoints",
            "description": "Addresses the store sends events to, signed by Standard Webhooks; the signing secret, its rotation and a test event."
        },
        {
            "name": "WebhookDeliveries",
            "x-displayName": "Webhook deliveries",
            "description": "What went out to an endpoint, what waits for a retry and what failed, with the responses of the receiver; a delivery can be retried."
        }
    ],
    "x-tagGroups": [
        {
            "name": "Basics",
            "tags": [
                "Me",
                "Store",
                "Locations"
            ]
        },
        {
            "name": "Catalog",
            "tags": [
                "Categories",
                "Products",
                "Variants",
                "ProductMedia",
                "MediaImports",
                "ModifierGroups",
                "ProductModifierGroups",
                "RecommendationRules",
                "TaxClasses",
                "PriceLists",
                "PriceListItems",
                "PriceListModifierItems"
            ]
        },
        {
            "name": "Inventory",
            "tags": [
                "InventoryLevels",
                "StockMovements",
                "Lots",
                "LocationTransfers",
                "Stocktakes",
                "StocktakeLines",
                "WriteOffReasons"
            ]
        },
        {
            "name": "Orders and payments",
            "tags": [
                "Orders",
                "OrderStatuses",
                "DraftOrders",
                "Payments",
                "Refunds",
                "DeliveryMethods",
                "ManualPaymentMethods"
            ]
        },
        {
            "name": "Customers",
            "tags": [
                "Customers",
                "CustomerAddresses",
                "CustomerFiscalProfiles",
                "CustomerGroups"
            ]
        },
        {
            "name": "Accounting",
            "tags": [
                "LegalEntities",
                "FiscalDocuments",
                "TaxPeriods",
                "TaxWithholdings",
                "MoneyAccounts",
                "MoneyCategories",
                "MoneyTransactions",
                "MoneyTransfers",
                "ExchangeRates",
                "PosShifts",
                "PosCashMovements",
                "PosCashReasons",
                "GiftCards",
                "GiftCardTransactions",
                "CustomerAccounts",
                "CustomerAccountEntries"
            ]
        },
        {
            "name": "Procurement",
            "tags": [
                "Suppliers",
                "SupplierBills",
                "SupplierBillPayments",
                "SettlementAgreements",
                "SettlementOffsets",
                "SettlementOffsetLines",
                "PurchaseOrders",
                "GoodsReceipts",
                "SupplierReturns",
                "ConsignmentSettlements"
            ]
        },
        {
            "name": "Bulk operations",
            "tags": [
                "Uploads",
                "BulkOperations"
            ]
        },
        {
            "name": "Events and webhooks",
            "tags": [
                "Events",
                "WebhookEndpoints",
                "WebhookDeliveries"
            ]
        }
    ],
    "x-problem-types": [
        {
            "type": "api_token_expired",
            "status": 401,
            "title": "API token has expired",
            "description": "The expiry date of the token has passed.",
            "resolution": "Issue a new token in the app settings of the store and replace the old one in your integration."
        },
        {
            "type": "api_token_invalid",
            "status": 401,
            "title": "API token is not valid",
            "description": "The token has a wrong format, its checksum does not match or there is no such token.",
            "resolution": "Check that the whole token was copied. Issue a new token in the app settings of the store if needed."
        },
        {
            "type": "api_token_missing",
            "status": 401,
            "title": "API token required",
            "description": "The request has no Authorization: Bearer header. A token in the query string is not accepted.",
            "resolution": "Send the app token in the Authorization header: Authorization: Bearer <token>."
        },
        {
            "type": "api_token_revoked",
            "status": 401,
            "title": "API token has been revoked",
            "description": "The token was revoked, the app was deleted, its service member was turned off or the store was closed.",
            "resolution": "Ask the store for a new token. If the app was deleted, the store has to create it again."
        },
        {
            "type": "capability_disabled",
            "status": 403,
            "title": "Resource not available to this store",
            "description": "The resource depends on a store capability this store does not have; capability names it. Tax periods, for example, exist only for Argentine stores.",
            "resolution": "Do not request the resource from this store: it has no such data."
        },
        {
            "type": "forbidden",
            "status": 403,
            "title": "Forbidden",
            "description": "An access rule of the store denied the action beyond the scopes, such as a location the app does not work with.",
            "resolution": "Read detail: it names the rule. Ask the store to extend the access of the app if the action is expected."
        },
        {
            "type": "insufficient_scope",
            "status": 403,
            "title": "Scope is missing",
            "description": "The app lacks the scope the endpoint needs; required_scope names it, as does the WWW-Authenticate header. An endpoint that accepts any of several scopes lists them in accepted_scopes — any one is enough.",
            "resolution": "Ask the store to grant the scope to the app. The token stays the same: scopes belong to the app."
        },
        {
            "type": "integration_api_not_in_plan",
            "status": 403,
            "title": "Integration API is not in the plan",
            "description": "The plan of the store does not include the Integration API.",
            "resolution": "The store needs a plan with the Integration API."
        },
        {
            "type": "ip_not_allowed",
            "status": 403,
            "title": "Address is not allowed",
            "description": "The app accepts requests only from listed IP addresses, and this request came from another one.",
            "resolution": "Call from an allowed address or ask the store to add yours to the app settings."
        },
        {
            "type": "not_found",
            "status": 404,
            "title": "Not found",
            "description": "The record does not exist or belongs to another store; an unknown path gets the same response.",
            "resolution": "Check the ID and the path. Records of other stores are never visible, even by an exact ID."
        },
        {
            "type": "method_not_allowed",
            "status": 405,
            "title": "Method not allowed",
            "description": "The path exists but does not accept this HTTP method.",
            "resolution": "Use the method of the operation from the reference."
        },
        {
            "type": "address_book_full",
            "status": 409,
            "title": "The customer's address book is full",
            "description": "The address book of the customer reached the limit of the store; limit is the ceiling.",
            "resolution": "Delete an address that is not needed and add the new one."
        },
        {
            "type": "bulk_operation_finished",
            "status": 409,
            "title": "The operation has already finished",
            "description": "The operation has already finished and cannot be cancelled; operation_status is its status.",
            "resolution": "Read the operation and its result."
        },
        {
            "type": "bulk_operation_queue_full",
            "status": 409,
            "title": "The app operation queue is full",
            "description": "The app already has as many unfinished bulk operations as allowed; limit is the ceiling.",
            "resolution": "Wait until one of them finishes, then create the next."
        },
        {
            "type": "bulk_operation_result_unavailable",
            "status": 409,
            "title": "There is no result file",
            "description": "The result of a file operation appears in full only when it is completed, and this operation is still running, failed or was cancelled; operation_status is its status.",
            "resolution": "Wait for the bulk_operation.finished event or read the operation: for failed, the reason is in error."
        },
        {
            "type": "consent_required",
            "status": 409,
            "title": "Consent to the consequences is required",
            "description": "The write would change other data of the store: consent_kind names the kind of consequence, consequences counts what will change, consent_token is the fingerprint of what was shown.",
            "resolution": "If the consequences are acceptable, repeat the request with consent[<consent_kind>]=<consent_token>, keeping consents already given. If they changed meanwhile, you get a new 409 with a new token. For a variant line inside a product write, give the consent by changing that variant (variant_id)."
        },
        {
            "type": "customer_contact_in_use",
            "status": 409,
            "title": "The contact already belongs to a store customer",
            "description": "The phone or email of a new customer already belongs to a customer of the store; field and existing_customer_id name them.",
            "resolution": "Use the existing customer: read it by existing_customer_id."
        },
        {
            "type": "draft_order_closed",
            "status": 409,
            "title": "The draft order is closed",
            "description": "The draft was placed or cancelled and can no longer be changed or placed; current gives its status and the order.",
            "resolution": "If current.order_id is set, the order is already placed: read it."
        },
        {
            "type": "external_id_archived",
            "status": 409,
            "title": "The record with this external ID is archived",
            "description": "The external ID belongs to an archived record of the store; external_id names it.",
            "resolution": "Ask the store to restore the record, or choose another ID."
        },
        {
            "type": "external_id_in_use",
            "status": 409,
            "title": "The external ID is taken",
            "description": "The external ID is already used by another live record of this app; external_id names it.",
            "resolution": "Read the record by its external ID and update it, or choose another ID."
        },
        {
            "type": "fiscal_document_annul_refused",
            "status": 409,
            "title": "The invoice can't be annulled",
            "description": "The invoice cannot be annulled. code is the reason: not_an_invoice — the document is not an invoice; not_issued — the invoice is not issued: a rejected one is reissued, a pending one is cancelled with the order; provider_disabled — the fiscal module of the store is off; already_voided — the invoice is already annulled or its note waits to be issued; nothing_to_void — the sale was refunded in full and the credit notes cleared the invoice. current.status is the document status, current.annulling_document_id is the current annulling note for already_voided.",
            "resolution": "already_voided — follow the note current.annulling_document_id. A retry does not fix the other reasons."
        },
        {
            "type": "fiscal_document_dismiss_refused",
            "status": 409,
            "title": "The document can't be dismissed",
            "description": "The document cannot be dismissed. code is the reason: not_awaiting_decision — the document does not wait for a human decision: rejected documents and CAEA documents whose reporting ARCA refuses are dismissed; already_resolved — the document is already dismissed. current.status is the document status now.",
            "resolution": "A retry does not fix it: the system completes failed and pending issuing on its own."
        },
        {
            "type": "fiscal_document_pdf_unavailable",
            "status": 409,
            "title": "Document has no file",
            "description": "The document has no file: it is not issued, or the provider kept neither a file nor the data to build one; current.status is the document status.",
            "resolution": "Wait for the fiscal_document.issued event and request the file again; an issued document without a file will not get one."
        },
        {
            "type": "fiscal_document_reissue_refused",
            "status": 409,
            "title": "The document can't be reissued",
            "description": "The document cannot be reissued. code is the reason: not_reissuable — the document has neither failed nor been rejected: it waits to be issued or is issued; advance_applied — a booking advance was applied to the check, and the check invoice already documents it; nothing_to_issue — the order was refunded in full. current.status is the document status now.",
            "resolution": "not_reissuable — wait for the issuing outcome event. A retry does not fix the other reasons: dismiss such a document with POST /v1/fiscal-documents/{document}/dismiss."
        },
        {
            "type": "idempotency_key_in_use",
            "status": 409,
            "title": "A request with this key is in progress",
            "description": "A request with the same Idempotency-Key is still running.",
            "resolution": "Wait for Retry-After seconds and repeat the request with the same key: you will get the saved response."
        },
        {
            "type": "in_use_conflict",
            "status": 409,
            "title": "Record in use",
            "description": "The record cannot be deleted: other data of the store still refers to it.",
            "resolution": "Archive the record instead of deleting it: archiving keeps the data that refers to it."
        },
        {
            "type": "invoice_issue_refused",
            "status": 409,
            "title": "The order invoice can't be issued now",
            "description": "The order invoice cannot be issued now. code is the reason: channel_not_first_party — the sales channel issues the document; entity_exempt — the legal entity of the order issues no documents; issued_externally — an external POS issues the document; provider_disabled — the fiscal module of the store is off; not_covered — the sale is not paid yet; advance_applied — a booking advance was applied to the check, and the check invoice documents it; invoice_exists — the invoice already exists or waits to be issued; invoice_rejected — the tax authority rejected the invoice; nothing_to_issue — the order was refunded in full; bill_required — the table has several bills, a bill invoice is issued by the POS or the dashboard. current.invoice_id is the current invoice of the order for invoice_exists and invoice_rejected.",
            "resolution": "not_covered — wait for the payment; invoice_exists — follow the invoice current.invoice_id; invoice_rejected — fix the data and reissue it with POST /v1/fiscal-documents/{document}/reissue. A retry does not fix the other reasons."
        },
        {
            "type": "money_transaction_locked",
            "status": 409,
            "title": "The transaction cannot be changed by hand",
            "description": "The ledger line cannot be edited or deleted by hand: it has a source document (then only the category, the counterparty and the description change), it is a service line of the ledger (opening balance, exchange difference, reflection of a group store) or it is a transfer leg. detail names the reason, current.origin is the origin of the line, current.transfer_id is the transfer.",
            "resolution": "Change a line with a source through its document and a transfer leg through /v1/money-transfers/{transfer_id}."
        },
        {
            "type": "order_cancel_refused",
            "status": 409,
            "title": "The order cannot be cancelled",
            "description": "The order cannot be cancelled now: its status does not allow it, a credit note cannot be issued, cash is refunded only by a register with an open shift, or a paid subscription is running.",
            "resolution": "Read detail; current shows the status of the order now."
        },
        {
            "type": "order_transition_refused",
            "status": 409,
            "title": "The order cannot move to this status",
            "description": "The store does not allow this status change of the order: the transition rules, pickup without a courier, delivery without a courier or an unpaid balance before completion. detail names the reason, current shows the status now.",
            "resolution": "Check allowed_next of the current status in /v1/order-statuses and the reason in detail."
        },
        {
            "type": "payment_not_confirmable",
            "status": 409,
            "title": "The payment cannot be confirmed",
            "description": "The payment no longer waits for money or is closed by its provider, not by hand; current shows its status.",
            "resolution": "Read the payment: confirmable tells when manual confirmation is possible."
        },
        {
            "type": "plan_limit_reached",
            "status": 409,
            "title": "The plan limit is reached",
            "description": "The plan of the store does not allow more records of this kind; limit is the ceiling.",
            "resolution": "Archive records that are not needed, or the store needs a higher plan."
        },
        {
            "type": "purchase_order_refused",
            "status": 409,
            "title": "The purchase order does not accept this command",
            "description": "The purchase order does not accept the command in its current state: only drafts and placed orders change, only drafts are deleted, placed orders are cancelled, received ones are closed, and an order is placed only with an active supplier and location. detail names the reason, current.status holds the order status now.",
            "resolution": "Read the order again and check its status: delete a draft instead of cancelling it, cancel a placed order instead of deleting it."
        },
        {
            "type": "record_limit_reached",
            "status": 409,
            "title": "The record limit is reached",
            "description": "The store has reached the limit of records of this kind; limit is the ceiling. It does not depend on the plan.",
            "resolution": "Delete records of this kind that are not needed in the store panel: a higher plan does not raise this limit."
        },
        {
            "type": "refund_not_confirmable",
            "status": 409,
            "title": "The refund does not await a payout confirmation",
            "description": "The refund has no manual payout waiting for confirmation: the money was returned by a provider, a register or the balance.",
            "resolution": "Read the refund: confirmable tells when confirmation is needed."
        },
        {
            "type": "refund_refused",
            "status": 409,
            "title": "The order cannot be refunded",
            "description": "The state of the order does not allow the refund: cancelled, no money received, cash already handed over to the register, the card of the sale spent, or a deposit holds a booking. detail names the reason.",
            "resolution": "Calculate the refund again (/v1/orders/{order}/refunds/calculate) and check refundable."
        },
        {
            "type": "shipment_in_progress",
            "status": 409,
            "title": "A shipment issue is already under way",
            "description": "A shipment issue for the order is already queued or running, or the shipment is being cancelled.",
            "resolution": "Wait for the order.updated event: the outcome will be in shipment or shipment_attempt."
        },
        {
            "type": "shipment_label_unavailable",
            "status": 409,
            "title": "No shipping label",
            "description": "The order has no shipment, the carrier has not provided the label yet, or its file is unavailable.",
            "resolution": "Check shipment.label_available on the order: the label exists when it is true."
        },
        {
            "type": "shipment_outcome_unknown",
            "status": 409,
            "title": "The previous issue has an unknown outcome",
            "description": "The connection to the carrier dropped after the previous issue request, and it is unknown whether the shipment was created.",
            "resolution": "The store checks the carrier account and records the outcome in the panel; after that issuing is available again."
        },
        {
            "type": "shipment_refused",
            "status": 409,
            "title": "The shipment cannot be issued now",
            "description": "The shipment cannot be issued now: the order's delivery method has no integrated carrier, the order no longer ships or it awaits payment of its bill. code is the reason (no_carrier, not_shippable, awaits_bill_payment), current is the order status now.",
            "resolution": "Fix the order as detail says — change the delivery method or wait for the bill to be paid — and repeat the request."
        },
        {
            "type": "shipment_tracking_refused",
            "status": 409,
            "title": "The tracking number can't be written manually",
            "description": "The order's tracking number can't be written or removed manually. code is the reason: carrier_integrated — an integrated carrier issues the number, the shipment is issued with POST /v1/orders/{order}/shipment; manual_tracking_unsupported — the order's delivery method doesn't ship with a delivery service; order_closed — the order is cancelled or refunded. current is the order status now.",
            "resolution": "For carrier_integrated, issue the shipment instead of writing a number; retrying won't fix the other reasons: such an order has no tracking number."
        },
        {
            "type": "stock_held_by_write_offs",
            "status": 409,
            "title": "Stock is held by write-offs awaiting approval",
            "description": "Setting the stock lower would take quantity held by write-offs waiting for approval in the store.",
            "resolution": "Wait until the store approves or rejects the write-offs, then set the stock again."
        },
        {
            "type": "stock_on_hand_changed",
            "status": 409,
            "title": "On-hand quantity changed",
            "description": "The on-hand stock differs from expected_on_hand: it changed after you read it. current.on_hand shows the stock now.",
            "resolution": "Recount against current.on_hand and send the request again with the new expected_on_hand."
        },
        {
            "type": "supplier_bill_payment_locked",
            "status": 409,
            "title": "The bill payment cannot be cancelled directly",
            "description": "The supplier bill payment cannot be cancelled directly: an offset, a credit note, a purchase order advance and a ledger expense are removed by their own document, and a withholding made with the payment in a closed tax period keeps the payment too. detail names the reason, current.kind holds the payment kind.",
            "resolution": "Remove an offset, a note, an advance or a ledger expense through its document in the store panel. A withholding of a closed period is corrected with a document of the next period."
        },
        {
            "type": "supplier_bill_refused",
            "status": 409,
            "title": "The supplier bill does not accept this command",
            "description": "The supplier bill does not accept the command in its current state: only a draft can be changed or deleted, a posted bill is not changed, a voided one is not posted, and notes already posted against a draft prevent deleting it. Only a posted bill is approved, approval cannot be revoked after the first payment, and only a posted and approved bill is paid. detail names the reason, current.status holds the bill status now.",
            "resolution": "Read the bill again and check its status: void a posted bill or issue a note against it instead of changing it."
        },
        {
            "type": "tax_withholding_certificate_unavailable",
            "status": 409,
            "title": "Record has no certificate",
            "description": "The store issues a certificate only for tax it withheld itself (direction practiced), from its legal entity: tax withheld from the store is backed by the agent paper. current.direction is the record direction, current.legal_entity_id its legal entity.",
            "resolution": "Ask the agent that withheld the tax for the certificate of tax withheld from the store; a record without a legal entity has no certificate."
        },
        {
            "type": "unique_conflict",
            "status": 409,
            "title": "Duplicate value",
            "description": "A concurrent request took a unique value, such as an address or an SKU, between the check and the write.",
            "resolution": "Read the current data and repeat with another value."
        },
        {
            "type": "upload_offset_mismatch",
            "status": 409,
            "title": "The chunk does not start where expected",
            "description": "The offset of the chunk differs from what the upload has received; received is the right offset.",
            "resolution": "Continue from received: send the chunk that starts at that byte."
        },
        {
            "type": "webhook_endpoint_limit_reached",
            "status": 409,
            "title": "The app has the maximum number of webhook endpoints",
            "description": "The app already has as many webhook endpoints as allowed; limit is the ceiling.",
            "resolution": "Delete an endpoint that is not needed, or subscribe an existing one to more event types."
        },
        {
            "type": "cursor_expired",
            "status": 410,
            "title": "Sync cursor expired",
            "description": "The sync cursor is older than the retention period of deletions or was issued before the database of the store was restored.",
            "resolution": "Sync again from the beginning without a cursor (or with updated_since) and save the new sync cursor."
        },
        {
            "type": "precondition_failed",
            "status": 412,
            "title": "The record has changed",
            "description": "The version in If-Match is not current: the record changed after you read it. For If-None-Match: * — the record already exists.",
            "resolution": "Read the record again, apply your change to the fresh data and send it with the new ETag."
        },
        {
            "type": "range_not_satisfiable",
            "status": 416,
            "title": "The range starts beyond the result",
            "description": "The range starts beyond the written result; Content-Range gives its length.",
            "resolution": "For a running operation, wait for new lines and resume from the downloaded length."
        },
        {
            "type": "idempotency_key_required",
            "status": 422,
            "title": "Idempotency key is required",
            "description": "The method runs only with the Idempotency-Key header: a duplicate with the tax authority cannot be undone.",
            "resolution": "Send a unique key, such as a UUID; retry after a lost response with the same key and body."
        },
        {
            "type": "idempotency_key_reused",
            "status": 422,
            "title": "Idempotency key is already used",
            "description": "The key was already used by another request: a different method, path or body.",
            "resolution": "Use a new key for a new request; repeat with the same key only the same request."
        },
        {
            "type": "invalid_idempotency_key",
            "status": 422,
            "title": "Idempotency key is invalid",
            "description": "The Idempotency-Key header could not be read: a key is 1 to 255 visible ASCII characters, sent as a token or a quoted string.",
            "resolution": "Send a unique key per request, such as a UUID."
        },
        {
            "type": "last_variant_of_product",
            "status": 422,
            "title": "Last variant of the product",
            "description": "A product cannot stay without variants, so its last variant cannot be archived.",
            "resolution": "Archive the product itself (DELETE /v1/products/{product})."
        },
        {
            "type": "money_out_of_range",
            "status": 422,
            "title": "Amount out of range",
            "description": "A price, quantity or unit gives an amount too large to calculate exactly.",
            "resolution": "Check the price, the quantity and the unit of the variant."
        },
        {
            "type": "validation_error",
            "status": 422,
            "title": "Invalid request",
            "description": "A field or parameter is invalid or unknown; errors lists the messages by field.",
            "resolution": "Fix the fields named in errors. Unknown fields are rejected, not ignored."
        },
        {
            "type": "precondition_required",
            "status": 428,
            "title": "If-Match is required",
            "description": "Changing a versioned record needs If-Match with its ETag; * is not a version.",
            "resolution": "Read the record, take its ETag and send it in If-Match."
        },
        {
            "type": "too_many_requests",
            "status": 429,
            "title": "Too many requests",
            "description": "The rate limit is exhausted; policy names the bucket — app, store or rejected — and Retry-After says how long to wait. rejected means too many requests from your address were rejected on entry: a missing, invalid, revoked or expired token, an address that is not allowed, a plan without the API.",
            "resolution": "Wait for Retry-After seconds. Spread requests evenly and use bulk operations for large volumes; the RateLimit header shows what is left. For rejected, fix the cause the earlier 401 or 403 named instead of repeating the request."
        },
        {
            "type": "server_error",
            "status": 500,
            "title": "Server error",
            "description": "An unexpected failure on our side. The request did not complete.",
            "resolution": "Repeat later with the same Idempotency-Key. If it persists, contact support with X-Request-Id."
        },
        {
            "type": "carrier_unavailable",
            "status": 503,
            "title": "Carrier unavailable",
            "description": "The carrier did not respond to a request the store makes to it on your behalf (the shipping label at Mercado Envíos).",
            "resolution": "Retry later, following Retry-After."
        },
        {
            "type": "store_frozen",
            "status": 503,
            "title": "Store frozen",
            "description": "The store is frozen for an unpaid subscription.",
            "resolution": "The store needs to pay its subscription; requests work again right after that."
        },
        {
            "type": "transient_conflict",
            "status": 503,
            "title": "Temporary conflict",
            "description": "A concurrent change rolled the request back as a whole; nothing was written.",
            "resolution": "Repeat after Retry-After seconds."
        },
        {
            "type": "http_error",
            "status": null,
            "title": "HTTP error",
            "description": "An HTTP error without its own type, such as 503 during maintenance.",
            "resolution": "Act by the status: for 503, repeat after Retry-After seconds."
        }
    ],
    "x-scopes": [
        {
            "name": "catalog:read",
            "description": "Read the catalog: categories, products with their variants and photos, recommendation rules, location price lists with fixed prices and surcharges.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "catalog:write",
            "description": "Create, change and archive categories, products, variants, product options and photos, and recommendation rules; set the rule, fixed prices and surcharges of location price lists; follow photo downloads.",
            "includes": [
                "catalog:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "inventory:read",
            "description": "Read stock levels by location, the stock movement ledger, lots, location transfers, stock counts and the write-off reasons of the store.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "inventory:write",
            "description": "Set the on-hand quantity after a count, receive stock and write it off.",
            "includes": [
                "inventory:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "orders:read",
            "description": "Read orders, draft orders, order statuses, delivery methods and manual payment methods. Customer contacts in orders also need customers:read.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "orders:write",
            "description": "Create and place draft orders, move orders between statuses, cancel them and issue their carrier shipments, and write the tracking number of a delivery service without integration. Placing a draft as paid also needs payments:write, cancelling an order with money received — refunds:write.",
            "includes": [
                "orders:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "orders:wholesale",
            "description": "Wholesale terms — the dashboard permission to run wholesale: create, change and delete wholesale price lists, their fixed prices and surcharges, and assign a wholesale price list to a customer (with customers:write). Includes orders:read, catalog:read and costs:read: a wholesale list prices from cost. Wholesale sales are not available through the API.",
            "includes": [
                "orders:read",
                "catalog:read",
                "costs:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "customers:read",
            "description": "Read customers with their address books, tax details and groups, and see the customer contacts, address and comment in orders and the recipient of fiscal documents.",
            "includes": [],
            "adds_fields_to": [
                "orders:read",
                "fiscal:read"
            ]
        },
        {
            "name": "customers:write",
            "description": "Create and change customers, their address books and tax details; manage customer groups and their members.",
            "includes": [
                "customers:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "locations:read",
            "description": "Read the store locations the app has access to.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "payments:read",
            "description": "Read the payments of orders.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "payments:write",
            "description": "Confirm a manual payment as received and place a draft order as paid.",
            "includes": [
                "payments:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "refunds:read",
            "description": "Read the refunds of orders.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "refunds:write",
            "description": "Calculate and create refunds, confirm manual payouts and cancel orders with money received.",
            "includes": [
                "refunds:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "costs:read",
            "description": "Add cost prices to catalog variants and order items and show wholesale price lists, which price from cost. Opens no endpoints of its own and works only together with catalog:read or orders:read.",
            "includes": [],
            "adds_fields_to": [
                "catalog:read",
                "orders:read"
            ]
        },
        {
            "name": "fiscal:read",
            "description": "Read the store legal entities, fiscal documents with their PDFs, tax periods, and withholdings and perceptions with the store certificates. The document recipient also requires customers:read. Together with orders:read it adds the external POS document to orders.",
            "includes": [],
            "adds_fields_to": [
                "orders:read"
            ]
        },
        {
            "name": "fiscal:write",
            "description": "Issue the invoice of a closed sale, reissue a document after a failure or a rejection by the tax authority and dismiss a rejected document. Issuing goes to the tax authority: the idempotency key is required.",
            "includes": [
                "fiscal:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "fiscal:annul",
            "description": "Annul issued invoices with a credit note. Irreversible: the note stays with the tax authority. Grants no writes: issuing documents and annulling them are separate permissions.",
            "includes": [
                "fiscal:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "finance:read",
            "description": "Read money accounts with balances, categories, the money journal with source and primary document, the accounting day rate, register shifts with drawer reconciliation and the cash drawer journal, gift cards with the store liability and their activity, and customer accounts in the receivables book with their entries and statement.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "finance:write",
            "description": "Record manual income and expenses, update and delete them, transfer between accounts, categorize the journal in bulk and record customer debt payments with money already received. Accounts and categories are managed in the store panel.",
            "includes": [
                "finance:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "procurement:read",
            "description": "Read suppliers with tax details and payment terms, supplier bills with tax, lines and amount due, bill payments, supplier balances, statements, offsets, purchase orders, goods receipts, supplier returns and consignment settlements.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "procurement:write",
            "description": "Create and change suppliers: tax details, payment terms and external ID. Purchase orders: draft, change, place, cancel and close. Supplier bills: draft, change, delete the draft, post and void.",
            "includes": [
                "procurement:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "procurement:approve",
            "description": "Approve posted supplier bills for payment and revoke the approval: an unapproved bill cannot be paid. Grants no write access: entering bills and authorising their payment are separate powers.",
            "includes": [
                "procurement:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "procurement:pay",
            "description": "Pay approved supplier bills outside the system — when the money left outside the store's accounts, for example from the ERP's bank — and cancel a payment. Grants neither write access nor approval: entering bills, authorising their payment and paying them are separate powers.",
            "includes": [
                "procurement:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "webhooks:read",
            "description": "Read the event feed, webhook endpoints and their deliveries.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "webhooks:write",
            "description": "Create, change and delete webhook endpoints, get and rotate their secrets, send test events and retry deliveries.",
            "includes": [
                "webhooks:read"
            ],
            "adds_fields_to": []
        },
        {
            "name": "bulk:read",
            "description": "Read bulk operations, download their results and check uploads.",
            "includes": [],
            "adds_fields_to": []
        },
        {
            "name": "bulk:write",
            "description": "Upload files, start and cancel bulk operations. Each operation type also needs the scope of its resource.",
            "includes": [
                "bulk:read"
            ],
            "adds_fields_to": []
        }
    ],
    "x-limits": [
        {
            "name": "page_size",
            "value": 250,
            "unit": "records",
            "description": "Records on a page of a list (limit)."
        },
        {
            "name": "live_tokens_per_app",
            "value": 2,
            "unit": "items",
            "description": "Current tokens of an app: one in use and one being rolled out."
        },
        {
            "name": "idempotency_key",
            "value": 24,
            "unit": "hours",
            "description": "How long the response to a request with an Idempotency-Key is kept."
        },
        {
            "name": "sync_cursor",
            "value": 30,
            "unit": "days",
            "description": "How long a sync cursor stays valid; an older one gets 410 cursor_expired."
        },
        {
            "name": "events",
            "value": 30,
            "unit": "days",
            "description": "How long events are kept in GET /v1/events."
        },
        {
            "name": "request_log",
            "value": 30,
            "unit": "days",
            "description": "How long requests stay in the request log of the app."
        },
        {
            "name": "webhook_endpoints_per_app",
            "value": 10,
            "unit": "items",
            "description": "Webhook endpoints of an app."
        },
        {
            "name": "webhook_timeout",
            "value": 10,
            "unit": "seconds",
            "description": "How long a webhook delivery waits for the response of the endpoint."
        },
        {
            "name": "previous_webhook_secret",
            "value": 24,
            "unit": "hours",
            "description": "How long the previous secret keeps signing after a rotation."
        },
        {
            "name": "webhook_retries",
            "value": 10,
            "unit": "items",
            "description": "Automatic retries of a failed webhook delivery."
        },
        {
            "name": "webhook_retry_window",
            "value": 72,
            "unit": "hours",
            "description": "About how long the automatic retries of a delivery last."
        },
        {
            "name": "webhook_disable_after",
            "value": 72,
            "unit": "hours",
            "description": "How long an endpoint may fail without a single success before it is disabled."
        },
        {
            "name": "bulk_operations_per_app",
            "value": 5,
            "unit": "items",
            "description": "Bulk operations of an app waiting or running at the same time."
        },
        {
            "name": "bulk_input",
            "value": 268435456,
            "unit": "bytes",
            "description": "Size of the input file of a bulk operation."
        },
        {
            "name": "bulk_line",
            "value": 1048576,
            "unit": "bytes",
            "description": "Size of one line of the input."
        },
        {
            "name": "upload_chunk",
            "value": 1048576,
            "unit": "bytes",
            "description": "Size of one chunk of an upload."
        },
        {
            "name": "bulk_retention",
            "value": 7,
            "unit": "days",
            "description": "How long a finished bulk operation and its files are kept."
        },
        {
            "name": "rejected_requests_per_minute",
            "value": 60,
            "unit": "items",
            "description": "Requests a minute from one address that may be rejected on entry (401, 403) before the address gets 429."
        }
    ],
    "x-changelog": [
        {
            "key": "feed-nulled-references",
            "date": "2026-11-20",
            "kind": "fixed",
            "title": "Lists return records whose reference a deletion cleared",
            "description": "When deleting a related record cleared a reference in a list record (a product tax_class_id after its tax class was deleted, a money account location_id after its location was deleted) or erased one of its nested rows (a supplier bill, goods receipt, supplier return or consignment settlement line, a product category), the record did not move in the change feed and did not emit .updated, so the integration copy kept the old value. Such a record now arrives in the next cursor sync and, for resources with a .updated event, as that event too. The feed will not replay changes made before this date: if your copy stores these references or nested rows, read the listed lists again once without a cursor.",
            "operations": [
                "orders.list",
                "payments.list",
                "refunds.list",
                "customers.list",
                "locations.list",
                "categories.list",
                "products.list",
                "variants.list",
                "modifier_groups.list",
                "recommendation_rules.list",
                "media_imports.list",
                "lots.list",
                "location_transfers.list",
                "fiscal_documents.list",
                "money_accounts.list",
                "money_categories.list",
                "pos_cash_movements.list",
                "gift_cards.list",
                "gift_card_transactions.list",
                "supplier_bills.list",
                "goods_receipts.list",
                "supplier_returns.list",
                "consignment_settlements.list"
            ]
        },
        {
            "key": "supplier-payment-withholdings",
            "date": "2026-11-20",
            "kind": "changed",
            "title": "Supplier bill payment withholdings: jurisdiction and currency",
            "description": "In POST /v1/supplier-bills/{supplier_bill}/payments/out-of-band, a turnover or municipal withholding without jurisdiction is now rejected with 422: such a withholding did not reach any province return. The withholding amount is still in the bill currency and is deducted from the payment to the supplier. For a bill in another currency, tax-withholdings receives the amount and base converted to the store currency at the payment day rate; before, it received the bill currency number as is. Without a rate for that day, a payment with withholdings is rejected with 422.",
            "operations": [
                "supplier_bills.record_out_of_band_payment"
            ]
        },
        {
            "key": "group-transfer-movements",
            "date": "2026-11-20",
            "kind": "added",
            "title": "Group store transfers in the stock journal",
            "description": "The stock movement journal gained the reasons group_transfer_out (shipped to another store of the group), group_transfer_in (received from it) and group_transfer_return (a transfer shortage went back to the sender's stock), and the document type group_transfer — this store's copy of the transfer. Filtering by document_type=group_transfer returns the movements of one transfer. /v1 has no separate transfer resource.",
            "operations": [
                "stock_movements.list",
                "stock_movements.get"
            ]
        },
        {
            "key": "external-fiscal-document",
            "date": "2026-11-20",
            "kind": "added",
            "title": "External POS document in orders",
            "description": "Orders got the external_fiscal_document field: the sale document in an external POS (FuDo, Poster) that issues it instead of us — the POS (issuer), the status pending or issued, and the number. The field comes with the fiscal:read scope; such orders have no fiscal documents. When the document appears or gets issued, the order moves in the feed and an order.updated event comes; historical orders get the field in a single backfill and pass through the feed again too. The orders.export bulk operation includes the field if the operation was created with the fiscal:read scope.",
            "operations": [
                "orders.list",
                "orders.get"
            ]
        },
        {
            "key": "fiscal-writes",
            "date": "2026-11-20",
            "kind": "added",
            "title": "Fiscal document writes",
            "description": "New scopes fiscal:write and fiscal:annul. With fiscal:write, POST /v1/orders/{order}/invoice issues the invoice of a closed sale, POST /v1/fiscal-documents/{document}/reissue reissues a document after a failure or a rejection by the tax authority (a rejected invoice with a corrected receptor or refresh_receptor), POST /v1/fiscal-documents/{document}/dismiss dismisses a rejected document. With fiscal:annul, POST /v1/fiscal-documents/{document}/annul annuls an issued invoice with a credit note and a reason. Issuing goes to the tax authority in the background: the response is 202 with the document, the outcome comes as fiscal_document.issued and fiscal_document.failed events. Commands that go to the tax authority require the Idempotency-Key header — without it, 422 idempotency_key_required. New refusals invoice_issue_refused, fiscal_document_reissue_refused, fiscal_document_dismiss_refused and fiscal_document_annul_refused. The fiscal document got the dismissal object, annulment got comment; annulment.reason is now order_cancelled, advance_applied or manual: the previous list described other reasons.",
            "operations": [
                "fiscal_documents.issue_invoice",
                "fiscal_documents.reissue",
                "fiscal_documents.dismiss",
                "fiscal_documents.annul"
            ]
        },
        {
            "key": "wholesale-price-lists",
            "date": "2026-11-20",
            "kind": "added",
            "title": "Wholesale price lists",
            "description": "New scope orders:wholesale — wholesale terms, the dashboard permission to run wholesale; it includes orders:read, catalog:read and costs:read. Under it POST /v1/price-lists creates a wholesale list, DELETE /v1/price-lists/{price_list} deletes it under If-Match (a list assigned to customers — with the wholesale_price_list_buyers consent), and PATCH and the row commands write a wholesale list; for a wholesale list PATCH also changes name. POST /v1/customers/{customer}/wholesale-price-list assigns a wholesale list to a customer under its If-Match — it also needs customers:write. The list write commands accept either catalog:write or orders:wholesale, and the scope of the list kind is required — the insufficient_scope refusal names it; for an endpoint with several scopes the refusal lists them in accepted_scopes.",
            "operations": [
                "price_lists.create",
                "price_lists.delete",
                "customers.set_wholesale_price_list"
            ]
        },
        {
            "key": "price-list-writes",
            "date": "2026-11-20",
            "kind": "added",
            "title": "Writing price lists",
            "description": "Under catalog:write a price list is written under If-Match of its version: PATCH /v1/price-lists/{price_list} changes its rule — adjustment_bp and rounding; the commands POST /v1/price-lists/{price_list}/items and …/items/remove set and remove fixed variant prices, …/modifier-items and …/modifier-items/remove — fixed modifier option surcharges, up to 1000 rows per request as one operation. The response is the list with its new version, and a batch sends a single price_list.updated event. A row in store money is written with price and compare_at_price, a row in the price list currency — with list_price and list_compare_at_price. An app manages a location list when all of its locations are accessible to it; wholesale lists are not written by these commands.",
            "operations": [
                "price_lists.update",
                "price_lists.set_items",
                "price_lists.remove_items",
                "price_lists.set_modifier_items",
                "price_lists.remove_modifier_items"
            ]
        },
        {
            "key": "price-lists",
            "date": "2026-11-20",
            "kind": "added",
            "title": "Price lists",
            "description": "Under catalog:read there are now price lists (GET /v1/price-lists) — location and wholesale lists with their adjustment_bp rule and rounding — their fixed variant prices (GET /v1/price-list-items) and fixed modifier option surcharges (GET /v1/price-list-modifier-items). A wholesale list prices from cost and is visible only with costs:read; a location list is visible to an app that can access at least one of its locations. Locations have a new price_list_id field; customers have wholesale_price_list_id and a customer feed filter by it. Changing a fixed price or surcharge bumps the list version. Events price_list.created, price_list.updated, price_list.deleted.",
            "operations": [
                "price_lists.list",
                "price_lists.get",
                "price_list_items.list",
                "price_list_items.get",
                "price_list_modifier_items.list",
                "price_list_modifier_items.get",
                "locations.list",
                "customers.list",
                "customers.get"
            ]
        },
        {
            "key": "customer-groups",
            "date": "2026-11-20",
            "kind": "added",
            "title": "Customer groups",
            "description": "Under customers:read there are now customer groups (GET /v1/customer-groups) with name, description and activity, and the customer has a group_ids field and the customer feed a group_id filter. Under customers:write groups are created, changed under If-Match and deleted; deleting a group detaches it from discount rules and broadcasts, and a rule left without an audience is switched off. Customers are added to a group and removed from it with POST /v1/customer-groups/{customer_group}/members and …/members/remove. Membership does not move the customer version: a change moves the customer in the feed and sends customer.updated. Events customer_group.created, customer_group.updated, customer_group.deleted.",
            "operations": [
                "customer_groups.list",
                "customer_groups.get",
                "customer_groups.create",
                "customer_groups.update",
                "customer_groups.delete",
                "customer_groups.add_members",
                "customer_groups.remove_members",
                "customers.list",
                "customers.get"
            ]
        },
        {
            "key": "order-shipment-tracking",
            "date": "2026-11-20",
            "kind": "added",
            "title": "Tracking number of a delivery service without integration",
            "description": "POST /v1/orders/{order}/shipment/tracking under orders:write writes the tracking number, link and service name of an order shipped by a delivery service without integration; POST …/shipment/tracking/clear removes it. The number is in the order's shipment: carrier got the value courier_service, and shipment and previous_shipments got carrier_name — the service as the store named it. The customer sees the number on the order page and gets it in a message if the order is already with the service. New refusal shipment_tracking_refused.",
            "operations": [
                "orders.set_shipment_tracking",
                "orders.clear_shipment_tracking",
                "orders.list",
                "orders.get"
            ]
        },
        {
            "key": "order-shipment-create",
            "date": "2026-11-20",
            "kind": "added",
            "title": "Issuing a shipment through the API",
            "description": "POST /v1/orders/{order}/shipment issues the shipment with the order's carrier under orders:write: the response is 202 with the order, the issue runs in the background and its outcome arrives with order.updated; when the shipment already exists the response is 200. shipment_attempt gained the queued and failed states and an error field with the reason code and text. New problems shipment_refused, shipment_in_progress and shipment_outcome_unknown.",
            "operations": [
                "orders.create_shipment",
                "orders.list",
                "orders.get"
            ]
        },
        {
            "key": "variants-list-price",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Variant price in the price list currency",
            "description": "Variants have list_price and list_price_currency: the price as the owner set it and its currency, when the store keeps its price list in a foreign currency. For such a variant price in store money is derived from the price list rate and is not accepted as input: set the price with list_price (the store price list currency or currency). null in list_price_currency means the price is set in store money, as before.",
            "operations": [
                "variants.list",
                "variants.get",
                "variants.get_by_external_id",
                "variants.create",
                "variants.update",
                "variants.upsert",
                "products.list",
                "products.get",
                "products.get_by_external_id",
                "products.create",
                "products.update",
                "products.upsert"
            ]
        },
        {
            "key": "products-sale-schedule",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Product ordering hours",
            "description": "Products have a new field sale_schedule — the week windows, in the store time zone, when the item can be ordered: a list of {days, from, to}, where days are ISO weekdays (1 is Monday) and from and to are “HH:MM”, with “24:00” only as an end; a window that ends before it starts runs past midnight and belongs to its start day. null means the item can always be ordered. It is not publication: outside the window the product stays visible and can go to the cart, and checkout checks the schedule against the order fulfilment time. The field can be written when creating, updating and upserting a product; null clears the schedule.",
            "operations": [
                "products.list",
                "products.get",
                "products.get_by_external_id",
                "products.create",
                "products.update",
                "products.upsert"
            ]
        },
        {
            "key": "order-shipment",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Order carrier shipment",
            "description": "Orders now carry their carrier shipment: shipment — the carrier, the tracking number and page, the latest status from a closed set and the status history with the carrier's text; previous_shipments — shipments replaced by a re-issue; shipment_attempt — an issue in progress or with an unknown outcome. The shipping label is at GET /v1/orders/{order}/shipment/label, a PDF under orders:read and customers:read since it carries the recipient's details. New problems shipment_label_unavailable and carrier_unavailable. Polling the carrier without a new status no longer moves the order in the feed or sends order.updated.",
            "operations": [
                "orders.list",
                "orders.get",
                "orders.get_shipment_label"
            ]
        },
        {
            "key": "order-discount-composition",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Order discount breakdown",
            "description": "Orders now show what their discounts are made of: applied_discounts — the log of discounts on goods (where the discount came from, what it is for, rule name, promo code, the cashier's reason for a manual discount, the item for a single-item markdown, amount), delivery_discounts — delivery discounts, items[].discount_allocations — which log rows make up an item's discount. The sums match: Σ applied_discounts = discount, Σ delivery_discounts = delivery_discount, Σ of an item's allocations = its discount. A discount of the external POS comes as a row with source = external_pos. An order moves in the feed and sends order.updated also when its contents change without the order itself being written: the discount log or item costs.",
            "operations": [
                "orders.list",
                "orders.get"
            ]
        },
        {
            "key": "inventory-stock-documents",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Location transfers and stock counts",
            "description": "Under inventory:read: location transfers (GET /v1/location-transfers) with their lines — variant, lot, quantity — and stock counts (GET /v1/stocktakes) with status, coverage and the blind-count flag. Stock count lines come in a feed of their own, GET /v1/stocktake-lines: expected, counted, variance, the adjustment applied and the location on-hand after posting; while a blind count is a draft, expected and variance are null. Stock movement documents of type location_transfer and stocktake are now readable through these resources. Events location_transfer.created, location_transfer.updated, stocktake.created, stocktake.status_changed, stocktake.updated.",
            "operations": [
                "location_transfers.list",
                "location_transfers.get",
                "stocktakes.list",
                "stocktakes.get",
                "stocktake_lines.list",
                "stocktake_lines.get"
            ]
        },
        {
            "key": "payment-rate-peg",
            "date": "2026-11-19",
            "kind": "changed",
            "title": "Rate peg in the payment invoice",
            "description": "The rate mode tender.exchange_rate.mode got the value pegged: the store pegged the method currency to another currency (for example, 1 USDT = 1 USD), and the rate is that currency rate times the ratio. The new field tender.exchange_rate.peg {currency, rate} names the peg; null when the rate is not pegged. Prices set in the peg currency go into the invoice as they are.",
            "operations": [
                "payments.list",
                "payments.get"
            ]
        },
        {
            "key": "inventory-stock-ledger",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Stock movement journal and lots",
            "description": "Under inventory:read, the stock movement journal is now available (GET /v1/stock-movements) — the signed change to a location's physical stock, the stock after it, the reason, the stock ledger column and the primary document — along with lots (GET /v1/lots) with number, expiry date and status. Lines of goods receipts, supplier returns and consignment settlements now carry lot_id. Events stock_movement.created, stock_movement.updated, lot.created, lot.updated, lot.deleted.",
            "operations": [
                "stock_movements.list",
                "stock_movements.get",
                "lots.list",
                "lots.get",
                "goods_receipts.list",
                "goods_receipts.get",
                "supplier_returns.list",
                "supplier_returns.get",
                "consignment_settlements.list",
                "consignment_settlements.get"
            ]
        },
        {
            "key": "fiscal-libro-iva-files",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Libro IVA books and the accountant package as files",
            "description": "Bulk operations got a third kind — a file. The libro_iva.export type builds the Libro IVA Digital books of a legal entity for a month: params are legal_entity_id, period as YYYY-MM and books (ventas, compras or both; purchases come with the import files). The accountant_package.export type builds the accountant package. It needs bulk:write and fiscal:read, Argentine tax ledger in the store and app access to all locations. The result is a ZIP with the same files as in the dashboard; it appears in full when completed, and until then GET …/result answers with the new 409 bulk_operation_result_unavailable. A refused build is failed with the code libro_iva_not_applicable or libro_iva_incomplete; for the latter, error.documents lists the documents and the reasons.",
            "operations": [
                "bulk_operations.create",
                "bulk_operations.get_result"
            ]
        },
        {
            "key": "procurement-supplier-bills-out-of-band-payments",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Supplier bill payments outside the system",
            "description": "New scope procurement:pay — not granted by default; it includes procurement:read but neither write nor approval. POST /v1/supplier-bills/{supplier_bill}/payments/out-of-band under If-Match marks an approved bill as paid outside the system: the debt is settled without a store money account, and for a withholding-agent legal entity the withholdings list is required. The response is the created payment, 201 with Location. DELETE /{supplier_bill}/payments/{supplier_bill_payment} under If-Match cancels a money or out-of-band payment together with its withholdings; other kinds are removed by their own document — new refusal supplier_bill_payment_locked. Payments and cancellations arrive as the supplier_bill_payment.created and .deleted events, the amount due of the bill as supplier_bill.updated.",
            "operations": [
                "supplier_bills.record_out_of_band_payment",
                "supplier_bills.delete_payment"
            ]
        },
        {
            "key": "procurement-supplier-bills-approval",
            "date": "2026-11-19",
            "kind": "added",
            "title": "Approving supplier bills for payment",
            "description": "New scope procurementSaleyarove — not granted by default; it includes procurement:read but not write. POST /v1/supplier-bills/{supplier_bill}/approve approves a posted bill for payment under If-Match: an unapproved bill cannot be paid, and an advance recorded on the bill's purchase order settles it right away. POST /{supplier_bill}/revoke-approval revokes the approval while the bill has no payments. A refusal due to the bill's state is supplier_bill_refused. Approval and its revocation arrive as the supplier_bill.updated event with the approved_at field.",
            "operations": [
                "supplier_bills.approve",
                "supplier_bills.revoke_approval"
            ]
        },
        {
            "key": "variants-net-content",
            "date": "2026-11-17",
            "kind": "added",
            "title": "Variant piece net content",
            "description": "Variants got the net_content field — the net content of one piece {quantity, unit}: a 500 g pack, a 1000 ml bottle. Responses carry the effective measure: a pack of several units of another variant takes it from that variant, a prepacked piece from its own measure. It can be written when creating or updating a variant and a product with variants — only for a plain variant sold by piece; null clears it. Combo deals count packs into a «from 1 kg» slot by it, and storefront feeds show the price per kilogram.",
            "operations": [
                "variants.list",
                "variants.get",
                "variants.get_by_external_id",
                "variants.create",
                "variants.update",
                "variants.upsert",
                "products.list",
                "products.get",
                "products.get_by_external_id",
                "products.create",
                "products.update",
                "products.upsert"
            ]
        },
        {
            "key": "procurement-supplier-bills-write",
            "date": "2026-11-16",
            "kind": "added",
            "title": "Writing supplier bills",
            "description": "Under procurement:write: a draft supplier bill (POST /v1/supplier-bills), changes to the draft under If-Match (PATCH /v1/supplier-bills/{supplier_bill}), deleting the draft (DELETE), posting with POST /{supplier_bill}/post and voiding with POST /{supplier_bill}/void. Fields match the response: the tax period as YYYY-MM, the rate as a string, taxes beyond VAT as additional_taxes, ARCA details in ar. The response and the input gain ar.import, the details of an import of goods or services. Posting may ask for the vendor_tax_id or close_returns consent. New refusal supplier_bill_refused: the command does not fit the state of the bill.",
            "operations": [
                "supplier_bills.create",
                "supplier_bills.update",
                "supplier_bills.delete",
                "supplier_bills.post",
                "supplier_bills.void"
            ]
        },
        {
            "key": "procurement-purchase-orders-write",
            "date": "2026-11-16",
            "kind": "added",
            "title": "Writing purchase orders",
            "description": "Under procurement:write: a draft purchase order (POST /v1/purchase-orders), changes under If-Match (PATCH /v1/purchase-orders/{purchase_order}) — a draft in full, a placed order’s lines, date and note with a revision and a message to the supplier — draft deletion (DELETE) and the transitions POST /{purchase_order}/place, /cancel and /close. Line quantity and price unit are strings in the variant’s base unit, as in the response. Available to stores with procurement turned on, otherwise 403 capability_disabled. New problem purchase_order_refused: the command does not fit the order’s state.",
            "operations": [
                "purchase_orders.create",
                "purchase_orders.update",
                "purchase_orders.delete",
                "purchase_orders.place",
                "purchase_orders.cancel",
                "purchase_orders.close"
            ]
        },
        {
            "key": "kitchen-modifiers",
            "date": "2026-11-16",
            "kind": "added",
            "title": "Modifiers",
            "description": "Modifier groups with options under catalog:read and catalog:write: the GET /v1/modifier-groups feed, a group by ID and by your system ID, create, update under If-Match, the upsert PATCH /v1/modifier-groups/by-external-id/{external_id} and archiving with the modifier_group_archive consent. Options are the group set: a row finds its option by id or external_id, an option missing from the set is archived. An update that lowers the selection minimum of products asks for the modifier_product_minimum consent. GET and PUT /v1/products/{product}/modifier-groups read and replace the product groups with the selection rule and option surcharges by variant; the product card has a new modifier_groups field. The variant recipe has a new option_recipes field — amounts of per-dish options. The store limit of groups is record_limit_reached.",
            "operations": [
                "modifier_groups.list",
                "modifier_groups.get",
                "modifier_groups.get_by_external_id",
                "modifier_groups.create",
                "modifier_groups.update",
                "modifier_groups.upsert",
                "modifier_groups.delete",
                "products.list",
                "products.get",
                "products.get_by_external_id",
                "products.create",
                "products.update",
                "products.upsert",
                "products.replace_options",
                "products.get_modifier_groups",
                "products.replace_modifier_groups",
                "variants.get_recipe",
                "variants.replace_recipe"
            ]
        },
        {
            "key": "procurement-suppliers-write",
            "date": "2026-11-16",
            "kind": "added",
            "title": "Writing suppliers",
            "description": "New scope procurement:write. Create a supplier (POST /v1/suppliers), update it under If-Match (PATCH /v1/suppliers/{supplier}) and create or update it by its ID in your system (PATCH /v1/suppliers/by-external-id/{external_id}); find a supplier by that ID with GET /v1/suppliers/by-external-id/{external_id} under procurement:read. The writable fields are the fields of the response, except customer_id. Suppliers got the external_id field. New problem record_limit_reached: the store has reached the limit of records of this kind, which does not depend on the plan; POST /v1/suppliers and POST /v1/recommendation-rules return it.",
            "operations": [
                "suppliers.list",
                "suppliers.get",
                "suppliers.get_by_external_id",
                "suppliers.create",
                "suppliers.update",
                "suppliers.upsert",
                "recommendation_rules.create",
                "events.list"
            ]
        },
        {
            "key": "kitchen-catalog",
            "date": "2026-11-16",
            "kind": "added",
            "title": "Ingredients, preps and recipes",
            "description": "POST /v1/products and the upsert create ingredients and preps (type ingredient, prep) with stock_unit — the base unit of stock and recipes and the purchase package; every product response carries stock_unit. GET and PUT /v1/variants/{variant}/recipe read and replace the recipe of a variant: components with amounts in the unit of each component and the yield of a prep, under the product version. Labor norms, production steps, the consumption method and by-products stay in the store panel: the API does not touch them.",
            "operations": [
                "products.list",
                "products.get",
                "products.get_by_external_id",
                "products.create",
                "products.update",
                "products.upsert",
                "products.replace_options",
                "variants.get_recipe",
                "variants.replace_recipe"
            ]
        },
        {
            "key": "tax-withholdings",
            "date": "2026-11-16",
            "kind": "added",
            "title": "Withholdings and perceptions",
            "description": "Under fiscal:read: the register of withholdings and perceptions (GET /v1/tax-withholdings, filter direction) — tax withheld from the store (suffered: settlement provider, bank, customer acting as an agent) and tax the store withheld when paying a supplier (practiced): kind, tax and jurisdiction, amount, base and rate, counterparty, credit tax and month, certificate number, source and annulment. The certificate the store issues to the counterparty is GET /v1/tax-withholdings/{tax_withholding}/certificate (PDF). Customer account entries of kind withholding got tax_withholding_id — the certificate in the register. New events: tax_withholding.created, tax_withholding.updated, tax_withholding.annulled and tax_withholding.deleted.",
            "operations": [
                "tax_withholdings.list",
                "tax_withholdings.get",
                "tax_withholdings.get_certificate",
                "customer_account_entries.list",
                "customer_account_entries.get",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "consignment-settlements",
            "date": "2026-11-15",
            "kind": "added",
            "title": "Consignment settlements",
            "description": "Under procurement:read: consignment settlements (GET /v1/consignment-settlements, filter supplier_id) — what was sold from consignment goods over a period, written off at the store's cost and charged extra for a price fixed by a goods receipt correction: section subtotals and lines with the variant, the goods receipt, the quantity in the variant base unit and the supply price, in the settlement currency and in store currency. Supplier bills already point to the settlement with consignment_settlement_id. New events: consignment_settlement.created, consignment_settlement.updated, consignment_settlement.posted and consignment_settlement.voided.",
            "operations": [
                "consignment_settlements.list",
                "consignment_settlements.get",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "procurement-documents",
            "date": "2026-11-15",
            "kind": "added",
            "title": "Purchase orders, goods receipts and supplier returns",
            "description": "Under procurement:read: purchase orders (GET /v1/purchase-orders, filter supplier_id) with lines of ordered, supplier-confirmed and received quantities; goods receipts (GET /v1/goods-receipts, filters supplier_id and purchase_order_id) with lines carrying the delivery note price, the price in store currency and the cost after tax, and before-and-after corrections; supplier returns (GET /v1/supplier-returns, filters supplier_id and goods_receipt_id) with lines, expected and received compensation and corrections. Quantities are strings in the variant base unit. Supplier bills gained goods_receipt_ids, purchase_order_ids and supplier_return_ids. New events: purchase_order.created, purchase_order.updated, purchase_order.status_changed, purchase_order.deleted, goods_receipt.created, goods_receipt.updated, goods_receipt.voided, supplier_return.created, supplier_return.updated, supplier_return.status_changed and supplier_return.deleted.",
            "operations": [
                "purchase_orders.list",
                "purchase_orders.get",
                "goods_receipts.list",
                "goods_receipts.get",
                "supplier_returns.list",
                "supplier_returns.get",
                "supplier_bills.list",
                "supplier_bills.get",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "procurement-settlements",
            "date": "2026-11-15",
            "kind": "added",
            "title": "Supplier balances, statements and offsets",
            "description": "Under procurement:read: supplier balance (GET /v1/suppliers/{id}/balance) — seven debt components, overdue aging and the total; supplier statement (GET /v1/suppliers/{id}/statement) — opening and closing balance for the period and lines with a running balance; both accept legal_entity_id. Offsets (GET /v1/settlement-offsets), their lines as a separate feed (GET /v1/settlement-offset-lines) and offset agreements (GET /v1/settlement-agreements). Supplier bills gain paid_total and outstanding in the document currency. Customer account entries gain settlement_offset_id. A supplier's customer_id now requires customers:read. New events: settlement_agreement.created, settlement_agreement.updated, settlement_agreement.deleted, settlement_offset.created, settlement_offset.updated and settlement_offset.voided.",
            "operations": [
                "suppliers.get_balance",
                "suppliers.get_statement",
                "suppliers.list",
                "suppliers.get",
                "settlement_agreements.list",
                "settlement_agreements.get",
                "settlement_offsets.list",
                "settlement_offsets.get",
                "settlement_offset_lines.list",
                "settlement_offset_lines.get",
                "supplier_bills.list",
                "supplier_bills.get",
                "customer_account_entries.list",
                "customer_account_entries.get",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "procurement-payables",
            "date": "2026-11-15",
            "kind": "added",
            "title": "Suppliers and supplier bills",
            "description": "New scope procurement:read. Suppliers (GET /v1/suppliers) — tax details and payment terms, without the contact person or notes. Supplier bills (GET /v1/supplier-bills, supplier_id filter) — invoices, notes and debts for deliveries without an invoice (fiscal: false), with VAT as the shared tax line, perceptions and withholdings in the additional_taxes list, lines and ARCA details in ar. Bill payments (GET /v1/supplier-bill-payments, supplier_bill_id filter) — by money, offset, credit note, purchase order advance, journal expense or outside the system. New events: supplier.created, supplier.updated, supplier.deleted, supplier_bill.created, supplier_bill.updated, supplier_bill.posted, supplier_bill.voided, supplier_bill.deleted, supplier_bill_payment.created, supplier_bill_payment.updated and supplier_bill_payment.deleted.",
            "operations": [
                "suppliers.list",
                "suppliers.get",
                "supplier_bills.list",
                "supplier_bills.get",
                "supplier_bill_payments.list",
                "supplier_bill_payments.get",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "money-write",
            "date": "2026-11-15",
            "kind": "added",
            "title": "Money journal writes and debt payments",
            "description": "New scope finance:write. Manual income or expense (POST /v1/money-transactions), updating and deleting a transaction under If-Match: a transaction with a source document changes only its category, counterparty and description, anything else is 409 money_transaction_locked. Account-currency amounts are decimal strings, extra decimal places are 422. Transfers between accounts: POST, GET, PATCH and DELETE /v1/money-transfers. Bulk operations money_transactions.create and money_transactions.update post and categorize the journal in bulk. A customer debt payment with money already received: POST /v1/customer-accounts/{customer_account}/payments, with withholding certificates. Customer account entries get the order_id filter: debt payment entries link to the debt payment order, not to a payment.",
            "operations": [
                "money_transactions.create",
                "money_transactions.update",
                "money_transactions.delete",
                "money_transfers.create",
                "money_transfers.get",
                "money_transfers.update",
                "money_transfers.delete",
                "customer_accounts.record_payment",
                "customer_account_entries.list",
                "bulk_operations.create",
                "bulk_operations.list",
                "bulk_operations.get"
            ]
        },
        {
            "key": "customer-accounts",
            "date": "2026-11-15",
            "kind": "added",
            "title": "Customer receivables book",
            "description": "Under finance:read, customer accounts are now available (GET /v1/customer-accounts) with a balance equal to the sum of the account entries, a credit limit (null means no limit) and payment terms; plus the account entries (GET /v1/customer-account-entries, filters customer_account_id and payment_id) with a signed amount, the due date of each charge and links to the order, payment and refund; and a statement for a period (GET /v1/customer-accounts/{customer_account}/statement) with a running balance and open debts with due dates. The customer_id and the staff note about the customer require customers:read. New events: customer_account.created, customer_account.updated, customer_account_entry.created and customer_account_entry.updated, sent when a customer merge moves an entry to the remaining customer account.",
            "operations": [
                "customer_accounts.list",
                "customer_accounts.get",
                "customer_accounts.get_statement",
                "customer_account_entries.list",
                "customer_account_entries.get",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "gift-cards",
            "date": "2026-11-15",
            "kind": "added",
            "title": "Gift cards and their activity",
            "description": "Under finance:read, gift cards are now available (GET /v1/gift-cards) with face value, balance and outstanding, the store liability for the card: 0 for an unpaid card, equal to the balance for a blocked or expired one; plus the gift card activity (GET /v1/gift-card-transactions, filters gift_card_id and payment_id) with a signed amount and the balance after each entry. The card owner customer_id requires customers:read. New events: gift_card.created, gift_card.updated and gift_card_transaction.created.",
            "operations": [
                "gift_cards.list",
                "gift_cards.get",
                "gift_card_transactions.list",
                "gift_card_transactions.get",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "pos-shifts",
            "date": "2026-11-15",
            "kind": "added",
            "title": "Register shifts and the cash drawer journal",
            "description": "finance:read now covers register shifts (GET /v1/pos-shifts) with drawer reconciliation for each currency — opening float, expected, counted, difference and float left for the next shift — the cash drawer journal (GET /v1/pos-cash-movements, shift_id filter) and pay-in and pay-out reasons (GET /v1/pos-cash-reasons). Payments and refunds get a pos_shift_id field and filter: the shift that took the money, used to reconcile its sales. New events: pos_shift.opened, pos_shift.closed, pos_shift.updated and pos_cash_movement.created.",
            "operations": [
                "pos_shifts.list",
                "pos_shifts.get",
                "pos_cash_movements.list",
                "pos_cash_movements.get",
                "pos_cash_reasons.list",
                "payments.list",
                "payments.get",
                "payments.confirm",
                "refunds.list",
                "refunds.get",
                "refunds.create",
                "refunds.confirm",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "exchange-rates",
            "date": "2026-11-14",
            "kind": "added",
            "title": "Accounting day rate",
            "description": "The new GET /v1/exchange-rates/{currency} operation under finance:read returns the accounting day rate on a date — the rate the money journal uses to convert transactions on an account in that currency into the store currency: as a decimal string, with the day it was fixed (rate_date) and the market rate source from the store rule.",
            "operations": [
                "exchange_rates.get"
            ]
        },
        {
            "key": "money-journal",
            "date": "2026-11-14",
            "kind": "added",
            "title": "Money journal: accounts, categories and transactions",
            "description": "The new finance:read scope opens the store money accounts with their balance in the account currency, movement categories with system category codes and the transaction journal — with the posting amount in the store currency and in the account currency, the accounting date, the posting record (source) and the primary document (document); transfer legs share transfer_id. New events: money_transaction.created, money_transaction.updated and money_transaction.deleted.",
            "operations": [
                "money_accounts.list",
                "money_accounts.get",
                "money_categories.list",
                "money_transactions.list",
                "money_transactions.get",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "payment-provider-charges",
            "date": "2026-11-14",
            "kind": "added",
            "title": "Provider fee and withheld tax of a payment",
            "description": "A payment gets provider_fee_amount and provider_withheld_tax_amount — the payment provider fee and the tax it withheld as an agent — and the shares the provider gave back when the buyer was refunded: refunded_provider_fee_amount and refunded_provider_withheld_tax_amount.",
            "operations": [
                "payments.list",
                "payments.get",
                "payments.confirm",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "payment-money",
            "date": "2026-11-14",
            "kind": "added",
            "title": "Payment money, the legal entity of a sale, and payment and refund events",
            "description": "A payment gets tender — payment in a foreign currency with the rate, its mode, source, market base and store markup — received_asset (the coin that actually arrived) and legal_entity_id; an order gets legal_entity_id. New events: payment.created, payment.succeeded, payment.status_changed, payment.updated, refund.completed, refund.status_changed and refund.updated.",
            "operations": [
                "payments.list",
                "payments.get",
                "payments.confirm",
                "orders.list",
                "orders.get",
                "orders.cancel",
                "orders.set_status",
                "draft_orders.complete",
                "bulk_operations.get_result",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "fiscal-records",
            "date": "2026-11-14",
            "kind": "added",
            "title": "Legal entities, fiscal documents and tax periods",
            "description": "The new fiscal:read scope opens the store legal entities, fiscal documents in every status — with the tax authorized by the tax authority, the accounting date, ARCA details and the PDF — and the tax periods of legal entities in Argentine stores. The document recipient requires customers:read. New events: fiscal_document.created, fiscal_document.updated, fiscal_document.issued, fiscal_document.failed, fiscal_document.annulled and tax_period.status_changed.",
            "operations": [
                "legal_entities.list",
                "fiscal_documents.list",
                "fiscal_documents.get",
                "fiscal_documents.get_pdf",
                "tax_periods.list",
                "events.list",
                "webhook_endpoints.create",
                "webhook_endpoints.update"
            ]
        },
        {
            "key": "sale-taxes",
            "date": "2026-11-13",
            "kind": "added",
            "title": "Tax of the sale and cost of order items",
            "description": "Orders get tax_lines, delivery_tax_lines and tax_lines of each item, refunds get tax_lines: the tax of the sale by the classification of the products, in one TaxLine form. With costs:read, order items get cost_amount and cost_basis.",
            "operations": [
                "orders.list",
                "orders.get",
                "orders.cancel",
                "orders.set_status",
                "draft_orders.complete",
                "refunds.list",
                "refunds.get",
                "refunds.create",
                "refunds.confirm",
                "bulk_operations.get_result"
            ]
        },
        {
            "key": "tax-classes",
            "date": "2026-11-13",
            "kind": "added",
            "title": "Tax classes of products",
            "description": "New endpoint /v1/tax-classes lists the tax classes of the store: the kind of tax (taxed, exempt, untaxed) and the rate in basis points. Products have a new field tax_class_id, readable and writable on create, update and upsert; null means the default class of the store. Before, a product created through the API always got the default class.",
            "operations": [
                "tax_classes.list",
                "products.list",
                "products.get",
                "products.get_by_external_id",
                "products.create",
                "products.update",
                "products.upsert",
                "products.replace_options"
            ]
        },
        {
            "key": "customer-marketing-consents-by-channel",
            "date": "2026-11-13",
            "kind": "added",
            "title": "Marketing consent per channel",
            "description": "Customers have a new field marketing_consents — marketing consent per channel (email, telegram, whatsapp, instagram): a row for each channel where the customer explicitly agreed (subscribed) or refused (unsubscribed), with the moment of the latest explicit consent. A refusal on one channel no longer stops marketing on the others. On WhatsApp the store sends marketing only with subscribed, in any consent mode.",
            "operations": [
                "customers.list",
                "customers.get",
                "customers.get_by_external_id",
                "customers.create",
                "customers.update",
                "customers.upsert"
            ]
        },
        {
            "key": "customer-accepts-marketing-deprecated",
            "date": "2026-11-13",
            "kind": "deprecated",
            "title": "accepts_marketing and marketing_consent_at are deprecated",
            "description": "The customer fields accepts_marketing and marketing_consent_at are deprecated and now mean email marketing consent. Per-channel consent is in marketing_consents. The fields keep working as long as /v1 does.",
            "operations": [
                "customers.list",
                "customers.get",
                "customers.get_by_external_id",
                "customers.create",
                "customers.update",
                "customers.upsert"
            ]
        },
        {
            "key": "membership-renewal-void",
            "date": "2026-11-13",
            "kind": "added",
            "title": "Membership renewal invoice",
            "description": "Orders get a new system cancellation reason cancel_reason = membership_renewal_void: a membership renewal invoice was voided because the membership was cancelled or ended unpaid. No money was taken on such an invoice.",
            "operations": [
                "orders.list",
                "orders.get"
            ]
        },
        {
            "key": "draft-order-currency",
            "date": "2026-11-13",
            "kind": "added",
            "title": "Total currency when completing a draft",
            "description": "Completing a draft accepts the optional currency field — the currency in which the app read the total. A store without orders may change its currency, and the total would match as a number in another currency; such a completion now gets 422 and no order is created.",
            "operations": [
                "draft_orders.complete"
            ]
        },
        {
            "key": "service-package-expiry",
            "date": "2026-11-13",
            "kind": "added",
            "title": "Visit package expiry",
            "description": "Visits of a package whose term is over become a sale of the day — an order paid with the service_package method. Extending the term cancels that sale by the system: the order gets the cancel reason service_package_term_extended and the visits go back to the package.",
            "operations": [
                "orders.list",
                "orders.get"
            ]
        },
        {
            "key": "operation-problem-types",
            "date": "2026-11-12",
            "kind": "added",
            "title": "Error types for each endpoint",
            "description": "Each endpoint in the specification now has an x-problem-types field with the error types it returns: its own errors and those that follow from how it works (idempotency key, version in If-Match, feed cursor, result range, deletion, consent to side effects). Common errors such as token, access, input validation, rate limit and server failures can come from any endpoint, and the document-level x-problem-types catalog still lists them. The stocktake_location_occupied type was removed from the catalog because no endpoint returned it. Endpoints that respond with a conflict without an idempotency key now describe the 409 response.",
            "operations": []
        },
        {
            "key": "rejected-requests-limit",
            "date": "2026-11-12",
            "kind": "changed",
            "title": "Limit on rejected requests",
            "description": "Requests rejected on entry — 401 and the 403 of an address that is not allowed or a plan without the API — are now counted per address. Above the rejected_requests_per_minute limit the address gets 429 too_many_requests with policy set to rejected and a Retry-After header until the minute ends. Requests with a valid token are not counted and are never rejected by this limit.",
            "operations": []
        },
        {
            "key": "service-package-redemption",
            "date": "2026-11-12",
            "kind": "added",
            "title": "Visits from packages",
            "description": "Payment method service_package — a visit redeemed from the client’s visit package: the order line was paid by a visit bought earlier with the package. The store received that money when it sold the package, so this payment never reaches the till or the accounts, while the visit becomes order revenue now. Refunding such a line returns the visit to the package — a refund transaction with target service_package that moves no money.",
            "operations": [
                "payments.list",
                "payments.get",
                "refunds.list",
                "refunds.get",
                "refunds.create",
                "refunds.calculate",
                "orders.list",
                "orders.get",
                "draft_orders.complete"
            ]
        },
        {
            "key": "service-packages",
            "date": "2026-11-12",
            "kind": "added",
            "title": "Visit packages",
            "description": "Product type service_package — a visit package: a set of service visits the store sells in advance. Orders now have a service_package_issue_amount field — the total of visit packages sold in the order. A package is the store’s obligation to provide visits, not revenue: revenue comes when a visit is redeemed from the package. Subtract the field from the total together with gift_card_issue_amount, reservation_deposit_amount and account_payment_amount.",
            "operations": [
                "orders.list",
                "orders.get",
                "orders.set_status",
                "orders.cancel",
                "draft_orders.complete",
                "bulk_operations.get_result",
                "products.list",
                "products.create",
                "products.get",
                "products.update",
                "products.get_by_external_id",
                "products.upsert",
                "products.replace_options"
            ]
        },
        {
            "key": "v1",
            "date": "2026-11-11",
            "kind": "released",
            "title": "Integration API v1",
            "description": "The first version of the contract: the store and its locations, catalog, stock, orders and their statuses, draft orders, payments and refunds, customers, uploads and bulk operations, events and webhooks. Every later change of the contract is listed here.",
            "operations": []
        }
    ],
    "paths": {
        "/bulk-operations": {
            "get": {
                "operationId": "bulk_operations.list",
                "summary": "List the app bulk operations changed since a given time: progress and outcomes",
                "tags": [
                    "BulkOperations"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "inventory.set",
                                "products.upsert",
                                "money_transactions.create",
                                "money_transactions.update",
                                "orders.export",
                                "libro_iva.export",
                                "accountant_package.export"
                            ]
                        },
                        "description": "Only operations of this kind."
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "running",
                                "cancelling",
                                "completed",
                                "cancelled",
                                "failed"
                            ]
                        },
                        "description": "Only operations in this status."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "bulk:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/BulkOperation"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "bulk_operations.create",
                "summary": "Start a bulk operation from an upload or an input address, a feed export or a file build",
                "tags": [
                    "BulkOperations"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateBulkOperationRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "bulk:write"
                        ]
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted: the outcome is at the Location URL",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BulkOperation"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "capability_disabled",
                    "bulk_operation_queue_full",
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/bulk-operations/{operation}": {
            "get": {
                "operationId": "bulk_operations.get",
                "summary": "Get a bulk operation",
                "tags": [
                    "BulkOperations"
                ],
                "parameters": [
                    {
                        "name": "operation",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the bulk operation."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "bulk:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BulkOperation"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/bulk-operations/{operation}/result": {
            "get": {
                "operationId": "bulk_operations.get_result",
                "summary": "Get the result of a bulk operation — NDJSON, a line per input line or per exported item, or the ZIP of a file operation; resume with Range",
                "tags": [
                    "BulkOperations"
                ],
                "parameters": [
                    {
                        "name": "operation",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the bulk operation."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/Range"
                    },
                    {
                        "$ref": "#/components/parameters/IfRange"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "bulk:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Accept-Ranges": {
                                "$ref": "#/components/headers/AcceptRanges"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ResultETag"
                            }
                        },
                        "content": {
                            "application/x-ndjson": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "line": {
                                                    "type": "integer",
                                                    "description": "Number of the input line, from 1."
                                                },
                                                "status": {
                                                    "type": "integer",
                                                    "description": "HTTP status the line would get as a separate request."
                                                },
                                                "body": {
                                                    "type": "object",
                                                    "additionalProperties": true,
                                                    "description": "Response to the line: the record as its endpoint returns it, or a problem+json error."
                                                }
                                            },
                                            "required": [
                                                "line",
                                                "status",
                                                "body"
                                            ]
                                        },
                                        {
                                            "$ref": "#/components/schemas/Order"
                                        }
                                    ]
                                }
                            },
                            "application/zip": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "206": {
                        "description": "Part of the result by Range",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Accept-Ranges": {
                                "$ref": "#/components/headers/AcceptRanges"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ResultETag"
                            },
                            "Content-Range": {
                                "$ref": "#/components/headers/ContentRange"
                            }
                        },
                        "content": {
                            "application/x-ndjson": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "line": {
                                                    "type": "integer",
                                                    "description": "Number of the input line, from 1."
                                                },
                                                "status": {
                                                    "type": "integer",
                                                    "description": "HTTP status the line would get as a separate request."
                                                },
                                                "body": {
                                                    "type": "object",
                                                    "additionalProperties": true,
                                                    "description": "Response to the line: the record as its endpoint returns it, or a problem+json error."
                                                }
                                            },
                                            "required": [
                                                "line",
                                                "status",
                                                "body"
                                            ]
                                        },
                                        {
                                            "$ref": "#/components/schemas/Order"
                                        }
                                    ]
                                }
                            },
                            "application/zip": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "416": {
                        "$ref": "#/components/responses/RangeNotSatisfiable"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "bulk_operation_result_unavailable",
                    "range_not_satisfiable"
                ]
            }
        },
        "/bulk-operations/{operation}/cancel": {
            "post": {
                "operationId": "bulk_operations.cancel",
                "summary": "Cancel a bulk operation at a line boundary",
                "tags": [
                    "BulkOperations"
                ],
                "parameters": [
                    {
                        "name": "operation",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the bulk operation."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "bulk:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BulkOperation"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "bulk_operation_finished",
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/categories": {
            "get": {
                "operationId": "categories.list",
                "summary": "List catalog categories changed since a given time",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Category"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "categories.create",
                "summary": "Create a catalog category",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCategoryRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Category"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "plan_limit_reached",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/categories/{category}": {
            "get": {
                "operationId": "categories.get",
                "summary": "Get a catalog category",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the category."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Category"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "categories.update",
                "summary": "Change a catalog category",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the category."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateCategoryRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Category"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "categories.delete",
                "summary": "Archive a catalog category",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "category",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the category."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "category_archive": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Archiving the category unlinks its products, moves its subcategories up and removes it from print routes, discounts and collections."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/categories/by-external-id/{external_id}": {
            "get": {
                "operationId": "categories.get_by_external_id",
                "summary": "Get a catalog category by its external ID",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Category"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "categories.upsert",
                "summary": "Create or change a catalog category by its external ID",
                "tags": [
                    "Categories"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatchUpsert"
                    },
                    {
                        "$ref": "#/components/parameters/IfNoneMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertCategoryRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Category"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Category"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "external_id_archived",
                    "idempotency_key_in_use",
                    "plan_limit_reached",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/consignment-settlements": {
            "get": {
                "operationId": "consignment_settlements.list",
                "summary": "Consignment settlements: consignment goods sold, written off at the store's cost and repriced over a period",
                "tags": [
                    "ConsignmentSettlements"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "supplier_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only documents of this supplier."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ConsignmentSettlement"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/consignment-settlements/{consignment_settlement}": {
            "get": {
                "operationId": "consignment_settlements.get",
                "summary": "Consignment settlement",
                "tags": [
                    "ConsignmentSettlements"
                ],
                "parameters": [
                    {
                        "name": "consignment_settlement",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Consignment settlement ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ConsignmentSettlement"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/customer-account-entries": {
            "get": {
                "operationId": "customer_account_entries.list",
                "summary": "Customer account entries: sales on account, payments, returns, write-offs, offsets, withholdings and reversals",
                "tags": [
                    "CustomerAccountEntries"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "customer_account_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only entries of this customer account."
                    },
                    {
                        "name": "payment_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only entries of this payment."
                    },
                    {
                        "name": "order_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only records of this order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerAccountEntry"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/customer-account-entries/{customer_account_entry}": {
            "get": {
                "operationId": "customer_account_entries.get",
                "summary": "Customer account entry",
                "tags": [
                    "CustomerAccountEntries"
                ],
                "parameters": [
                    {
                        "name": "customer_account_entry",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer account entry ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerAccountEntry"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/customer-accounts": {
            "get": {
                "operationId": "customer_accounts.list",
                "summary": "Customer accounts in the receivables book: balance, credit limit and payment terms",
                "tags": [
                    "CustomerAccounts"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerAccount"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/customer-accounts/{customer_account}": {
            "get": {
                "operationId": "customer_accounts.get",
                "summary": "Customer account",
                "tags": [
                    "CustomerAccounts"
                ],
                "parameters": [
                    {
                        "name": "customer_account",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer account ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerAccount"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/customer-accounts/{customer_account}/statement": {
            "get": {
                "operationId": "customer_accounts.get_statement",
                "summary": "Customer account statement for a period: opening and closing balance, entries with a running balance, and open debts with due dates",
                "tags": [
                    "CustomerAccounts"
                ],
                "parameters": [
                    {
                        "name": "customer_account",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer account ID."
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "First day of the period, YYYY-MM-DD in the store time zone; by default, the day of the first account operation."
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Last day of the period, YYYY-MM-DD in the store time zone; today by default."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerAccountStatement"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/customer-accounts/{customer_account}/payments": {
            "post": {
                "operationId": "customer_accounts.record_payment",
                "summary": "Record a customer debt payment with money already received: an entry in the receivables book with withholding certificates",
                "tags": [
                    "CustomerAccounts"
                ],
                "parameters": [
                    {
                        "name": "customer_account",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer account ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RecordCustomerAccountPaymentRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "finance:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerAccountEntry"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/customers/{customer}/addresses/{address}": {
            "get": {
                "operationId": "customer_addresses.get",
                "summary": "Get an address from a customer's address book",
                "tags": [
                    "CustomerAddresses"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "name": "address",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the address in the address book of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerAddress"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "customer_addresses.update",
                "summary": "Update a customer's address",
                "tags": [
                    "CustomerAddresses"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "name": "address",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the address in the address book of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateCustomerAddressRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerAddress"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "customer_addresses.delete",
                "summary": "Delete an address from a customer's address book",
                "tags": [
                    "CustomerAddresses"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "name": "address",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the address in the address book of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/customers/{customer}/addresses": {
            "post": {
                "operationId": "customer_addresses.create",
                "summary": "Add an address to a customer's address book",
                "tags": [
                    "CustomerAddresses"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCustomerAddressRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerAddress"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "address_book_full",
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/customers/{customer}/fiscal-profile": {
            "get": {
                "operationId": "customer_fiscal_profiles.get",
                "summary": "Get a customer's tax details",
                "tags": [
                    "CustomerFiscalProfiles"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerFiscalProfile"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "put": {
                "operationId": "customer_fiscal_profiles.replace",
                "summary": "Replace a customer's tax details; null makes them a retail customer",
                "tags": [
                    "CustomerFiscalProfiles"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReplaceCustomerFiscalProfileRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerFiscalProfile"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/customer-groups": {
            "get": {
                "operationId": "customer_groups.list",
                "summary": "List the store's customer groups: name, description and whether they are active",
                "tags": [
                    "CustomerGroups"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerGroup"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "customer_groups.create",
                "summary": "Create a customer group",
                "tags": [
                    "CustomerGroups"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCustomerGroupRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "record_limit_reached",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/customer-groups/{customer_group}": {
            "get": {
                "operationId": "customer_groups.get",
                "summary": "Get a customer group",
                "tags": [
                    "CustomerGroups"
                ],
                "parameters": [
                    {
                        "name": "customer_group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer group ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "customer_groups.update",
                "summary": "Change a group's name, description or activity",
                "tags": [
                    "CustomerGroups"
                ],
                "parameters": [
                    {
                        "name": "customer_group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer group ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "customer_groups.delete",
                "summary": "Delete a group: its memberships go with it, and discount rules and broadcasts stop targeting it",
                "tags": [
                    "CustomerGroups"
                ],
                "parameters": [
                    {
                        "name": "customer_group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer group ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/customer-groups/{customer_group}/members": {
            "post": {
                "operationId": "customer_groups.add_members",
                "summary": "Add customers to a group",
                "tags": [
                    "CustomerGroups"
                ],
                "parameters": [
                    {
                        "name": "customer_group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer group ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ChangeCustomerGroupMembersRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/customer-groups/{customer_group}/members/remove": {
            "post": {
                "operationId": "customer_groups.remove_members",
                "summary": "Remove customers from a group",
                "tags": [
                    "CustomerGroups"
                ],
                "parameters": [
                    {
                        "name": "customer_group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Customer group ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ChangeCustomerGroupMembersRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CustomerGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/customers": {
            "get": {
                "operationId": "customers.list",
                "summary": "List customers changed since a given time: contacts, marketing consent, addresses and groups; look up by phone, email and group",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "phone",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 32
                        },
                        "description": "Only customers with this phone, in E.164 format."
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 254
                        },
                        "description": "Only customers with this email."
                    },
                    {
                        "name": "group_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only customers in this group: its current members."
                    },
                    {
                        "name": "wholesale_price_list_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only customers assigned this wholesale price list."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Customer"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "customers.create",
                "summary": "Create a customer: a name and at least one contact",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCustomerRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "customer_contact_in_use",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/customers/{customer}": {
            "get": {
                "operationId": "customers.get",
                "summary": "Get a customer",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "customers.update",
                "summary": "Update a customer's name, language and external ID",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateCustomerRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "customer_contact_in_use",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/customers/by-external-id/{external_id}": {
            "get": {
                "operationId": "customers.get_by_external_id",
                "summary": "Get a customer by its external ID",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "customers:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "customers.upsert",
                "summary": "Create or update a customer by its external ID",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatchUpsert"
                    },
                    {
                        "$ref": "#/components/parameters/IfNoneMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertCustomerRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "customer_contact_in_use",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/customers/{customer}/wholesale-price-list": {
            "post": {
                "operationId": "customers.set_wholesale_price_list",
                "summary": "Assign a wholesale price list to a customer or remove it",
                "tags": [
                    "Customers"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the customer."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetCustomerWholesalePriceListRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "customers:write",
                            "orders:wholesale"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/delivery-methods": {
            "get": {
                "operationId": "delivery_methods.list",
                "summary": "List the store delivery methods",
                "tags": [
                    "DeliveryMethods"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/DeliveryMethod"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/draft-orders/{draft}": {
            "get": {
                "operationId": "draft_orders.get",
                "summary": "Get a draft order: items, totals and what blocks placing it",
                "tags": [
                    "DraftOrders"
                ],
                "parameters": [
                    {
                        "name": "draft",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the draft order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DraftOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "draft_orders.update",
                "summary": "Change a draft order: customer, delivery, payment method and items",
                "tags": [
                    "DraftOrders"
                ],
                "parameters": [
                    {
                        "name": "draft",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the draft order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateDraftOrderRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DraftOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "draft_order_closed",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "draft_orders.delete",
                "summary": "Delete a draft order",
                "tags": [
                    "DraftOrders"
                ],
                "parameters": [
                    {
                        "name": "draft",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the draft order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/draft-orders": {
            "post": {
                "operationId": "draft_orders.create",
                "summary": "Create a draft order for a customer",
                "tags": [
                    "DraftOrders"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateDraftOrderRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DraftOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/draft-orders/{draft}/complete": {
            "post": {
                "operationId": "draft_orders.complete",
                "summary": "Place the order from a draft: invoice the customer or record the payment as received",
                "tags": [
                    "DraftOrders"
                ],
                "parameters": [
                    {
                        "name": "draft",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the draft order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CompleteDraftOrderRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "draft_order_closed",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/events": {
            "get": {
                "operationId": "events.list",
                "summary": "List store events of the last 30 days: what changed in orders, payments, refunds, fiscal documents, tax periods, products, stock and customers, with the record as it is now",
                "tags": [
                    "Events"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "order.created",
                                "order.updated",
                                "order.status_changed",
                                "order.paid",
                                "order.cancelled",
                                "payment.created",
                                "payment.succeeded",
                                "payment.status_changed",
                                "payment.updated",
                                "refund.created",
                                "refund.completed",
                                "refund.status_changed",
                                "refund.updated",
                                "fiscal_document.created",
                                "fiscal_document.updated",
                                "fiscal_document.issued",
                                "fiscal_document.failed",
                                "fiscal_document.annulled",
                                "tax_period.status_changed",
                                "money_transaction.created",
                                "money_transaction.updated",
                                "money_transaction.deleted",
                                "pos_shift.opened",
                                "pos_shift.closed",
                                "pos_shift.updated",
                                "pos_cash_movement.created",
                                "gift_card.created",
                                "gift_card.updated",
                                "gift_card_transaction.created",
                                "customer_account.created",
                                "customer_account.updated",
                                "customer_account_entry.created",
                                "customer_account_entry.updated",
                                "supplier.created",
                                "supplier.updated",
                                "supplier.deleted",
                                "supplier_bill.created",
                                "supplier_bill.updated",
                                "supplier_bill.posted",
                                "supplier_bill.voided",
                                "supplier_bill.deleted",
                                "supplier_bill_payment.created",
                                "supplier_bill_payment.updated",
                                "supplier_bill_payment.deleted",
                                "settlement_agreement.created",
                                "settlement_agreement.updated",
                                "settlement_agreement.deleted",
                                "settlement_offset.created",
                                "settlement_offset.updated",
                                "settlement_offset.voided",
                                "purchase_order.created",
                                "purchase_order.updated",
                                "purchase_order.status_changed",
                                "purchase_order.deleted",
                                "goods_receipt.created",
                                "goods_receipt.updated",
                                "goods_receipt.voided",
                                "supplier_return.created",
                                "supplier_return.updated",
                                "supplier_return.status_changed",
                                "supplier_return.deleted",
                                "consignment_settlement.created",
                                "consignment_settlement.updated",
                                "consignment_settlement.posted",
                                "consignment_settlement.voided",
                                "tax_withholding.created",
                                "tax_withholding.updated",
                                "tax_withholding.annulled",
                                "tax_withholding.deleted",
                                "product.created",
                                "product.updated",
                                "product.deleted",
                                "inventory_level.updated",
                                "stock_movement.created",
                                "stock_movement.updated",
                                "lot.created",
                                "lot.updated",
                                "lot.deleted",
                                "location_transfer.created",
                                "location_transfer.updated",
                                "stocktake.created",
                                "stocktake.status_changed",
                                "stocktake.updated",
                                "customer.created",
                                "customer.updated",
                                "customer.deleted",
                                "customer_group.created",
                                "customer_group.updated",
                                "customer_group.deleted",
                                "price_list.created",
                                "price_list.updated",
                                "price_list.deleted",
                                "bulk_operation.finished"
                            ]
                        },
                        "description": "Only events of this type, such as order.paid."
                    },
                    {
                        "name": "created_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only events created after this moment."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Event"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/exchange-rates/{currency}": {
            "get": {
                "operationId": "exchange_rates.get",
                "summary": "Get the accounting day rate of a currency on a date: the rate the money journal uses to convert transactions on foreign-currency accounts",
                "tags": [
                    "ExchangeRates"
                ],
                "parameters": [
                    {
                        "name": "currency",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "ISO 4217 currency or asset code (USDT, USDC) from the set of money account currencies."
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Accounting date YYYY-MM-DD in the store time zone; today by default."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ExchangeRate"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/fiscal-documents": {
            "get": {
                "operationId": "fiscal_documents.list",
                "summary": "List fiscal documents changed since a given moment: invoices, credit and debit notes in every status",
                "tags": [
                    "FiscalDocuments"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "order_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only records of this order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/FiscalDocument"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/fiscal-documents/{document}": {
            "get": {
                "operationId": "fiscal_documents.get",
                "summary": "Get a fiscal document",
                "tags": [
                    "FiscalDocuments"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the fiscal document."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FiscalDocument"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/fiscal-documents/{document}/pdf": {
            "get": {
                "operationId": "fiscal_documents.get_pdf",
                "summary": "Download the PDF of a fiscal document, the same file the customer receives",
                "tags": [
                    "FiscalDocuments"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the fiscal document."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "fiscal_document_pdf_unavailable"
                ]
            }
        },
        "/orders/{order}/invoice": {
            "post": {
                "operationId": "fiscal_documents.issue_invoice",
                "summary": "Issue the invoice of a closed sale: issuing runs in the background, the outcome comes as an event",
                "tags": [
                    "FiscalDocuments"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKeyRequired"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:write"
                        ]
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted: the outcome is at the Location URL",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FiscalDocument"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "invoice_issue_refused",
                    "idempotency_key_required",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/fiscal-documents/{document}/reissue": {
            "post": {
                "operationId": "fiscal_documents.reissue",
                "summary": "Reissue a document after a failure or a rejection by the tax authority",
                "tags": [
                    "FiscalDocuments"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "ID of the fiscal document."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKeyRequired"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReissueFiscalDocumentRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "fiscal:write"
                        ]
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted: the outcome is at the Location URL",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FiscalDocument"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "fiscal_document_reissue_refused",
                    "idempotency_key_in_use",
                    "idempotency_key_required",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/fiscal-documents/{document}/dismiss": {
            "post": {
                "operationId": "fiscal_documents.dismiss",
                "summary": "Dismiss a rejected document: it will not be issued",
                "tags": [
                    "FiscalDocuments"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "ID of the fiscal document."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DismissFiscalDocumentRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "fiscal:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FiscalDocument"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "fiscal_document_dismiss_refused",
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/fiscal-documents/{document}/annul": {
            "post": {
                "operationId": "fiscal_documents.annul",
                "summary": "Annul an issued invoice with a credit note",
                "tags": [
                    "FiscalDocuments"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "ID of the fiscal document."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKeyRequired"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AnnulFiscalDocumentRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "fiscal:annul"
                        ]
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted: the outcome is at the Location URL",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FiscalDocument"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "fiscal_document_annul_refused",
                    "idempotency_key_in_use",
                    "idempotency_key_required",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/gift-card-transactions": {
            "get": {
                "operationId": "gift_card_transactions.list",
                "summary": "Gift card activity: issue, redemption, refund to the card, adjustment, void, block and balance transfer",
                "tags": [
                    "GiftCardTransactions"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "gift_card_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only entries of this gift card."
                    },
                    {
                        "name": "payment_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only entries of this payment."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/GiftCardTransaction"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/gift-card-transactions/{entry}": {
            "get": {
                "operationId": "gift_card_transactions.get",
                "summary": "Gift card activity entry",
                "tags": [
                    "GiftCardTransactions"
                ],
                "parameters": [
                    {
                        "name": "entry",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Gift card activity entry ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GiftCardTransaction"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/gift-cards": {
            "get": {
                "operationId": "gift_cards.list",
                "summary": "Gift cards: face value, balance and the store liability for each card",
                "tags": [
                    "GiftCards"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/GiftCard"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/gift-cards/{card}": {
            "get": {
                "operationId": "gift_cards.get",
                "summary": "Gift card",
                "tags": [
                    "GiftCards"
                ],
                "parameters": [
                    {
                        "name": "card",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Gift card ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GiftCard"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/goods-receipts": {
            "get": {
                "operationId": "goods_receipts.list",
                "summary": "Goods receipts: deliveries from suppliers with lines, delivery note prices and corrections",
                "tags": [
                    "GoodsReceipts"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "supplier_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only documents of this supplier."
                    },
                    {
                        "name": "purchase_order_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only goods receipts against this purchase order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/GoodsReceipt"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/goods-receipts/{goods_receipt}": {
            "get": {
                "operationId": "goods_receipts.get",
                "summary": "Goods receipt",
                "tags": [
                    "GoodsReceipts"
                ],
                "parameters": [
                    {
                        "name": "goods_receipt",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Goods receipt ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GoodsReceipt"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/inventory-levels": {
            "get": {
                "operationId": "inventory_levels.list",
                "summary": "List stock levels by location changed since a given time",
                "tags": [
                    "InventoryLevels"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "variant_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only stock of this variant."
                    },
                    {
                        "name": "location_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only stock at this location."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/InventoryLevel"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/inventory-levels/set": {
            "post": {
                "operationId": "inventory_levels.set",
                "summary": "Set the on-hand quantity of a variant at a location",
                "tags": [
                    "InventoryLevels"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetInventoryLevelRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "inventory:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InventoryChange"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "stock_held_by_write_offs",
                    "stock_on_hand_changed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/inventory-levels/adjust": {
            "post": {
                "operationId": "inventory_levels.adjust",
                "summary": "Receive stock or write it off at a location",
                "tags": [
                    "InventoryLevels"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AdjustInventoryLevelRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "inventory:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InventoryChange"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/legal-entities": {
            "get": {
                "operationId": "legal_entities.list",
                "summary": "List the store legal entities: issuers of fiscal documents and owners of tax periods",
                "tags": [
                    "LegalEntities"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/LegalEntity"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/location-transfers": {
            "get": {
                "operationId": "location_transfers.list",
                "summary": "Transfers of goods between locations with their lines, changed since a given moment",
                "tags": [
                    "LocationTransfers"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "source_location_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only transfers that took goods out of this location."
                    },
                    {
                        "name": "destination_location_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only transfers that brought goods to this location."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/LocationTransfer"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/location-transfers/{location_transfer}": {
            "get": {
                "operationId": "location_transfers.get",
                "summary": "Location transfer",
                "tags": [
                    "LocationTransfers"
                ],
                "parameters": [
                    {
                        "name": "location_transfer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Location transfer ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LocationTransfer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/locations": {
            "get": {
                "operationId": "locations.list",
                "summary": "List the store locations available to the app",
                "tags": [
                    "Locations"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "locations:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Location"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/lots": {
            "get": {
                "operationId": "lots.list",
                "summary": "Product lots: number, expiry date and status, changed since a given moment",
                "tags": [
                    "Lots"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "variant_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only lots of this variant."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Lot"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/lots/{lot}": {
            "get": {
                "operationId": "lots.get",
                "summary": "Product lot",
                "tags": [
                    "Lots"
                ],
                "parameters": [
                    {
                        "name": "lot",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Lot ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Lot"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/manual-payment-methods": {
            "get": {
                "operationId": "manual_payment_methods.list",
                "summary": "List the store manual payment methods",
                "tags": [
                    "ManualPaymentMethods"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ManualPaymentMethod"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/me": {
            "get": {
                "operationId": "me.get",
                "summary": "Get the app behind the token, its access and rate limits",
                "tags": [
                    "Me"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Me"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/media-imports": {
            "get": {
                "operationId": "media_imports.list",
                "summary": "List photo downloads by URL changed since a given time: pending, downloaded or failed",
                "tags": [
                    "MediaImports"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "product_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only records of this product."
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "succeeded",
                                "failed"
                            ]
                        },
                        "description": "Only downloads in this status."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/MediaImport"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/media-imports/{import}": {
            "get": {
                "operationId": "media_imports.get",
                "summary": "Get a photo download by URL",
                "tags": [
                    "MediaImports"
                ],
                "parameters": [
                    {
                        "name": "import",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the photo download."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MediaImport"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/modifier-groups": {
            "get": {
                "operationId": "modifier_groups.list",
                "summary": "List modifier groups with options changed since the given moment",
                "tags": [
                    "ModifierGroups"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ModifierGroup"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "modifier_groups.create",
                "summary": "Create a modifier group with options",
                "tags": [
                    "ModifierGroups"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateModifierGroupRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModifierGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "record_limit_reached",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/modifier-groups/{group}": {
            "get": {
                "operationId": "modifier_groups.get",
                "summary": "Get a modifier group with its options",
                "tags": [
                    "ModifierGroups"
                ],
                "parameters": [
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the modifier group."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModifierGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "modifier_groups.update",
                "summary": "Update a modifier group and its option set",
                "tags": [
                    "ModifierGroups"
                ],
                "parameters": [
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the modifier group."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "modifier_product_minimum": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Products with their own selection rule get a minimum equal to the number of enabled options of the group; otherwise they could not be bought."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateModifierGroupRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModifierGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "modifier_groups.delete",
                "summary": "Archive a modifier group",
                "tags": [
                    "ModifierGroups"
                ],
                "parameters": [
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the modifier group."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "modifier_group_archive": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Archiving the group removes it from products, breaks the selection in customer carts and removes its options from open draft orders."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/modifier-groups/by-external-id/{external_id}": {
            "get": {
                "operationId": "modifier_groups.get_by_external_id",
                "summary": "Get a modifier group by external ID",
                "tags": [
                    "ModifierGroups"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModifierGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "modifier_groups.upsert",
                "summary": "Create or update a modifier group by external ID",
                "tags": [
                    "ModifierGroups"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "modifier_product_minimum": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Products with their own selection rule get a minimum equal to the number of enabled options of the group; otherwise they could not be bought."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatchUpsert"
                    },
                    {
                        "$ref": "#/components/parameters/IfNoneMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertModifierGroupRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModifierGroup"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ModifierGroup"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "record_limit_reached",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/money-accounts": {
            "get": {
                "operationId": "money_accounts.list",
                "summary": "List the store money accounts with their current balance: cash, bank, acquiring, wallet",
                "tags": [
                    "MoneyAccounts"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/MoneyAccount"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/money-accounts/{account}": {
            "get": {
                "operationId": "money_accounts.get",
                "summary": "Get a money account",
                "tags": [
                    "MoneyAccounts"
                ],
                "parameters": [
                    {
                        "name": "account",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the money account."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MoneyAccount"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/money-categories": {
            "get": {
                "operationId": "money_categories.list",
                "summary": "List the money movement categories: the income and expense tree with system category codes",
                "tags": [
                    "MoneyCategories"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/MoneyCategory"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/money-transactions": {
            "get": {
                "operationId": "money_transactions.list",
                "summary": "List money transactions changed since a given moment: account income and expenses with their source and primary document",
                "tags": [
                    "MoneyTransactions"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "account_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only movements of this money account."
                    },
                    {
                        "name": "transfer_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only the legs of this transfer between accounts."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/MoneyTransaction"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "money_transactions.create",
                "summary": "Record manual income or expense on a money account",
                "tags": [
                    "MoneyTransactions"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateMoneyTransactionRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "finance:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MoneyTransaction"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/money-transactions/{transaction}": {
            "get": {
                "operationId": "money_transactions.get",
                "summary": "Get a money transaction",
                "tags": [
                    "MoneyTransactions"
                ],
                "parameters": [
                    {
                        "name": "transaction",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the money transaction."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MoneyTransaction"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "money_transactions.update",
                "summary": "Update a money transaction: only the category, counterparty and description of a transaction with a source document",
                "tags": [
                    "MoneyTransactions"
                ],
                "parameters": [
                    {
                        "name": "transaction",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the money transaction."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateMoneyTransactionRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "finance:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MoneyTransaction"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "money_transaction_locked",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "money_transactions.delete",
                "summary": "Delete a manual money transaction and restore the account balance",
                "tags": [
                    "MoneyTransactions"
                ],
                "parameters": [
                    {
                        "name": "transaction",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the money transaction."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "money_transaction_locked",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/money-transfers/{money_transfer}": {
            "get": {
                "operationId": "money_transfers.get",
                "summary": "Get a transfer between money accounts",
                "tags": [
                    "MoneyTransfers"
                ],
                "parameters": [
                    {
                        "name": "money_transfer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the transfer — the transfer_id of its legs in the money journal."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MoneyTransfer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "money_transfers.update",
                "summary": "Update a whole transfer in place: accounts, amounts, fee, date and description",
                "tags": [
                    "MoneyTransfers"
                ],
                "parameters": [
                    {
                        "name": "money_transfer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the transfer — the transfer_id of its legs in the money journal."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateMoneyTransferRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "finance:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MoneyTransfer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "money_transfers.delete",
                "summary": "Delete a transfer with all its legs",
                "tags": [
                    "MoneyTransfers"
                ],
                "parameters": [
                    {
                        "name": "money_transfer",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the transfer — the transfer_id of its legs in the money journal."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/money-transfers": {
            "post": {
                "operationId": "money_transfers.create",
                "summary": "Transfer money between accounts, with or without a fee",
                "tags": [
                    "MoneyTransfers"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateMoneyTransferRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "finance:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MoneyTransfer"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/order-statuses": {
            "get": {
                "operationId": "order_statuses.list",
                "summary": "List the order statuses of the store and the transitions between them",
                "tags": [
                    "OrderStatuses"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/OrderStatus"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/orders": {
            "get": {
                "operationId": "orders.list",
                "summary": "List orders changed since a given time: items, totals, the order status and the payment status",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "number",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 16
                        },
                        "description": "Only the order with this number."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Order"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/orders/{order}": {
            "get": {
                "operationId": "orders.get",
                "summary": "Get an order",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/orders/{order}/shipment/label": {
            "get": {
                "operationId": "orders.get_shipment_label",
                "summary": "Download the carrier label of the order's current shipment as a PDF; it carries the recipient's details, so customers:read is required too",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:read",
                            "customers:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "shipment_label_unavailable",
                    "carrier_unavailable"
                ]
            }
        },
        "/orders/{order}/status": {
            "post": {
                "operationId": "orders.set_status",
                "summary": "Move an order to another status of the store",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetOrderStatusRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "order_transition_refused",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/orders/{order}/cancel": {
            "post": {
                "operationId": "orders.cancel",
                "summary": "Cancel an order",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "order_cancel": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Cancelling the order returns the received money to the customer, the subscription or the booking, issues a credit note for the fiscal document, cancels the carrier shipment and leaves already picked goods as losses."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CancelOrderRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "idempotency_key_in_use",
                    "order_cancel_refused",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/orders/{order}/shipment": {
            "post": {
                "operationId": "orders.create_shipment",
                "summary": "Issue the order's shipment with its carrier: the request runs in the background, the outcome shows in the order and arrives with order.updated",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted: the outcome is at the Location URL",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "shipment_in_progress",
                    "shipment_outcome_unknown",
                    "shipment_refused",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/orders/{order}/shipment/tracking": {
            "post": {
                "operationId": "orders.set_shipment_tracking",
                "summary": "Write the tracking number of a delivery service without integration: number, link and service name",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetOrderShipmentTrackingRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "shipment_in_progress",
                    "shipment_tracking_refused",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/orders/{order}/shipment/tracking/clear": {
            "post": {
                "operationId": "orders.clear_shipment_tracking",
                "summary": "Remove a manually written tracking number",
                "tags": [
                    "Orders"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "shipment_in_progress",
                    "shipment_tracking_refused",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/payments": {
            "get": {
                "operationId": "payments.list",
                "summary": "List order payments changed since a given time",
                "tags": [
                    "Payments"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "order_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only records of this order."
                    },
                    {
                        "name": "pos_shift_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only records taken by this register shift."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "payments:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Payment"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/payments/{payment}": {
            "get": {
                "operationId": "payments.get",
                "summary": "Get an order payment",
                "tags": [
                    "Payments"
                ],
                "parameters": [
                    {
                        "name": "payment",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the payment."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "payments:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Payment"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/payments/{payment}/confirm": {
            "post": {
                "operationId": "payments.confirm",
                "summary": "Confirm that the money of a pending invoice was received",
                "tags": [
                    "Payments"
                ],
                "parameters": [
                    {
                        "name": "payment",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the payment."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ConfirmPaymentRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "payments:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Payment"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "payment_not_confirmable",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/pos-cash-movements": {
            "get": {
                "operationId": "pos_cash_movements.list",
                "summary": "Cash drawer journal: cash sales and refunds, pay-ins, pay-outs, safe drops, change and reversals",
                "tags": [
                    "PosCashMovements"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "shift_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only movements of this register shift."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PosCashMovement"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/pos-cash-movements/{movement}": {
            "get": {
                "operationId": "pos_cash_movements.get",
                "summary": "Cash drawer movement",
                "tags": [
                    "PosCashMovements"
                ],
                "parameters": [
                    {
                        "name": "movement",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Cash drawer movement ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PosCashMovement"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/pos-cash-reasons": {
            "get": {
                "operationId": "pos_cash_reasons.list",
                "summary": "Pay-in and pay-out reasons with their money journal category",
                "tags": [
                    "PosCashReasons"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PosCashReason"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/pos-shifts": {
            "get": {
                "operationId": "pos_shifts.list",
                "summary": "Register shifts changed since a given moment: cash drawer reconciliation for each currency",
                "tags": [
                    "PosShifts"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PosShift"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/pos-shifts/{shift}": {
            "get": {
                "operationId": "pos_shifts.get",
                "summary": "Register shift",
                "tags": [
                    "PosShifts"
                ],
                "parameters": [
                    {
                        "name": "shift",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Register shift ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "finance:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PosShift"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/price-list-items": {
            "get": {
                "operationId": "price_list_items.list",
                "summary": "List fixed variant prices in price lists changed since a given moment",
                "tags": [
                    "PriceListItems"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "price_list_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only prices of this price list."
                    },
                    {
                        "name": "variant_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only prices of this variant across all lists."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PriceListItem"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/price-list-items/{price_list_item}": {
            "get": {
                "operationId": "price_list_items.get",
                "summary": "Get a fixed variant price in a price list",
                "tags": [
                    "PriceListItems"
                ],
                "parameters": [
                    {
                        "name": "price_list_item",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Price list fixed price ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceListItem"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/price-lists/{price_list}/items": {
            "post": {
                "operationId": "price_lists.set_items",
                "summary": "Set fixed variant prices in a price list in bulk",
                "tags": [
                    "PriceListItems"
                ],
                "parameters": [
                    {
                        "name": "price_list",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Price list ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetPriceListItemsRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    },
                    {
                        "apiToken": [
                            "orders:wholesale"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceList"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/price-lists/{price_list}/items/remove": {
            "post": {
                "operationId": "price_lists.remove_items",
                "summary": "Remove fixed variant prices from a price list in bulk",
                "tags": [
                    "PriceListItems"
                ],
                "parameters": [
                    {
                        "name": "price_list",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Price list ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RemovePriceListItemsRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    },
                    {
                        "apiToken": [
                            "orders:wholesale"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceList"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/price-list-modifier-items": {
            "get": {
                "operationId": "price_list_modifier_items.list",
                "summary": "List fixed modifier option surcharges in price lists changed since a given moment",
                "tags": [
                    "PriceListModifierItems"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "price_list_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only surcharges of this price list."
                    },
                    {
                        "name": "modifier_option_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only surcharges of this option across all lists."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PriceListModifierItem"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/price-list-modifier-items/{price_list_modifier_item}": {
            "get": {
                "operationId": "price_list_modifier_items.get",
                "summary": "Get a fixed option surcharge in a price list",
                "tags": [
                    "PriceListModifierItems"
                ],
                "parameters": [
                    {
                        "name": "price_list_modifier_item",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Price list fixed surcharge ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceListModifierItem"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/price-lists/{price_list}/modifier-items": {
            "post": {
                "operationId": "price_lists.set_modifier_items",
                "summary": "Set fixed modifier option surcharges in a price list in bulk",
                "tags": [
                    "PriceListModifierItems"
                ],
                "parameters": [
                    {
                        "name": "price_list",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Price list ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetPriceListModifierItemsRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    },
                    {
                        "apiToken": [
                            "orders:wholesale"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceList"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/price-lists/{price_list}/modifier-items/remove": {
            "post": {
                "operationId": "price_lists.remove_modifier_items",
                "summary": "Remove fixed modifier option surcharges from a price list in bulk",
                "tags": [
                    "PriceListModifierItems"
                ],
                "parameters": [
                    {
                        "name": "price_list",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Price list ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RemovePriceListModifierItemsRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    },
                    {
                        "apiToken": [
                            "orders:wholesale"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceList"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/price-lists": {
            "get": {
                "operationId": "price_lists.list",
                "summary": "List the store's price lists: location and wholesale lists with their rule and rounding",
                "tags": [
                    "PriceLists"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "kind",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "location",
                                "wholesale"
                            ]
                        },
                        "description": "Only lists of this kind: location — location lists, wholesale — wholesale lists."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PriceList"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "price_lists.create",
                "summary": "Create a wholesale price list",
                "tags": [
                    "PriceLists"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreatePriceListRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "orders:wholesale"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceList"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/price-lists/{price_list}": {
            "get": {
                "operationId": "price_lists.get",
                "summary": "Get a price list",
                "tags": [
                    "PriceLists"
                ],
                "parameters": [
                    {
                        "name": "price_list",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Price list ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceList"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "price_lists.update",
                "summary": "Update a price list: adjustment and rounding, and the name of a wholesale list; a location list's rule changes prices at all its locations",
                "tags": [
                    "PriceLists"
                ],
                "parameters": [
                    {
                        "name": "price_list",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Price list ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdatePriceListRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    },
                    {
                        "apiToken": [
                            "orders:wholesale"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PriceList"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "price_lists.delete",
                "summary": "Delete a wholesale price list; its assignment to customers is removed with consent",
                "tags": [
                    "PriceLists"
                ],
                "parameters": [
                    {
                        "name": "price_list",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Price list ID."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "wholesale_price_list_buyers": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The wholesale list is assigned to customers: deleting it removes the assignment, and their wholesale sales go at base prices. buyers — how many customers it affects."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "orders:wholesale"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/products/{product}/media/{media}": {
            "get": {
                "operationId": "product_media.get",
                "summary": "Get a product gallery photo",
                "tags": [
                    "ProductMedia"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "name": "media",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the photo: id in media of the product."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductMedia"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "product_media.update",
                "summary": "Move a gallery photo or make it primary",
                "tags": [
                    "ProductMedia"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "name": "media",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the photo: id in media of the product."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateProductMediaRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductMedia"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "product_media.delete",
                "summary": "Remove a photo from the product gallery",
                "tags": [
                    "ProductMedia"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "name": "media",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the photo: id in media of the product."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/products/{product}/media": {
            "post": {
                "operationId": "product_media.create",
                "summary": "Add a photo to the product gallery from an image URL",
                "tags": [
                    "ProductMedia"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateProductMediaRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted: the outcome is at the Location URL",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MediaImport"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/products/{product}/modifier-groups": {
            "get": {
                "operationId": "products.get_modifier_groups",
                "summary": "Get the product modifier groups and their option surcharges by variant",
                "tags": [
                    "ProductModifierGroups"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductModifierGroups"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "put": {
                "operationId": "products.replace_modifier_groups",
                "summary": "Replace the product modifier groups and their option surcharges by variant",
                "tags": [
                    "ProductModifierGroups"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReplaceProductModifierGroupsRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductModifierGroups"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/products": {
            "get": {
                "operationId": "products.list",
                "summary": "List products: categories, options and media, without variants",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Product"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "products.create",
                "summary": "Create a product with its variants",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateProductRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Product"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "plan_limit_reached",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/products/{product}": {
            "get": {
                "operationId": "products.get",
                "summary": "Get a product",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Product"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "products.update",
                "summary": "Change a product card: fields, categories, external ID",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateProductRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Product"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "products.delete",
                "summary": "Archive a product with its variants",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "recipe_ingredient": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The item is an ingredient of live recipes and leaves them."
                                },
                                "production_draft": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Draft production acts with the item are cancelled."
                                },
                                "program_menu": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The dish leaves the menus of meal subscription programs."
                                },
                                "live_subscriptions": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The program with live subscriptions is taken off sale."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/products/by-external-id/{external_id}": {
            "get": {
                "operationId": "products.get_by_external_id",
                "summary": "Get a product by its external ID",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Product"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "products.upsert",
                "summary": "Create or update a product with its variants by its external ID",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatchUpsert"
                    },
                    {
                        "$ref": "#/components/parameters/IfNoneMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertProductRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Product"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Product"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "plan_limit_reached",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/products/{product}/options": {
            "put": {
                "operationId": "products.replace_options",
                "summary": "Replace the product options and lay out its variants",
                "tags": [
                    "Products"
                ],
                "parameters": [
                    {
                        "name": "product",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the product."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "variant_axes": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Variants with the same combination are merged, and the variants named for the archive are archived together with their dependencies."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReplaceProductOptionsRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Product"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/purchase-orders": {
            "get": {
                "operationId": "purchase_orders.list",
                "summary": "Purchase orders: ordered, confirmed by the supplier and received, by line",
                "tags": [
                    "PurchaseOrders"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "supplier_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only documents of this supplier."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PurchaseOrder"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "purchase_orders.create",
                "summary": "Create a draft purchase order",
                "tags": [
                    "PurchaseOrders"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreatePurchaseOrderRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PurchaseOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "capability_disabled",
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/purchase-orders/{purchase_order}": {
            "get": {
                "operationId": "purchase_orders.get",
                "summary": "Purchase order",
                "tags": [
                    "PurchaseOrders"
                ],
                "parameters": [
                    {
                        "name": "purchase_order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Purchase order ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PurchaseOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "purchase_orders.update",
                "summary": "Change a purchase order: a draft in full, a placed order’s lines, date and note with a revision",
                "tags": [
                    "PurchaseOrders"
                ],
                "parameters": [
                    {
                        "name": "purchase_order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Purchase order ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PurchaseOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "capability_disabled",
                    "idempotency_key_in_use",
                    "purchase_order_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "purchase_orders.delete",
                "summary": "Delete a draft purchase order",
                "tags": [
                    "PurchaseOrders"
                ],
                "parameters": [
                    {
                        "name": "purchase_order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Purchase order ID."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "purchase_order_follow_up": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The draft is a follow-up order from a “buy elsewhere” decision on another order’s supplier answer: deleting it withdraws that decision, and the discrepancy on the source order waits for a decision again. source_orders counts the source orders affected."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "capability_disabled",
                    "consent_required",
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "purchase_order_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/purchase-orders/{purchase_order}/place": {
            "post": {
                "operationId": "purchase_orders.place",
                "summary": "Mark a draft as placed with the supplier",
                "tags": [
                    "PurchaseOrders"
                ],
                "parameters": [
                    {
                        "name": "purchase_order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Purchase order ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PurchaseOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "capability_disabled",
                    "idempotency_key_in_use",
                    "purchase_order_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/purchase-orders/{purchase_order}/cancel": {
            "post": {
                "operationId": "purchase_orders.cancel",
                "summary": "Cancel a placed purchase order",
                "tags": [
                    "PurchaseOrders"
                ],
                "parameters": [
                    {
                        "name": "purchase_order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Purchase order ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PurchaseOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "capability_disabled",
                    "idempotency_key_in_use",
                    "purchase_order_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/purchase-orders/{purchase_order}/close": {
            "post": {
                "operationId": "purchase_orders.close",
                "summary": "Close a received purchase order",
                "tags": [
                    "PurchaseOrders"
                ],
                "parameters": [
                    {
                        "name": "purchase_order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Purchase order ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PurchaseOrder"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "capability_disabled",
                    "idempotency_key_in_use",
                    "purchase_order_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/recommendation-rules": {
            "get": {
                "operationId": "recommendation_rules.list",
                "summary": "List recommendation rules changed since a given time",
                "tags": [
                    "RecommendationRules"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/RecommendationRule"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "recommendation_rules.create",
                "summary": "Create a recommendation rule",
                "tags": [
                    "RecommendationRules"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateRecommendationRuleRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RecommendationRule"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "record_limit_reached",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/recommendation-rules/{rule}": {
            "get": {
                "operationId": "recommendation_rules.get",
                "summary": "Get a recommendation rule",
                "tags": [
                    "RecommendationRules"
                ],
                "parameters": [
                    {
                        "name": "rule",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the recommendation rule."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RecommendationRule"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "recommendation_rules.update",
                "summary": "Change a recommendation rule",
                "tags": [
                    "RecommendationRules"
                ],
                "parameters": [
                    {
                        "name": "rule",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the recommendation rule."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateRecommendationRuleRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RecommendationRule"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "recommendation_rules.delete",
                "summary": "Delete a recommendation rule",
                "tags": [
                    "RecommendationRules"
                ],
                "parameters": [
                    {
                        "name": "rule",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the recommendation rule."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/refunds": {
            "get": {
                "operationId": "refunds.list",
                "summary": "List order refunds changed since a given time: items and payment transactions",
                "tags": [
                    "Refunds"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "order_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only records of this order."
                    },
                    {
                        "name": "pos_shift_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only records taken by this register shift."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "refunds:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Refund"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/refunds/{refund}": {
            "get": {
                "operationId": "refunds.get",
                "summary": "Get an order refund",
                "tags": [
                    "Refunds"
                ],
                "parameters": [
                    {
                        "name": "refund",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the refund."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "refunds:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Refund"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/orders/{order}/refunds/calculate": {
            "post": {
                "operationId": "refunds.calculate",
                "summary": "Calculate an order refund and what is left to refund, without writing anything",
                "tags": [
                    "Refunds"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CalculateRefundRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "refunds:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RefundCalculation"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "refund_refused",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/orders/{order}/refunds": {
            "post": {
                "operationId": "refunds.create",
                "summary": "Refund order items and delivery: money goes back by the payment methods, goods go back to stock",
                "tags": [
                    "Refunds"
                ],
                "parameters": [
                    {
                        "name": "order",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the order."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateRefundRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "refunds:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Refund"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "refund_refused",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/refunds/{refund}/confirm": {
            "post": {
                "operationId": "refunds.confirm",
                "summary": "Confirm that the refund money was paid back outside the system",
                "tags": [
                    "Refunds"
                ],
                "parameters": [
                    {
                        "name": "refund",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the refund."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "refunds:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Refund"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "refund_not_confirmable",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/settlement-agreements": {
            "get": {
                "operationId": "settlement_agreements.list",
                "summary": "Offset agreements: parties, kind, contract details, term and schedule",
                "tags": [
                    "SettlementAgreements"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "supplier_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only documents of this supplier."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SettlementAgreement"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/settlement-agreements/{settlement_agreement}": {
            "get": {
                "operationId": "settlement_agreements.get",
                "summary": "Offset agreement",
                "tags": [
                    "SettlementAgreements"
                ],
                "parameters": [
                    {
                        "name": "settlement_agreement",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Offset agreement ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SettlementAgreement"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/settlement-offset-lines": {
            "get": {
                "operationId": "settlement_offset_lines.list",
                "summary": "Offset lines: customer debts and supplier bills that were offset",
                "tags": [
                    "SettlementOffsetLines"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "settlement_offset_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only lines of this offset."
                    },
                    {
                        "name": "order_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only lines that settled this order's debt."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SettlementOffsetLine"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/settlement-offset-lines/{settlement_offset_line}": {
            "get": {
                "operationId": "settlement_offset_lines.get",
                "summary": "Offset line",
                "tags": [
                    "SettlementOffsetLines"
                ],
                "parameters": [
                    {
                        "name": "settlement_offset_line",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Offset line ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SettlementOffsetLine"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/settlement-offsets": {
            "get": {
                "operationId": "settlement_offsets.list",
                "summary": "Offsets: mutual debts of a customer and a supplier settled by an offset document",
                "tags": [
                    "SettlementOffsets"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "supplier_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only documents of this supplier."
                    },
                    {
                        "name": "agreement_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only offsets under this agreement."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SettlementOffset"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/settlement-offsets/{settlement_offset}": {
            "get": {
                "operationId": "settlement_offsets.get",
                "summary": "Offset",
                "tags": [
                    "SettlementOffsets"
                ],
                "parameters": [
                    {
                        "name": "settlement_offset",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Offset ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SettlementOffset"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/stock-movements": {
            "get": {
                "operationId": "stock_movements.list",
                "summary": "Stock movement journal: every change to a location's physical stock",
                "tags": [
                    "StockMovements"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "variant_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only movements of this variant."
                    },
                    {
                        "name": "location_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only movements at this location."
                    },
                    {
                        "name": "lot_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only movements of this lot."
                    },
                    {
                        "name": "document_type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "goods_receipt",
                                "stocktake",
                                "stock_write_off",
                                "production_order",
                                "location_transfer",
                                "group_transfer",
                                "supplier_return",
                                "order"
                            ]
                        },
                        "description": "Primary document type, together with document_id: only movements whose primary document it is."
                    },
                    {
                        "name": "document_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Primary document ID, together with document_type."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/StockMovement"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/stock-movements/{stock_movement}": {
            "get": {
                "operationId": "stock_movements.get",
                "summary": "Stock movement",
                "tags": [
                    "StockMovements"
                ],
                "parameters": [
                    {
                        "name": "stock_movement",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Stock movement ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StockMovement"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/stocktake-lines": {
            "get": {
                "operationId": "stocktake_lines.list",
                "summary": "Stock count lines: expected, counted, variance and adjustment, changed since a given moment",
                "tags": [
                    "StocktakeLines"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "stocktake_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only lines of this stock count."
                    },
                    {
                        "name": "variant_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only lines of this variant."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/StocktakeLine"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/stocktake-lines/{stocktake_line}": {
            "get": {
                "operationId": "stocktake_lines.get",
                "summary": "Stock count line",
                "tags": [
                    "StocktakeLines"
                ],
                "parameters": [
                    {
                        "name": "stocktake_line",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Stock count line ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/StocktakeLine"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/stocktakes": {
            "get": {
                "operationId": "stocktakes.list",
                "summary": "Stock counts: coverage, status and dates, changed since a given moment",
                "tags": [
                    "Stocktakes"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "location_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only stock counts of this location."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Stocktake"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/stocktakes/{stocktake}": {
            "get": {
                "operationId": "stocktakes.get",
                "summary": "Stock count",
                "tags": [
                    "Stocktakes"
                ],
                "parameters": [
                    {
                        "name": "stocktake",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Stock count ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Stocktake"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/store": {
            "get": {
                "operationId": "store.get",
                "summary": "Get the store: currency, time zone and languages",
                "tags": [
                    "Store"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Store"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/supplier-bill-payments": {
            "get": {
                "operationId": "supplier_bill_payments.list",
                "summary": "Supplier bill payments: money, offset, credit note, advance, journal expense or paid outside the system",
                "tags": [
                    "SupplierBillPayments"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "supplier_bill_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only payments of this supplier bill."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SupplierBillPayment"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/supplier-bill-payments/{supplier_bill_payment}": {
            "get": {
                "operationId": "supplier_bill_payments.get",
                "summary": "Supplier bill payment",
                "tags": [
                    "SupplierBillPayments"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill_payment",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill payment ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBillPayment"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/supplier-bills/{supplier_bill}/payments/out-of-band": {
            "post": {
                "operationId": "supplier_bills.record_out_of_band_payment",
                "summary": "Mark a supplier bill as paid outside the system",
                "tags": [
                    "SupplierBillPayments"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RecordOutOfBandSupplierBillPaymentRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "procurement:pay"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBillPayment"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "supplier_bill_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/supplier-bills/{supplier_bill}/payments/{supplier_bill_payment}": {
            "delete": {
                "operationId": "supplier_bills.delete_payment",
                "summary": "Cancel a supplier bill payment",
                "tags": [
                    "SupplierBillPayments"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "name": "supplier_bill_payment",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill payment ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:pay"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "supplier_bill_payment_locked",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/supplier-bills": {
            "get": {
                "operationId": "supplier_bills.list",
                "summary": "Supplier bills: invoices, notes and debts for deliveries without an invoice, with tax and lines",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "supplier_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only documents of this supplier."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SupplierBill"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "supplier_bills.create",
                "summary": "Create a draft supplier bill",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateSupplierBillRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBill"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/supplier-bills/{supplier_bill}": {
            "get": {
                "operationId": "supplier_bills.get",
                "summary": "Supplier bill",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBill"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "supplier_bills.update",
                "summary": "Change a draft supplier bill",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateSupplierBillRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBill"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "supplier_bill_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "supplier_bills.delete",
                "summary": "Delete a draft supplier bill",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "supplier_bill_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/supplier-bills/{supplier_bill}/post": {
            "post": {
                "operationId": "supplier_bills.post",
                "summary": "Post a supplier bill: it enters payables and the purchase ledger",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "vendor_tax_id": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The supplier sent the bill without a tax ID on their record: posting writes the CUIT from the invoice into the supplier record. suppliers is how many records change."
                                },
                                "close_returns": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The credit note fully covers supplier returns: posting closes them. supplier_returns is how many returns close."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PostSupplierBillCommandRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBill"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "idempotency_key_in_use",
                    "supplier_bill_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/supplier-bills/{supplier_bill}/void": {
            "post": {
                "operationId": "supplier_bills.void",
                "summary": "Void a supplier bill together with its payments and offsets",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBill"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "supplier_bill_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/supplier-bills/{supplier_bill}/approve": {
            "post": {
                "operationId": "supplier_bills.approve",
                "summary": "Approve a posted supplier bill for payment",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:approve"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBill"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "supplier_bill_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/supplier-bills/{supplier_bill}/revoke-approval": {
            "post": {
                "operationId": "supplier_bills.revoke_approval",
                "summary": "Revoke the payment approval of a supplier bill",
                "tags": [
                    "SupplierBills"
                ],
                "parameters": [
                    {
                        "name": "supplier_bill",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier bill ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:approve"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBill"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "supplier_bill_refused",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/supplier-returns": {
            "get": {
                "operationId": "supplier_returns.list",
                "summary": "Supplier returns: goods shipped back to the supplier and the compensation for them",
                "tags": [
                    "SupplierReturns"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "supplier_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only documents of this supplier."
                    },
                    {
                        "name": "goods_receipt_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only returns from this goods receipt."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SupplierReturn"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/supplier-returns/{supplier_return}": {
            "get": {
                "operationId": "supplier_returns.get",
                "summary": "Supplier return",
                "tags": [
                    "SupplierReturns"
                ],
                "parameters": [
                    {
                        "name": "supplier_return",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier return ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierReturn"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/suppliers": {
            "get": {
                "operationId": "suppliers.list",
                "summary": "Store suppliers: tax details and payment terms",
                "tags": [
                    "Suppliers"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Supplier"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "suppliers.create",
                "summary": "Create a supplier: tax details and payment terms",
                "tags": [
                    "Suppliers"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateSupplierRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Supplier"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "record_limit_reached",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/suppliers/{supplier}": {
            "get": {
                "operationId": "suppliers.get",
                "summary": "Supplier",
                "tags": [
                    "Suppliers"
                ],
                "parameters": [
                    {
                        "name": "supplier",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Supplier"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "suppliers.update",
                "summary": "Update a supplier's tax details, payment terms and external ID",
                "tags": [
                    "Suppliers"
                ],
                "parameters": [
                    {
                        "name": "supplier",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateSupplierRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Supplier"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/suppliers/by-external-id/{external_id}": {
            "get": {
                "operationId": "suppliers.get_by_external_id",
                "summary": "Supplier by its external ID",
                "tags": [
                    "Suppliers"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Supplier"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "suppliers.upsert",
                "summary": "Create or update a supplier by its external ID",
                "tags": [
                    "Suppliers"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatchUpsert"
                    },
                    {
                        "$ref": "#/components/parameters/IfNoneMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Supplier"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Supplier"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "record_limit_reached",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/suppliers/{supplier}/balance": {
            "get": {
                "operationId": "suppliers.get_balance",
                "summary": "Supplier balance: what the store owes right now, by component and due date",
                "tags": [
                    "Suppliers"
                ],
                "parameters": [
                    {
                        "name": "supplier",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier ID."
                    },
                    {
                        "name": "legal_entity_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Only the debt to this store legal entity."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierBalance"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/suppliers/{supplier}/statement": {
            "get": {
                "operationId": "suppliers.get_statement",
                "summary": "Supplier statement for a period: opening and closing balance, lines with a running balance",
                "tags": [
                    "Suppliers"
                ],
                "parameters": [
                    {
                        "name": "supplier",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Supplier ID."
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "First day of the period, YYYY-MM-DD in the store time zone; by default, the day of the first statement line."
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        },
                        "description": "Last day of the period, YYYY-MM-DD in the store time zone; today by default."
                    },
                    {
                        "name": "legal_entity_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Statement for this store legal entity: only its share of lines and balances."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "procurement:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SupplierStatement"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/tax-classes": {
            "get": {
                "operationId": "tax_classes.list",
                "summary": "List the tax classes of the store: the kind and rate of tax a product sells with",
                "tags": [
                    "TaxClasses"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TaxClass"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/tax-periods": {
            "get": {
                "operationId": "tax_periods.list",
                "summary": "List the tax periods of legal entities: which months are closed and final",
                "tags": [
                    "TaxPeriods"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TaxPeriod"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "capability_disabled",
                    "cursor_expired"
                ]
            }
        },
        "/tax-withholdings": {
            "get": {
                "operationId": "tax_withholdings.list",
                "summary": "List withholdings and perceptions changed since a given moment: tax withheld from the store, to credit, and tax the store withheld, to remit",
                "tags": [
                    "TaxWithholdings"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "direction",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "suffered",
                                "practiced"
                            ]
                        },
                        "description": "Only one side of the register: suffered — withheld from the store, practiced — withheld by the store."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TaxWithholding"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/tax-withholdings/{tax_withholding}": {
            "get": {
                "operationId": "tax_withholdings.get",
                "summary": "Get a withholding or perception",
                "tags": [
                    "TaxWithholdings"
                ],
                "parameters": [
                    {
                        "name": "tax_withholding",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Withholding or perception ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaxWithholding"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/tax-withholdings/{tax_withholding}/certificate": {
            "get": {
                "operationId": "tax_withholdings.get_certificate",
                "summary": "Download the PDF withholding certificate the store issues to the counterparty",
                "tags": [
                    "TaxWithholdings"
                ],
                "parameters": [
                    {
                        "name": "tax_withholding",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Withholding or perception ID."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "fiscal:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "tax_withholding_certificate_unavailable"
                ]
            }
        },
        "/uploads/{upload}": {
            "get": {
                "operationId": "uploads.get",
                "summary": "Get a chunked file upload: how much is received",
                "tags": [
                    "Uploads"
                ],
                "parameters": [
                    {
                        "name": "upload",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the upload."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "bulk:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Upload"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/uploads": {
            "post": {
                "operationId": "uploads.create",
                "summary": "Start a chunked file upload — the input of a bulk operation",
                "tags": [
                    "Uploads"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateUploadRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "bulk:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Upload"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/uploads/{upload}/chunks": {
            "post": {
                "operationId": "upload_chunks.create",
                "summary": "Append a file chunk as the raw body",
                "tags": [
                    "Uploads"
                ],
                "parameters": [
                    {
                        "name": "upload",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "ID of the upload."
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "description": "Byte of the file the chunk starts at: equal to received of the upload, otherwise 409 upload_offset_mismatch. The chunk itself is the raw request body."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/octet-stream": {
                            "schema": {
                                "type": "string",
                                "format": "binary"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "bulk:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Upload"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "upload_offset_mismatch",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/variants": {
            "get": {
                "operationId": "variants.list",
                "summary": "List product variants: SKU, barcodes, prices and units",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "name": "product_id",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        },
                        "description": "Only records of this product."
                    },
                    {
                        "name": "sku",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 64
                        },
                        "description": "Only the variant with this SKU."
                    },
                    {
                        "name": "barcode",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 512
                        },
                        "description": "Only variants with this barcode."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Variant"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "variants.create",
                "summary": "Add a variant to a product",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateVariantRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Variant"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/variants/{variant}": {
            "get": {
                "operationId": "variants.get",
                "summary": "Get a product variant",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the variant."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Variant"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "variants.update",
                "summary": "Update a product variant",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the variant."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "measure_change": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The variant changes how it is sold (by the piece or by measure): its stock, prices and limits are converted."
                                },
                                "piece_mode_off": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The packs of the variant are archived when it stops being sold in packs."
                                },
                                "stock_source": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The own stock of the variant moves to its base variant, and it sells from the base from now on."
                                },
                                "program_menu": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The dish leaves the menus of meal subscription programs."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateVariantRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Variant"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "external_id_archived",
                    "external_id_in_use",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "variants.delete",
                "summary": "Archive a product variant",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the variant."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "recipe_ingredient": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The item is an ingredient of live recipes and leaves them."
                                },
                                "production_draft": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Draft production acts with the item are cancelled."
                                },
                                "program_menu": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The dish leaves the menus of meal subscription programs."
                                },
                                "stock_dependents": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "Packs drawing from the stock of this variant become ordinary variants with zero stock."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "last_variant_of_product",
                    "precondition_required"
                ]
            }
        },
        "/variants/by-external-id/{external_id}": {
            "get": {
                "operationId": "variants.get_by_external_id",
                "summary": "Get a product variant by its external ID",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Variant"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "variants.upsert",
                "summary": "Create or update a variant by its external ID",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "External ID: the ID of the record in your system."
                    },
                    {
                        "name": "consent",
                        "in": "query",
                        "description": "Consents to the consequences of the change, by kind: consent[<consent_kind>]=<consent_token> from a 409 consent_required response. Keep the consents already given when the next kind is asked.",
                        "style": "deepObject",
                        "explode": true,
                        "schema": {
                            "type": "object",
                            "properties": {
                                "measure_change": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The variant changes how it is sold (by the piece or by measure): its stock, prices and limits are converted."
                                },
                                "piece_mode_off": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The packs of the variant are archived when it stops being sold in packs."
                                },
                                "stock_source": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The own stock of the variant moves to its base variant, and it sells from the base from now on."
                                },
                                "program_menu": {
                                    "type": "string",
                                    "minLength": 64,
                                    "maxLength": 64,
                                    "description": "The dish leaves the menus of meal subscription programs."
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatchUpsert"
                    },
                    {
                        "$ref": "#/components/parameters/IfNoneMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertVariantRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Variant"
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Variant"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "consent_required",
                    "external_id_archived",
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/variants/{variant}/recipe": {
            "get": {
                "operationId": "variants.get_recipe",
                "summary": "Get the recipe of a variant: components and the yield of a prep",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the variant."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "catalog:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/VariantRecipe"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "put": {
                "operationId": "variants.replace_recipe",
                "summary": "Replace the recipe of a variant: components and the yield of a prep",
                "tags": [
                    "Variants"
                ],
                "parameters": [
                    {
                        "name": "variant",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the variant."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReplaceVariantRecipeRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "catalog:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/VariantRecipe"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/webhook-endpoints/{endpoint}/deliveries": {
            "get": {
                "operationId": "webhook_deliveries.list",
                "summary": "Deliveries of a webhook endpoint: what went out, what awaits a retry, what failed",
                "tags": [
                    "WebhookDeliveries"
                ],
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook endpoint."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "succeeded",
                                "failed"
                            ]
                        },
                        "description": "Only deliveries in this status."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookDelivery"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        },
        "/webhook-deliveries/{delivery}": {
            "get": {
                "operationId": "webhook_deliveries.get",
                "summary": "A webhook delivery with all attempts and receiver responses",
                "tags": [
                    "WebhookDeliveries"
                ],
                "parameters": [
                    {
                        "name": "delivery",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook delivery."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookDelivery"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/webhook-endpoints/{endpoint}/test": {
            "post": {
                "operationId": "webhook_endpoints.test",
                "summary": "Send a ping test event to the endpoint — one attempt signed with the current secret",
                "tags": [
                    "WebhookDeliveries"
                ],
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook endpoint."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:write"
                        ]
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted: the outcome is at the Location URL",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookDelivery"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/webhook-deliveries/{delivery}/retry": {
            "post": {
                "operationId": "webhook_deliveries.retry",
                "summary": "Retry the delivery now — the same body and the same webhook-id",
                "tags": [
                    "WebhookDeliveries"
                ],
                "parameters": [
                    {
                        "name": "delivery",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook delivery."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:write"
                        ]
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted: the outcome is at the Location URL",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookDelivery"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/webhook-endpoints": {
            "get": {
                "operationId": "webhook_endpoints.list",
                "summary": "List the webhook endpoints of the app",
                "tags": [
                    "WebhookEndpoints"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookEndpoint"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            },
            "post": {
                "operationId": "webhook_endpoints.create",
                "summary": "Add a webhook endpoint and subscribe it to event types",
                "tags": [
                    "WebhookEndpoints"
                ],
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateWebhookEndpointRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "webhooks:write"
                        ]
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            },
                            "Location": {
                                "$ref": "#/components/headers/Location"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "webhook_endpoint_limit_reached",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/webhook-endpoints/{endpoint}": {
            "get": {
                "operationId": "webhook_endpoints.get",
                "summary": "Retrieve a webhook endpoint",
                "tags": [
                    "WebhookEndpoints"
                ],
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook endpoint."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            },
            "patch": {
                "operationId": "webhook_endpoints.update",
                "summary": "Update a webhook endpoint: URL, description, event types, status",
                "tags": [
                    "WebhookEndpoints"
                ],
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook endpoint."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiToken": [
                            "webhooks:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            },
            "delete": {
                "operationId": "webhook_endpoints.delete",
                "summary": "Delete a webhook endpoint",
                "tags": [
                    "WebhookEndpoints"
                ],
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook endpoint."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    },
                    {
                        "$ref": "#/components/parameters/IfMatch"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:write"
                        ]
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "412": {
                        "$ref": "#/components/responses/PreconditionFailed"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "428": {
                        "$ref": "#/components/responses/PreconditionRequired"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "in_use_conflict",
                    "precondition_failed",
                    "idempotency_key_reused",
                    "invalid_idempotency_key",
                    "precondition_required"
                ]
            }
        },
        "/webhook-endpoints/{endpoint}/rotate-secret": {
            "post": {
                "operationId": "webhook_endpoints.rotate_secret",
                "summary": "Issue a new signing secret: the previous one keeps signing deliveries alongside it for 24 hours",
                "tags": [
                    "WebhookEndpoints"
                ],
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook endpoint."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            },
                            "Idempotent-Replayed": {
                                "$ref": "#/components/headers/IdempotentReplayed"
                            },
                            "ETag": {
                                "$ref": "#/components/headers/ETag"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "idempotency_key_in_use",
                    "idempotency_key_reused",
                    "invalid_idempotency_key"
                ]
            }
        },
        "/webhook-endpoints/{endpoint}/secret": {
            "get": {
                "operationId": "webhook_endpoints.get_secret",
                "summary": "Retrieve the delivery signing secret of a webhook endpoint",
                "tags": [
                    "WebhookEndpoints"
                ],
                "parameters": [
                    {
                        "name": "endpoint",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "ID of the webhook endpoint."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "webhooks:write"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpointSecret"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": []
            }
        },
        "/write-off-reasons": {
            "get": {
                "operationId": "write_off_reasons.list",
                "summary": "List the store write-off reasons",
                "tags": [
                    "WriteOffReasons"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 250
                        },
                        "description": "Page size: up to 250 records; 50 by default."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": "Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it."
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$"
                        },
                        "description": "Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor."
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync."
                    },
                    {
                        "$ref": "#/components/parameters/AcceptLanguage"
                    }
                ],
                "security": [
                    {
                        "apiToken": [
                            "inventory:read"
                        ]
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "headers": {
                            "RateLimit": {
                                "$ref": "#/components/headers/RateLimit"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimitPolicy"
                            },
                            "X-Request-Id": {
                                "$ref": "#/components/headers/RequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WriteOffReason"
                                            },
                                            "description": "Records of the page."
                                        },
                                        "deleted": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "description": "ID of the erased record."
                                                    },
                                                    "deleted_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "description": "When the record was erased."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "deleted_at"
                                                ]
                                            },
                                            "description": "Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor."
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Cursor of the next page; null on the last page."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "true when there is a next page."
                                        },
                                        "sync_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "deleted",
                                        "next_cursor",
                                        "has_more",
                                        "sync_cursor"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthenticated"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "410": {
                        "$ref": "#/components/responses/CursorExpired"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationFailed"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    },
                    "503": {
                        "$ref": "#/components/responses/ServiceUnavailable"
                    }
                },
                "x-problem-types": [
                    "cursor_expired"
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "AdjustInventoryLevelRequest": {
                "type": "object",
                "properties": {
                    "variant_id": {
                        "type": "integer",
                        "description": "ID of the variant. Together with location_id it identifies the stock level; a pair missing from the list has zero stock."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "ID of the store location."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500,
                        "description": "Comment of the movement; required when the write-off reason requires it."
                    },
                    "lot_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "For restock of a variant tracked by lots — the lot; a new lot gets expires_at. Without it the goods go into a new lot with an automatic number, as on receiving."
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Expiry date of a new lot, in the store time zone."
                    },
                    "reason": {
                        "type": "string",
                        "enum": [
                            "restock",
                            "write_off"
                        ],
                        "description": "restock — goods arrive, delta is positive; write_off — goods are written off for a reason of the store (write_off_reason_id), delta is negative."
                    },
                    "delta": {
                        "type": "string",
                        "pattern": "^-?\\d{1,15}(\\.\\d{1,15})?$",
                        "maxLength": 32,
                        "description": "Change of the on-hand stock, a decimal string in the unit of the variant. Lowering the stock without a write-off reason is not possible: a correction of a wrong count goes through setting the stock."
                    },
                    "write_off_reason_id": {
                        "type": "integer",
                        "description": "For write_off — the reason (/v1/write-off-reasons), which must be selectable."
                    }
                },
                "required": [
                    "variant_id",
                    "location_id",
                    "reason",
                    "delta"
                ]
            },
            "AnnulFiscalDocumentRequest": {
                "type": "object",
                "properties": {
                    "reason": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 500,
                        "description": "Why the invoice is annulled, in your own words, 3 to 500 characters: it goes to the annulling note and the order history."
                    }
                },
                "required": [
                    "reason"
                ]
            },
            "BulkOperation": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "app_id": {
                        "type": "integer",
                        "description": "ID of the app that created the operation."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "inventory.set",
                            "products.upsert",
                            "money_transactions.create",
                            "money_transactions.update",
                            "orders.export",
                            "libro_iva.export",
                            "accountant_package.export"
                        ],
                        "description": "Operation type: inventory.set — set stock levels; products.upsert — create or update products with variants; money_transactions.create — manual income and expenses; money_transactions.update — edit money transactions, for example assign categories; orders.export — export orders; libro_iva.export — the Libro IVA Digital books of a legal entity for a month; accountant_package.export — the accountant package of a legal entity for a month."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "running",
                            "cancelling",
                            "completed",
                            "cancelled",
                            "failed"
                        ],
                        "description": "pending — waiting to start; running — in progress; cancelling — stops after the current line; completed — the whole input was processed or the file was built; cancelled — cancelled; failed — stopped before the end of the input or did not build the file (error)."
                    },
                    "input": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "source": {
                                "type": "string",
                                "enum": [
                                    "upload",
                                    "url"
                                ],
                                "description": "upload — a chunked upload (/v1/uploads); url — a file downloaded from an address."
                            },
                            "url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Address the input is downloaded from; null for an upload."
                            },
                            "file_name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Name of the uploaded file; null for an address."
                            },
                            "bytes": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Size of the input in bytes, unpacked when it came in gzip; null while unknown."
                            },
                            "processed_bytes": {
                                "type": "integer",
                                "description": "How many bytes of the input are done: the share of bytes is the progress."
                            }
                        },
                        "required": [
                            "source",
                            "url",
                            "file_name",
                            "bytes",
                            "processed_bytes"
                        ],
                        "description": "The input of the operation: a chunked upload or an address. null for an export and a file — they have no input."
                    },
                    "params": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": true,
                        "description": "Export or file parameters as accepted on creation: for orders.export, the filters of the GET /v1/orders feed (updated_since, number); for libro_iva.export, legal_entity_id, period and books; for accountant_package.export, legal_entity_id and period. null for an operation with an input."
                    },
                    "lines": {
                        "type": "object",
                        "properties": {
                            "read": {
                                "type": "integer",
                                "description": "Lines read."
                            },
                            "succeeded": {
                                "type": "integer",
                                "description": "Lines done successfully."
                            },
                            "failed": {
                                "type": "integer",
                                "description": "Lines rejected."
                            }
                        },
                        "required": [
                            "read",
                            "succeeded",
                            "failed"
                        ],
                        "description": "Input lines: read (including blank ones), executed successfully and refused. A refused line does not stop the operation; its reason is in the result. For an export, the feed items written to the result: read and succeeded are equal, failed is 0. For a file, zeros: its outcome is status and its content is the archive."
                    },
                    "error": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "enum": [
                                    "invalid_url",
                                    "blocked_address",
                                    "unreachable",
                                    "too_large",
                                    "access_denied",
                                    "not_found",
                                    "rate_limited",
                                    "http_error",
                                    "input_corrupt",
                                    "app_unavailable",
                                    "scope_revoked",
                                    "processing_failed",
                                    "capability_disabled",
                                    "locations_restricted",
                                    "legal_entity_deleted",
                                    "libro_iva_not_applicable",
                                    "libro_iva_incomplete"
                                ],
                                "description": "invalid_url, blocked_address, unreachable, too_large, access_denied, not_found, rate_limited, http_error — the input was not downloaded (source_status for an error response of its server); input_corrupt — the input cannot be read, for example broken gzip; app_unavailable — the app was deleted or lost access; scope_revoked — the app lost a scope the operation needs; capability_disabled — the store no longer has the tax ledger that holds the file data; locations_restricted — the app was limited to locations, and the file covers the whole legal entity; legal_entity_deleted — the legal entity was deleted after the operation was created; libro_iva_not_applicable — the legal entity does not keep Libro IVA Digital; libro_iva_incomplete — documents of the period cannot be written as book records (documents); processing_failed — an internal failure."
                            },
                            "message": {
                                "type": "string",
                                "description": "The reason in words, in the language of the request."
                            },
                            "source_status": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "HTTP status the server of the input responded with, for access_denied, not_found, rate_limited and http_error; otherwise null."
                            },
                            "documents": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "enum": [
                                                "fiscal_document",
                                                "supplier_bill"
                                            ],
                                            "description": "fiscal_document — a fiscal document of the sales book; supplier_bill — a supplier bill of the purchase or import book."
                                        },
                                        "id": {
                                            "type": "integer",
                                            "description": "ID of the record, unique among records of its kind in the store."
                                        },
                                        "reason": {
                                            "type": "string",
                                            "enum": [
                                                "missing_request",
                                                "missing_number",
                                                "unknown_document_type",
                                                "other_ledger_file",
                                                "broker_fields_required",
                                                "currency_code_unconfirmed",
                                                "unsupported_currency",
                                                "missing_exchange_rate",
                                                "invalid_vendor_tax_id",
                                                "unknown_tax_rate",
                                                "missing_despacho",
                                                "unknown_rate",
                                                "missing_import_document_kind",
                                                "missing_import_document_description",
                                                "unsupported_service_rate",
                                                "missing_import_tax_payment"
                                            ],
                                            "description": "Why the document cannot be written: missing_request, missing_number — the fiscal document has no ARCA request or number; unknown_document_type, other_ledger_file, broker_fields_required — the bill type is not for this book or broker details are needed; currency_code_unconfirmed, unsupported_currency, missing_exchange_rate — the currency has no ARCA code or no rate; invalid_vendor_tax_id — invalid seller CUIT; unknown_tax_rate — the rate cannot be split into alícuotas; missing_despacho, unknown_rate — a goods import has no clearance number or rate; missing_import_document_kind, missing_import_document_description, unsupported_service_rate, missing_import_tax_payment — a services import lacks the provider document, the rate or the tax payment."
                                        }
                                    },
                                    "required": [
                                        "type",
                                        "id",
                                        "reason"
                                    ]
                                },
                                "description": "For libro_iva_incomplete, the documents of the period that cannot be written as book records; fix them in the store and create the operation again. Otherwise null."
                            }
                        },
                        "required": [
                            "code",
                            "message",
                            "source_status",
                            "documents"
                        ],
                        "description": "For failed, why the operation did not reach the end of the input or did not build the file. For a running one, the last input download failure that is still being retried. Otherwise null."
                    },
                    "result_url": {
                        "type": "string",
                        "description": "The result address: NDJSON, one line per input line in order, with the outcomes of the lines processed so far; for an export, one feed item per line; for a file, the ZIP of the completed operation. Can be resumed with ranges."
                    },
                    "result_scopes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Scopes the result needs: reading the data of the kind and the field scopes the operation was created with, such as customers:read for an export of orders with customer data. The set is fixed at creation; a scope taken away stops the operation (scope_revoked)."
                    },
                    "sync_cursor": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "For a completed export — the sync cursor of the feed it was built from (GET /v1/orders with the same params): the feed returns from it what changed after the export. null otherwise."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "started_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the operation started; null while pending."
                    },
                    "finished_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the operation finished; null until then."
                    }
                },
                "required": [
                    "id",
                    "app_id",
                    "type",
                    "status",
                    "input",
                    "params",
                    "lines",
                    "error",
                    "result_url",
                    "result_scopes",
                    "sync_cursor",
                    "created_at",
                    "updated_at",
                    "started_at",
                    "finished_at"
                ]
            },
            "CalculateRefundRequest": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "order_item_id": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "description": "ID of the item of the order (items in /v1/orders)."
                                },
                                "quantity": {
                                    "type": "string",
                                    "maxLength": 32,
                                    "description": "Quantity, a decimal string in unit: pieces, or the whole measure of an item sold by weight or volume."
                                }
                            },
                            "required": [
                                "order_item_id",
                                "quantity"
                            ]
                        },
                        "maxItems": 200,
                        "uniqueItems": true,
                        "description": "Returned items."
                    },
                    "shipping_amount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000000000,
                        "description": "Part of amount that refunds the delivery."
                    },
                    "irreversible_to": {
                        "type": "string",
                        "enum": [
                            "manual",
                            "balance"
                        ],
                        "description": "Where the share of an irreversible method (a transfer, crypto, a manual method) goes: manual — the store pays it back by hand and confirms it (POST /v1/refunds/{refund}/confirm); balance — to the balance of the customer (balance_available of the calculation)."
                    }
                },
                "required": [
                    "items"
                ]
            },
            "CancelOrderRequest": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "maxLength": 50,
                        "description": "Status of the order: a code from the status list of the store (/v1/order-statuses). A store can add its own statuses; status_group gives the lasting meaning."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500,
                        "description": "Reason of the cancellation in words, kept in the history of the order."
                    }
                }
            },
            "Category": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the parent category; null for a top-level category. Categories come as a flat list, the tree is built by this field."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "description": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Description by language in Markdown (GitHub Flavored): an object of the filled languages."
                    },
                    "slug": {
                        "type": "string",
                        "description": "Address of the category on the storefront, unique in the store."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Position among the sibling categories: lower comes first."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false hides the category from the storefront."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the category was archived; null for a live category."
                    }
                },
                "required": [
                    "id",
                    "external_id",
                    "version",
                    "parent_id",
                    "name",
                    "description",
                    "slug",
                    "position",
                    "is_active",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ]
            },
            "ChangeCustomerGroupMembersRequest": {
                "type": "object",
                "properties": {
                    "customer_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1,
                        "maxItems": 1000,
                        "uniqueItems": true,
                        "description": "IDs of store customers, without repeats, up to 1000 per request. Customers already in the group (when adding) or not in it (when removing) are skipped."
                    }
                },
                "required": [
                    "customer_ids"
                ]
            },
            "CompleteDraftOrderRequest": {
                "type": "object",
                "properties": {
                    "mode": {
                        "type": "string",
                        "enum": [
                            "invoice",
                            "after_picking",
                            "mark_paid"
                        ],
                        "description": "invoice — the order waits for payment, the payment details go to the customer through the channels of the store, the payment page is in payment_url of the payment; after_picking — the customer is invoiced the exact total after picking, for goods sold by weight; mark_paid — the money was already received by a manual method, needs the payments:write scope."
                    },
                    "expected_total": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000000000,
                        "description": "The total you read on the draft: prices, discounts or delivery may change after reading. If it differs, the request gets 422 and no order is created."
                    },
                    "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3,
                        "description": "The currency in which you read the total: the currency field of the draft. A store without orders may change its currency, and the change keeps price numbers as they are; if the currency differs, the request gets 422 and no order is created. Without the field the currency is not checked."
                    }
                },
                "required": [
                    "mode",
                    "expected_total"
                ]
            },
            "ConfirmPaymentRequest": {
                "type": "object",
                "properties": {
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500,
                        "description": "Comment to the confirmation, kept in the history of the order."
                    }
                }
            },
            "ConflictProblem": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Machine type of the problem: a stable code to branch on, such as insufficient_scope. Every type has a page in the error catalog."
                    },
                    "title": {
                        "type": "string",
                        "description": "Short summary of the problem in the language of the request."
                    },
                    "status": {
                        "type": "integer",
                        "description": "HTTP status of the response."
                    },
                    "detail": {
                        "type": "string",
                        "description": "Explanation of this occurrence in the language of the request."
                    },
                    "current": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "The record as it is now, the fields the conflict is about: on_hand for stock_on_hand_changed, status for rejected order changes, status and order_id for a closed draft."
                    },
                    "external_id": {
                        "type": "string",
                        "description": "For external_id_in_use and external_id_archived — the taken external ID."
                    },
                    "consent_kind": {
                        "type": "string",
                        "description": "For consent_required — the kind of consequence to agree to."
                    },
                    "consequences": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "description": "For consent_required — what will change: kind of data → number of records."
                    },
                    "consent_token": {
                        "type": "string",
                        "description": "For consent_required — fingerprint of the shown consequences. Repeat the request with consent[<consent_kind>]=<consent_token>."
                    },
                    "variant_id": {
                        "type": "integer",
                        "description": "For consent_required of a variant line in a product write — the variant: the consent is given by changing that variant (PATCH /v1/variants/{variant})."
                    },
                    "limit": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "For plan_limit_reached, address_book_full, bulk_operation_queue_full and webhook_endpoint_limit_reached — the limit."
                    },
                    "field": {
                        "type": "string",
                        "enum": [
                            "phone",
                            "email"
                        ],
                        "description": "For customer_contact_in_use — the contact that belongs to another customer: phone or email."
                    },
                    "existing_customer_id": {
                        "type": "integer",
                        "description": "For customer_contact_in_use — the customer the contact belongs to."
                    },
                    "received": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "For upload_offset_mismatch — bytes the upload has received: the offset to continue from."
                    },
                    "operation_status": {
                        "type": "string",
                        "description": "For bulk_operation_finished — the status the operation finished with."
                    }
                },
                "required": [
                    "type",
                    "title",
                    "status"
                ]
            },
            "ConsignmentLossPolicy": {
                "type": "string",
                "enum": [
                    "return_to_supplier",
                    "our_cost"
                ]
            },
            "ConsignmentSettlement": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "number": {
                        "type": "string",
                        "description": "Settlement number."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "posted",
                            "void"
                        ],
                        "description": "draft — the period is collected for review, the sales are not yet frozen and the period can change; posted — agreed with the supplier: the sales of the period are frozen into it and a bill can be issued against it; void — voided: its sales are released and go into the next settlement."
                    },
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Store legal entity the supplier invoices (/v1/legal-entities); null on older settlements: the default legal entity."
                    },
                    "supplier_bill_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Bill issued against the settlement (/v1/supplier-bills); null — not billed yet or the bill was voided and the settlement can be billed again. A voided bill keeps the link in its consignment_settlement_id."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Settlement currency, ISO 4217 — the currency of the supply prices: line prices, amounts and subtotal are in it."
                    },
                    "period_from": {
                        "type": "string",
                        "description": "First day of the period, YYYY-MM-DD."
                    },
                    "period_to": {
                        "type": "string",
                        "description": "Last day of the period, YYYY-MM-DD."
                    },
                    "subtotal": {
                        "type": "integer",
                        "description": "Settlement total in its currency — the sum of the lines, what the supplier invoices."
                    },
                    "base_subtotal": {
                        "type": "integer",
                        "description": "The same total in the store currency."
                    },
                    "sections": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "sale",
                                        "loss",
                                        "price_adjustment"
                                    ],
                                    "description": "sale — goods sold; loss — expired or missing goods the store pays for under the supplier policy; price_adjustment — extra charge for a price fixed by a goods receipt correction after the goods were charged."
                                },
                                "subtotal": {
                                    "type": "integer",
                                    "description": "Section subtotal in the settlement currency."
                                }
                            },
                            "required": [
                                "kind",
                                "subtotal"
                            ]
                        },
                        "description": "Subtotals by section in document order; empty sections are left out."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "position": {
                                    "type": "integer",
                                    "description": "Line number in the document."
                                },
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "sale",
                                        "loss",
                                        "price_adjustment"
                                    ],
                                    "description": "Section of the line, with the codes of sections[].kind."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Product variant ID (/v1/variants)."
                                },
                                "lot_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Lot of the line (/v1/lots); null for a product without lots."
                                },
                                "goods_receipt_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Goods receipt the goods came with (/v1/goods-receipts)."
                                },
                                "name": {
                                    "type": "string",
                                    "description": "Item name as in the document: captured when the settlement was built and not changed by later renames."
                                },
                                "sku": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Variant SKU captured with the name; null if there is none."
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Base unit of the line quantity: pcs — pieces, g — grams, ml — milliliters."
                                },
                                "quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity sold, written off or repriced, a decimal string in the base unit; a sale cancelled within the period is subtracted."
                                },
                                "unit_cost": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Supply price in the settlement currency per cost_per_quantity; on a price_adjustment line — the new price. null — the goods receipt has no price, and the line is charged at zero."
                                },
                                "cost_per_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity in the base unit the price is for: \"1000\" on a weighed product means per kilogram."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Line amount in the settlement currency; on a price_adjustment line — the difference to what was already charged. Lines add up to subtotal."
                                },
                                "base_amount": {
                                    "type": "integer",
                                    "description": "Line amount in the store currency."
                                }
                            },
                            "required": [
                                "id",
                                "position",
                                "kind",
                                "variant_id",
                                "lot_id",
                                "goods_receipt_id",
                                "name",
                                "sku",
                                "unit",
                                "quantity",
                                "unit_cost",
                                "cost_per_quantity",
                                "amount",
                                "base_amount"
                            ]
                        },
                        "description": "Settlement lines in document order: variant × goods receipt × price."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "posted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the settlement was posted; null on a draft."
                    },
                    "voided_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the settlement was voided; null on an active settlement."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "number",
                    "status",
                    "supplier_id",
                    "legal_entity_id",
                    "supplier_bill_id",
                    "currency",
                    "period_from",
                    "period_to",
                    "subtotal",
                    "base_subtotal",
                    "sections",
                    "lines",
                    "note",
                    "posted_at",
                    "voided_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "CreateBulkOperationRequest": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "inventory.set",
                            "products.upsert",
                            "money_transactions.create",
                            "money_transactions.update",
                            "orders.export",
                            "libro_iva.export",
                            "accountant_package.export"
                        ],
                        "description": "Operation type: inventory.set — set stock levels; products.upsert — create or update products with variants; money_transactions.create — manual income and expenses; money_transactions.update — edit money transactions, for example assign categories; orders.export — export orders; libro_iva.export — the Libro IVA Digital books of a legal entity for a month; accountant_package.export — the accountant package of a legal entity for a month."
                    },
                    "input": {
                        "type": "object",
                        "properties": {
                            "upload_id": {
                                "type": "integer",
                                "minimum": 1,
                                "description": "ID of a complete chunked upload (/v1/uploads)."
                            },
                            "url": {
                                "type": "string",
                                "maxLength": 2048,
                                "description": "Address the input is downloaded from; null for an upload."
                            }
                        },
                        "description": "The input of the operation: a chunked upload or an address. null for an export and a file — they have no input."
                    },
                    "params": {
                        "type": "object",
                        "properties": {
                            "updated_since": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?(Z|[+-]\\d{2}:\\d{2})$",
                                "description": "For orders.export — orders changed after this moment."
                            },
                            "include_deleted": {
                                "type": "boolean",
                                "description": "For orders.export — also deleted orders."
                            },
                            "number": {
                                "type": "string",
                                "maxLength": 16,
                                "description": "For orders.export — only the order with this number."
                            },
                            "legal_entity_id": {
                                "type": "integer",
                                "description": "For libro_iva.export and accountant_package.export — the legal entity whose file is built."
                            },
                            "period": {
                                "type": "string",
                                "description": "For libro_iva.export and accountant_package.export — the month as YYYY-MM, not later than the current month of the store."
                            },
                            "books": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "enum": [
                                        "ventas",
                                        "compras"
                                    ]
                                },
                                "minItems": 1,
                                "maxItems": 2,
                                "uniqueItems": true,
                                "description": "For libro_iva.export — the books: ventas (sales) and compras (purchases with the import files), one or both."
                            }
                        },
                        "description": "Export or file parameters as accepted on creation: for orders.export, the filters of the GET /v1/orders feed (updated_since, number); for libro_iva.export, legal_entity_id, period and books; for accountant_package.export, legal_entity_id and period. null for an operation with an input."
                    }
                },
                "required": [
                    "type"
                ]
            },
            "CreateCategoryRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50000
                        },
                        "description": "Description by language in Markdown (GitHub Flavored): an object of the filled languages."
                    },
                    "slug": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Address of the category on the storefront, unique in the store."
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the parent category; null for a top-level category. Categories come as a flat list, the tree is built by this field."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Position among the sibling categories: lower comes first."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false hides the category from the storefront."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    }
                },
                "required": [
                    "name"
                ]
            },
            "CreateCustomerAddressRequest": {
                "type": "object",
                "properties": {
                    "label": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "Name of the address, such as Home or Work; null when not given."
                    },
                    "street": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Street."
                    },
                    "house": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "House number."
                    },
                    "apartment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Apartment or office."
                    },
                    "floor": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16,
                        "description": "Floor."
                    },
                    "entrance": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16,
                        "description": "Entrance."
                    },
                    "district": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "District or neighborhood."
                    },
                    "postal_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16,
                        "description": "Postal code."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500,
                        "description": "Comment for the courier, such as how to get in; null when not given."
                    },
                    "location": {
                        "type": "object",
                        "properties": {
                            "lat": {
                                "type": "number",
                                "minimum": -90,
                                "maximum": 90,
                                "description": "Latitude in degrees."
                            },
                            "lng": {
                                "type": "number",
                                "minimum": -180,
                                "maximum": 180,
                                "description": "Longitude in degrees."
                            }
                        },
                        "required": [
                            "lat",
                            "lng"
                        ],
                        "description": "Point of the address on the map; null when the address came from another system and has not been located yet."
                    },
                    "is_default": {
                        "type": "boolean",
                        "description": "The main address of the customer. When the main address is deleted, the newest address becomes the main one."
                    }
                },
                "required": [
                    "street",
                    "location"
                ]
            },
            "CreateCustomerGroupRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Group name, up to 120 characters; unique in the store, case-insensitive."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500,
                        "description": "Description for staff, up to 500 characters; null or no field means no description."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "Whether the group is active; true by default."
                    }
                },
                "required": [
                    "name"
                ]
            },
            "CreateCustomerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "pattern": "\\S",
                        "maxLength": 120,
                        "description": "Name of the customer; null when unknown."
                    },
                    "language": {
                        "$ref": "#/components/schemas/Locale",
                        "description": "Language the store writes to the customer in: ru, en or es."
                    },
                    "phone": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Main phone of the customer in E.164 format, such as +5491123456789; null when unknown."
                    },
                    "email": {
                        "type": "string",
                        "maxLength": 254,
                        "description": "Email of the customer; null when unknown."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID of the customer, its ID in your system; null when not set. After two customers are merged, the ID of the merged one also finds the surviving customer; the response shows the main ID."
                    }
                },
                "required": [
                    "name"
                ]
            },
            "CreateDraftOrderRequest": {
                "type": "object",
                "properties": {
                    "customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The customer of the draft (/v1/customers); null until chosen."
                    },
                    "delivery_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Delivery method (/v1/delivery-methods); null until chosen."
                    },
                    "address_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Address from the address book of the customer, for a method with delivery; null when not chosen."
                    },
                    "pickup_location_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Pickup point for a pickup method. A method with one pickup point uses it by itself; with several the draft must name one."
                    },
                    "delivery_slots": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "from": {
                                    "type": "string",
                                    "description": "Start of the window."
                                },
                                "to": {
                                    "type": "string",
                                    "description": "End of the window."
                                }
                            },
                            "required": [
                                "from",
                                "to"
                            ]
                        },
                        "maxItems": 50,
                        "description": "Delivery windows chosen for a method that works with windows."
                    },
                    "delivery_cost_override": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Delivery price set by hand instead of the calculation of the method; null — by the rules of the method."
                    },
                    "payment_method": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "cash",
                            "mercadopago",
                            "crypto",
                            "bybit",
                            "trc20",
                            "balance",
                            "modo",
                            "payway",
                            "mercadopago_qr",
                            "mercadopago_point",
                            "mercadopago_transfer",
                            "gift_card",
                            "subscription",
                            "deposit",
                            "external",
                            "manual",
                            "offset",
                            "on_account",
                            "exchange_credit",
                            "bonpunto",
                            "service_package",
                            null
                        ],
                        "description": "Payment method the draft will be placed with: discounts for the method and compatibility with the delivery depend on it."
                    },
                    "manual_payment_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "description": "Manual payment method of the store when payment_method is manual; otherwise null."
                    },
                    "promocode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "Promo code applied to the draft; null when none."
                    },
                    "customer_comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "Comment of the customer to the order. Only with the customers:read scope."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "Internal note of the store: it goes to the order, the customer does not see it."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the line in the draft."
                                },
                                "variant_id": {
                                    "type": "integer",
                                    "description": "Variant of the line; null for a custom line."
                                },
                                "quantity": {
                                    "type": "string",
                                    "maxLength": 32,
                                    "description": "Quantity, a decimal string in unit: pieces for an item sold by the piece, the measure for an item sold by weight or volume (\"480\" grams)."
                                },
                                "modifiers": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "option_id": {
                                                "type": "integer",
                                                "description": "ID of the modifier option."
                                            },
                                            "quantity": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 99,
                                                "description": "How many times the modifier is added."
                                            }
                                        },
                                        "required": [
                                            "option_id"
                                        ]
                                    },
                                    "maxItems": 50,
                                    "description": "Modifiers of the line, such as extra toppings of a dish."
                                }
                            },
                            "required": [
                                "variant_id",
                                "quantity"
                            ]
                        },
                        "maxItems": 200,
                        "uniqueItems": true,
                        "description": "Items of the draft. An open draft is priced live by the catalog, discounts and delivery; a closed draft keeps its items without prices."
                    }
                }
            },
            "CreateModifierGroupRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "min_select": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 99,
                        "description": "How many options the customer must choose: 0 — the group is optional. A product can set its own rule (selection_rule)."
                    },
                    "max_select": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 99,
                        "description": "How many options can be chosen in total, repeats included; null — no limit."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — the group is turned off and not offered on products."
                    },
                    "adds_ingredients": {
                        "type": "boolean",
                        "description": "Whether the group options change the dish composition; with true, an option without its own composition makes the item composition unknown (allergens)."
                    },
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "external_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                                },
                                "name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                                },
                                "price_delta": {
                                    "type": "integer",
                                    "minimum": -100000000,
                                    "maximum": 100000000,
                                    "description": "Surcharge on the item price per portion of the option, an integer in minor units of the store currency; negative — a discount. A product can set its own surcharge by variant."
                                },
                                "max_quantity": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 99,
                                    "description": "How many times the option can be taken in one item; null — no own limit, only the group max_select applies."
                                },
                                "duration_minutes": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 5,
                                    "maximum": 120,
                                    "description": "How many minutes the option adds to a bookable service, a multiple of 5; null — none. Has no effect on other kinds of items."
                                },
                                "is_active": {
                                    "type": "boolean",
                                    "description": "false — the option is turned off and not offered."
                                },
                                "is_default": {
                                    "type": "boolean",
                                    "description": "The option is preselected: the storefront and the POS check it at once, and the server fills a required group left empty with it."
                                },
                                "adds_ingredients": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ],
                                    "description": "Whether this option changes the composition; null — as the group (adds_ingredients)."
                                },
                                "recipe_per_variant": {
                                    "type": "boolean",
                                    "description": "Consumption depends on the dish: no general composition, the amount is set by the recipe of each variant (option_recipes); without it the option is not offered on that variant."
                                },
                                "nutrition": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "kcal": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 1000000,
                                            "description": "Energy, kcal."
                                        },
                                        "protein_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Protein, mg."
                                        },
                                        "fat_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Fat, mg."
                                        },
                                        "carbs_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Carbohydrates, mg."
                                        }
                                    },
                                    "description": "Nutrition of one use of the option declared by the store: all four numbers or null — then the option composition computes it."
                                },
                                "recipe": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "variant_id": {
                                                "type": "integer",
                                                "description": "ID of the product variant."
                                            },
                                            "quantity": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 32,
                                                "description": "Component amount for one use of the option, a decimal string in the unit of the component; null — to taste: in the composition but not consumed."
                                            }
                                        },
                                        "required": [
                                            "variant_id",
                                            "quantity"
                                        ]
                                    },
                                    "maxItems": 100,
                                    "description": "General composition of the option — what it consumes in any dish: ingredients and preps with their amount. Empty for a per-dish option. On write, the whole list, an empty one clears it; without the field the composition is left as it is."
                                }
                            }
                        },
                        "minItems": 1,
                        "maxItems": 100,
                        "uniqueItems": true,
                        "description": "Options in display order. On write, the whole set: a row finds its option by id or external_id, the found one gets the fields sent, a row without an option is new and carries name; an option missing from the set is archived and removed from open draft orders."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    }
                },
                "required": [
                    "name",
                    "options"
                ]
            },
            "CreateMoneyTransactionRequest": {
                "type": "object",
                "properties": {
                    "account_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "ID of the money account of the movement."
                    },
                    "direction": {
                        "$ref": "#/components/schemas/MoneyTransactionDirection",
                        "description": "income — money into the account; expense — money out of the account."
                    },
                    "account_amount": {
                        "type": "string",
                        "maxLength": 37,
                        "description": "Amount in the account currency, as a decimal string."
                    },
                    "amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 100000000000000,
                        "description": "Posting amount in the minor units of the store currency, always positive: direction gives the sign. For a foreign-currency account it is converted at the snapshot rate."
                    },
                    "occurred_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Accounting date, YYYY-MM-DD in the store time zone."
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Moment of the movement."
                    },
                    "category_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Category ID; null for a transfer between accounts or a movement without a category."
                    },
                    "supplier_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the supplier counterparty; null if there is none."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "Movement comment as a person or a document wrote it; null if there is none."
                    }
                },
                "required": [
                    "account_id",
                    "direction",
                    "account_amount"
                ]
            },
            "CreateMoneyTransferRequest": {
                "type": "object",
                "properties": {
                    "from_account_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "ID of the money account the money left."
                    },
                    "to_account_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "ID of the money account the money arrived at."
                    },
                    "from_amount": {
                        "type": "string",
                        "maxLength": 37,
                        "description": "Amount taken from from_account_id in its currency, as a decimal string."
                    },
                    "to_amount": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 37,
                        "description": "Amount credited to to_account_id in its currency, as a decimal string. In the same currency it equals from_amount: any difference is the fee."
                    },
                    "fee": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 37,
                        "description": "Transfer fee in the currency of the source account, as a decimal string — an expense on the system category bank_fees; null when there is no fee."
                    },
                    "occurred_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Accounting date of the transfer, YYYY-MM-DD in the store time zone."
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Moment of the transfer."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "Description of the transfer; null when not set."
                    }
                },
                "required": [
                    "from_account_id",
                    "to_account_id",
                    "from_amount"
                ]
            },
            "CreatePriceListRequest": {
                "type": "object",
                "properties": {
                    "kind": {
                        "type": "string",
                        "enum": [
                            "wholesale"
                        ],
                        "description": "List kind: only wholesale. A location list is created by its location in the dashboard."
                    },
                    "name": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Name of the wholesale list, up to 120 characters: the dashboard shows it on the customer profile."
                    },
                    "adjustment_bp": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 50000,
                        "description": "Markup over cost in basis points (1% = 100), from 0 to 50000: 0 — at cost; a wholesale list never sells below cost."
                    },
                    "rounding": {
                        "type": "object",
                        "properties": {
                            "mode": {
                                "$ref": "#/components/schemas/DiscountRoundingMode",
                                "description": "How to round: nearest, up or down."
                            },
                            "precision": {
                                "type": "integer",
                                "enum": [
                                    "1",
                                    "0",
                                    "-1",
                                    "-2",
                                    "-3",
                                    "-4",
                                    "-5",
                                    "-6",
                                    "2"
                                ],
                                "description": "Rounding step in minor units of the store currency; the step of the minor unit itself means no rounding."
                            }
                        },
                        "description": "Rounding of the unit price — mode and precision together. Omitted — the list takes the store price rounding."
                    }
                },
                "required": [
                    "kind",
                    "name",
                    "adjustment_bp"
                ]
            },
            "CreateProductMediaRequest": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "maxLength": 2048,
                        "description": "Public address of the file."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000,
                        "description": "Place in the gallery, starting from zero."
                    },
                    "is_primary": {
                        "type": "boolean",
                        "description": "The main photo: the storefront shows it first."
                    }
                },
                "required": [
                    "url"
                ]
            },
            "CreateProductRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "short_description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        },
                        "description": "Short description by language, plain text for product lists."
                    },
                    "description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50000
                        },
                        "description": "Description by language in Markdown (GitHub Flavored): an object of the filled languages."
                    },
                    "slug": {
                        "type": "string",
                        "maxLength": 160,
                        "description": "Address of the product on the storefront, unique in the store."
                    },
                    "brand_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the brand of the product; null when not set."
                    },
                    "tax_class_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the tax class of the product (/v1/tax-classes); null — the default class of the store. A sale keeps the rate of its item: a change of class affects future sales only."
                    },
                    "category_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "IDs of the categories the product is in, ascending."
                    },
                    "primary_category_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The main category among category_ids; null when the product has no main category."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false takes the product off sale and hides it from the storefront."
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product appears on the storefront; null — right away."
                    },
                    "unpublished_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product leaves the storefront; null — it stays."
                    },
                    "sale_schedule": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "days": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 7
                                    },
                                    "minItems": 1,
                                    "maxItems": 7,
                                    "description": "Window days, ISO: 1 is Monday, 7 is Sunday."
                                },
                                "from": {
                                    "type": "string",
                                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$",
                                    "description": "Window start, “HH:MM” on the store clock."
                                },
                                "to": {
                                    "type": "string",
                                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$",
                                    "description": "Window end, “HH:MM”, exclusive; “24:00” means until the end of the day. An end earlier than the start makes the window run past midnight; it belongs to its start day."
                                }
                            },
                            "required": [
                                "days",
                                "from",
                                "to"
                            ]
                        },
                        "maxItems": 14,
                        "description": "When the item can be ordered — week windows in the store time zone; null means always. Outside a window the product stays visible and can go to the cart, and checkout checks the schedule against the order fulfilment time."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "goods",
                            "dish",
                            "ingredient",
                            "prep"
                        ],
                        "description": "Kind of product: goods — goods for sale; dish — a dish cooked to order; ingredient — raw material for recipes; prep — a semi-finished item made in-house; manufactured — made by the own production of the store; meal_program — a meal subscription; bundle — a set of other products; gift_card — a gift card; service — a service booked in advance."
                    },
                    "stock_unit": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "unit": {
                                "type": "string",
                                "enum": [
                                    "g",
                                    "ml",
                                    "pcs"
                                ],
                                "description": "Base unit: g — grams, ml — milliliters, pcs — pieces. Quantities of the variants of the product are decimal strings in this unit."
                            },
                            "purchase_unit": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 16,
                                "description": "Name of the purchase package, such as kg or box; null — the item is bought in its base unit."
                            },
                            "purchase_quantity": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 32,
                                "description": "How many base units are in one purchase package, a decimal string, such as 1000 for a kilogram of an item kept in grams."
                            }
                        },
                        "description": "Stock unit of an item with stock by measure (ingredient, prep, manufactured): stock, recipes and yield are kept in it. null for goods and dishes — their unit is the selling axis of the variant."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "variants": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "external_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "External ID of the variant, its ID in your system: the key the row is matched by."
                                },
                                "sku": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 64,
                                    "description": "Stock keeping unit (SKU); null when not set."
                                },
                                "name": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "description": "Name of the variant by language, such as {\"es\": \"Grande\"}."
                                },
                                "price": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Price for price_per_quantity units, an integer in minor units of currency."
                                },
                                "track_inventory": {
                                    "type": "boolean",
                                    "description": "The store counts the stock of the variant; false — it is sold without counting stock."
                                },
                                "is_active": {
                                    "type": "boolean",
                                    "description": "false takes the variant off sale."
                                },
                                "position": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Position among the variants of the product: lower comes first."
                                },
                                "list_price": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Price as the owner set it, in minor units of list_price_currency; null — the price is set in store money (price). For such a variant price is derived from the price list rate and is not accepted as input."
                                },
                                "list_price_currency": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "ARS",
                                        "USD",
                                        "BRL",
                                        "CLP",
                                        "COP",
                                        "MXN",
                                        "PEN",
                                        "RUB",
                                        null
                                    ],
                                    "description": "Currency of the set price (store price list in a foreign currency); null — the price is in the store currency currency. As input: the store price list currency or currency."
                                },
                                "compare_at_price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "maximum": 10000000000,
                                    "description": "Price before the discount, shown crossed out; null when there is no discount."
                                },
                                "weight_grams": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Shipping weight in grams; null when not set."
                                },
                                "length_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Length of the package in millimeters; null when not set."
                                },
                                "width_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Width of the package in millimeters; null when not set."
                                },
                                "height_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Height of the package in millimeters; null when not set."
                                },
                                "sale_starts_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the sale starts: compare_at_price is shown from this moment; null — no start limit."
                                },
                                "sale_ends_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the sale ends; null — no end limit."
                                },
                                "sold_by": {
                                    "type": "string",
                                    "enum": [
                                        "each",
                                        "weight",
                                        "volume"
                                    ],
                                    "description": "How the variant is sold: each — by the piece; weight — by weight; volume — by volume."
                                },
                                "price_per_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "How many units the price is for, a decimal string: one piece, or 1000 for a price per kilogram of a variant sold by weight. null when a variant sold by weight or volume has none set."
                                },
                                "measure_step": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Step of the quantity in a line of a variant sold by weight or volume, in its unit; null when not set."
                                },
                                "min_measure_qty": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Smallest quantity in a line of a variant sold by weight or volume; null when not set."
                                },
                                "max_measure_qty": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Largest quantity in a line of a variant sold by weight or volume; null when not set."
                                },
                                "net_content": {
                                    "type": "object",
                                    "properties": {
                                        "quantity": {
                                            "type": "string",
                                            "maxLength": 32,
                                            "description": "Measure as a decimal string in unit: \"500\", \"0.5\"."
                                        },
                                        "unit": {
                                            "type": "string",
                                            "enum": [
                                                "g",
                                                "ml"
                                            ],
                                            "description": "Unit of the measure: g — grams; ml — millilitres."
                                        }
                                    },
                                    "description": "Net content of one piece: a 500 g pack, a 1000 ml bottle. A pack of several units of another variant takes it from that variant, a prepacked piece from its own measure; it can be written only for a plain variant sold by piece. null for variants sold by weight or volume and for pieces without a net content."
                                },
                                "barcodes": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "enum": [
                                                    "ean13",
                                                    "ean8",
                                                    "upca",
                                                    "upce",
                                                    "code128",
                                                    "code39",
                                                    "gtin",
                                                    "itf",
                                                    "qr",
                                                    "datamatrix",
                                                    "other"
                                                ],
                                                "description": "Symbology: ean13, ean8, upca, upce, code128, code39, gtin, itf, qr, datamatrix or other."
                                            },
                                            "value": {
                                                "type": "string",
                                                "description": "The barcode."
                                            },
                                            "is_primary": {
                                                "type": [
                                                    "boolean",
                                                    "null"
                                                ],
                                                "description": "The main barcode of the variant: labels and receipts show it."
                                            }
                                        },
                                        "required": [
                                            "type",
                                            "value"
                                        ]
                                    },
                                    "maxItems": 20,
                                    "description": "Barcodes of the variant."
                                }
                            },
                            "required": [
                                "price"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 200,
                        "description": "Variant rows written together with the card. A row is found by its external_id: a variant of the product with this ID is changed by the sent fields, without one a variant is created; variants not mentioned stay as they are. Creating a product needs at least one row with a price."
                    }
                },
                "required": [
                    "name",
                    "variants"
                ]
            },
            "CreatePurchaseOrderRequest": {
                "type": "object",
                "properties": {
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "Location the delivery is expected at (/v1/locations)."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Buying legal entity of the store (/v1/legal-entities); null on an order created before the store had legal entities."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Order currency, ISO 4217: line prices and totals are in it."
                    },
                    "prices_include_tax": {
                        "type": "boolean",
                        "description": "true — line prices include tax; false — they do not."
                    },
                    "expected_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "When the store expects the delivery, YYYY-MM-DD; null if not set."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000,
                        "description": "Staff note; null if there is none."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "variant_id": {
                                    "type": "integer",
                                    "description": "Product variant ID (/v1/variants)."
                                },
                                "ordered_quantity": {
                                    "type": "string",
                                    "maxLength": 32,
                                    "description": "Ordered quantity, a decimal string in the base unit."
                                },
                                "unit_cost": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Price in the order currency per cost_per_quantity; null — no price."
                                },
                                "cost_per_quantity": {
                                    "type": "string",
                                    "maxLength": 32,
                                    "description": "Quantity in the base unit the price is for: \"1000\" on a weighed product means per kilogram."
                                }
                            },
                            "required": [
                                "variant_id",
                                "ordered_quantity"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 500,
                        "uniqueItems": true,
                        "description": "Order lines in document order."
                    }
                },
                "required": [
                    "supplier_id",
                    "location_id",
                    "currency",
                    "lines"
                ]
            },
            "CreateRecommendationRuleRequest": {
                "type": "object",
                "properties": {
                    "source_type": {
                        "$ref": "#/components/schemas/RecommendationRuleSource",
                        "description": "What the rule applies to: category — products of the category and its subcategories; collection — products of the collection."
                    },
                    "source_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "ID of the category or collection the rule applies to. A source has one rule."
                    },
                    "target_collection_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the collection whose products the rule offers after its own; null — no collection."
                    },
                    "product_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 20,
                        "uniqueItems": true,
                        "description": "IDs of the products the rule offers, in shelf order; at most 20."
                    },
                    "exclusive": {
                        "type": "boolean",
                        "description": "true — “only this rule”: rules below and automatic picks do not fill the shelf; without products and a collection it hides the shelf."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false turns the rule off: it is kept but does not apply."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Priority: a rule with a lower value applies earlier."
                    }
                },
                "required": [
                    "source_type",
                    "source_id"
                ]
            },
            "CreateRefundRequest": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "order_item_id": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "description": "ID of the item of the order (items in /v1/orders)."
                                },
                                "quantity": {
                                    "type": "string",
                                    "maxLength": 32,
                                    "description": "Quantity, a decimal string in unit: pieces, or the whole measure of an item sold by weight or volume."
                                }
                            },
                            "required": [
                                "order_item_id",
                                "quantity"
                            ]
                        },
                        "maxItems": 200,
                        "uniqueItems": true,
                        "description": "Returned items."
                    },
                    "shipping_amount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000000000,
                        "description": "Part of amount that refunds the delivery."
                    },
                    "irreversible_to": {
                        "type": "string",
                        "enum": [
                            "manual",
                            "balance"
                        ],
                        "description": "Where the share of an irreversible method (a transfer, crypto, a manual method) goes: manual — the store pays it back by hand and confirms it (POST /v1/refunds/{refund}/confirm); balance — to the balance of the customer (balance_available of the calculation)."
                    },
                    "expected_amount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000000000,
                        "description": "The amount from the calculation (/v1/orders/{order}/refunds/calculate) you confirm. A spread discount, earlier refunds or a change of the order can change it after reading; a refund for another amount is not made."
                    }
                },
                "required": [
                    "items",
                    "expected_amount"
                ]
            },
            "CreateSupplierBillRequest": {
                "type": "object",
                "properties": {
                    "kind": {
                        "type": "string",
                        "enum": [
                            "invoice",
                            "debit_note",
                            "credit_note"
                        ],
                        "description": "invoice — invoice; debit_note — debit note: increases the debt; credit_note — credit note: decreases the debt (return, discount, correction). Document amounts are always positive, kind sets the sign."
                    },
                    "fiscal": {
                        "type": "boolean",
                        "description": "false — debt for a delivery without an invoice: no ARCA details, not in the purchase book; true — invoice or note."
                    },
                    "legal_entity_id": {
                        "type": "integer",
                        "description": "ID of the buying store legal entity (/v1/legal-entities)."
                    },
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "related_bill_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the document the note corrects; null for an invoice and a note without a reference."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20,
                        "description": "Document number as the store entered it; null for a debt without an invoice."
                    },
                    "issued_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Document date, YYYY-MM-DD in the store time zone."
                    },
                    "tax_period": {
                        "type": "string",
                        "description": "Tax period in which the document is recorded in the purchase book, YYYY-MM."
                    },
                    "due_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Due date, YYYY-MM-DD in the store time zone; null — no due date."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Document currency, ISO 4217: all amounts except base_total are in it."
                    },
                    "exchange_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^\\d{1,14}(\\.\\d{1,10})?$",
                        "maxLength": 1000000000000,
                        "description": "Rate of the document currency to the store currency as a decimal string; null for a document in the store currency."
                    },
                    "net_taxed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "VAT taxable base."
                    },
                    "net_exempt": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "VAT exempt amount."
                    },
                    "net_untaxed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Amount outside the scope of VAT."
                    },
                    "tax_total": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Document VAT."
                    },
                    "total": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Document total: base, taxes and perceptions."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000,
                        "description": "Staff note; null if there is none."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "description": {
                                    "type": "string",
                                    "maxLength": 300,
                                    "description": "Line description as in the document."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Product variant ID (/v1/variants); null for a line not about a product."
                                },
                                "quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "pattern": "^\\d{1,14}(\\.\\d{1,6})?$",
                                    "minLength": 0,
                                    "maxLength": 1000000000000,
                                    "description": "Quantity as a decimal string; null if not stated."
                                },
                                "unit_amount": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Unit price without tax; null if not stated."
                                },
                                "net_amount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Line amount without tax."
                                },
                                "tax_kind": {
                                    "type": "string",
                                    "enum": [
                                        "taxed",
                                        "exempt",
                                        "untaxed"
                                    ],
                                    "description": "taxed — taxed at a rate; exempt — exempt; untaxed — outside the scope of tax."
                                },
                                "rate_bps": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000,
                                    "description": "VAT rate in basis points: 2100 is 21 %."
                                },
                                "tax_amount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Line VAT."
                                }
                            },
                            "required": [
                                "description",
                                "net_amount",
                                "tax_kind"
                            ]
                        },
                        "maxItems": 500,
                        "description": "Document lines in order; a document entered by totals has no lines."
                    },
                    "additional_taxes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "perception",
                                        "withholding",
                                        "internal",
                                        "other"
                                    ],
                                    "description": "perception — perception: increases the amount payable and is credited by the store; withholding — withholding: the store withholds it on payment and pays it to the treasury, the amount transferred decreases; internal — internal taxes (excise); other — other taxes."
                                },
                                "regime": {
                                    "type": "string",
                                    "enum": [
                                        "vat",
                                        "income",
                                        "turnover",
                                        "municipal",
                                        "internal",
                                        "social",
                                        "other"
                                    ],
                                    "description": "Which tax: vat — VAT, income — income tax, turnover — turnover tax (Ingresos Brutos), municipal — municipal and others."
                                },
                                "jurisdiction": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "pattern": "^[A-Z]{2}-[A-Z0-9]{1,5}$",
                                    "maxLength": 8,
                                    "description": "Tax jurisdiction, for example the Ingresos Brutos province; null if the tax does not need one."
                                },
                                "amount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Tax amount."
                                },
                                "certificate_number": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 64,
                                    "description": "Withholding or perception certificate number; null if there is none."
                                }
                            },
                            "required": [
                                "kind",
                                "regime",
                                "amount"
                            ]
                        },
                        "maxItems": 50,
                        "description": "Taxes beyond VAT: perceptions, withholdings, internal and other. The document carries only their amount, without base or rate."
                    },
                    "goods_receipt_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 100,
                        "description": "Goods receipts the document covers (/v1/goods-receipts): deliveries matched to the invoice, or the delivery behind a delivery debt."
                    },
                    "purchase_order_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 100,
                        "description": "Purchase orders the document relates to (/v1/purchase-orders)."
                    },
                    "supplier_return_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 100,
                        "description": "Supplier returns the credit note was issued for (/v1/supplier-returns)."
                    },
                    "ar": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "document_type_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 3,
                                "description": "ARCA comprobante type code: 001 — invoice A, 006 — invoice B, 011 — invoice C; null if not stated."
                            },
                            "point_of_sale": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 99999,
                                "description": "Supplier point of sale (punto de venta); null if not stated."
                            },
                            "authorization_kind": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "CAE",
                                    "CAEA",
                                    "CAI",
                                    null
                                ],
                                "description": "CAE — electronic document; CAEA — code issued for a period; CAI — printed form; null — no authorization (for example, a foreign document)."
                            },
                            "authorization_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 14,
                                "description": "Authorization code; null if not stated."
                            },
                            "authorization_expires_on": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date",
                                "description": "Authorization code expiry date, YYYY-MM-DD; null if not stated."
                            },
                            "credit_fiscal_amount": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 10000000000,
                                "description": "Creditable part of VAT under proportional credit; null — the whole tax is creditable."
                            },
                            "import": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "kind": {
                                        "type": "string",
                                        "enum": [
                                            "goods",
                                            "services"
                                        ],
                                        "description": "goods — import of goods under a customs declaration; services — services from a provider abroad."
                                    },
                                    "customs_declaration": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 16,
                                        "description": "Customs declaration number (despacho) of an import of goods; null if not given."
                                    },
                                    "document_kind": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "invoice",
                                            "contract",
                                            "other",
                                            null
                                        ],
                                        "description": "Document of the service provider: invoice, contract or other (with a description); null if not given."
                                    },
                                    "document_description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20,
                                        "description": "Description of a document of kind other; null for the rest."
                                    },
                                    "provider_tax_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20,
                                        "description": "Tax ID of the provider in their country; null if not given."
                                    },
                                    "tax_paid_on": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date",
                                        "description": "Date VAT on the imported services was paid, YYYY-MM-DD; null if not given."
                                    },
                                    "tax_paid_amount": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 10000000000,
                                        "description": "VAT paid on the imported services in the document currency; null if not given."
                                    },
                                    "payment_reference": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20,
                                        "description": "Identifier of the tax payment; null if not given."
                                    },
                                    "payment_entity_tax_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 11,
                                        "description": "CUIT of the bank the tax was paid through; null if not given."
                                    }
                                },
                                "description": "Import of goods or services — its own layout of the ARCA import ledger; null for a domestic document."
                            }
                        },
                        "description": "ARCA details of the invoice or note; null for a debt for a delivery without an invoice."
                    }
                },
                "required": [
                    "kind",
                    "fiscal",
                    "legal_entity_id",
                    "supplier_id",
                    "issued_on",
                    "currency",
                    "total"
                ]
            },
            "CreateSupplierRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Supplier name as the store sees it."
                    },
                    "tax_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Tax number as the store entered it (CUIT in Argentina); null if not set."
                    },
                    "tax_id_country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "AR",
                            "BR",
                            "CL",
                            "CO",
                            "MX",
                            "PE",
                            "RU",
                            null
                        ],
                        "description": "Country of the tax number, ISO 3166-1 alpha-2; null if the number is not set."
                    },
                    "legal_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 200,
                        "description": "Legal name; null if not set."
                    },
                    "settlement_mode": {
                        "$ref": "#/components/schemas/SupplierSettlementMode",
                        "description": "on_receipt — regular purchase: the debt arises on receipt; on_sale — consignment: the store pays for what was sold under a consignment settlement."
                    },
                    "consignment_loss_policy": {
                        "$ref": "#/components/schemas/ConsignmentLossPolicy",
                        "description": "Who pays for expired and missing consignment goods: return_to_supplier — goods go back to the supplier; our_cost — the store bears the loss."
                    },
                    "prices_include_tax": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "true — the supplier quotes prices with tax, false — without tax; null — by the store rule."
                    },
                    "payment_term_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 365,
                        "description": "Payment term in days: the bill due date due_on is calculated from it. null — no term."
                    },
                    "min_order_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "maximum": 100000000000000,
                        "description": "Minimum order amount in minor units of currency; null — no minimum."
                    },
                    "lead_time_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 365,
                        "description": "Delivery lead time in days from the order; null if not set."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — the supplier is turned off: no new orders are placed with it, documents remain."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Purchase currency with the supplier, ISO 4217: min_order_amount and its order prices are in it."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    }
                },
                "required": [
                    "name"
                ]
            },
            "CreateUploadRequest": {
                "type": "object",
                "properties": {
                    "file_name": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Name of the file given when the upload started."
                    },
                    "size": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 268435456,
                        "description": "Size of the whole file in bytes."
                    }
                },
                "required": [
                    "file_name",
                    "size"
                ]
            },
            "CreateVariantRequest": {
                "type": "object",
                "properties": {
                    "product_id": {
                        "type": "integer",
                        "description": "ID of the product."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "Stock keeping unit (SKU); null when not set."
                    },
                    "name": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name of the variant by language, such as {\"es\": \"Grande\"}."
                    },
                    "price": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Price for price_per_quantity units, an integer in minor units of currency."
                    },
                    "track_inventory": {
                        "type": "boolean",
                        "description": "The store counts the stock of the variant; false — it is sold without counting stock."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false takes the variant off sale."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Position among the variants of the product: lower comes first."
                    },
                    "list_price": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Price as the owner set it, in minor units of list_price_currency; null — the price is set in store money (price). For such a variant price is derived from the price list rate and is not accepted as input."
                    },
                    "list_price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB",
                            null
                        ],
                        "description": "Currency of the set price (store price list in a foreign currency); null — the price is in the store currency currency. As input: the store price list currency or currency."
                    },
                    "compare_at_price": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "maximum": 10000000000,
                        "description": "Price before the discount, shown crossed out; null when there is no discount."
                    },
                    "weight_grams": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Shipping weight in grams; null when not set."
                    },
                    "length_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Length of the package in millimeters; null when not set."
                    },
                    "width_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Width of the package in millimeters; null when not set."
                    },
                    "height_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Height of the package in millimeters; null when not set."
                    },
                    "sale_starts_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale starts: compare_at_price is shown from this moment; null — no start limit."
                    },
                    "sale_ends_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale ends; null — no end limit."
                    },
                    "sold_by": {
                        "type": "string",
                        "enum": [
                            "each",
                            "weight",
                            "volume"
                        ],
                        "description": "How the variant is sold: each — by the piece; weight — by weight; volume — by volume."
                    },
                    "price_per_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "How many units the price is for, a decimal string: one piece, or 1000 for a price per kilogram of a variant sold by weight. null when a variant sold by weight or volume has none set."
                    },
                    "measure_step": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Step of the quantity in a line of a variant sold by weight or volume, in its unit; null when not set."
                    },
                    "min_measure_qty": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Smallest quantity in a line of a variant sold by weight or volume; null when not set."
                    },
                    "max_measure_qty": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Largest quantity in a line of a variant sold by weight or volume; null when not set."
                    },
                    "net_content": {
                        "type": "object",
                        "properties": {
                            "quantity": {
                                "type": "string",
                                "maxLength": 32,
                                "description": "Measure as a decimal string in unit: \"500\", \"0.5\"."
                            },
                            "unit": {
                                "type": "string",
                                "enum": [
                                    "g",
                                    "ml"
                                ],
                                "description": "Unit of the measure: g — grams; ml — millilitres."
                            }
                        },
                        "description": "Net content of one piece: a 500 g pack, a 1000 ml bottle. A pack of several units of another variant takes it from that variant, a prepacked piece from its own measure; it can be written only for a plain variant sold by piece. null for variants sold by weight or volume and for pieces without a net content."
                    },
                    "barcodes": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "ean13",
                                        "ean8",
                                        "upca",
                                        "upce",
                                        "code128",
                                        "code39",
                                        "gtin",
                                        "itf",
                                        "qr",
                                        "datamatrix",
                                        "other"
                                    ],
                                    "description": "Symbology: ean13, ean8, upca, upce, code128, code39, gtin, itf, qr, datamatrix or other."
                                },
                                "value": {
                                    "type": "string",
                                    "description": "The barcode."
                                },
                                "is_primary": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ],
                                    "description": "The main barcode of the variant: labels and receipts show it."
                                }
                            },
                            "required": [
                                "type",
                                "value"
                            ]
                        },
                        "maxItems": 20,
                        "description": "Barcodes of the variant."
                    },
                    "option_values": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "option_id": {
                                    "type": "integer",
                                    "description": "ID of the option in options of the product."
                                },
                                "value_id": {
                                    "type": "integer",
                                    "description": "ID of the value in values of that option."
                                }
                            },
                            "required": [
                                "option_id",
                                "value_id"
                            ]
                        },
                        "maxItems": 10,
                        "description": "Option values of the variant: one value of every option of the product."
                    },
                    "stock_source_variant_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "For a pack of several units of another variant: that variant. The pack sells from its stock and has no stock levels of its own. null for an ordinary variant."
                    },
                    "stock_source_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "How much of the base variant one piece of the pack takes, a decimal string in the unit of the base variant; null for an ordinary variant."
                    },
                    "sibling_name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language of the only variant of the product, which this request makes one of several: the only variant has no name of its own, one of several must have it."
                    }
                },
                "required": [
                    "product_id",
                    "price"
                ]
            },
            "CreateWebhookEndpointRequest": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "maxLength": 2048,
                        "description": "HTTPS address deliveries are sent to."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Description of the endpoint; null when not given."
                    },
                    "enabled_events": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "order.created",
                                "order.updated",
                                "order.status_changed",
                                "order.paid",
                                "order.cancelled",
                                "payment.created",
                                "payment.succeeded",
                                "payment.status_changed",
                                "payment.updated",
                                "refund.created",
                                "refund.completed",
                                "refund.status_changed",
                                "refund.updated",
                                "fiscal_document.created",
                                "fiscal_document.updated",
                                "fiscal_document.issued",
                                "fiscal_document.failed",
                                "fiscal_document.annulled",
                                "tax_period.status_changed",
                                "money_transaction.created",
                                "money_transaction.updated",
                                "money_transaction.deleted",
                                "pos_shift.opened",
                                "pos_shift.closed",
                                "pos_shift.updated",
                                "pos_cash_movement.created",
                                "gift_card.created",
                                "gift_card.updated",
                                "gift_card_transaction.created",
                                "customer_account.created",
                                "customer_account.updated",
                                "customer_account_entry.created",
                                "customer_account_entry.updated",
                                "supplier.created",
                                "supplier.updated",
                                "supplier.deleted",
                                "supplier_bill.created",
                                "supplier_bill.updated",
                                "supplier_bill.posted",
                                "supplier_bill.voided",
                                "supplier_bill.deleted",
                                "supplier_bill_payment.created",
                                "supplier_bill_payment.updated",
                                "supplier_bill_payment.deleted",
                                "settlement_agreement.created",
                                "settlement_agreement.updated",
                                "settlement_agreement.deleted",
                                "settlement_offset.created",
                                "settlement_offset.updated",
                                "settlement_offset.voided",
                                "purchase_order.created",
                                "purchase_order.updated",
                                "purchase_order.status_changed",
                                "purchase_order.deleted",
                                "goods_receipt.created",
                                "goods_receipt.updated",
                                "goods_receipt.voided",
                                "supplier_return.created",
                                "supplier_return.updated",
                                "supplier_return.status_changed",
                                "supplier_return.deleted",
                                "consignment_settlement.created",
                                "consignment_settlement.updated",
                                "consignment_settlement.posted",
                                "consignment_settlement.voided",
                                "tax_withholding.created",
                                "tax_withholding.updated",
                                "tax_withholding.annulled",
                                "tax_withholding.deleted",
                                "product.created",
                                "product.updated",
                                "product.deleted",
                                "inventory_level.updated",
                                "stock_movement.created",
                                "stock_movement.updated",
                                "lot.created",
                                "lot.updated",
                                "lot.deleted",
                                "location_transfer.created",
                                "location_transfer.updated",
                                "stocktake.created",
                                "stocktake.status_changed",
                                "stocktake.updated",
                                "customer.created",
                                "customer.updated",
                                "customer.deleted",
                                "customer_group.created",
                                "customer_group.updated",
                                "customer_group.deleted",
                                "price_list.created",
                                "price_list.updated",
                                "price_list.deleted",
                                "bulk_operation.finished"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 93,
                        "uniqueItems": true,
                        "description": "Event types the endpoint is subscribed to, such as order.created; the types are those of GET /v1/events. A type whose read scope the app lost is not delivered."
                    }
                },
                "required": [
                    "url",
                    "enabled_events"
                ]
            },
            "Customer": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID of the customer, its ID in your system; null when not set. After two customers are merged, the ID of the merged one also finds the surviving customer; the response shows the main ID."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Name of the customer; null when unknown."
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Main phone of the customer in E.164 format, such as +5491123456789; null when unknown."
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Email of the customer; null when unknown."
                    },
                    "language": {
                        "type": "string",
                        "enum": [
                            "ru",
                            "en",
                            "es"
                        ],
                        "description": "Language the store writes to the customer in: ru, en or es."
                    },
                    "is_blocked": {
                        "type": "boolean",
                        "description": "The store has blocked the customer: they cannot sign in to the storefront."
                    },
                    "marketing_consents": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "channel": {
                                    "type": "string",
                                    "enum": [
                                        "email",
                                        "telegram",
                                        "whatsapp",
                                        "instagram"
                                    ],
                                    "description": "Marketing channel: email, telegram, whatsapp or instagram."
                                },
                                "status": {
                                    "type": "string",
                                    "enum": [
                                        "subscribed",
                                        "unsubscribed"
                                    ],
                                    "description": "subscribed — the customer explicitly agreed to marketing on the channel; unsubscribed — they refused it."
                                },
                                "consented_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the customer last explicitly agreed to marketing on the channel; a refusal keeps this time. null when they have not."
                                }
                            },
                            "required": [
                                "channel",
                                "status",
                                "consented_at"
                            ]
                        },
                        "description": "Marketing consent per channel (email, telegram, whatsapp, instagram): a row for each channel where the customer explicitly agreed (subscribed) or refused (unsubscribed), with the moment of the latest explicit consent. A missing channel means implied consent: a store with marketing_consent_mode opt_out writes to that channel, one with opt_in does not. WhatsApp requires subscribed."
                    },
                    "accepts_marketing": {
                        "type": "boolean",
                        "description": "Deprecated, see marketing_consents: the customer has not unsubscribed from email marketing."
                    },
                    "marketing_consent_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "Deprecated, see marketing_consents: when the customer explicitly agreed to email marketing; null when they have not."
                    },
                    "balance": {
                        "type": "integer",
                        "description": "Balance of the customer in the store: orders can be paid with it. In minor units of the currency of the store."
                    },
                    "addresses": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the address."
                                },
                                "customer_id": {
                                    "type": "integer",
                                    "description": "ID of the customer the address belongs to."
                                },
                                "label": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Name of the address, such as Home or Work; null when not given."
                                },
                                "street": {
                                    "type": "string",
                                    "description": "Street."
                                },
                                "house": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "House number."
                                },
                                "apartment": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Apartment or office."
                                },
                                "floor": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Floor."
                                },
                                "entrance": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Entrance."
                                },
                                "district": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "District or neighborhood."
                                },
                                "postal_code": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Postal code."
                                },
                                "comment": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Comment for the courier, such as how to get in; null when not given."
                                },
                                "location": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "lat": {
                                            "type": "number",
                                            "description": "Latitude in degrees."
                                        },
                                        "lng": {
                                            "type": "number",
                                            "description": "Longitude in degrees."
                                        }
                                    },
                                    "required": [
                                        "lat",
                                        "lng"
                                    ],
                                    "description": "Point of the address on the map; null when the address came from another system and has not been located yet."
                                },
                                "is_default": {
                                    "type": "boolean",
                                    "description": "The main address of the customer. When the main address is deleted, the newest address becomes the main one."
                                },
                                "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the record was created."
                                },
                                "updated_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the record last changed."
                                }
                            },
                            "required": [
                                "id",
                                "customer_id",
                                "label",
                                "street",
                                "house",
                                "apartment",
                                "floor",
                                "entrance",
                                "district",
                                "postal_code",
                                "comment",
                                "location",
                                "is_default",
                                "created_at",
                                "updated_at"
                            ]
                        },
                        "description": "Address book of the customer; its size is limited by the store. A deleted address is simply missing from the list."
                    },
                    "group_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "The customer's groups by ascending ID. Membership is written by the group commands: a change moves the customer in the feed and sends customer.updated, but changes neither version nor updated_at."
                    },
                    "wholesale_price_list_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Wholesale price list of the business customer: their wholesale sales are priced by it. null — wholesale at base prices. The list itself is visible only with costs:read."
                    },
                    "merged_into_customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The customer this one was merged into: that customer got its contacts, addresses and orders. null when not merged."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the record was archived; null for a live record."
                    }
                },
                "required": [
                    "id",
                    "external_id",
                    "version",
                    "name",
                    "phone",
                    "email",
                    "language",
                    "is_blocked",
                    "marketing_consents",
                    "accepts_marketing",
                    "marketing_consent_at",
                    "balance",
                    "addresses",
                    "group_ids",
                    "wholesale_price_list_id",
                    "merged_into_customer_id",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ]
            },
            "CustomerAccount": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "suspended"
                        ],
                        "description": "State: active means the customer buys on account within the limit; suspended means new sales on account are closed, while the debt stays and can be paid."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "balance": {
                        "type": "integer",
                        "description": "Balance in minor currency units: positive means the customer owes, negative means an overpayment. Equals the sum of amount over all account entries (/v1/customer-account-entries)."
                    },
                    "credit_limit": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Credit limit in minor currency units; null means no limit. Sales on account over the limit or with an overdue debt need a manager approval."
                    },
                    "payment_terms_days": {
                        "type": "integer",
                        "description": "Payment terms of a sale on account, in days: the charge due date (due_on) is the sale day plus these days."
                    },
                    "customer_id": {
                        "type": "integer",
                        "description": "Customer ID (/v1/customers). Only with access to customers."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note about the customer; null if there is none. Only with access to customers: erasing the customer erases it."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "status",
                    "currency",
                    "balance",
                    "credit_limit",
                    "payment_terms_days",
                    "created_at",
                    "updated_at"
                ]
            },
            "CustomerAccountEntry": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "customer_account_id": {
                        "type": "integer",
                        "description": "Customer account ID (/v1/customer-accounts). Changes only on a customer merge, when the entry moves to the remaining customer account."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "charge",
                            "opening_balance",
                            "opening_credit",
                            "payment",
                            "return",
                            "write_off",
                            "offset",
                            "withholding",
                            "reversal"
                        ],
                        "description": "Entry kind: charge is a sale on account; opening_balance is a debt from the previous books; opening_credit is an overpayment from the previous books; payment is a debt payment; return is a return of goods sold on account; write_off is a bad debt write-off; offset is an offset against the customer as a supplier; withholding is tax withheld by a customer acting as a withholding agent on payment; reversal reverses the entry reverses_entry_id."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Signed amount in minor currency units: positive means the debt grew, negative means it went down."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the store legal entity (/v1/legal-entities) the debt is owed to: a payment closes debts of its own legal entity only. null if no legal entity is set."
                    },
                    "due_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Due date of the charge, YYYY-MM-DD in the store time zone: the debt is overdue from the next day. null for entries that reduce the debt."
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the operation happened. A debt from the previous books is backdated, so operations are ordered by this field, not by entry order."
                    },
                    "order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Order ID (/v1/orders): the sale on account or the debt payment order with account_payment_amount; null if there is no order."
                    },
                    "payment_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Payment ID (/v1/payments) with the on_account method of a sale on account; null for other entries. The money of a debt payment is the payment of its order order_id."
                    },
                    "refund_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the refund (/v1/refunds) that returned goods sold on account; null for other entries."
                    },
                    "reverses_entry_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the entry this reversal cancels; null for a regular entry."
                    },
                    "settlement_offset_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Offset ID (/v1/settlement-offsets) for an entry of kind offset; null otherwise. The reversal of an offset points to the entry (reverses_entry_id)."
                    },
                    "tax_withholding_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the certificate in the withholding register (/v1/tax-withholdings, scope fiscal:read) on an entry of kind withholding; null on other entries and once the certificate is removed from the register — a reversal removes the certificate the payment created."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note: the reason for a write-off, a carried-over debt or a reversal; null if there is none."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the entry was written to the book."
                    }
                },
                "required": [
                    "id",
                    "customer_account_id",
                    "kind",
                    "amount",
                    "currency",
                    "legal_entity_id",
                    "due_on",
                    "occurred_at",
                    "order_id",
                    "payment_id",
                    "refund_id",
                    "reverses_entry_id",
                    "settlement_offset_id",
                    "tax_withholding_id",
                    "note",
                    "created_at"
                ]
            },
            "CustomerAccountStatement": {
                "type": "object",
                "properties": {
                    "customer_account_id": {
                        "type": "integer",
                        "description": "Customer account ID (/v1/customer-accounts)."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "from": {
                        "type": "string",
                        "description": "First day of the period, YYYY-MM-DD in the store time zone; without from in the request, the day of the first account operation."
                    },
                    "to": {
                        "type": "string",
                        "description": "Last day of the period, YYYY-MM-DD in the store time zone."
                    },
                    "opening_balance": {
                        "type": "integer",
                        "description": "Debt at the start of the period: the sum of operations before from."
                    },
                    "closing_balance": {
                        "type": "integer",
                        "description": "Debt at the end of the period: opening_balance plus the period lines."
                    },
                    "charged": {
                        "type": "integer",
                        "description": "Total debt increases in the period."
                    },
                    "reduced": {
                        "type": "integer",
                        "description": "Total debt decreases in the period, as a positive number."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "entry_id": {
                                    "type": "integer",
                                    "description": "Entry ID (/v1/customer-account-entries)."
                                },
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "charge",
                                        "opening_balance",
                                        "opening_credit",
                                        "payment",
                                        "return",
                                        "write_off",
                                        "offset",
                                        "withholding",
                                        "reversal"
                                    ],
                                    "description": "Entry kind, the same values as kind of an account entry."
                                },
                                "occurred_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the operation happened."
                                },
                                "order_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Order ID (/v1/orders); null if there is no order."
                                },
                                "due_on": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date",
                                    "description": "Due date of the charge; null for entries that reduce the debt."
                                },
                                "note": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Staff note; null if there is none."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Signed amount: positive means the debt grew, negative means it went down."
                                },
                                "balance": {
                                    "type": "integer",
                                    "description": "Debt after this line."
                                }
                            },
                            "required": [
                                "entry_id",
                                "kind",
                                "occurred_at",
                                "order_id",
                                "due_on",
                                "note",
                                "amount",
                                "balance"
                            ]
                        },
                        "description": "Period entries in operation order (occurred_at) with a running balance."
                    },
                    "open_items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "entry_id": {
                                    "type": "integer",
                                    "description": "Charge entry ID (/v1/customer-account-entries)."
                                },
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "charge",
                                        "opening_balance"
                                    ],
                                    "description": "charge is a sale on account; opening_balance is a debt from the previous books."
                                },
                                "occurred_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the operation happened."
                                },
                                "order_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Order ID (/v1/orders); null if there is no order."
                                },
                                "due_on": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date",
                                    "description": "Due date of the charge, YYYY-MM-DD in the store time zone."
                                },
                                "open_amount": {
                                    "type": "integer",
                                    "description": "Unpaid part of the charge at the end of the period."
                                },
                                "overdue": {
                                    "type": "boolean",
                                    "description": "The due date passed before to: the debt is overdue at the end of the period."
                                }
                            },
                            "required": [
                                "entry_id",
                                "kind",
                                "occurred_at",
                                "order_id",
                                "due_on",
                                "open_amount",
                                "overdue"
                            ]
                        },
                        "description": "Charges still open at the end of the period, by due date. Which payment closed which charge is decided by FIFO allocation within each legal entity."
                    }
                },
                "required": [
                    "customer_account_id",
                    "currency",
                    "from",
                    "to",
                    "opening_balance",
                    "closing_balance",
                    "charged",
                    "reduced",
                    "lines",
                    "open_items"
                ]
            },
            "CustomerAddress": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the address."
                    },
                    "customer_id": {
                        "type": "integer",
                        "description": "ID of the customer the address belongs to."
                    },
                    "label": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Name of the address, such as Home or Work; null when not given."
                    },
                    "street": {
                        "type": "string",
                        "description": "Street."
                    },
                    "house": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "House number."
                    },
                    "apartment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Apartment or office."
                    },
                    "floor": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Floor."
                    },
                    "entrance": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Entrance."
                    },
                    "district": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "District or neighborhood."
                    },
                    "postal_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Postal code."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Comment for the courier, such as how to get in; null when not given."
                    },
                    "location": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "lat": {
                                "type": "number",
                                "description": "Latitude in degrees."
                            },
                            "lng": {
                                "type": "number",
                                "description": "Longitude in degrees."
                            }
                        },
                        "required": [
                            "lat",
                            "lng"
                        ],
                        "description": "Point of the address on the map; null when the address came from another system and has not been located yet."
                    },
                    "is_default": {
                        "type": "boolean",
                        "description": "The main address of the customer. When the main address is deleted, the newest address becomes the main one."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "customer_id",
                    "label",
                    "street",
                    "house",
                    "apartment",
                    "floor",
                    "entrance",
                    "district",
                    "postal_code",
                    "comment",
                    "location",
                    "is_default",
                    "created_at",
                    "updated_at"
                ]
            },
            "CustomerFiscalProfile": {
                "type": "object",
                "properties": {
                    "customer_id": {
                        "type": "integer",
                        "description": "ID of the customer."
                    },
                    "receptor": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id_type": {
                                "type": "string",
                                "enum": [
                                    "tax_id",
                                    "personal_id",
                                    "national_id",
                                    "passport",
                                    "none"
                                ],
                                "description": "Kind of ID: tax_id — tax ID of a business (CUIT in Argentina); personal_id — tax ID of a person (CUIL); national_id — national identity document (DNI); passport; none — no ID."
                            },
                            "id_number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Number of the ID; null when id_type is none."
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Legal or full name for the document; null when not given."
                            },
                            "tax_status": {
                                "type": "string",
                                "enum": [
                                    "registered",
                                    "small_taxpayer",
                                    "exempt",
                                    "final_consumer",
                                    "not_categorized",
                                    "foreign"
                                ],
                                "description": "Tax status: registered — registered for VAT (Responsable Inscripto in Argentina); small_taxpayer — a simplified regime (Monotributo); exempt — exempt from VAT; final_consumer — a final consumer; not_categorized — not categorized; foreign — a foreign customer."
                            },
                            "address": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Fiscal address in one line; null when not given."
                            }
                        },
                        "required": [
                            "id_type",
                            "id_number",
                            "name",
                            "tax_status",
                            "address"
                        ],
                        "description": "Tax details documents of new orders are issued under; null — a retail customer without tax details. A placed order keeps its own copy (fiscal_receptor of the order)."
                    }
                },
                "required": [
                    "customer_id",
                    "receptor"
                ]
            },
            "CustomerGroup": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "name": {
                        "type": "string",
                        "description": "Group name: a label for the store, customers do not see it. Unique in the store, case-insensitive."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Description for staff; null if not set."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "Whether the group is active. An inactive group selects nobody: discounts and broadcasts do not see its members, and the membership is kept."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "name",
                    "description",
                    "is_active",
                    "created_at",
                    "updated_at"
                ]
            },
            "DeliveryMethod": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "code": {
                        "type": "string",
                        "description": "Code of the record, unique in the store: it does not change when the record is renamed."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name of the delivery method by language."
                    },
                    "fulfilment_type": {
                        "type": "string",
                        "enum": [
                            "self_pickup",
                            "home_delivery",
                            "parcel_locker",
                            "mail_post",
                            "pos",
                            "aggregator",
                            "manual_courier"
                        ],
                        "description": "How the method delivers, the same values as fulfilment_type of an order."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — customers cannot choose the method."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Sort position: lower comes first."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the record was archived; null for a live record."
                    }
                },
                "required": [
                    "id",
                    "code",
                    "name",
                    "fulfilment_type",
                    "is_active",
                    "position",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ]
            },
            "DiscountRoundingMode": {
                "type": "string",
                "enum": [
                    "nearest",
                    "up",
                    "down"
                ]
            },
            "DismissFiscalDocumentRequest": {
                "type": "object",
                "properties": {
                    "reason": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 500,
                        "description": "Why the document will not be issued, in your own words, 3 to 500 characters: a tax audit will ask for it."
                    }
                },
                "required": [
                    "reason"
                ]
            },
            "DraftOrder": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Revision of the draft: any change of the draft moves it, including a change by the staff in the panel. The draft is changed, deleted and placed under it."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "open",
                            "completed",
                            "cancelled"
                        ],
                        "description": "open — can be changed and placed; completed — placed, the order is in order_id; cancelled — cancelled without an order."
                    },
                    "customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The customer of the draft (/v1/customers); null until chosen."
                    },
                    "order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The order placed from the draft; null until it is placed."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the line in the draft."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Variant of the line; null for a custom line."
                                },
                                "product_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Product of the line; null for a custom line."
                                },
                                "product_name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    },
                                    "description": "Name of the product at the time of the sale, by language."
                                },
                                "variant_name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    },
                                    "description": "Name of the variant at the time of the sale, by language; an empty object when the variant had no name."
                                },
                                "custom_name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Name of a custom line the staff added without a product; null for a line with a variant."
                                },
                                "quantity": {
                                    "type": "string",
                                    "description": "Quantity, a decimal string in unit: pieces for an item sold by the piece, the measure for an item sold by weight or volume (\"480\" grams)."
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "pcs",
                                        "g",
                                        "ml",
                                        null
                                    ],
                                    "description": "Unit of quantity: pcs, g or ml; null when the variant no longer knows the unit of its measure."
                                },
                                "unit_price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Price of one unit with its modifiers; null for a closed draft."
                                },
                                "discount": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Markdown of the line; null for a closed draft."
                                },
                                "total": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Amount of the line before the markdown; null for a closed draft."
                                },
                                "modifiers": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "option_id": {
                                                "type": "integer",
                                                "description": "ID of the modifier option."
                                            },
                                            "quantity": {
                                                "type": "integer",
                                                "description": "How many times the modifier is added."
                                            }
                                        },
                                        "required": [
                                            "option_id",
                                            "quantity"
                                        ]
                                    },
                                    "description": "Modifiers of the line, such as extra toppings of a dish."
                                }
                            },
                            "required": [
                                "id",
                                "variant_id",
                                "product_id",
                                "product_name",
                                "variant_name",
                                "custom_name",
                                "quantity",
                                "unit",
                                "unit_price",
                                "discount",
                                "total",
                                "modifiers"
                            ]
                        },
                        "description": "Items of the draft. An open draft is priced live by the catalog, discounts and delivery; a closed draft keeps its items without prices."
                    },
                    "delivery_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Delivery method (/v1/delivery-methods); null until chosen."
                    },
                    "address_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Address from the address book of the customer, for a method with delivery; null when not chosen."
                    },
                    "pickup_location_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Pickup point for a pickup method. A method with one pickup point uses it by itself; with several the draft must name one."
                    },
                    "delivery_slots": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "from": {
                                    "type": "string",
                                    "description": "Start of the window."
                                },
                                "to": {
                                    "type": "string",
                                    "description": "End of the window."
                                }
                            },
                            "required": [
                                "from",
                                "to"
                            ]
                        },
                        "description": "Delivery windows chosen for a method that works with windows."
                    },
                    "delivery_cost_override": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Delivery price set by hand instead of the calculation of the method; null — by the rules of the method."
                    },
                    "payment_method": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "cash",
                            "mercadopago",
                            "crypto",
                            "bybit",
                            "trc20",
                            "balance",
                            "modo",
                            "payway",
                            "mercadopago_qr",
                            "mercadopago_point",
                            "mercadopago_transfer",
                            "gift_card",
                            "subscription",
                            "deposit",
                            "external",
                            "manual",
                            "offset",
                            "on_account",
                            "exchange_credit",
                            "bonpunto",
                            "service_package",
                            null
                        ],
                        "description": "Payment method the draft will be placed with: discounts for the method and compatibility with the delivery depend on it."
                    },
                    "manual_payment_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Manual payment method of the store when payment_method is manual; otherwise null."
                    },
                    "promocode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Promo code applied to the draft; null when none."
                    },
                    "customer_comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Comment of the customer to the order. Only with the customers:read scope."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Internal note of the store: it goes to the order, the customer does not see it."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "items_total": {
                        "type": "integer",
                        "description": "Sum of the lines before the order discount."
                    },
                    "discount": {
                        "type": "integer",
                        "description": "Discount of the order."
                    },
                    "delivery_cost": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Delivery to pay; null when it cannot be calculated yet."
                    },
                    "total": {
                        "type": "integer",
                        "description": "Amount to pay."
                    },
                    "issues": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "code": {
                                    "type": "string",
                                    "enum": [
                                        "customer_required",
                                        "phone_required",
                                        "items_empty",
                                        "import_lines_pending",
                                        "import_parse_running",
                                        "items_unavailable",
                                        "modifier_invalid",
                                        "price_missing",
                                        "measure_required",
                                        "insufficient_stock",
                                        "presale_not_ready",
                                        "presale_plan_short",
                                        "gift_card_sales_disabled",
                                        "delivery_method_required",
                                        "address_required",
                                        "branch_required",
                                        "pickup_location_required",
                                        "pickup_location_none",
                                        "pickup_location_mismatch",
                                        "slot_required",
                                        "slot_invalid",
                                        "delivery_not_applicable",
                                        "delivery_cost_required",
                                        "promocode_invalid",
                                        "payment_delivery_incompatible"
                                    ],
                                    "description": "customer_required — no customer; phone_required — the customer has no phone; items_empty — no lines; import_lines_pending, import_parse_running — imported lines are not ready yet; items_unavailable — an item is not for sale; modifier_invalid — a modifier does not fit the item; price_missing — an item has no price; measure_required — an item sold by weight or volume needs its measure; insufficient_stock — not enough stock; presale_not_ready, presale_plan_short — a pre-sale item is not ready or has fewer left than ordered; gift_card_sales_disabled — the store does not sell gift cards; delivery_method_required — no delivery method; address_required — the delivery needs an address; branch_required — the method needs a carrier branch; pickup_location_required — the method has several pickup points, name one; pickup_location_none — the method has no available pickup point; pickup_location_mismatch — the pickup point is not served by the method; slot_required — the method needs a delivery window; slot_invalid — the window is not available; delivery_not_applicable — the method does not deliver this order; delivery_cost_required — the method needs a delivery price set by hand; promocode_invalid — the promo code does not apply; payment_delivery_incompatible — the payment method does not work with the delivery method."
                                },
                                "line_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "The line the issue is about; null for an issue of the whole draft."
                                }
                            },
                            "required": [
                                "code",
                                "line_id"
                            ]
                        },
                        "description": "What prevents placing the draft; empty when nothing does and for a closed draft."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "status",
                    "customer_id",
                    "order_id",
                    "lines",
                    "delivery_method_id",
                    "address_id",
                    "pickup_location_id",
                    "delivery_slots",
                    "delivery_cost_override",
                    "payment_method",
                    "manual_payment_method_id",
                    "promocode",
                    "note",
                    "currency",
                    "items_total",
                    "discount",
                    "delivery_cost",
                    "total",
                    "issues",
                    "created_at",
                    "updated_at"
                ]
            },
            "Event": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the event; deliveries send it as webhook-id. Events are kept for 30 days."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "order.created",
                            "order.updated",
                            "order.status_changed",
                            "order.paid",
                            "order.cancelled",
                            "payment.created",
                            "payment.succeeded",
                            "payment.status_changed",
                            "payment.updated",
                            "refund.created",
                            "refund.completed",
                            "refund.status_changed",
                            "refund.updated",
                            "fiscal_document.created",
                            "fiscal_document.updated",
                            "fiscal_document.issued",
                            "fiscal_document.failed",
                            "fiscal_document.annulled",
                            "tax_period.status_changed",
                            "money_transaction.created",
                            "money_transaction.updated",
                            "money_transaction.deleted",
                            "pos_shift.opened",
                            "pos_shift.closed",
                            "pos_shift.updated",
                            "pos_cash_movement.created",
                            "gift_card.created",
                            "gift_card.updated",
                            "gift_card_transaction.created",
                            "customer_account.created",
                            "customer_account.updated",
                            "customer_account_entry.created",
                            "customer_account_entry.updated",
                            "supplier.created",
                            "supplier.updated",
                            "supplier.deleted",
                            "supplier_bill.created",
                            "supplier_bill.updated",
                            "supplier_bill.posted",
                            "supplier_bill.voided",
                            "supplier_bill.deleted",
                            "supplier_bill_payment.created",
                            "supplier_bill_payment.updated",
                            "supplier_bill_payment.deleted",
                            "settlement_agreement.created",
                            "settlement_agreement.updated",
                            "settlement_agreement.deleted",
                            "settlement_offset.created",
                            "settlement_offset.updated",
                            "settlement_offset.voided",
                            "purchase_order.created",
                            "purchase_order.updated",
                            "purchase_order.status_changed",
                            "purchase_order.deleted",
                            "goods_receipt.created",
                            "goods_receipt.updated",
                            "goods_receipt.voided",
                            "supplier_return.created",
                            "supplier_return.updated",
                            "supplier_return.status_changed",
                            "supplier_return.deleted",
                            "consignment_settlement.created",
                            "consignment_settlement.updated",
                            "consignment_settlement.posted",
                            "consignment_settlement.voided",
                            "tax_withholding.created",
                            "tax_withholding.updated",
                            "tax_withholding.annulled",
                            "tax_withholding.deleted",
                            "product.created",
                            "product.updated",
                            "product.deleted",
                            "inventory_level.updated",
                            "stock_movement.created",
                            "stock_movement.updated",
                            "lot.created",
                            "lot.updated",
                            "lot.deleted",
                            "location_transfer.created",
                            "location_transfer.updated",
                            "stocktake.created",
                            "stocktake.status_changed",
                            "stocktake.updated",
                            "customer.created",
                            "customer.updated",
                            "customer.deleted",
                            "customer_group.created",
                            "customer_group.updated",
                            "customer_group.deleted",
                            "price_list.created",
                            "price_list.updated",
                            "price_list.deleted",
                            "bulk_operation.finished"
                        ],
                        "description": "Type of the event: order.created, order.updated, order.status_changed, order.paid, order.cancelled; payment.created, payment.succeeded, payment.status_changed, payment.updated; refund.created, refund.completed, refund.status_changed, refund.updated; product.created, product.updated, product.deleted; inventory_level.updated; customer.created, customer.updated, customer.deleted; fiscal_document.created, fiscal_document.updated, fiscal_document.issued, fiscal_document.failed, fiscal_document.annulled; tax_period.status_changed; bulk_operation.finished."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the change happened."
                    },
                    "actor": {
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "integration_app",
                                    "operator",
                                    "customer",
                                    "courier",
                                    "device",
                                    "supplier",
                                    "system"
                                ],
                                "description": "integration_app — an app (actor.id is its id from /v1/me); operator — a staff member; customer; courier; device — a register or another device of the store; supplier; system — automation."
                            },
                            "id": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "ID of the actor among its kind; null for system."
                            }
                        },
                        "required": [
                            "type",
                            "id"
                        ],
                        "description": "Who made the change."
                    },
                    "request_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ID of the request of this app that made the change (X-Request-Id): by it the app recognizes its own changes. null when the change is not by this app."
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer",
                                "description": "ID of the record."
                            },
                            "object": {
                                "anyOf": [
                                    {
                                        "$ref": "#/components/schemas/Order"
                                    },
                                    {
                                        "$ref": "#/components/schemas/Payment"
                                    },
                                    {
                                        "$ref": "#/components/schemas/Refund"
                                    },
                                    {
                                        "$ref": "#/components/schemas/FiscalDocument"
                                    },
                                    {
                                        "$ref": "#/components/schemas/TaxPeriod"
                                    },
                                    {
                                        "$ref": "#/components/schemas/TaxWithholding"
                                    },
                                    {
                                        "$ref": "#/components/schemas/MoneyTransaction"
                                    },
                                    {
                                        "$ref": "#/components/schemas/PosShift"
                                    },
                                    {
                                        "$ref": "#/components/schemas/PosCashMovement"
                                    },
                                    {
                                        "$ref": "#/components/schemas/GiftCard"
                                    },
                                    {
                                        "$ref": "#/components/schemas/GiftCardTransaction"
                                    },
                                    {
                                        "$ref": "#/components/schemas/CustomerAccount"
                                    },
                                    {
                                        "$ref": "#/components/schemas/CustomerAccountEntry"
                                    },
                                    {
                                        "$ref": "#/components/schemas/Supplier"
                                    },
                                    {
                                        "$ref": "#/components/schemas/SupplierBill"
                                    },
                                    {
                                        "$ref": "#/components/schemas/SupplierBillPayment"
                                    },
                                    {
                                        "$ref": "#/components/schemas/SettlementAgreement"
                                    },
                                    {
                                        "$ref": "#/components/schemas/SettlementOffset"
                                    },
                                    {
                                        "$ref": "#/components/schemas/PurchaseOrder"
                                    },
                                    {
                                        "$ref": "#/components/schemas/GoodsReceipt"
                                    },
                                    {
                                        "$ref": "#/components/schemas/SupplierReturn"
                                    },
                                    {
                                        "$ref": "#/components/schemas/ConsignmentSettlement"
                                    },
                                    {
                                        "$ref": "#/components/schemas/Product"
                                    },
                                    {
                                        "$ref": "#/components/schemas/InventoryLevel"
                                    },
                                    {
                                        "$ref": "#/components/schemas/StockMovement"
                                    },
                                    {
                                        "$ref": "#/components/schemas/Lot"
                                    },
                                    {
                                        "$ref": "#/components/schemas/LocationTransfer"
                                    },
                                    {
                                        "$ref": "#/components/schemas/Stocktake"
                                    },
                                    {
                                        "$ref": "#/components/schemas/Customer"
                                    },
                                    {
                                        "$ref": "#/components/schemas/CustomerGroup"
                                    },
                                    {
                                        "$ref": "#/components/schemas/PriceList"
                                    },
                                    {
                                        "$ref": "#/components/schemas/BulkOperation"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ],
                                "x-open-variants": true,
                                "description": "The record as it is now: the same object as its endpoint in /v1 returns, with fields by the scopes of the app. null when the record is gone. Events can arrive out of order: version of the object tells which is newer."
                            },
                            "previous_attributes": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Previous status: of the order in order.status_changed, of the tax period in tax_period.status_changed, of the document in fiscal_document.failed."
                                    }
                                },
                                "required": [
                                    "status"
                                ],
                                "description": "Previous values of the fields the event is about; null when the event has none."
                            }
                        },
                        "required": [
                            "id",
                            "object",
                            "previous_attributes"
                        ],
                        "description": "What the event is about."
                    }
                },
                "required": [
                    "id",
                    "type",
                    "created_at",
                    "actor",
                    "request_id",
                    "data"
                ]
            },
            "ExchangeRate": {
                "type": "object",
                "properties": {
                    "currency": {
                        "type": "string",
                        "description": "Rate currency — ISO 4217 or asset code (USDT): 1 unit of this currency = rate units of the store currency."
                    },
                    "store_currency": {
                        "type": "string",
                        "description": "Store currency, ISO 4217 code."
                    },
                    "date": {
                        "type": "string",
                        "description": "Requested accounting date, YYYY-MM-DD in the store time zone."
                    },
                    "rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Accounting day rate as a decimal string: 1 currency = rate of the store currency — the money journal converts transactions on an account in this currency on this date with it. null — the day rate is not fixed yet (the first foreign-currency transaction of the day fixes it) or no source quotes the pair. \"1\" for the store currency."
                    },
                    "rate_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Day the rate was fixed: for a date without its own rate the journal takes the closest previous one, for a date before the first fixing — the first one. null — no rate."
                    },
                    "source": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "coingecko",
                            "criptoya_p2p",
                            "ar_oficial",
                            "ar_blue",
                            "ar_mep",
                            "ar_ccl",
                            "ar_mayorista",
                            "cbr",
                            null
                        ],
                        "description": "Market rate source from the store rule: coingecko, criptoya_p2p, ar_oficial, ar_blue, ar_mep, ar_ccl, ar_mayorista, cbr. null — no source quotes the pair (the store accepts it only at a manual rate) or it is the store currency."
                    }
                },
                "required": [
                    "currency",
                    "store_currency",
                    "date",
                    "rate",
                    "rate_date",
                    "source"
                ]
            },
            "FiscalDocument": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "invoice",
                            "credit_note",
                            "debit_note"
                        ],
                        "description": "invoice — sales invoice; credit_note — credit note: a refund, an order decrease or an invoice annulment; debit_note — debit note: an order increase after the invoice."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "issued",
                            "rejected",
                            "failed",
                            "voided"
                        ],
                        "description": "issued — authorized by the tax authority; pending — waiting to be issued; failed — issuing failed and is retried automatically; rejected — refused by the tax authority, the data needs fixing; voided — issuing cancelled with the sale, no legal trace."
                    },
                    "status_reason": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Why the document is in this status (tax authority refusal, failure or cancellation) in the store languages; null for issued and pending documents."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the issuing legal entity; null — a document from before sales were split by legal entity: its issuer is the default legal entity."
                    },
                    "order_id": {
                        "type": "integer",
                        "description": "ID of the order."
                    },
                    "refund_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the refund the credit note documents; null for other documents."
                    },
                    "related_document_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the invoice the note corrects; null for an invoice."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The number as printed on the document, such as 0004-00000013; null until the document is issued."
                    },
                    "issued_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Accounting date of the document, YYYY-MM-DD in the store time zone: it puts the document into a tax period. null until the document is issued."
                    },
                    "issued_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the tax authority authorized the document; null until it is issued."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "total": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Document total including tax; null for documents created before the store kept the total."
                    },
                    "tax_lines": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/TaxLine"
                        },
                        "description": "Tax authorized by the tax authority, the legally binding one: the regime of the issuing legal entity sets it, and it may differ from the order tax. null if the document is not issued, does not itemize tax (a monotributo invoice C) or the breakdown cannot be restored."
                    },
                    "annulment": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "annulled_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the invoice was annulled."
                            },
                            "document_id": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "ID of the annulling credit note."
                            },
                            "reason": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "order_cancelled",
                                    "advance_applied",
                                    "manual",
                                    null
                                ],
                                "description": "Why it was annulled: order_cancelled — the sale was cancelled; advance_applied — a booking advance was applied to the check, and the check invoice documents it; manual — a decision of a person or an app, the reason in words is in comment. null when the annulling note is not found."
                            },
                            "comment": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The reason in the words of whoever annulled the invoice, for manual; null when the system annulled it."
                            }
                        },
                        "required": [
                            "annulled_at",
                            "document_id",
                            "reason",
                            "comment"
                        ],
                        "description": "The invoice is annulled by a note: it stays with the tax authority but no longer counts for the sale. null if not annulled."
                    },
                    "dismissal": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "dismissed_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the document was dismissed."
                            },
                            "reason": {
                                "type": "string",
                                "description": "The reason in the words of whoever dismissed it."
                            }
                        },
                        "required": [
                            "dismissed_at",
                            "reason"
                        ],
                        "description": "The document is dismissed: the tax authority rejected it (or refused its CAEA reporting), and it will not be issued. The document status does not change. null when not dismissed."
                    },
                    "receptor": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id_type": {
                                "type": "string",
                                "enum": [
                                    "tax_id",
                                    "personal_id",
                                    "national_id",
                                    "passport",
                                    "none"
                                ],
                                "description": "Kind of ID: tax_id — tax ID of a business (CUIT in Argentina); personal_id — tax ID of a person (CUIL); national_id — national identity document (DNI); passport; none — no ID."
                            },
                            "id_number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Number of the ID; null when id_type is none."
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Legal or full name for the document; null when not given."
                            },
                            "tax_status": {
                                "type": "string",
                                "enum": [
                                    "registered",
                                    "small_taxpayer",
                                    "exempt",
                                    "final_consumer",
                                    "not_categorized",
                                    "foreign"
                                ],
                                "description": "Tax status: registered — registered for VAT (Responsable Inscripto in Argentina); small_taxpayer — a simplified regime (Monotributo); exempt — exempt from VAT; final_consumer — a final consumer; not_categorized — not categorized; foreign — a foreign customer."
                            },
                            "address": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Fiscal address in one line; null when not given."
                            }
                        },
                        "required": [
                            "id_type",
                            "id_number",
                            "name",
                            "tax_status",
                            "address"
                        ],
                        "description": "Who the document is issued to; null for a retail sale without tax details. Only with the customers:read scope."
                    },
                    "ar": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "document_type_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "ARCA comprobante type code: 001 — invoice A, 006 — invoice B, 011 — invoice C; 003, 008, 013 — credit notes A, B, C."
                            },
                            "point_of_sale": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Point of sale (punto de venta)."
                            },
                            "sequence_number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Sequence number of the document in the point of sale, 8 digits."
                            },
                            "authorization_kind": {
                                "type": "string",
                                "enum": [
                                    "CAE",
                                    "CAEA"
                                ],
                                "description": "CAE — the code was granted when issuing online; CAEA — a code granted in advance, issued in contingency."
                            },
                            "authorization_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Authorization code: CAE or CAEA."
                            },
                            "authorization_expires_on": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date",
                                "description": "Expiry of the authorization code, YYYY-MM-DD; null if unknown."
                            },
                            "testing": {
                                "type": "boolean",
                                "description": "true — issued by the ARCA testing environment (homologación): the document has no legal effect and must not be booked as a sale."
                            }
                        },
                        "required": [
                            "document_type_code",
                            "point_of_sale",
                            "sequence_number",
                            "authorization_kind",
                            "authorization_code",
                            "authorization_expires_on",
                            "testing"
                        ],
                        "description": "ARCA details; null for a store in another country, for a document not issued yet and when the details cannot be restored from what the provider kept."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "type",
                    "status",
                    "status_reason",
                    "legal_entity_id",
                    "order_id",
                    "refund_id",
                    "related_document_id",
                    "number",
                    "issued_on",
                    "issued_at",
                    "currency",
                    "total",
                    "tax_lines",
                    "annulment",
                    "dismissal",
                    "ar",
                    "created_at",
                    "updated_at"
                ]
            },
            "ForbiddenProblem": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Machine type of the problem: a stable code to branch on, such as insufficient_scope. Every type has a page in the error catalog."
                    },
                    "title": {
                        "type": "string",
                        "description": "Short summary of the problem in the language of the request."
                    },
                    "status": {
                        "type": "integer",
                        "description": "HTTP status of the response."
                    },
                    "detail": {
                        "type": "string",
                        "description": "Explanation of this occurrence in the language of the request."
                    },
                    "required_scope": {
                        "type": "string",
                        "description": "For insufficient_scope — the scope the endpoint needs."
                    },
                    "accepted_scopes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "For insufficient_scope — the scopes the endpoint accepts: any one is enough. For an endpoint with one scope — that scope alone."
                    }
                },
                "required": [
                    "type",
                    "title",
                    "status"
                ]
            },
            "GiftCard": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "last4": {
                        "type": "string",
                        "description": "The last four characters of the card code, used to recognise the card in the customer's hands. The code itself is not stored."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "pending_payment",
                            "disabled",
                            "deactivated"
                        ],
                        "description": "State: active — accepted for payment while it has a balance and has not expired; pending_payment — sold with a non-cash method, payment not confirmed yet; disabled — blocked (lost, dispute), the liability remains; deactivated — voided, the balance is cleared."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "initial_amount": {
                        "type": "integer",
                        "description": "Face value at issue, in minor units of the currency."
                    },
                    "balance": {
                        "type": "integer",
                        "description": "Card balance in minor units of the currency — the sum of its activity entries (/v1/gift-card-transactions)."
                    },
                    "outstanding": {
                        "type": "integer",
                        "description": "The store liability for the card: the balance, except for an unpaid card (pending_payment), for which no money came in. A blocked or expired card keeps its liability."
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "End of validity; null means no expiry. An expired card is not accepted for payment."
                    },
                    "issued_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the card was issued."
                    },
                    "issued_order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the order (/v1/orders) that sold the card; null for an issue without a sale (compensation, promo)."
                    },
                    "reissued_from_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the card whose balance was moved here by a reissue; null for a regular issue."
                    },
                    "customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the owning customer (/v1/customers); null for a bearer card. Only with customer access."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note at issue; null if there is none."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "last4",
                    "status",
                    "currency",
                    "initial_amount",
                    "balance",
                    "outstanding",
                    "expires_at",
                    "issued_at",
                    "issued_order_id",
                    "reissued_from_id",
                    "note",
                    "created_at",
                    "updated_at"
                ]
            },
            "GiftCardTransaction": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "gift_card_id": {
                        "type": "integer",
                        "description": "Gift card ID (/v1/gift-cards)."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "issue",
                            "redeem",
                            "refund",
                            "adjust",
                            "void",
                            "block",
                            "unblock",
                            "transfer_out",
                            "transfer_in"
                        ],
                        "description": "Entry kind: issue — issue; redeem — payment with the card; refund — a purchase refunded to the card; adjust — manual adjustment; void — void (the card was returned or not paid); block and unblock — block and its removal, with no amount; transfer_out and transfer_in — balance moved by a reissue from the old card to the new one."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Signed amount in minor units of the currency: positive — the liability grew, negative — it shrank, 0 — block and its removal."
                    },
                    "balance_after": {
                        "type": "integer",
                        "description": "Card balance after this entry."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the order."
                    },
                    "payment_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Payment ID (/v1/payments): a payment with the gift_card method or the payment for the card sale; null if there is no payment."
                    },
                    "refund_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the refund (/v1/refunds) that returned money to the card or for the card itself; null if there is no refund."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Adjustment reason or staff note; null if there is none."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    }
                },
                "required": [
                    "id",
                    "gift_card_id",
                    "type",
                    "amount",
                    "balance_after",
                    "currency",
                    "order_id",
                    "payment_id",
                    "refund_id",
                    "note",
                    "created_at"
                ]
            },
            "GoodsReceipt": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Receipt number; null on a receipt created before numbering."
                    },
                    "supplier_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Supplier ID (/v1/suppliers); null on a receipt without a supplier."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "Location the goods were received at (/v1/locations)."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Buying legal entity of the store (/v1/legal-entities): its tax regime decides whether the purchase tax is recoverable; null on older receipts."
                    },
                    "purchase_order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Purchase order the goods were received against (/v1/purchase-orders); null — received without an order."
                    },
                    "received_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the goods were received."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Receipt currency, ISO 4217: delivery note prices, line totals and subtotals are in it."
                    },
                    "exchange_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Rate of the receipt currency to the store currency as a decimal string, captured on receipt; null on a receipt without a captured rate."
                    },
                    "settlement_mode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "on_receipt",
                            "on_sale",
                            null
                        ],
                        "description": "How the store pays for the delivery: on_receipt — for what was received; on_sale — when sold, by a consignment settlement; null on older receipts."
                    },
                    "supplier_document": {
                        "type": "object",
                        "properties": {
                            "type_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Document type code of the tax provider of the store country (in Argentina, the ARCA comprobante code); null — no document."
                            },
                            "number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Delivery note number; null if not given."
                            },
                            "date": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Delivery note date, YYYY-MM-DD; null if not given."
                            }
                        },
                        "required": [
                            "type_code",
                            "number",
                            "date"
                        ],
                        "description": "Supplier delivery note as confirmed by staff."
                    },
                    "prices_include_tax": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "true — line prices include tax; false — they do not; null — not specified."
                    },
                    "input_tax_treatment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "recoverable",
                            "cost",
                            null
                        ],
                        "description": "Where the tax in the purchase price went: recoverable — it is credited, cost excludes tax; cost — nothing to credit it against, tax is part of cost; null — cost as entered."
                    },
                    "lines_subtotal": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Value received: the sum of line_total in the receipt currency; null — the document has no prices."
                    },
                    "payable_total": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Amount owed to the supplier in the receipt currency; null — unknown."
                    },
                    "voided_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the receipt was reversed: goods left stock, the delivery debt was voided; null on an active receipt."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Product variant ID (/v1/variants)."
                                },
                                "lot_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Lot of the line (/v1/lots); null for a product without lots."
                                },
                                "purchase_order_line_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Purchase order line (lines[].id of the order) the line was received against; null without an order."
                                },
                                "added_by_correction_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Correction (corrections[].id) that added the line; null on a line from posting."
                                },
                                "supplier_description": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Item name as on the delivery note; null if not recorded."
                                },
                                "supplier_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity as on the delivery note, in supplier_unit, as a decimal string; null if not recorded."
                                },
                                "supplier_unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Delivery note unit as written: \"kg\", \"15 kg\", \"pcs\"; null if not given."
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Base unit of quantity and cost_per_quantity: pcs — pieces, g — grams, ml — milliliters."
                                },
                                "quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity received into stock, a decimal string in the base unit."
                                },
                                "unit_cost": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Delivery note price in the receipt currency per cost_per_quantity; null — no price."
                                },
                                "cost_per_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity in the base unit the price is for: \"1000\" on a weighed product means per kilogram."
                                },
                                "line_total": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Line total in the receipt currency: price times the delivery note quantity; null without a price or delivery note quantity."
                                },
                                "store_unit_cost_micro": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Line price in the store currency at the receipt rate per cost_per_quantity, in millionths of the minor unit; null without a price."
                                },
                                "tax_rate_bps": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Tax rate the cost was computed with, in basis points; null — no tax treatment."
                                },
                                "landed_unit_cost_micro": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Cost after the tax treatment that the line set on the item: store currency, per cost_per_quantity, in millionths of the minor unit; null without a price."
                                }
                            },
                            "required": [
                                "id",
                                "variant_id",
                                "lot_id",
                                "purchase_order_line_id",
                                "added_by_correction_id",
                                "supplier_description",
                                "supplier_quantity",
                                "supplier_unit",
                                "unit",
                                "quantity",
                                "unit_cost",
                                "cost_per_quantity",
                                "line_total",
                                "store_unit_cost_micro",
                                "tax_rate_bps",
                                "landed_unit_cost_micro"
                            ]
                        },
                        "description": "Receipt lines; values are after corrections."
                    },
                    "corrections": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "number": {
                                    "type": "string",
                                    "description": "Correction number."
                                },
                                "reason": {
                                    "type": "string",
                                    "description": "Why it was corrected, in the words of staff."
                                },
                                "subtotal_before": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "lines_subtotal before the correction; null — there were no prices."
                                },
                                "subtotal_after": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "lines_subtotal after the correction; null — there are no prices."
                                },
                                "consumed_variance": {
                                    "type": "integer",
                                    "description": "Price difference on goods that had already left stock, in the store currency: it went to the cost of goods sold."
                                },
                                "lines": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "goods_receipt_line_id": {
                                                "type": "integer",
                                                "description": "Receipt line ID (lines[].id)."
                                            },
                                            "quantity_before": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Received quantity before the correction, in the base unit."
                                            },
                                            "quantity_after": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Received quantity after the correction, in the base unit."
                                            },
                                            "supplier_quantity_before": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Delivery note quantity before the correction; null if there was none."
                                            },
                                            "supplier_quantity_after": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Delivery note quantity after the correction; null if there is none."
                                            },
                                            "unit_cost_before": {
                                                "type": [
                                                    "integer",
                                                    "null"
                                                ],
                                                "description": "Delivery note price before the correction; null — no price."
                                            },
                                            "unit_cost_after": {
                                                "type": [
                                                    "integer",
                                                    "null"
                                                ],
                                                "description": "Delivery note price after the correction; null — no price."
                                            },
                                            "store_unit_cost_before_micro": {
                                                "type": [
                                                    "integer",
                                                    "null"
                                                ],
                                                "description": "Price in the store currency before the correction, in millionths of the minor unit."
                                            },
                                            "store_unit_cost_after_micro": {
                                                "type": [
                                                    "integer",
                                                    "null"
                                                ],
                                                "description": "Price in the store currency after the correction, in millionths of the minor unit."
                                            },
                                            "consumed_quantity": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "How much of the line had already left stock at the time of the correction."
                                            },
                                            "consumed_variance": {
                                                "type": "integer",
                                                "description": "Price difference on what had left stock, in the store currency."
                                            }
                                        },
                                        "required": [
                                            "goods_receipt_line_id",
                                            "quantity_before",
                                            "quantity_after",
                                            "supplier_quantity_before",
                                            "supplier_quantity_after",
                                            "unit_cost_before",
                                            "unit_cost_after",
                                            "store_unit_cost_before_micro",
                                            "store_unit_cost_after_micro",
                                            "consumed_quantity",
                                            "consumed_variance"
                                        ]
                                    },
                                    "description": "Corrected lines, before and after."
                                },
                                "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the correction was posted."
                                }
                            },
                            "required": [
                                "id",
                                "number",
                                "reason",
                                "subtotal_before",
                                "subtotal_after",
                                "consumed_variance",
                                "lines",
                                "created_at"
                            ]
                        },
                        "description": "Corrections of the posted receipt in order: what was fixed and why."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "number",
                    "supplier_id",
                    "location_id",
                    "legal_entity_id",
                    "purchase_order_id",
                    "received_at",
                    "currency",
                    "exchange_rate",
                    "settlement_mode",
                    "supplier_document",
                    "prices_include_tax",
                    "input_tax_treatment",
                    "lines_subtotal",
                    "payable_total",
                    "voided_at",
                    "note",
                    "lines",
                    "corrections",
                    "created_at",
                    "updated_at"
                ]
            },
            "InventoryChange": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": [
                            "applied",
                            "unchanged",
                            "pending_approval"
                        ],
                        "description": "Outcome of the write: applied — the stock changed; unchanged — the stock already had this value; pending_approval — the write-off waits for approval in the store: on_hand has not changed yet, available already excludes the held quantity."
                    },
                    "inventory_level": {
                        "$ref": "#/components/schemas/InventoryLevel",
                        "description": "Stock level of the pair after the write."
                    }
                },
                "required": [
                    "status",
                    "inventory_level"
                ]
            },
            "InventoryLevel": {
                "type": "object",
                "properties": {
                    "variant_id": {
                        "type": "integer",
                        "description": "ID of the variant. Together with location_id it identifies the stock level; a pair missing from the list has zero stock."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "ID of the store location."
                    },
                    "on_hand": {
                        "type": "string",
                        "description": "Physical stock at the location across all its bins, a decimal string in the unit of the variant. Setting stock names and checks this value."
                    },
                    "reserved": {
                        "type": "string",
                        "description": "Quantity reserved for orders, a decimal string in the unit of the variant."
                    },
                    "available": {
                        "type": "string",
                        "description": "Quantity that can be sold: stock that can be picked minus reservations, a decimal string. Negative when more was sold than there was."
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the stock level last changed; null when the pair has had no stock movements yet."
                    }
                },
                "required": [
                    "variant_id",
                    "location_id",
                    "on_hand",
                    "reserved",
                    "available",
                    "updated_at"
                ]
            },
            "LegalEntity": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "name": {
                        "type": "string",
                        "description": "Name of the legal entity as registered with the tax authority."
                    },
                    "tax_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Tax ID in the store country (CUIT in Argentina, 11 digits); null if not set."
                    },
                    "tax_status": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "registered",
                            "small_taxpayer",
                            "exempt",
                            null
                        ],
                        "description": "Tax status: registered — VAT payer (Responsable Inscripto in Argentina); small_taxpayer — simplified regime (Monotributo); exempt — VAT exempt. null if not set."
                    },
                    "is_default": {
                        "type": "boolean",
                        "description": "The default legal entity: it gets the sales not routed to other legal entities and the documents without an issuer."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — the legal entity is switched off: it gets no new sales; its documents and periods stay."
                    },
                    "issues_fiscal_documents": {
                        "type": "boolean",
                        "description": "Whether the legal entity issues fiscal documents; false — its sales go without a document."
                    },
                    "ar": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "tax_condition": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "responsable_inscripto",
                                    "monotributo",
                                    "exento",
                                    null
                                ],
                                "description": "Condición frente al IVA: responsable_inscripto, monotributo or exento; null if not set."
                            },
                            "regime_category": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Monotributo category (A…K); null if not set."
                            },
                            "regime_activity_kind": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "services",
                                    "goods",
                                    null
                                ],
                                "description": "Activity of the monotributo taxpayer, which sets the fee: services or goods; null if not set."
                            }
                        },
                        "required": [
                            "tax_condition",
                            "regime_category",
                            "regime_activity_kind"
                        ],
                        "description": "Argentina specifics; null for a store in another country."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "tax_id",
                    "tax_status",
                    "is_default",
                    "is_active",
                    "issues_fiscal_documents",
                    "ar",
                    "created_at",
                    "updated_at"
                ]
            },
            "Locale": {
                "type": "string",
                "enum": [
                    "ru",
                    "en",
                    "es"
                ]
            },
            "Location": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "address": {
                        "type": "string",
                        "description": "Address of the location in one line."
                    },
                    "coordinates": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "lat": {
                                "type": "number",
                                "description": "Latitude in degrees."
                            },
                            "lng": {
                                "type": "number",
                                "description": "Longitude in degrees."
                            }
                        },
                        "required": [
                            "lat",
                            "lng"
                        ],
                        "description": "Point of the location on the map; null when not set. A location without it is not shown on the storefront map."
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Phone of the location; null when not set."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false when the store has turned the location off."
                    },
                    "is_default": {
                        "type": "boolean",
                        "description": "The main location of the store: delivery orders take stock from it when no other location is chosen. A store has one."
                    },
                    "is_pickup_point": {
                        "type": "boolean",
                        "description": "Customers can pick up orders at the location."
                    },
                    "is_stock_source": {
                        "type": "boolean",
                        "description": "The location keeps goods: it has stock levels, receives deliveries, runs stocktakes and transfers."
                    },
                    "fulfills_online_orders": {
                        "type": "boolean",
                        "description": "The stock of the location is sold to customers online. Meaningful only when is_stock_source is true: a kitchen keeps goods but does not sell them."
                    },
                    "price_list_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Price list of the location: its selling prices over the base prices. null — the location sells at base prices. One list can serve several locations."
                    },
                    "working_hours": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "from": {
                                        "type": "string",
                                        "description": "Start of the interval, HH:MM."
                                    },
                                    "to": {
                                        "type": "string",
                                        "description": "End of the interval, HH:MM. An end earlier than the start means the interval goes past midnight."
                                    }
                                },
                                "required": [
                                    "from",
                                    "to"
                                ]
                            }
                        },
                        "description": "Opening hours: day of the week (mon, tue, wed, thu, fri, sat, sun) → list of intervals in the store time zone. A day without intervals is a day off."
                    },
                    "temporarily_closed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the location closed temporarily; null when it is open."
                    },
                    "reopens_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Date the temporarily closed location opens again, in the store time zone; null when it is open or the date is unknown."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "address",
                    "coordinates",
                    "phone",
                    "is_active",
                    "is_default",
                    "is_pickup_point",
                    "is_stock_source",
                    "fulfills_online_orders",
                    "price_list_id",
                    "working_hours",
                    "temporarily_closed_at",
                    "reopens_on",
                    "created_at",
                    "updated_at"
                ]
            },
            "LocationTransfer": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "number": {
                        "type": "string",
                        "description": "Transfer number in the store."
                    },
                    "source_location_id": {
                        "type": "integer",
                        "description": "ID of the location the goods left (/v1/locations)."
                    },
                    "destination_location_id": {
                        "type": "integer",
                        "description": "ID of the location the goods arrived at (/v1/locations)."
                    },
                    "origin": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "location_drain",
                            "reversal",
                            null
                        ],
                        "description": "Where the transfer came from when no person created it: location_drain — stock moved out when a location was switched off; reversal — return of a posted transfer. null — created by a staff member."
                    },
                    "reverses_location_transfer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the transfer this one returns; null for an ordinary transfer."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff comment; null if there is none."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "variant_id": {
                                    "type": "integer",
                                    "description": "Product variant ID (/v1/variants)."
                                },
                                "lot_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Lot ID (/v1/lots); null for goods without lots."
                                },
                                "quantity": {
                                    "type": "string",
                                    "description": "Quantity moved, as a decimal string in the variant unit."
                                }
                            },
                            "required": [
                                "id",
                                "variant_id",
                                "lot_id",
                                "quantity"
                            ]
                        },
                        "description": "Transfer lines: what moved and how much. The stock movements of the transfer are an outflow at the source and an inflow at the destination with document.type = location_transfer."
                    },
                    "executed_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the transfer was posted."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "number",
                    "source_location_id",
                    "destination_location_id",
                    "origin",
                    "reverses_location_transfer_id",
                    "comment",
                    "lines",
                    "executed_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "Lot": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "variant_id": {
                        "type": "integer",
                        "description": "Product variant ID (/v1/variants)."
                    },
                    "number": {
                        "type": "string",
                        "description": "Lot number — from the supplier's package or assigned by the store; unique within the variant."
                    },
                    "expires_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Best before, as an accounting date YYYY-MM-DD; null without an expiry date."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "available",
                            "hold",
                            "quarantine"
                        ],
                        "description": "Availability: available — for sale; hold — on hold; quarantine — quarantined. A held or quarantined lot stays in stock but is not sold or picked."
                    },
                    "received_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the lot arrived in stock."
                    },
                    "document": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "goods_receipt",
                                    "production_order",
                                    "stocktake"
                                ],
                                "description": "Document type: goods_receipt — goods receipt (/v1/goods-receipts); production_order — production order; stocktake — stocktake that found the goods."
                            },
                            "id": {
                                "type": "integer",
                                "description": "Document ID."
                            }
                        },
                        "required": [
                            "type",
                            "id"
                        ],
                        "description": "Document the lot arrived with; null when the lot was assigned to stock without a document."
                    },
                    "merged_into_lot_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the lot this one was merged into: stock and movements continue on it; null for a standalone lot."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "variant_id",
                    "number",
                    "expires_on",
                    "status",
                    "received_at",
                    "document",
                    "merged_into_lot_id",
                    "created_at",
                    "updated_at"
                ]
            },
            "ManualPaymentMethod": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "code": {
                        "type": "string",
                        "description": "Code of the record, unique in the store: it does not change when the record is renamed."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name of the payment method by language."
                    },
                    "settlement_currency": {
                        "type": "string",
                        "description": "Currency the money of the method arrives in, an ISO 4217 code."
                    },
                    "settles_on_receipt": {
                        "type": "boolean",
                        "description": "The customer pays when the order is handed over, such as a transfer to the courier; false — before the order is prepared."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — customers cannot choose the method."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Sort position: lower comes first."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the record was archived; null for a live record."
                    }
                },
                "required": [
                    "id",
                    "code",
                    "name",
                    "settlement_currency",
                    "settles_on_receipt",
                    "is_active",
                    "position",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ]
            },
            "Me": {
                "type": "object",
                "properties": {
                    "app": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer",
                                "description": "ID of the app."
                            },
                            "name": {
                                "type": "string",
                                "description": "Name of the app given by the store."
                            },
                            "description": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Description of the app; null when the store has not written one."
                            },
                            "scopes": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "description": "Scopes granted to the app: what its tokens may read and change."
                            },
                            "allowed_ips": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                },
                                "description": "IP addresses and CIDR ranges the app may call from; null means any address."
                            },
                            "all_locations": {
                                "type": "boolean",
                                "description": "true when the app works with every location of the store, including ones added later."
                            },
                            "location_ids": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "integer"
                                },
                                "description": "Locations the app works with when all_locations is false; null when it works with all of them."
                            },
                            "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the app was created."
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "description",
                            "scopes",
                            "allowed_ips",
                            "all_locations",
                            "location_ids",
                            "created_at"
                        ],
                        "description": "The app the token belongs to."
                    },
                    "token": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string",
                                "description": "Name of the token given when it was issued."
                            },
                            "prefix": {
                                "type": "string",
                                "description": "Visible prefix of the token: it tells tokens apart without revealing them."
                            },
                            "expires_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time",
                                "description": "When the token expires; null when it does not expire."
                            }
                        },
                        "required": [
                            "name",
                            "prefix",
                            "expires_at"
                        ],
                        "description": "The token of this request."
                    },
                    "store_id": {
                        "type": "integer",
                        "description": "ID of the store the token belongs to."
                    },
                    "rate_limits": {
                        "type": "object",
                        "properties": {
                            "app": {
                                "type": "object",
                                "properties": {
                                    "per_minute": {
                                        "type": "integer",
                                        "description": "Requests per minute the bucket refills at."
                                    },
                                    "burst": {
                                        "type": "integer",
                                        "description": "Requests that can go in a row before the per-minute rate applies."
                                    }
                                },
                                "required": [
                                    "per_minute",
                                    "burst"
                                ],
                                "description": "Bucket of the app, shared by all its tokens."
                            },
                            "store": {
                                "type": "object",
                                "properties": {
                                    "per_minute": {
                                        "type": "integer",
                                        "description": "Requests per minute the bucket refills at."
                                    },
                                    "burst": {
                                        "type": "integer",
                                        "description": "Requests that can go in a row before the per-minute rate applies."
                                    }
                                },
                                "required": [
                                    "per_minute",
                                    "burst"
                                ],
                                "description": "Bucket of the store, shared by all its apps."
                            }
                        },
                        "required": [
                            "app",
                            "store"
                        ],
                        "description": "Rate limits of the requests of the app."
                    }
                },
                "required": [
                    "app",
                    "token",
                    "store_id",
                    "rate_limits"
                ]
            },
            "MediaImport": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "app_id": {
                        "type": "integer",
                        "description": "ID of the app that asked for the download."
                    },
                    "product_id": {
                        "type": "integer",
                        "description": "ID of the product the photo goes to."
                    },
                    "url": {
                        "type": "string",
                        "description": "Address the photo is downloaded from."
                    },
                    "position": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Place in the gallery, starting from zero; null — at the end."
                    },
                    "is_primary": {
                        "type": "boolean",
                        "description": "The photo becomes the main one."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "succeeded",
                            "failed"
                        ],
                        "description": "pending — waiting or downloading; succeeded — the photo is in the gallery (media_id); failed — the photo was not added (error)."
                    },
                    "media_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The photo in the gallery, the id in media of the product; set when status is succeeded."
                    },
                    "error": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "enum": [
                                    "invalid_url",
                                    "blocked_address",
                                    "unreachable",
                                    "too_large",
                                    "access_denied",
                                    "not_found",
                                    "rate_limited",
                                    "http_error",
                                    "not_an_image",
                                    "image_dimensions_exceeded",
                                    "media_quota_exceeded",
                                    "product_deleted",
                                    "processing_failed"
                                ],
                                "description": "invalid_url — not an http or https address; blocked_address — the address leads to a private network; unreachable — the server did not respond; too_large — the file is larger than allowed; access_denied, not_found, rate_limited, http_error — the server responded with an error (source_status); not_an_image — the file is not an image; image_dimensions_exceeded — the image has too many pixels; media_quota_exceeded — the media storage of the store is full; product_deleted — the product was archived before the photo arrived; processing_failed — the image could not be processed."
                            },
                            "message": {
                                "type": "string",
                                "description": "The reason in words, in the language of the request."
                            },
                            "source_status": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "HTTP status the server of the photo responded with, for access_denied, not_found, rate_limited and http_error; otherwise null."
                            }
                        },
                        "required": [
                            "code",
                            "message",
                            "source_status"
                        ],
                        "description": "Why the photo was not added; set when status is failed."
                    },
                    "attempts": {
                        "type": "integer",
                        "description": "How many times the download was taken up: network and source failures are retried."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "finished_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the download finished; null while pending."
                    }
                },
                "required": [
                    "id",
                    "app_id",
                    "product_id",
                    "url",
                    "position",
                    "is_primary",
                    "status",
                    "media_id",
                    "error",
                    "attempts",
                    "created_at",
                    "updated_at",
                    "finished_at"
                ]
            },
            "ModifierGroup": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "min_select": {
                        "type": "integer",
                        "description": "How many options the customer must choose: 0 — the group is optional. A product can set its own rule (selection_rule)."
                    },
                    "max_select": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "How many options can be chosen in total, repeats included; null — no limit."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — the group is turned off and not offered on products."
                    },
                    "adds_ingredients": {
                        "type": "boolean",
                        "description": "Whether the group options change the dish composition; with true, an option without its own composition makes the item composition unknown (allergens)."
                    },
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "external_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                                },
                                "name": {
                                    "type": "object",
                                    "additionalProperties": true,
                                    "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                                },
                                "price_delta": {
                                    "type": "integer",
                                    "description": "Surcharge on the item price per portion of the option, an integer in minor units of the store currency; negative — a discount. A product can set its own surcharge by variant."
                                },
                                "max_quantity": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "How many times the option can be taken in one item; null — no own limit, only the group max_select applies."
                                },
                                "duration_minutes": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "How many minutes the option adds to a bookable service, a multiple of 5; null — none. Has no effect on other kinds of items."
                                },
                                "is_active": {
                                    "type": "boolean",
                                    "description": "false — the option is turned off and not offered."
                                },
                                "is_default": {
                                    "type": "boolean",
                                    "description": "The option is preselected: the storefront and the POS check it at once, and the server fills a required group left empty with it."
                                },
                                "adds_ingredients": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ],
                                    "description": "Whether this option changes the composition; null — as the group (adds_ingredients)."
                                },
                                "recipe_per_variant": {
                                    "type": "boolean",
                                    "description": "Consumption depends on the dish: no general composition, the amount is set by the recipe of each variant (option_recipes); without it the option is not offered on that variant."
                                },
                                "nutrition": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "kcal": {
                                            "type": "integer",
                                            "description": "Energy, kcal."
                                        },
                                        "protein_mg": {
                                            "type": "integer",
                                            "description": "Protein, mg."
                                        },
                                        "fat_mg": {
                                            "type": "integer",
                                            "description": "Fat, mg."
                                        },
                                        "carbs_mg": {
                                            "type": "integer",
                                            "description": "Carbohydrates, mg."
                                        }
                                    },
                                    "required": [
                                        "kcal",
                                        "protein_mg",
                                        "fat_mg",
                                        "carbs_mg"
                                    ],
                                    "description": "Nutrition of one use of the option declared by the store: all four numbers or null — then the option composition computes it."
                                },
                                "recipe": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "variant_id": {
                                                "type": "integer",
                                                "description": "ID of the product variant."
                                            },
                                            "quantity": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Component amount for one use of the option, a decimal string in the unit of the component; null — to taste: in the composition but not consumed."
                                            }
                                        },
                                        "required": [
                                            "variant_id",
                                            "quantity"
                                        ]
                                    },
                                    "description": "General composition of the option — what it consumes in any dish: ingredients and preps with their amount. Empty for a per-dish option. On write, the whole list, an empty one clears it; without the field the composition is left as it is."
                                }
                            },
                            "required": [
                                "id",
                                "external_id",
                                "name",
                                "price_delta",
                                "max_quantity",
                                "duration_minutes",
                                "is_active",
                                "is_default",
                                "adds_ingredients",
                                "recipe_per_variant",
                                "nutrition",
                                "recipe"
                            ]
                        },
                        "description": "Options in display order. On write, the whole set: a row finds its option by id or external_id, the found one gets the fields sent, a row without an option is new and carries name; an option missing from the set is archived and removed from open draft orders."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the record was archived; null for a live record."
                    }
                },
                "required": [
                    "id",
                    "external_id",
                    "version",
                    "name",
                    "min_select",
                    "max_select",
                    "is_active",
                    "adds_ingredients",
                    "options",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ]
            },
            "MoneyAccount": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "name": {
                        "type": "string",
                        "description": "Account name as the store sees it."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "bank",
                            "cash",
                            "acquiring",
                            "ewallet",
                            "crypto",
                            "advance",
                            "transit",
                            "group_share"
                        ],
                        "description": "Account kind: bank; cash; acquiring — payment provider; ewallet — e-wallet; crypto — crypto wallet; advance — staff advances of a location; transit — cash in transit (collection); group_share — share in a store group account: the money sits with the holder, the balance is a settlement with the group."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Account currency: an ISO 4217 code or an asset (USDT). May differ from the store currency."
                    },
                    "balance": {
                        "type": "string",
                        "description": "Current balance in the account currency, as a decimal string such as \"12345.5\"."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the legal entity that owns the account; null — a store account without a legal entity."
                    },
                    "location_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the account location; null — a store-wide account."
                    },
                    "is_default": {
                        "type": "boolean",
                        "description": "Default account for its currency."
                    },
                    "is_system": {
                        "type": "boolean",
                        "description": "System cash account (advance, transit): moved only by register documents."
                    },
                    "archived_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the account was archived: it takes no new movements, its history stays. null for an active account."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "type",
                    "currency",
                    "balance",
                    "legal_entity_id",
                    "location_id",
                    "is_default",
                    "is_system",
                    "archived_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "MoneyCategory": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the parent category; null for a top-level category."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "income",
                            "expense"
                        ],
                        "description": "income — income category; expense — expense category."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "system_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "sales",
                            "tips",
                            "other_income",
                            "carrier_claims",
                            "supplier_refunds",
                            "financing_surcharge",
                            "cash_overage",
                            "exchange_gain",
                            "customer_refunds",
                            "cash_shortage",
                            "exchange_loss",
                            "goods_purchase",
                            "payroll",
                            "rent",
                            "utilities",
                            "marketplace_fees",
                            "acquiring_fees",
                            "bank_fees",
                            "taxes",
                            "logistics",
                            "advertising",
                            "other_expense",
                            null
                        ],
                        "description": "System category code — identify the category by it, not by its name: sales, acquiring_fees — acquiring fees, taxes, cash_shortage and cash_overage — register shortage and overage, and others. null for a category created by the store."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Sort position: lower comes first."
                    },
                    "archived_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the category was archived: no new movements are posted to it. null for an active category."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "parent_id",
                    "kind",
                    "name",
                    "system_code",
                    "position",
                    "archived_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "MoneyTransaction": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "account_id": {
                        "type": "integer",
                        "description": "ID of the money account of the movement."
                    },
                    "direction": {
                        "type": "string",
                        "enum": [
                            "income",
                            "expense"
                        ],
                        "description": "income — money into the account; expense — money out of the account."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Posting amount in the minor units of the store currency, always positive: direction gives the sign. For a foreign-currency account it is converted at the snapshot rate."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "account_amount": {
                        "type": "string",
                        "description": "Amount in the account currency, as a decimal string."
                    },
                    "account_currency": {
                        "type": "string",
                        "description": "Account currency: an ISO 4217 code or an asset (USDT)."
                    },
                    "exchange_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Snapshot rate: 1 unit of the account currency = exchange_rate units of the store currency, as a decimal string. null for an account in the store currency."
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Moment of the movement."
                    },
                    "occurred_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Accounting date, YYYY-MM-DD in the store time zone."
                    },
                    "category_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Category ID; null for a transfer between accounts or a movement without a category."
                    },
                    "supplier_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the supplier counterparty; null if there is none."
                    },
                    "transfer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Shared ID of the legs of a transfer between accounts: the expense from one account and the income to the other carry the same one. null if not a transfer."
                    },
                    "reverses_transaction_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the movement this one reverses; null for a regular movement."
                    },
                    "origin": {
                        "type": "string",
                        "enum": [
                            "manual",
                            "statement",
                            "sales",
                            "refunds",
                            "disputes",
                            "pos",
                            "suppliers",
                            "payroll",
                            "opening_balance",
                            "exchange_differences",
                            "group_stores"
                        ],
                        "description": "Source class: manual — entered by a person; sales; refunds; disputes; pos — register and safe; suppliers; payroll; statement — bank statement; opening_balance; exchange_differences; group_stores — operations of group stores on a shared account."
                    },
                    "source": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "payment",
                                    "payment_tip",
                                    "payment_tip_refund",
                                    "payment_surcharge",
                                    "payment_surcharge_refund",
                                    "payment_overpayment",
                                    "payment_change",
                                    "payment_change_counter",
                                    "payment_provider_fee",
                                    "payment_provider_fee_refund",
                                    "payment_withheld_tax",
                                    "payment_withheld_tax_refund",
                                    "refund",
                                    "dispute",
                                    "pos_shift",
                                    "pos_shift_drawer",
                                    "pos_cash_transfer",
                                    "pos_cash_transfer_counter",
                                    "pos_cash_shared_safe",
                                    "pos_cash_shared_safe_counter",
                                    "pos_cash_movement",
                                    "pos_drawer_movement",
                                    "pos_cash_advance_expense",
                                    "pos_cash_advance_expense_void",
                                    "pos_cash_bank_credit",
                                    "pos_cash_bank_credit_counter",
                                    "pos_cash_bank_credit_difference",
                                    "payroll_period",
                                    "purchase_order",
                                    "supplier_bill_payment",
                                    "supplier_return_refund",
                                    "statement_line",
                                    "opening_balance",
                                    "exchange_difference",
                                    "group_member_operation"
                                ],
                                "description": "Posting kind. payment and payment_* — a payment income and its parts (tip, surcharge, change, provider fee, withheld tax); refund — a refund payout; pos_* — register documents; supplier_bill_payment — a supplier bill payment; exchange_difference — an exchange difference."
                            },
                            "id": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "ID of the source record: for payment and payment_* — the payment ID, for refund — an ID from the refund transactions[], for exchange_difference — the expense movement ID; for the others — an internal ID."
                            }
                        },
                        "required": [
                            "type",
                            "id"
                        ],
                        "description": "The record that posted the movement; null if entered manually."
                    },
                    "document": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "order",
                                    "dispute",
                                    "pos_shift",
                                    "pos_safe",
                                    "purchase_order",
                                    "supplier_bill",
                                    "supplier_return",
                                    "payroll",
                                    "statement_import",
                                    "money_accounts"
                                ],
                                "description": "Document kind: order; pos_shift — register shift; supplier_bill; purchase_order; supplier_return; dispute; payroll — payroll period; pos_safe — register safe; statement_import — statement import; money_accounts — account opening balance."
                            },
                            "id": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Document ID; null for registers without a record of their own: pos_safe, statement_import, money_accounts."
                            }
                        },
                        "required": [
                            "type",
                            "id"
                        ],
                        "description": "Primary document of the movement; null if entered manually or the document lives in the books of another group store."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Movement comment as a person or a document wrote it; null if there is none."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "account_id",
                    "direction",
                    "amount",
                    "currency",
                    "account_amount",
                    "account_currency",
                    "exchange_rate",
                    "occurred_at",
                    "occurred_on",
                    "category_id",
                    "supplier_id",
                    "transfer_id",
                    "reverses_transaction_id",
                    "origin",
                    "source",
                    "document",
                    "description",
                    "created_at",
                    "updated_at"
                ]
            },
            "MoneyTransactionDirection": {
                "type": "string",
                "enum": [
                    "income",
                    "expense"
                ]
            },
            "MoneyTransfer": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the transfer — the transfer_id of its legs in the money journal (/v1/money-transactions)."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "from_account_id": {
                        "type": "integer",
                        "description": "ID of the money account the money left."
                    },
                    "to_account_id": {
                        "type": "integer",
                        "description": "ID of the money account the money arrived at."
                    },
                    "from_amount": {
                        "type": "string",
                        "description": "Amount taken from from_account_id in its currency, as a decimal string."
                    },
                    "from_currency": {
                        "type": "string",
                        "description": "Currency of the source account: ISO 4217 code or crypto code."
                    },
                    "to_amount": {
                        "type": "string",
                        "description": "Amount credited to to_account_id in its currency, as a decimal string. In the same currency it equals from_amount: any difference is the fee."
                    },
                    "to_currency": {
                        "type": "string",
                        "description": "Currency of the destination account."
                    },
                    "fee": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Transfer fee in the currency of the source account, as a decimal string — an expense on the system category bank_fees; null when there is no fee."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Value of the transfer in minor units of the store currency: both legs carry it. The ledger posts the exchange difference of a currency exchange as a separate transaction."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Moment of the transfer."
                    },
                    "occurred_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Accounting date of the transfer, YYYY-MM-DD in the store time zone."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Description of the transfer; null when not set."
                    },
                    "from_transaction_id": {
                        "type": "integer",
                        "description": "ID of the expense transaction on the source account."
                    },
                    "to_transaction_id": {
                        "type": "integer",
                        "description": "ID of the income transaction on the destination account."
                    },
                    "fee_transaction_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the fee transaction; null when there is no fee."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "from_account_id",
                    "to_account_id",
                    "from_amount",
                    "from_currency",
                    "to_amount",
                    "to_currency",
                    "fee",
                    "amount",
                    "currency",
                    "occurred_at",
                    "occurred_on",
                    "description",
                    "from_transaction_id",
                    "to_transaction_id",
                    "fee_transaction_id",
                    "created_at"
                ]
            },
            "Order": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Number of the order shown to the customer and the staff; null while the order has none yet."
                    },
                    "channel": {
                        "type": "string",
                        "enum": [
                            "web",
                            "pos",
                            "marketplace",
                            "external",
                            "manual",
                            "subscription"
                        ],
                        "description": "Where the order came from: web — the storefront; pos — the register; marketplace — a marketplace such as Mercado Libre; external — an accounting system of the store; manual — a draft order of the staff or an app; subscription — a day of a meal subscription."
                    },
                    "app_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The app that placed the order from its draft order (/v1/draft-orders), its id from /v1/me; null for orders of the storefront, the register or the staff."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "Location that serves the order: the pickup point or the location the stock is taken from."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Legal entity the sale is made under (/v1/legal-entities); null — the sale is not split between legal entities, and its legal entity is the store default."
                    },
                    "status": {
                        "type": "string",
                        "description": "Status of the order: a code from the status list of the store (/v1/order-statuses). A store can add its own statuses; status_group gives the lasting meaning."
                    },
                    "status_group": {
                        "type": "string",
                        "enum": [
                            "pos_open",
                            "placed",
                            "pending_payment",
                            "paid",
                            "confirmed",
                            "preparing",
                            "ready",
                            "ready_for_pickup",
                            "out_for_delivery",
                            "delivery_failed",
                            "delivered",
                            "completed",
                            "cancelled",
                            "refunded"
                        ],
                        "description": "Lasting meaning of the status: pos_open — an open bill at the register; placed; pending_payment — waiting for payment; paid; confirmed — accepted by the store; preparing; ready; ready_for_pickup; out_for_delivery; delivery_failed; delivered; completed; cancelled; refunded."
                    },
                    "payment_status": {
                        "type": "string",
                        "enum": [
                            "unpaid",
                            "partial",
                            "paid",
                            "partially_refunded",
                            "refunded"
                        ],
                        "description": "Payment of the order: unpaid; partial — paid in part; paid; partially_refunded; refunded."
                    },
                    "sale_type": {
                        "type": "string",
                        "enum": [
                            "retail",
                            "staff",
                            "wholesale"
                        ],
                        "description": "retail — a sale to a customer; staff — a sale to an employee; wholesale — a wholesale sale."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "items_total": {
                        "type": "integer",
                        "description": "Sum of the items before the order discount."
                    },
                    "discount": {
                        "type": "integer",
                        "description": "Discount on the order's goods: the sum of applied_discounts[].amount and of items[].discount."
                    },
                    "applied_discounts": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "Log row; items[].discount_allocations[].applied_discount_id points to it."
                                },
                                "source": {
                                    "type": "string",
                                    "enum": [
                                        "promocode",
                                        "automatic",
                                        "pick",
                                        "manual",
                                        "offline_capture",
                                        "loyalty_program",
                                        "external_pos"
                                    ],
                                    "description": "How the discount got into the order: automatic — a store rule; pick — a rule the cashier selected; promocode — the buyer's promo code; manual — a cashier's manual discount; offline_capture — the gap between an offline register sale and the server's calculation, not a seller's decision; loyalty_program — a loyalty program; external_pos — the external POS that made the sale."
                                },
                                "kind": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "promo",
                                        "employee",
                                        "expiry",
                                        "payment_method",
                                        "markdown",
                                        "goodwill",
                                        "comp",
                                        "other",
                                        null
                                    ],
                                    "description": "What the discount is for: promo — a promotion; employee — for staff; expiry — markdown for the expiry date; payment_method — for the payment method; markdown — markdown for the condition of the goods; goodwill — a gesture to the buyer; comp — on the house; other — something else. null — a discount of the external POS, an offline gap or a discount from before this axis existed."
                                },
                                "name": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": true,
                                    "description": "Name of the rule or loyalty program at the time of sale; null for a promo code, a manual discount, an offline gap and the external POS."
                                },
                                "code": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "The promo code the buyer entered; null — not a promo code discount."
                                },
                                "reason": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "The cashier's reason for a manual discount; null for the rest."
                                },
                                "order_item_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "The item marked down on its own; null — a discount on the order, its shares per item are in items[].discount_allocations."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Discount amount."
                                }
                            },
                            "required": [
                                "id",
                                "source",
                                "kind",
                                "name",
                                "code",
                                "reason",
                                "order_item_id",
                                "amount"
                            ]
                        },
                        "description": "What the discount on goods is made of — the log of applied discounts. Rows are rewritten when the order is recalculated: an id lives until then."
                    },
                    "delivery_cost": {
                        "type": "integer",
                        "description": "Delivery to pay, after the delivery discount."
                    },
                    "delivery_discount": {
                        "type": "integer",
                        "description": "Taken off the delivery by a discount: the delivery price before it is delivery_cost + delivery_discount."
                    },
                    "delivery_discounts": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "Row of the delivery discount log."
                                },
                                "source": {
                                    "type": "string",
                                    "enum": [
                                        "promocode",
                                        "automatic",
                                        "pick",
                                        "manual",
                                        "offline_capture",
                                        "loyalty_program",
                                        "external_pos"
                                    ],
                                    "description": "How the discount got into the order — values as in applied_discounts[].source."
                                },
                                "kind": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "promo",
                                        "employee",
                                        "expiry",
                                        "payment_method",
                                        "markdown",
                                        "goodwill",
                                        "comp",
                                        "other",
                                        null
                                    ],
                                    "description": "What the discount is for — values as in applied_discounts[].kind."
                                },
                                "name": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": true,
                                    "description": "Name of the rule at the time of sale; null — a promo code discount."
                                },
                                "code": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "The promo code the buyer entered; null — not a promo code discount."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Delivery discount amount."
                                }
                            },
                            "required": [
                                "id",
                                "source",
                                "kind",
                                "name",
                                "code",
                                "amount"
                            ]
                        },
                        "description": "What the delivery discount is made of: the sum of amount equals delivery_discount."
                    },
                    "delivery_tax_lines": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/TaxLine"
                        },
                        "description": "Tax of the delivery by the default tax class of the store: its share of the tax of its rate in tax_lines; null when there is no delivery to pay or the tax is unknown."
                    },
                    "platform_discount": {
                        "type": "integer",
                        "description": "Discount paid by the aggregator platform: it does not reduce the sale of the store."
                    },
                    "platform_service_fee": {
                        "type": "integer",
                        "description": "Service fee of the aggregator platform: part of total, but not a sale of the store."
                    },
                    "platform_delivery_fee": {
                        "type": "integer",
                        "description": "Delivery carried by the aggregator platform: part of total, but not a sale of the store."
                    },
                    "total": {
                        "type": "integer",
                        "description": "Amount of the order to pay."
                    },
                    "tax_lines": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/TaxLine"
                        },
                        "description": "Tax of the sale by the classification of the products at the time of the sale: the taxable part of the order (items except gift card sales, visits beyond what a package paid, delivery) by rate. For each rate the tax_lines of the items and delivery_tax_lines add up to the line of the order. The legally binding tax is in the fiscal document: the issuing legal entity sets it by its tax status. null when the store has no tax classes or the order has no taxable part."
                    },
                    "gift_card_issue_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Face value of the gift card the order sells: a liability of the store, not revenue; null when the order does not sell a gift card."
                    },
                    "reservation_deposit_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Deposit for a table reservation or a booking: a prepayment, not revenue; null when the order is not a deposit."
                    },
                    "account_payment_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Payment against the debt of the customer: money received for the debt, not revenue; null when the order is not a debt payment."
                    },
                    "service_package_issue_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Visit packages sold in the order: the store owes these visits, so it is not revenue — revenue comes when a visit is redeemed from the package; null when the order has no packages."
                    },
                    "payment_method": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "cash",
                            "mercadopago",
                            "crypto",
                            "bybit",
                            "trc20",
                            "balance",
                            "modo",
                            "payway",
                            "mercadopago_qr",
                            "mercadopago_point",
                            "mercadopago_transfer",
                            "gift_card",
                            "subscription",
                            "deposit",
                            "external",
                            "manual",
                            "offset",
                            "on_account",
                            "exchange_credit",
                            "bonpunto",
                            "service_package",
                            null
                        ],
                        "description": "Payment method chosen when the order was placed: manual — a manual method of the store (manual_payment_method_id). The actual payments are in /v1/payments. null when none was chosen."
                    },
                    "manual_payment_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Manual payment method of the store (/v1/manual-payment-methods) when payment_method is manual; otherwise null."
                    },
                    "delivery_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Delivery method of the store (/v1/delivery-methods); null when the order has none, such as a sale at the register."
                    },
                    "fulfilment_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "self_pickup",
                            "home_delivery",
                            "parcel_locker",
                            "mail_post",
                            "pos",
                            "aggregator",
                            "manual_courier",
                            null
                        ],
                        "description": "How the order reaches the customer, by its delivery method at the time of the order: self_pickup — pickup at a location; home_delivery — delivery to an address; parcel_locker — a parcel locker; mail_post — by post; pos — handed over at the register; aggregator — delivered by an aggregator platform; manual_courier — a courier the store arranges itself. null when unknown."
                    },
                    "delivery_slots": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "from": {
                                    "type": "string",
                                    "description": "Start of the window."
                                },
                                "to": {
                                    "type": "string",
                                    "description": "End of the window."
                                }
                            },
                            "required": [
                                "from",
                                "to"
                            ]
                        },
                        "description": "Delivery windows chosen by the customer, by start; empty when there is no window."
                    },
                    "shipment": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "carrier": {
                                "type": "string",
                                "enum": [
                                    "andreani",
                                    "correo_argentino",
                                    "uber_direct",
                                    "mercadolibre",
                                    "courier_service"
                                ],
                                "description": "The carrier as a module key: andreani, correo_argentino, uber_direct, mercadolibre (Mercado Envíos); courier_service — a delivery service without integration whose number the store entered (POST /v1/orders/{order}/shipment/tracking), the service is in carrier_name, no statuses."
                            },
                            "carrier_name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The service as the store named it, for a manually entered number; null for an integrated carrier (carrier names it) or when the store didn't name the service."
                            },
                            "tracking_number": {
                                "type": "string",
                                "description": "The shipment number at the carrier: it is found in the carrier account and tracked by it."
                            },
                            "tracking_url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "The tracking page at the carrier; null when the carrier gave none."
                            },
                            "status": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "accepted",
                                    "preparing",
                                    "courier_assigned",
                                    "picked_up",
                                    "in_transit",
                                    "arrived_at_branch",
                                    "out_for_delivery",
                                    "delivery_failed",
                                    "delivered",
                                    "not_delivered",
                                    "returned",
                                    "lost",
                                    "cancelled",
                                    "unknown",
                                    null
                                ],
                                "description": "The latest status: accepted — accepted, the parcel is still at the store; preparing — the carrier is preparing the dispatch; courier_assigned — a courier is on the way to pick it up; picked_up — picked up; in_transit — in transit; arrived_at_branch — waiting at a branch; out_for_delivery — with the last-mile courier; delivery_failed — a delivery attempt failed, the carrier will retry; delivered — delivered; not_delivered — the carrier gave up delivering; returned — returned to the sender; lost — lost; cancelled — cancelled; unknown — a carrier status outside this set, its text is in events[].description. null when there is no status yet. A late intermediate status does not undo delivered, cancelled, returned or lost."
                            },
                            "status_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time",
                                "description": "When the latest status happened."
                            },
                            "events": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "enum": [
                                                "accepted",
                                                "preparing",
                                                "courier_assigned",
                                                "picked_up",
                                                "in_transit",
                                                "arrived_at_branch",
                                                "out_for_delivery",
                                                "delivery_failed",
                                                "delivered",
                                                "not_delivered",
                                                "returned",
                                                "lost",
                                                "cancelled",
                                                "unknown"
                                            ],
                                            "description": "The status — values as in shipment.status."
                                        },
                                        "description": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "The status in the carrier's words; null when the carrier gave no text."
                                        },
                                        "occurred_at": {
                                            "type": "string",
                                            "format": "date-time",
                                            "description": "When the event happened at the carrier."
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "description",
                                        "occurred_at"
                                    ]
                                },
                                "description": "Status history by the time of the event at the carrier."
                            },
                            "label_available": {
                                "type": "boolean",
                                "description": "The label can be downloaded: the store holds the file or the carrier serves it on request."
                            }
                        },
                        "required": [
                            "carrier",
                            "carrier_name",
                            "tracking_number",
                            "tracking_url",
                            "status",
                            "status_at",
                            "events",
                            "label_available"
                        ],
                        "description": "The carrier shipment, or the number of a non-integrated delivery service entered by the store; null when the order has none. The label is at GET /v1/orders/{order}/shipment/label when label_available is true."
                    },
                    "previous_shipments": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "carrier": {
                                    "type": "string",
                                    "enum": [
                                        "andreani",
                                        "correo_argentino",
                                        "uber_direct",
                                        "mercadolibre",
                                        "courier_service"
                                    ],
                                    "description": "The carrier — values as in shipment.carrier."
                                },
                                "carrier_name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "The service of a manually entered number — as in shipment.carrier_name."
                                },
                                "tracking_number": {
                                    "type": "string",
                                    "description": "The shipment number at the carrier."
                                },
                                "tracking_url": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "The tracking page at the carrier; null when the carrier gave none."
                                },
                                "status": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "accepted",
                                        "preparing",
                                        "courier_assigned",
                                        "picked_up",
                                        "in_transit",
                                        "arrived_at_branch",
                                        "out_for_delivery",
                                        "delivery_failed",
                                        "delivered",
                                        "not_delivered",
                                        "returned",
                                        "lost",
                                        "cancelled",
                                        "unknown",
                                        null
                                    ],
                                    "description": "The latest status — values as in shipment.status."
                                },
                                "status_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the latest status happened."
                                },
                                "events": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "status": {
                                                "type": "string",
                                                "enum": [
                                                    "accepted",
                                                    "preparing",
                                                    "courier_assigned",
                                                    "picked_up",
                                                    "in_transit",
                                                    "arrived_at_branch",
                                                    "out_for_delivery",
                                                    "delivery_failed",
                                                    "delivered",
                                                    "not_delivered",
                                                    "returned",
                                                    "lost",
                                                    "cancelled",
                                                    "unknown"
                                                ],
                                                "description": "The status — values as in shipment.status."
                                            },
                                            "description": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The status in the carrier's words; null when the carrier gave no text."
                                            },
                                            "occurred_at": {
                                                "type": "string",
                                                "format": "date-time",
                                                "description": "When the event happened at the carrier."
                                            }
                                        },
                                        "required": [
                                            "status",
                                            "description",
                                            "occurred_at"
                                        ]
                                    },
                                    "description": "Status history by the time of the event at the carrier."
                                }
                            },
                            "required": [
                                "carrier",
                                "carrier_name",
                                "tracking_number",
                                "tracking_url",
                                "status",
                                "status_at",
                                "events"
                            ]
                        },
                        "description": "Shipments replaced by a re-issue (the previous one was cancelled and a new one issued), oldest first; same shape as shipment, without label_available."
                    },
                    "shipment_attempt": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "state": {
                                "type": "string",
                                "enum": [
                                    "queued",
                                    "in_progress",
                                    "outcome_unknown",
                                    "failed"
                                ],
                                "description": "queued — the issue was requested through the API and is waiting in the queue; in_progress — the request to the carrier is running right now; outcome_unknown — the connection to the carrier dropped after the request, and it is unknown whether the shipment was created: a new issue is blocked until the store checks with the carrier in the panel; failed — the requested issue failed and there is no shipment, the reason is in error."
                            },
                            "started_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the issue was requested or started."
                            },
                            "error": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "code": {
                                        "type": "string",
                                        "enum": [
                                            "no_carrier",
                                            "not_shippable",
                                            "awaits_bill_payment",
                                            "carrier_rejected",
                                            "shipment_data_invalid",
                                            "request_expired",
                                            "internal_error"
                                        ],
                                        "description": "The reason as a machine code: no_carrier — the delivery method has no integrated carrier; not_shippable — the order no longer ships; awaits_bill_payment — the bill is unpaid; carrier_rejected — the carrier refused; shipment_data_invalid — the order data or the carrier settings are incomplete; request_expired — the request was not processed in time; internal_error — a service failure before the carrier was contacted."
                                    },
                                    "message": {
                                        "type": "string",
                                        "description": "The reason in the store's words in the response language; when the carrier refused, with its words."
                                    }
                                },
                                "required": [
                                    "code",
                                    "message"
                                ],
                                "description": "Why the requested issue failed; null unless it failed."
                            }
                        },
                        "required": [
                            "state",
                            "started_at",
                            "error"
                        ],
                        "description": "An unfinished shipment issue; null when there is none."
                    },
                    "merged_into_order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The order this one was merged into when bills of a table were joined: its items and payments are there, and this order stays an empty cancelled record. null when not merged."
                    },
                    "cancel_reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "payment_init_failed",
                            "payment_declined",
                            "cashier_void",
                            "shift_closed",
                            "order_timeout",
                            "merged",
                            "items_moved",
                            "sale_void",
                            "subscription_day_unserved",
                            "booking_forfeit_reverted",
                            "service_package_term_extended",
                            "membership_renewal_void",
                            null
                        ],
                        "description": "System reason of the cancellation: payment_init_failed — the payment could not start; payment_declined — the payment was declined; cashier_void — voided at the register; shift_closed — the shift of the register closed; order_timeout — not paid in time; merged — merged into another order; items_moved — the items moved to another order; sale_void — the sale was voided; subscription_day_unserved — a day of a subscription was not served; booking_forfeit_reverted — the forfeit of a booking was reverted; service_package_term_extended — a visit package term was extended and its expiry reverted; membership_renewal_void — a membership renewal invoice was voided: the membership was cancelled or ended. null when not cancelled or when a person gave the reason."
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the item."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Variant of the item; null for an item without a variant, such as a gift card sold at the register."
                                },
                                "product_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Product of the item; null for an item without a variant."
                                },
                                "product_name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    },
                                    "description": "Name of the product at the time of the sale, by language."
                                },
                                "variant_name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    },
                                    "description": "Name of the variant at the time of the sale, by language; an empty object when the variant had no name."
                                },
                                "quantity": {
                                    "type": "string",
                                    "description": "Quantity, a decimal string in unit: pieces for an item sold by the piece, the measure for an item sold by weight or volume (\"480\" grams)."
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "pcs",
                                        "g",
                                        "ml",
                                        null
                                    ],
                                    "description": "Unit of quantity: pcs, g or ml; null when the variant no longer knows the unit of its measure."
                                },
                                "unit_price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Price of one piece; null for an item sold by weight or volume, its amount is in total."
                                },
                                "total": {
                                    "type": "integer",
                                    "description": "Amount of the item."
                                },
                                "discount": {
                                    "type": "integer",
                                    "description": "Discount on the item."
                                },
                                "discount_allocations": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "applied_discount_id": {
                                                "type": "integer",
                                                "description": "Row of applied_discounts of this order."
                                            },
                                            "amount": {
                                                "type": "integer",
                                                "description": "This discount's share on the item."
                                            }
                                        },
                                        "required": [
                                            "applied_discount_id",
                                            "amount"
                                        ]
                                    },
                                    "description": "Which log discounts make up the item's discount: the sum of amount equals items[].discount."
                                },
                                "is_gift": {
                                    "type": "boolean",
                                    "description": "A gift of a promotion or a promo code: the item is priced and fully discounted."
                                },
                                "tax_lines": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "$ref": "#/components/schemas/TaxLine"
                                    },
                                    "description": "Tax of the item: its share of the tax of its rate in tax_lines of the order. It covers the taxable part of the item: a visit partly paid by a package counts only the rest. null for an item outside the sale (a gift card sale, a visit fully paid by a package, a fully discounted item) or when the tax is unknown."
                                },
                                "cost_amount": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Cost of the item at the time of the sale: an amount in minor units of currency for the whole item, not a rate. null when it was not calculated. Only with the costs:read scope."
                                },
                                "cost_basis": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "variant",
                                        "recipe",
                                        "unknown",
                                        "backfill",
                                        "standard",
                                        "partial",
                                        "external",
                                        null
                                    ],
                                    "description": "How the cost was calculated: variant — the cost of the variant; recipe — the sum of the recipe; standard — by the standard recipe, an estimate; partial — only the known part of the recipe, a lower bound; backfill — estimated later by the catalog cost, not at the time of the sale; external — taken from the external register that made the sale; unknown — nothing to calculate from. Only with the costs:read scope."
                                }
                            },
                            "required": [
                                "id",
                                "variant_id",
                                "product_id",
                                "product_name",
                                "variant_name",
                                "quantity",
                                "unit",
                                "unit_price",
                                "total",
                                "discount",
                                "discount_allocations",
                                "is_gift",
                                "tax_lines"
                            ]
                        },
                        "description": "Items of the order: a historical record, names are as at the time of the sale."
                    },
                    "customer": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer",
                                "description": "ID of the record, unique among records of its kind in the store."
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Name of the customer; null when unknown."
                            },
                            "phone": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Main phone of the customer in E.164 format, such as +5491123456789; null when unknown."
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Email of the customer; null when unknown."
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "phone",
                            "email"
                        ],
                        "description": "The customer of the order; null for an order without a customer. Only with the customers:read scope."
                    },
                    "delivery_address": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "kind": {
                                "type": "string",
                                "enum": [
                                    "address",
                                    "branch"
                                ],
                                "description": "address — an address of the customer; branch — a pickup branch of a carrier (branch, address_line)."
                            },
                            "recipient": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Who receives the order; null when not given."
                            },
                            "phone": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Phone of the recipient; null when not given."
                            },
                            "street": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Street."
                            },
                            "house": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "House number."
                            },
                            "apartment": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Apartment or office."
                            },
                            "floor": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Floor."
                            },
                            "entrance": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Entrance."
                            },
                            "district": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "District or neighborhood."
                            },
                            "city": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "City."
                            },
                            "province": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Province or state."
                            },
                            "postal_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Postal code."
                            },
                            "address_line": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Address of the carrier branch in one line; null for an address of the customer."
                            },
                            "comment": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Comment of the customer about the address, such as how to get in."
                            },
                            "location": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "lat": {
                                        "type": "number",
                                        "description": "Latitude in degrees."
                                    },
                                    "lng": {
                                        "type": "number",
                                        "description": "Longitude in degrees."
                                    }
                                },
                                "required": [
                                    "lat",
                                    "lng"
                                ],
                                "description": "Point of the address on the map; null when unknown."
                            },
                            "branch": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "external_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "ID of the branch in the system of the carrier."
                                    },
                                    "name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Name of the branch."
                                    }
                                },
                                "required": [
                                    "external_id",
                                    "name"
                                ],
                                "description": "The carrier branch when kind is branch; otherwise null."
                            }
                        },
                        "required": [
                            "kind",
                            "recipient",
                            "phone",
                            "street",
                            "house",
                            "apartment",
                            "floor",
                            "entrance",
                            "district",
                            "city",
                            "province",
                            "postal_code",
                            "address_line",
                            "comment",
                            "location",
                            "branch"
                        ],
                        "description": "Delivery address at the time of the order; null for pickup — the pickup point is location_id. Only with the customers:read scope."
                    },
                    "customer_comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Comment of the customer to the order. Only with the customers:read scope."
                    },
                    "fiscal_receptor": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id_type": {
                                "type": "string",
                                "enum": [
                                    "tax_id",
                                    "personal_id",
                                    "national_id",
                                    "passport",
                                    "none"
                                ],
                                "description": "Kind of ID: tax_id — tax ID of a business (CUIT in Argentina); personal_id — tax ID of a person (CUIL); national_id — national identity document (DNI); passport; none — no ID."
                            },
                            "id_number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Number of the ID; null when id_type is none."
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Legal or full name for the document; null when not given."
                            },
                            "tax_status": {
                                "type": "string",
                                "enum": [
                                    "registered",
                                    "small_taxpayer",
                                    "exempt",
                                    "final_consumer",
                                    "not_categorized",
                                    "foreign"
                                ],
                                "description": "Tax status: registered — registered for VAT (Responsable Inscripto in Argentina); small_taxpayer — a simplified regime (Monotributo); exempt — exempt from VAT; final_consumer — a final consumer; not_categorized — not categorized; foreign — a foreign customer."
                            },
                            "address": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Fiscal address in one line; null when not given."
                            }
                        },
                        "required": [
                            "id_type",
                            "id_number",
                            "name",
                            "tax_status",
                            "address"
                        ],
                        "description": "Who the fiscal document of the order is issued to, frozen on the order; null for a retail sale without tax details. Only with the customers:read scope."
                    },
                    "external_fiscal_document": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "issuer": {
                                "type": "string",
                                "description": "The POS that issues the document: fudo is FuDo, poster is Poster."
                            },
                            "status": {
                                "type": "string",
                                "enum": [
                                    "pending",
                                    "issued"
                                ],
                                "description": "pending: the bill is open in the POS, which issues the document when it closes; issued: the POS issued the document."
                            },
                            "number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Document number in the POS; null until the document is issued or when the POS does not report the number."
                            }
                        },
                        "required": [
                            "issuer",
                            "status",
                            "number"
                        ],
                        "description": "The sale document in an external POS: the order went to the store POS or came from it, and the POS issues the document, not us — such an order has no fiscal documents. null when there is no POS document: the document is ours or the POS did not report it. Only with the fiscal:read scope."
                    },
                    "placed_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the order was placed."
                    },
                    "confirmed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the store confirmed the order; null until then."
                    },
                    "completed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the order was completed; null until then."
                    },
                    "cancelled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the order was cancelled; null when it was not."
                    },
                    "refunded_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the order was refunded in full; null when it was not."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "number",
                    "channel",
                    "app_id",
                    "location_id",
                    "legal_entity_id",
                    "status",
                    "status_group",
                    "payment_status",
                    "sale_type",
                    "currency",
                    "items_total",
                    "discount",
                    "applied_discounts",
                    "delivery_cost",
                    "delivery_discount",
                    "delivery_discounts",
                    "delivery_tax_lines",
                    "platform_discount",
                    "platform_service_fee",
                    "platform_delivery_fee",
                    "total",
                    "tax_lines",
                    "gift_card_issue_amount",
                    "reservation_deposit_amount",
                    "account_payment_amount",
                    "service_package_issue_amount",
                    "payment_method",
                    "manual_payment_method_id",
                    "delivery_method_id",
                    "fulfilment_type",
                    "delivery_slots",
                    "shipment",
                    "previous_shipments",
                    "shipment_attempt",
                    "merged_into_order_id",
                    "cancel_reason",
                    "items",
                    "placed_at",
                    "confirmed_at",
                    "completed_at",
                    "cancelled_at",
                    "refunded_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "OrderStatus": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "code": {
                        "type": "string",
                        "description": "Code of the status: the value of status of an order. Codes of system statuses are the same in every store."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name of the status by language, as the store shows it."
                    },
                    "status_group": {
                        "type": "string",
                        "enum": [
                            "pos_open",
                            "placed",
                            "pending_payment",
                            "paid",
                            "confirmed",
                            "preparing",
                            "ready",
                            "ready_for_pickup",
                            "out_for_delivery",
                            "delivery_failed",
                            "delivered",
                            "completed",
                            "cancelled",
                            "refunded"
                        ],
                        "description": "Lasting meaning of the status, the same values as status_group of an order."
                    },
                    "allowed_next": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Codes of the statuses an order can move to from this one, by the transition rules of the store. The move is also checked against the order: pickup orders do not go to a courier, delivery needs a courier, completion needs the order paid."
                    },
                    "is_system": {
                        "type": "boolean",
                        "description": "A system status: one per meaning of status_group, the same in every store. Statuses the store adds itself have false."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Position in the status list of the store."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the store retired the status: orders no longer move to it, past orders still show it. null for a status in use."
                    }
                },
                "required": [
                    "id",
                    "code",
                    "name",
                    "status_group",
                    "allowed_next",
                    "is_system",
                    "position",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ]
            },
            "Payment": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "order_id": {
                        "type": "integer",
                        "description": "ID of the order."
                    },
                    "pos_shift_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the register shift (/v1/pos-shifts) that took the money: the Z report assigns the payment to that shift. null — not a register payment."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Legal entity that receives the money (/v1/legal-entities), the one of the order; null — the sale is not split between legal entities, and the store default legal entity receives the money."
                    },
                    "method": {
                        "type": "string",
                        "enum": [
                            "cash",
                            "mercadopago",
                            "crypto",
                            "bybit",
                            "trc20",
                            "balance",
                            "modo",
                            "payway",
                            "mercadopago_qr",
                            "mercadopago_point",
                            "mercadopago_transfer",
                            "gift_card",
                            "subscription",
                            "deposit",
                            "external",
                            "manual",
                            "offset",
                            "on_account",
                            "exchange_credit",
                            "bonpunto",
                            "service_package"
                        ],
                        "description": "Payment method. manual — a manual method of the store (manual_payment_method_id); balance — the balance of the customer; on_account — on credit, the customer owes the amount; gift_card — a gift card; the other values name the payment provider or the kind of payment."
                    },
                    "manual_payment_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Manual payment method of the store (/v1/manual-payment-methods) when method is manual; otherwise null."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "processing",
                            "succeeded",
                            "failed",
                            "partially_refunded",
                            "refunded",
                            "expired",
                            "voided"
                        ],
                        "description": "pending — waiting for money; processing — the provider is processing it; succeeded — paid; failed; partially_refunded; refunded; expired — the payment link expired; voided — cancelled before the money arrived."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Amount to pay by this payment."
                    },
                    "received_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Amount actually received; null while the money has not arrived. Received on the order is received_amount minus refunded_amount over its payments."
                    },
                    "refunded_amount": {
                        "type": "integer",
                        "description": "Refunded out of the received amount."
                    },
                    "tip_amount": {
                        "type": "integer",
                        "description": "Tip on top of the order amount."
                    },
                    "refunded_tip_amount": {
                        "type": "integer",
                        "description": "Refunded out of the tip."
                    },
                    "surcharge_amount": {
                        "type": "integer",
                        "description": "Surcharge for paying in installments, on top of the order amount."
                    },
                    "refunded_surcharge_amount": {
                        "type": "integer",
                        "description": "Refunded out of the surcharge."
                    },
                    "provider_fee_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Fee the payment provider deducted from the payment before paying it out to the store. null — the provider does not report charges: cash, a manual method, or a payment that was never charged."
                    },
                    "refunded_provider_fee_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Share of the fee the provider gave back when the buyer was refunded — as the provider reports it, not pro rata to refunded_amount: a refund outside the provider does not return the fee."
                    },
                    "provider_withheld_tax_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Tax the provider withheld from the payment as a tax agent (Ingresos Brutos at MercadoPago). The withholding with its jurisdiction is in the store tax register."
                    },
                    "refunded_provider_withheld_tax_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Share of the withheld tax the provider gave back."
                    },
                    "tender": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "currency": {
                                "type": "string",
                                "description": "Currency of the payment method: an ISO 4217 code or a crypto asset code such as USDT."
                            },
                            "amount": {
                                "type": "string",
                                "description": "Invoice amount in the method currency as a decimal string: it covers amount together with tips and surcharge. Multiplied by the rate it may differ from amount by rounding and by the part of the invoice priced in the method currency directly from the price list."
                            },
                            "received_amount": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Received in the method currency as a decimal string; null — the received amount is kept only in the store currency (received_amount), or a different coin arrived (received_asset)."
                            },
                            "tendered_amount": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Cash in a foreign currency: how much was handed over in bills, as a decimal string. Change is given in the store currency. null for other methods."
                            },
                            "exchange_rate": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "rate": {
                                        "type": "string",
                                        "description": "Rate as a decimal string: 1 unit of the method currency = rate units of the store currency."
                                    },
                                    "mode": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "auto",
                                            "fixed",
                                            "pegged",
                                            null
                                        ],
                                        "description": "How the rate was obtained: auto — the market rate of the source plus the store markup; fixed — the rate set by the store; pegged — the store pegged the method currency to another currency (peg), and the rate is that currency's rate times the peg ratio. null for invoices issued before rate rules existed."
                                    },
                                    "source": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "coingecko",
                                            "criptoya_p2p",
                                            "ar_oficial",
                                            "ar_blue",
                                            "ar_mep",
                                            "ar_ccl",
                                            "ar_mayorista",
                                            "cbr",
                                            null
                                        ],
                                        "description": "Market rate source: coingecko — the CoinGecko aggregate price; criptoya_p2p — the median of P2P markets; ar_oficial, ar_blue, ar_mep, ar_ccl, ar_mayorista — dollar rates in Argentina; cbr — the Bank of Russia. null if no source was recorded."
                                    },
                                    "base": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Market rate of the source before the store markup, as a decimal string; null if there is no market base."
                                    },
                                    "markup_bps": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "Store markup over the market rate in basis points (100 is 1%); it can be negative. null for a rate set by the store and for invoices issued before rate rules existed."
                                    },
                                    "peg": {
                                        "type": [
                                            "object",
                                            "null"
                                        ],
                                        "properties": {
                                            "currency": {
                                                "type": "string",
                                                "description": "Currency the method currency is pegged to (ISO 4217)."
                                            },
                                            "rate": {
                                                "type": "string",
                                                "description": "Peg ratio as a decimal string: how many units of peg.currency one unit of the method currency is worth."
                                            }
                                        },
                                        "required": [
                                            "currency",
                                            "rate"
                                        ],
                                        "description": "Peg of the method currency to another currency: 1 unit of the method currency = peg.rate units of peg.currency (for example, 1 USDT = 1 USD). Prices set in that currency go into the invoice as they are. null when the rate is not pegged."
                                    }
                                },
                                "required": [
                                    "rate",
                                    "mode",
                                    "source",
                                    "base",
                                    "markup_bps",
                                    "peg"
                                ],
                                "description": "Rate that turned the method amount into the payment amount, snapshotted when the payment was issued; null if there is no rate."
                            }
                        },
                        "required": [
                            "currency",
                            "amount",
                            "received_amount",
                            "tendered_amount",
                            "exchange_rate"
                        ],
                        "description": "Payment in a currency other than the store currency: a USDT invoice, a transfer in dollars, cash in a foreign currency. null — the payment is in the store currency. The payment amounts (amount and the rest) stay in the store currency, and accounting uses them."
                    },
                    "received_asset": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "asset": {
                                "type": "string",
                                "description": "Coin code, such as USDC."
                            },
                            "amount": {
                                "type": "string",
                                "description": "How many coins arrived, as a decimal string."
                            },
                            "rate": {
                                "type": "string",
                                "description": "Crediting rate as a decimal string: 1 coin = rate units of the store currency."
                            },
                            "rate_source": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Source of the crediting rate; manual — the rate was set by hand."
                            },
                            "rate_as_of": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Moment of the quote or of the manual rate version."
                            },
                            "tx_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "ID of the blockchain or exchange transfer, for reconciliation."
                            }
                        },
                        "required": [
                            "asset",
                            "amount",
                            "rate",
                            "rate_source",
                            "rate_as_of",
                            "tx_id"
                        ],
                        "description": "Coin that actually arrived when the customer sent something other than what was invoiced and it was valued separately; null — what was invoiced arrived."
                    },
                    "provider_payment_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ID of the operation at the payment provider, for reconciliation with its statement; null when there is no provider."
                    },
                    "payment_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Payment page of the provider while the payment waits for money: the link can be sent to the customer. null for a paid or cancelled payment and for a manual method."
                    },
                    "confirmable": {
                        "type": "boolean",
                        "description": "The payment can be confirmed by hand now (POST /v1/payments/{payment}/confirm): it waits for money that a person confirms, not the provider."
                    },
                    "replaces_payment_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The payment this one replaced when the payment method was corrected; null otherwise."
                    },
                    "confirmed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the money was received; null while it has not."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "order_id",
                    "pos_shift_id",
                    "legal_entity_id",
                    "method",
                    "manual_payment_method_id",
                    "status",
                    "currency",
                    "amount",
                    "received_amount",
                    "refunded_amount",
                    "tip_amount",
                    "refunded_tip_amount",
                    "surcharge_amount",
                    "refunded_surcharge_amount",
                    "provider_fee_amount",
                    "refunded_provider_fee_amount",
                    "provider_withheld_tax_amount",
                    "refunded_provider_withheld_tax_amount",
                    "tender",
                    "received_asset",
                    "provider_payment_id",
                    "payment_url",
                    "confirmable",
                    "replaces_payment_id",
                    "confirmed_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "PosCashMovement": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "shift_id": {
                        "type": "integer",
                        "description": "Register shift ID (/v1/pos-shifts)."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "pay_in",
                            "pay_out",
                            "sale_cash_in",
                            "refund_cash_out",
                            "courier_shortage",
                            "waiter_cash_in",
                            "sale_reversal",
                            "no_sale",
                            "float_in",
                            "drop_out",
                            "pay_in_reversal",
                            "pay_out_reversal",
                            "drop_out_reversal",
                            "float_in_reversal",
                            "change_out",
                            "change_out_reversal"
                        ],
                        "description": "Movement type: sale_cash_in — cash sale; refund_cash_out — cash refund; sale_reversal — cash handed back when an unfinished sale is undone; change_out — change in the store currency for foreign-currency notes; pay_in and pay_out — pay-in and pay-out with a reason; drop_out — safe drop; float_in — float from the safe; waiter_cash_in — cash handed in by a waiter; courier_shortage — courier shortfall; no_sale — drawer opened without a sale; *_reversal — reversals."
                    },
                    "direction": {
                        "type": "string",
                        "enum": [
                            "in",
                            "out",
                            "none"
                        ],
                        "description": "Sign in the drawer's expected cash: in — money went into the drawer; out — it left; none — the drawer was opened without money."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Amount in minor units of the movement currency, never negative: direction gives the sign."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the drawer the movement changes, ISO 4217 code."
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When it happened by the register clock: a movement recorded offline arrives later."
                    },
                    "order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the order."
                    },
                    "payment_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Payment ID (/v1/payments) of the cash sale or refund; null for manual movements."
                    },
                    "reverses_movement_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the movement this one reverses; null for a regular movement."
                    },
                    "cash_transfer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Safe envelope ID — a drop or float: the money journal refers to it with a source of type pos_cash_transfer. null if there is no envelope."
                    },
                    "cash_reason_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Pay-in or pay-out reason ID (/v1/pos-cash-reasons); null for other types."
                    },
                    "supplier_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the supplier who was paid; null unless the pay-out went to a supplier."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Cashier comment; null if none."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    }
                },
                "required": [
                    "id",
                    "shift_id",
                    "type",
                    "direction",
                    "amount",
                    "currency",
                    "occurred_at",
                    "order_id",
                    "payment_id",
                    "reverses_movement_id",
                    "cash_transfer_id",
                    "cash_reason_id",
                    "supplier_id",
                    "comment",
                    "created_at"
                ]
            },
            "PosCashReason": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "direction": {
                        "type": "string",
                        "enum": [
                            "pay_in",
                            "pay_out"
                        ],
                        "description": "pay_in — pay-in reason; pay_out — pay-out reason."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "system_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "other",
                            null
                        ],
                        "description": "System reason code: other — «Other», one per direction. null for reasons created by the store."
                    },
                    "category_id": {
                        "type": "integer",
                        "description": "Money journal category ID (/v1/money-categories) the movement with this reason is posted to."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Sort position: lower comes first."
                    },
                    "archived_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the reason was archived: the register no longer offers it, history stays. null while active."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "direction",
                    "name",
                    "system_code",
                    "category_id",
                    "position",
                    "archived_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "PosShift": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Shift number in the register log, for example Z-0044; null for shifts older than numbering."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "ID of the store location."
                    },
                    "register_id": {
                        "type": "integer",
                        "description": "Register ID at the location. The API has no register directory: for accounting, group shifts by location."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "open",
                            "closed"
                        ],
                        "description": "open — the shift is running; closed — the drawer was counted and the shift closed."
                    },
                    "opened_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the shift was opened."
                    },
                    "closed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the shift was closed; null while open."
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Note left by whoever closed the shift; null if none."
                    },
                    "drawers": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "Drawer ID: the money journal posts a foreign-currency drawer difference with a source of type pos_shift_drawer and this ID."
                                },
                                "currency": {
                                    "type": "string",
                                    "enum": [
                                        "ARS",
                                        "USD",
                                        "BRL",
                                        "CLP",
                                        "COP",
                                        "MXN",
                                        "PEN",
                                        "RUB"
                                    ],
                                    "description": "Drawer currency, ISO 4217 code: drawer amounts are in its minor units."
                                },
                                "opening_float": {
                                    "type": "integer",
                                    "description": "Opening float."
                                },
                                "expected": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "How much the drawer should have held at closing; null while the shift is open."
                                },
                                "counted": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "How much was counted at closing; null while the shift is open."
                                },
                                "difference": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Difference: counted minus expected — an overage is positive, a shortage negative. The money journal posts it with the shift as the document. null while the shift is open."
                                },
                                "carried_float": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Left in the drawer as float for the next shift; dropped to the safe — counted minus carried_float. null while open and for shifts closed before safe tracking."
                                }
                            },
                            "required": [
                                "id",
                                "currency",
                                "opening_float",
                                "expected",
                                "counted",
                                "difference",
                                "carried_float"
                            ]
                        },
                        "description": "One cash drawer per currency that has been in it; the store currency first. Expected cash is opening_float plus the movements in that currency signed by direction."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "number",
                    "location_id",
                    "register_id",
                    "status",
                    "opened_at",
                    "closed_at",
                    "notes",
                    "drawers",
                    "created_at",
                    "updated_at"
                ]
            },
            "PostSupplierBillCommandRequest": {
                "type": "object",
                "properties": []
            },
            "PriceList": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "location",
                            "wholesale"
                        ],
                        "description": "List kind: location — selling prices at the list locations over the base price, wholesale — wholesale prices of a business customer from cost. Never changes."
                    },
                    "name": {
                        "type": "string",
                        "description": "The list's label in the store dashboard; for a location list, the name of the location it was created for."
                    },
                    "adjustment_bp": {
                        "type": "integer",
                        "description": "Rule adjustment in basis points: +20% is 2000, −10% is -1000. For a location list it applies to the variant base price (-9000 to 50000), for a wholesale list it is a markup over unit cost (0 to 50000)."
                    },
                    "rounding": {
                        "type": "object",
                        "properties": {
                            "mode": {
                                "type": "string",
                                "enum": [
                                    "nearest",
                                    "up",
                                    "down"
                                ],
                                "description": "Rounding direction: nearest, up or down."
                            },
                            "precision": {
                                "type": "integer",
                                "description": "Rounding digit in major-unit decimals: 2 — to cents, 0 — to whole units, -2 — to hundreds."
                            }
                        },
                        "required": [
                            "mode",
                            "precision"
                        ],
                        "description": "Rounding of the price set by the list rule. Fixed prices and prices of items sold by weight or volume are not rounded."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "kind",
                    "name",
                    "adjustment_bp",
                    "rounding",
                    "created_at",
                    "updated_at"
                ]
            },
            "PriceListItem": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "price_list_id": {
                        "type": "integer",
                        "description": "Price list ID."
                    },
                    "variant_id": {
                        "type": "integer",
                        "description": "ID of the variant with a fixed price in the list; the variant may be archived."
                    },
                    "price": {
                        "type": "integer",
                        "description": "Price in minor units of currency: the assigned price in store money."
                    },
                    "compare_at_price": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Price before the discount, shown struck through; null when there is no discount. Always null in a wholesale list."
                    },
                    "list_price": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Price as the owner set it, in minor units of list_price_currency; null — the price was set in store money (price)."
                    },
                    "list_compare_at_price": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Price before the discount in list_price_currency; null — no discount, or the price was set in store money."
                    },
                    "list_price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Currency of the assigned price (a price list in another currency); null — the price is in the store currency."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "tare_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Package the wholesale price of a raw material or prepared ingredient is set for, in the variant unit — as of when it was set; null — the price is per the variant price_per_quantity."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "price_list_id",
                    "variant_id",
                    "price",
                    "compare_at_price",
                    "list_price",
                    "list_compare_at_price",
                    "list_price_currency",
                    "currency",
                    "tare_quantity",
                    "created_at",
                    "updated_at"
                ]
            },
            "PriceListModifierItem": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "price_list_id": {
                        "type": "integer",
                        "description": "Price list ID."
                    },
                    "modifier_option_id": {
                        "type": "integer",
                        "description": "Modifier option ID."
                    },
                    "variant_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Variant of the item the surcharge is specific to; null — the surcharge applies to all variants."
                    },
                    "price_delta": {
                        "type": "integer",
                        "description": "Option surcharge in minor units of currency: the assigned surcharge in store money."
                    },
                    "list_price_delta": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Surcharge as the owner set it, in minor units of list_price_currency; null — set in store money (price_delta)."
                    },
                    "list_price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Currency of the assigned surcharge; null — the surcharge is in the store currency."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "price_list_id",
                    "modifier_option_id",
                    "variant_id",
                    "price_delta",
                    "list_price_delta",
                    "list_price_currency",
                    "currency",
                    "created_at",
                    "updated_at"
                ]
            },
            "Problem": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Machine type of the problem: a stable code to branch on, such as insufficient_scope. Every type has a page in the error catalog."
                    },
                    "title": {
                        "type": "string",
                        "description": "Short summary of the problem in the language of the request."
                    },
                    "status": {
                        "type": "integer",
                        "description": "HTTP status of the response."
                    },
                    "detail": {
                        "type": "string",
                        "description": "Explanation of this occurrence in the language of the request."
                    }
                },
                "required": [
                    "type",
                    "title",
                    "status"
                ]
            },
            "Product": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "goods",
                            "dish",
                            "ingredient",
                            "prep",
                            "manufactured",
                            "meal_program",
                            "bundle",
                            "gift_card",
                            "service",
                            "service_package"
                        ],
                        "description": "Kind of product: goods — goods for sale; dish — a dish cooked to order; ingredient — raw material for recipes; prep — a semi-finished item made in-house; manufactured — made by the own production of the store; meal_program — a meal subscription; bundle — a set of other products; gift_card — a gift card; service — a service booked in advance."
                    },
                    "stock_unit": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "unit": {
                                "type": "string",
                                "enum": [
                                    "g",
                                    "ml",
                                    "pcs"
                                ],
                                "description": "Base unit: g — grams, ml — milliliters, pcs — pieces. Quantities of the variants of the product are decimal strings in this unit."
                            },
                            "purchase_unit": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Name of the purchase package, such as kg or box; null — the item is bought in its base unit."
                            },
                            "purchase_quantity": {
                                "type": "string",
                                "description": "How many base units are in one purchase package, a decimal string, such as 1000 for a kilogram of an item kept in grams."
                            }
                        },
                        "required": [
                            "unit",
                            "purchase_unit",
                            "purchase_quantity"
                        ],
                        "description": "Stock unit of an item with stock by measure (ingredient, prep, manufactured): stock, recipes and yield are kept in it. null for goods and dishes — their unit is the selling axis of the variant."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "short_description": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Short description by language, plain text for product lists."
                    },
                    "description": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Description by language in Markdown (GitHub Flavored): an object of the filled languages."
                    },
                    "slug": {
                        "type": "string",
                        "description": "Address of the product on the storefront, unique in the store."
                    },
                    "brand_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the brand of the product; null when not set."
                    },
                    "tax_class_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the tax class of the product (/v1/tax-classes); null — the default class of the store. A sale keeps the rate of its item: a change of class affects future sales only."
                    },
                    "category_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "IDs of the categories the product is in, ascending."
                    },
                    "primary_category_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The main category among category_ids; null when the product has no main category."
                    },
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the option."
                                },
                                "key": {
                                    "type": "string",
                                    "description": "Machine key of the option, unique within the product, such as size."
                                },
                                "name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    },
                                    "description": "Name of the option by language."
                                },
                                "position": {
                                    "type": "integer",
                                    "description": "Position of the option: lower comes first."
                                },
                                "values": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "integer",
                                                "description": "ID of the value. Variants refer to it in option_values."
                                            },
                                            "value": {
                                                "type": "object",
                                                "additionalProperties": {
                                                    "type": "string"
                                                },
                                                "description": "The value by language, such as {\"es\": \"Rojo\", \"en\": \"Red\"}."
                                            },
                                            "swatch_color": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Color of the swatch, a hex code such as #C0392B; null when the value has no swatch."
                                            },
                                            "position": {
                                                "type": "integer",
                                                "description": "Position of the value: lower comes first."
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "value",
                                            "swatch_color",
                                            "position"
                                        ]
                                    },
                                    "description": "Values of the option in order."
                                }
                            },
                            "required": [
                                "id",
                                "key",
                                "name",
                                "position",
                                "values"
                            ]
                        },
                        "description": "Options the variants differ by, such as size or color, in order."
                    },
                    "modifier_groups": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "group_id": {
                                    "type": "integer",
                                    "description": "ID of the modifier group (/v1/modifier-groups)."
                                },
                                "selection_rule": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "min_select": {
                                            "type": "integer",
                                            "description": "How many options must be chosen on this product."
                                        },
                                        "max_select": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "description": "How many options can be chosen on this product; null — no limit."
                                        }
                                    },
                                    "required": [
                                        "min_select",
                                        "max_select"
                                    ],
                                    "description": "Selection rule on this product instead of the group rule; null — the group rule."
                                }
                            },
                            "required": [
                                "group_id",
                                "selection_rule"
                            ]
                        },
                        "description": "The product modifier groups in display order with the selection rule on this product. Option surcharges by variant — GET /v1/products/{product}/modifier-groups; PUT on the same path replaces the groups."
                    },
                    "media": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the file in the media library. A file is in the gallery of a product at most once."
                                },
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "image",
                                        "video"
                                    ],
                                    "description": "image or video."
                                },
                                "url": {
                                    "type": "string",
                                    "description": "Public address of the file."
                                },
                                "mime": {
                                    "type": "string",
                                    "description": "MIME type of the file, such as image/webp."
                                },
                                "alt": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "string"
                                    },
                                    "description": "Alternative text by language, for screen readers and search engines."
                                },
                                "position": {
                                    "type": "integer",
                                    "description": "Place in the gallery, starting from zero."
                                },
                                "is_primary": {
                                    "type": "boolean",
                                    "description": "The main photo: the storefront shows it first."
                                }
                            },
                            "required": [
                                "id",
                                "kind",
                                "url",
                                "mime",
                                "alt",
                                "position",
                                "is_primary"
                            ]
                        },
                        "description": "Photos and videos of the gallery in order: the same objects as in /v1/products/{product}/media."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false takes the product off sale and hides it from the storefront."
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product appears on the storefront; null — right away."
                    },
                    "unpublished_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product leaves the storefront; null — it stays."
                    },
                    "sale_schedule": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "days": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer"
                                    },
                                    "description": "Window days, ISO: 1 is Monday, 7 is Sunday."
                                },
                                "from": {
                                    "type": "string",
                                    "description": "Window start, “HH:MM” on the store clock."
                                },
                                "to": {
                                    "type": "string",
                                    "description": "Window end, “HH:MM”, exclusive; “24:00” means until the end of the day. An end earlier than the start makes the window run past midnight; it belongs to its start day."
                                }
                            },
                            "required": [
                                "days",
                                "from",
                                "to"
                            ]
                        },
                        "description": "When the item can be ordered — week windows in the store time zone; null means always. Outside a window the product stays visible and can go to the cart, and checkout checks the schedule against the order fulfilment time."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product was archived with its variants; null for a live product."
                    }
                },
                "required": [
                    "id",
                    "external_id",
                    "version",
                    "type",
                    "stock_unit",
                    "name",
                    "short_description",
                    "description",
                    "slug",
                    "brand_id",
                    "tax_class_id",
                    "category_ids",
                    "primary_category_id",
                    "options",
                    "modifier_groups",
                    "media",
                    "is_active",
                    "published_at",
                    "unpublished_at",
                    "sale_schedule",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ]
            },
            "ProductMedia": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the file in the media library. A file is in the gallery of a product at most once."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "image",
                            "video"
                        ],
                        "description": "image or video."
                    },
                    "url": {
                        "type": "string",
                        "description": "Public address of the file."
                    },
                    "mime": {
                        "type": "string",
                        "description": "MIME type of the file, such as image/webp."
                    },
                    "alt": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Alternative text by language, for screen readers and search engines."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Place in the gallery, starting from zero."
                    },
                    "is_primary": {
                        "type": "boolean",
                        "description": "The main photo: the storefront shows it first."
                    }
                },
                "required": [
                    "id",
                    "kind",
                    "url",
                    "mime",
                    "alt",
                    "position",
                    "is_primary"
                ]
            },
            "ProductModifierGroups": {
                "type": "object",
                "properties": {
                    "product_id": {
                        "type": "integer",
                        "description": "ID of the product. The groups are versioned on its card: ETag and If-Match carry the product version."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "groups": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "group_id": {
                                    "type": "integer",
                                    "description": "ID of the modifier group (/v1/modifier-groups)."
                                },
                                "selection_rule": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "min_select": {
                                            "type": "integer",
                                            "description": "How many options must be chosen on this product."
                                        },
                                        "max_select": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "description": "How many options can be chosen on this product; null — no limit."
                                        }
                                    },
                                    "required": [
                                        "min_select",
                                        "max_select"
                                    ],
                                    "description": "Selection rule on this product instead of the group rule; null — the group rule."
                                }
                            },
                            "required": [
                                "group_id",
                                "selection_rule"
                            ]
                        },
                        "description": "The product modifier groups in display order. On write, the whole set."
                    },
                    "option_prices": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "option_id": {
                                    "type": "integer",
                                    "description": "ID of an option from the product groups."
                                },
                                "variant_id": {
                                    "type": "integer",
                                    "description": "ID of the product variant."
                                },
                                "is_available": {
                                    "type": "boolean",
                                    "description": "false — the option is not offered on this variant; such a row has no surcharge."
                                },
                                "price_delta": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Option surcharge on this variant, an integer in minor units of the store currency; null only for an unavailable option."
                                }
                            },
                            "required": [
                                "option_id",
                                "variant_id",
                                "is_available",
                                "price_delta"
                            ]
                        },
                        "description": "Surcharge and availability of options on the product variants instead of the option surcharge. On write, replaces the overrides as a whole; without the field the previous ones stay, except those of removed groups."
                    }
                },
                "required": [
                    "product_id",
                    "version",
                    "groups",
                    "option_prices"
                ]
            },
            "PurchaseOrder": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Order number; null on an order created before numbering."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "sent",
                            "partial",
                            "received",
                            "closed",
                            "cancelled"
                        ],
                        "description": "draft — not sent to the supplier; sent — placed, delivery expected; partial — partly received; received — fully received; closed — closed by the store, received in full or short (closed_short); cancelled — cancelled."
                    },
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "Location the delivery is expected at (/v1/locations)."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Buying legal entity of the store (/v1/legal-entities); null on an order created before the store had legal entities."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Order currency, ISO 4217: line prices and totals are in it."
                    },
                    "prices_include_tax": {
                        "type": "boolean",
                        "description": "true — line prices include tax; false — they do not."
                    },
                    "ordered_total": {
                        "type": "integer",
                        "description": "Value of what is ordered and still in force; for a closed line, of what was received."
                    },
                    "received_total": {
                        "type": "integer",
                        "description": "Value of what was received against the order."
                    },
                    "expected_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "When the store expects the delivery, YYYY-MM-DD; null if not set."
                    },
                    "next_delivery_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Next expected delivery, taking the dates promised by the supplier into account, YYYY-MM-DD; null if nothing is expected."
                    },
                    "placed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the order was first sent to the supplier; null on a draft and on an order cancelled before sending."
                    },
                    "closed_short": {
                        "type": "boolean",
                        "description": "true — the order was closed short: the rest is no longer expected."
                    },
                    "supplier_response": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "awaiting",
                            "confirmed",
                            "changed",
                            "declined",
                            null
                        ],
                        "description": "Supplier answer: awaiting — waiting; confirmed — confirmed as is; changed — confirmed with changes (see confirmed_quantity and promised_on of the lines); declined — declined; null — answers are not tracked."
                    },
                    "revision": {
                        "type": "integer",
                        "description": "Revision of the order terms the supplier sees: grows with each change to a placed order."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "variant_id": {
                                    "type": "integer",
                                    "description": "Product variant ID (/v1/variants)."
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Base unit of the line quantities: pcs — pieces, g — grams, ml — milliliters."
                                },
                                "ordered_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Ordered quantity, a decimal string in the base unit."
                                },
                                "confirmed_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity confirmed by the supplier; null — no answer for the line."
                                },
                                "received_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity received against the line."
                                },
                                "unit_cost": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Price in the order currency per cost_per_quantity; null — no price."
                                },
                                "cost_per_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity in the base unit the price is for: \"1000\" on a weighed product means per kilogram."
                                },
                                "ordered_amount": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Value of the line quantity in force; null without a price. Lines add up to ordered_total."
                                },
                                "received_amount": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Value of the received quantity; null without a price. Lines add up to received_total."
                                },
                                "promised_on": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date",
                                    "description": "Delivery date promised by the supplier, YYYY-MM-DD; null — no promise, expected by expected_on."
                                },
                                "closed_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the line was closed and the rest no longer expected; null on an open line."
                                }
                            },
                            "required": [
                                "id",
                                "variant_id",
                                "unit",
                                "ordered_quantity",
                                "confirmed_quantity",
                                "received_quantity",
                                "unit_cost",
                                "cost_per_quantity",
                                "ordered_amount",
                                "received_amount",
                                "promised_on",
                                "closed_at"
                            ]
                        },
                        "description": "Order lines in document order."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "number",
                    "status",
                    "supplier_id",
                    "location_id",
                    "legal_entity_id",
                    "currency",
                    "prices_include_tax",
                    "ordered_total",
                    "received_total",
                    "expected_on",
                    "next_delivery_on",
                    "placed_at",
                    "closed_short",
                    "supplier_response",
                    "revision",
                    "note",
                    "lines",
                    "created_at",
                    "updated_at"
                ]
            },
            "RateLimitProblem": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Machine type of the problem: a stable code to branch on, such as insufficient_scope. Every type has a page in the error catalog."
                    },
                    "title": {
                        "type": "string",
                        "description": "Short summary of the problem in the language of the request."
                    },
                    "status": {
                        "type": "integer",
                        "description": "HTTP status of the response."
                    },
                    "detail": {
                        "type": "string",
                        "description": "Explanation of this occurrence in the language of the request."
                    },
                    "policy": {
                        "type": "string",
                        "enum": [
                            "app",
                            "store",
                            "rejected"
                        ],
                        "description": "Which bucket ran out: app — of the app; store — of the store, shared by all its apps; rejected — of requests from one address that were rejected on entry."
                    }
                },
                "required": [
                    "type",
                    "title",
                    "status",
                    "policy"
                ]
            },
            "RecommendationRule": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Priority: a rule with a lower value applies earlier."
                    },
                    "source_type": {
                        "type": "string",
                        "enum": [
                            "category",
                            "collection"
                        ],
                        "description": "What the rule applies to: category — products of the category and its subcategories; collection — products of the collection."
                    },
                    "source_id": {
                        "type": "integer",
                        "description": "ID of the category or collection the rule applies to. A source has one rule."
                    },
                    "target_collection_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the collection whose products the rule offers after its own; null — no collection."
                    },
                    "product_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "IDs of the products the rule offers, in shelf order; at most 20."
                    },
                    "exclusive": {
                        "type": "boolean",
                        "description": "true — “only this rule”: rules below and automatic picks do not fill the shelf; without products and a collection it hides the shelf."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false turns the rule off: it is kept but does not apply."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "position",
                    "source_type",
                    "source_id",
                    "target_collection_id",
                    "product_ids",
                    "exclusive",
                    "is_active",
                    "created_at",
                    "updated_at"
                ]
            },
            "RecommendationRuleSource": {
                "type": "string",
                "enum": [
                    "category",
                    "collection"
                ]
            },
            "RecordCustomerAccountPaymentRequest": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000000,
                        "description": "How much money arrived against the debt, in minor units of the store currency."
                    },
                    "payment_method": {
                        "type": "string",
                        "enum": [
                            "cash",
                            "mercadopago",
                            "crypto",
                            "bybit",
                            "trc20",
                            "balance",
                            "modo",
                            "payway",
                            "mercadopago_qr",
                            "mercadopago_point",
                            "mercadopago_transfer",
                            "gift_card",
                            "subscription",
                            "deposit",
                            "external",
                            "manual",
                            "offset",
                            "on_account",
                            "exchange_credit",
                            "bonpunto",
                            "service_package"
                        ],
                        "description": "How the money arrived: the method must repay debt and be confirmed by hand — for example cash or the manual method."
                    },
                    "manual_payment_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "description": "ID of the manual payment method (/v1/manual-payment-methods) when payment_method=manual, for example a bank transfer."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "ID of the store location."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the store legal entity (/v1/legal-entities) whose debt is paid: needed when the customer owes several legal entities."
                    },
                    "withholdings": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "regime": {
                                    "type": "string",
                                    "description": "Withheld tax: vat, turnover, income and other TaxRegime codes."
                                },
                                "jurisdiction": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "pattern": "^[A-Z]{2}-[A-Z0-9]{1,5}$",
                                    "maxLength": 8,
                                    "description": "Jurisdiction of a provincial or municipal tax, for example AR-B; null for national taxes."
                                },
                                "amount": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "description": "Withheld amount in minor units of the store currency."
                                },
                                "certificate_number": {
                                    "type": "string",
                                    "maxLength": 64,
                                    "description": "Number of the withholding certificate."
                                }
                            },
                            "required": [
                                "regime",
                                "amount",
                                "certificate_number"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 2000,
                        "description": "Withholding certificates the customer agent handed over with the money: they settle the debt like money."
                    },
                    "withheld_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Day of the withholding, YYYY-MM-DD: it puts the certificate into a tax period, a closed period is refused."
                    },
                    "withholding_agent_tax_id": {
                        "type": "string",
                        "maxLength": 20,
                        "description": "CUIT of the customer agent that withheld the tax."
                    }
                },
                "required": [
                    "amount",
                    "payment_method",
                    "location_id"
                ]
            },
            "RecordOutOfBandSupplierBillPaymentRequest": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "integer",
                        "maximum": 10000000000,
                        "description": "How much of the debt is settled, in minor units of the supplier bill currency: no more than the amount due (outstanding). Withholdings are part of this amount: the supplier received amount minus the withholdings."
                    },
                    "paid_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Payment day, YYYY-MM-DD in the store time zone, not in the future: it puts the withholdings into a tax period, and a closed period is a refusal."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "A note on the payment, such as the bank transfer number; null for no note."
                    },
                    "withholdings": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "regime": {
                                    "type": "string",
                                    "enum": [
                                        "vat",
                                        "income",
                                        "turnover",
                                        "municipal",
                                        "internal",
                                        "social",
                                        "other"
                                    ],
                                    "description": "Withheld tax: vat, turnover, income and other TaxRegime codes."
                                },
                                "amount": {
                                    "type": "integer",
                                    "maximum": 10000000000,
                                    "description": "Withholding amount in minor units of the supplier bill currency; the withholdings total is less than amount. It is deducted from the payment to the supplier. For a bill in another currency, tax-withholdings records the store-currency equivalent at the payment day rate; without a rate, 422."
                                },
                                "jurisdiction": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "pattern": "^[A-Z]{2}-[A-Z0-9]{1,5}$",
                                    "maxLength": 8,
                                    "description": "Jurisdiction of a provincial or municipal tax, for example AR-B: required for turnover and municipal. null for national taxes."
                                },
                                "certificate_number": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 64,
                                    "description": "Number of the withholding certificate given to the supplier; null to let the store issue a number from its own series."
                                },
                                "rate_bps": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 10000,
                                    "description": "Withholding rate in hundredths of a percent (250 is 2.5%); null when the rate is unknown."
                                },
                                "rate_source": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "padron",
                                        "default",
                                        "manual",
                                        null
                                    ],
                                    "description": "Where the rate comes from: padron is the ARCA or provincial register, default is the default rate, manual is entered by hand; null when not stated."
                                }
                            },
                            "required": [
                                "regime",
                                "amount"
                            ]
                        },
                        "maxItems": 20,
                        "description": "Withholdings the store made on this payout to the supplier. For a withholding-agent legal entity the list is required: an empty list means no withholding was made, a missing field is a refusal. Other legal entities do not need the field."
                    }
                },
                "required": [
                    "amount",
                    "paid_on"
                ]
            },
            "Refund": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "order_id": {
                        "type": "integer",
                        "description": "ID of the order."
                    },
                    "pos_shift_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the register shift (/v1/pos-shifts) that made the refund; null — not refunded at a register."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "return",
                            "adjustment",
                            "overpayment",
                            "tip"
                        ],
                        "description": "return — goods are returned; adjustment — the amount is corrected without goods; overpayment — an overpayment is returned; tip — a tip is returned."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "completed",
                            "failed",
                            "reversed"
                        ],
                        "description": "pending — waiting for the provider or a manual payout; completed; failed; reversed — cancelled after it was completed."
                    },
                    "app_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The app that made the refund (/v1/orders/{order}/refunds or an order cancellation), its id from /v1/me; null for a refund by the register, the staff, the customer or automation."
                    },
                    "confirmable": {
                        "type": "boolean",
                        "description": "The refund waits for confirmation that the money was paid back outside the system (POST /v1/refunds/{refund}/confirm)."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Amount of the refund: items and delivery."
                    },
                    "shipping_amount": {
                        "type": "integer",
                        "description": "Part of amount that refunds the delivery."
                    },
                    "tax_lines": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/TaxLine"
                        },
                        "description": "Tax of what was refunded by the classification of the products: the composition of the credit note of the refund, with the returned items except gift cards and the delivery; for a refund of an amount without items, the taxable part by the default tax class of the store. null when the store has no tax classes or nothing taxable was refunded (a gift card)."
                    },
                    "exchanged_to_order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The order handed out in exchange; null for an ordinary refund."
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "order_item_id": {
                                    "type": "integer",
                                    "description": "ID of the item of the order (items in /v1/orders)."
                                },
                                "quantity": {
                                    "type": "string",
                                    "description": "Quantity, a decimal string in unit: pieces, or the whole measure of an item sold by weight or volume."
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "pcs",
                                        "g",
                                        "ml",
                                        null
                                    ],
                                    "description": "Unit of quantity: pcs, g or ml; null when the variant no longer knows the unit of its measure."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Amount refunded for the item."
                                }
                            },
                            "required": [
                                "order_item_id",
                                "quantity",
                                "unit",
                                "amount"
                            ]
                        },
                        "description": "Returned items."
                    },
                    "transactions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the transaction."
                                },
                                "payment_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Payment of the order the money goes back by; null when there is no such payment, such as a refund to the balance."
                                },
                                "method": {
                                    "type": "string",
                                    "enum": [
                                        "cash",
                                        "mercadopago",
                                        "crypto",
                                        "bybit",
                                        "trc20",
                                        "balance",
                                        "modo",
                                        "payway",
                                        "mercadopago_qr",
                                        "mercadopago_point",
                                        "mercadopago_transfer",
                                        "gift_card",
                                        "subscription",
                                        "deposit",
                                        "external",
                                        "manual",
                                        "offset",
                                        "on_account",
                                        "exchange_credit",
                                        "bonpunto",
                                        "service_package"
                                    ],
                                    "description": "Payment method of the transaction, the same values as method of a payment."
                                },
                                "target": {
                                    "type": "string",
                                    "enum": [
                                        "card",
                                        "cash",
                                        "balance",
                                        "gift_card",
                                        "account",
                                        "manual",
                                        "exchange",
                                        "subscription",
                                        "deposit",
                                        "service_package"
                                    ],
                                    "description": "Where the money goes: card — back to the card through the provider; cash — in cash; balance — to the balance of the customer; gift_card — to a gift card; account — against the debt of the customer; manual — paid back by hand outside the system; exchange — to the order of an exchange; subscription — to a subscription; deposit — to a deposit."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Amount of the transaction."
                                },
                                "status": {
                                    "type": "string",
                                    "enum": [
                                        "pending",
                                        "completed",
                                        "failed",
                                        "reversed"
                                    ],
                                    "description": "pending, completed, failed or reversed, as status of the refund."
                                },
                                "provider_refund_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "ID of the refund at the payment provider, for reconciliation with its statement; null when there is no provider."
                                }
                            },
                            "required": [
                                "id",
                                "payment_id",
                                "method",
                                "target",
                                "amount",
                                "status",
                                "provider_refund_id"
                            ]
                        },
                        "description": "Where the money went: transactions by the payments of the order."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "order_id",
                    "pos_shift_id",
                    "kind",
                    "status",
                    "app_id",
                    "confirmable",
                    "currency",
                    "amount",
                    "shipping_amount",
                    "tax_lines",
                    "exchanged_to_order_id",
                    "items",
                    "transactions",
                    "created_at",
                    "updated_at"
                ]
            },
            "RefundCalculation": {
                "type": "object",
                "properties": {
                    "order_id": {
                        "type": "integer",
                        "description": "ID of the order."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Amount that will be refunded for the chosen items and delivery."
                    },
                    "shipping_amount": {
                        "type": "integer",
                        "description": "Part of amount that refunds the delivery."
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "order_item_id": {
                                    "type": "integer",
                                    "description": "ID of the item of the order (items in /v1/orders)."
                                },
                                "quantity": {
                                    "type": "string",
                                    "description": "Quantity, a decimal string in unit: pieces, or the whole measure of an item sold by weight or volume."
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "pcs",
                                        "g",
                                        "ml",
                                        null
                                    ],
                                    "description": "Unit of quantity: pcs, g or ml; null when the variant no longer knows the unit of its measure."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Amount refunded for the item."
                                }
                            },
                            "required": [
                                "order_item_id",
                                "quantity",
                                "unit",
                                "amount"
                            ]
                        },
                        "description": "Items that will be returned."
                    },
                    "transactions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "payment_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Payment of the order the money goes back by; null when there is no such payment, such as a refund to the balance."
                                },
                                "method": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "cash",
                                        "mercadopago",
                                        "crypto",
                                        "bybit",
                                        "trc20",
                                        "balance",
                                        "modo",
                                        "payway",
                                        "mercadopago_qr",
                                        "mercadopago_point",
                                        "mercadopago_transfer",
                                        "gift_card",
                                        "subscription",
                                        "deposit",
                                        "external",
                                        "manual",
                                        "offset",
                                        "on_account",
                                        "exchange_credit",
                                        "bonpunto",
                                        "service_package",
                                        null
                                    ],
                                    "description": "Payment method of the share; null for a share without a payment."
                                },
                                "target": {
                                    "type": "string",
                                    "enum": [
                                        "card",
                                        "cash",
                                        "balance",
                                        "gift_card",
                                        "account",
                                        "manual",
                                        "exchange",
                                        "subscription",
                                        "deposit",
                                        "service_package"
                                    ],
                                    "description": "Where the money goes: card — back to the card through the provider; cash — in cash; balance — to the balance of the customer; gift_card — to a gift card; account — against the debt of the customer; manual — paid back by hand outside the system; exchange — to the order of an exchange; subscription — to a subscription; deposit — to a deposit."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Amount of the transaction."
                                }
                            },
                            "required": [
                                "payment_id",
                                "method",
                                "target",
                                "amount"
                            ]
                        },
                        "description": "Where the money will go: shares by the payments of the order, exactly as the refund will make them."
                    },
                    "balance_available": {
                        "type": "boolean",
                        "description": "A share of an irreversible method (a transfer, crypto, a manual method) can go to the balance of the customer instead — irreversible_to: balance in the refund: such a share is in the calculation, the customer has an account and the store uses balances."
                    },
                    "refundable": {
                        "type": "object",
                        "properties": {
                            "items": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "order_item_id": {
                                            "type": "integer",
                                            "description": "ID of the item of the order (items in /v1/orders)."
                                        },
                                        "quantity": {
                                            "type": "string",
                                            "description": "Quantity left to refund, a decimal string in unit."
                                        },
                                        "unit": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "enum": [
                                                "pcs",
                                                "g",
                                                "ml",
                                                null
                                            ],
                                            "description": "Unit of quantity: pcs, g or ml; null when the variant no longer knows the unit of its measure."
                                        }
                                    },
                                    "required": [
                                        "order_item_id",
                                        "quantity",
                                        "unit"
                                    ]
                                },
                                "description": "Items with quantity left to refund."
                            },
                            "shipping_amount": {
                                "type": "integer",
                                "description": "Delivery amount left to refund."
                            }
                        },
                        "required": [
                            "items",
                            "shipping_amount"
                        ],
                        "description": "What can still be refunded on the order: items with quantity left and the rest of the delivery. A cancelled refund does not use it up."
                    }
                },
                "required": [
                    "order_id",
                    "currency",
                    "amount",
                    "shipping_amount",
                    "items",
                    "transactions",
                    "balance_available",
                    "refundable"
                ]
            },
            "ReissueFiscalDocumentRequest": {
                "type": "object",
                "properties": {
                    "receptor": {
                        "type": "object",
                        "properties": {
                            "id_type": {
                                "type": "string",
                                "enum": [
                                    "tax_id",
                                    "personal_id",
                                    "national_id",
                                    "passport",
                                    "none"
                                ],
                                "description": "Kind of ID: tax_id — tax ID of a business (CUIT in Argentina); personal_id — tax ID of a person (CUIL); national_id — national identity document (DNI); passport; none — no ID."
                            },
                            "id_number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 32,
                                "description": "Number of the ID; null when id_type is none."
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 255,
                                "description": "Legal or full name for the document; null when not given."
                            },
                            "tax_status": {
                                "type": "string",
                                "enum": [
                                    "registered",
                                    "small_taxpayer",
                                    "exempt",
                                    "final_consumer",
                                    "not_categorized",
                                    "foreign"
                                ],
                                "description": "Tax status: registered — registered for VAT (Responsable Inscripto in Argentina); small_taxpayer — a simplified regime (Monotributo); exempt — exempt from VAT; final_consumer — a final consumer; not_categorized — not categorized; foreign — a foreign customer."
                            },
                            "address": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 255,
                                "description": "Fiscal address in one line; null when not given."
                            }
                        },
                        "description": "Corrected recipient details of a rejected invoice; they also replace the details of the order. Invoices only: notes inherit the recipient of their invoice. Leave it out when the details do not change."
                    },
                    "refresh_receptor": {
                        "type": "boolean",
                        "description": "true — read the details again from the current tax profile of the order customer (PUT /v1/customers/{customer}/fiscal-profile). Not together with receptor."
                    }
                }
            },
            "RemovePriceListItemsRequest": {
                "type": "object",
                "properties": {
                    "variant_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "minItems": 1,
                        "maxItems": 1000,
                        "uniqueItems": true,
                        "description": "IDs of variants whose fixed prices to remove, without repeats, up to 1000 per request. A variant without a fixed price is skipped."
                    }
                },
                "required": [
                    "variant_ids"
                ]
            },
            "RemovePriceListModifierItemsRequest": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "modifier_option_id": {
                                    "type": "integer",
                                    "description": "Modifier option ID."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Variant whose surcharge to remove; null or omitted — the surcharge for all variants."
                                }
                            },
                            "required": [
                                "modifier_option_id"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 1000,
                        "description": "Fixed surcharges to remove, up to 1000 per request. A pair without a fixed surcharge is skipped."
                    }
                },
                "required": [
                    "items"
                ]
            },
            "ReplaceCustomerFiscalProfileRequest": {
                "type": "object",
                "properties": {
                    "receptor": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id_type": {
                                "type": "string",
                                "enum": [
                                    "tax_id",
                                    "personal_id",
                                    "national_id",
                                    "passport",
                                    "none"
                                ],
                                "description": "Kind of ID: tax_id — tax ID of a business (CUIT in Argentina); personal_id — tax ID of a person (CUIL); national_id — national identity document (DNI); passport; none — no ID."
                            },
                            "id_number": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 32,
                                "description": "Number of the ID; null when id_type is none."
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 255,
                                "description": "Legal or full name for the document; null when not given."
                            },
                            "tax_status": {
                                "type": "string",
                                "enum": [
                                    "registered",
                                    "small_taxpayer",
                                    "exempt",
                                    "final_consumer",
                                    "not_categorized",
                                    "foreign"
                                ],
                                "description": "Tax status: registered — registered for VAT (Responsable Inscripto in Argentina); small_taxpayer — a simplified regime (Monotributo); exempt — exempt from VAT; final_consumer — a final consumer; not_categorized — not categorized; foreign — a foreign customer."
                            },
                            "address": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 255,
                                "description": "Fiscal address in one line; null when not given."
                            }
                        },
                        "description": "Tax details documents of new orders are issued under; null — a retail customer without tax details. A placed order keeps its own copy (fiscal_receptor of the order)."
                    }
                },
                "required": [
                    "receptor"
                ]
            },
            "ReplaceProductModifierGroupsRequest": {
                "type": "object",
                "properties": {
                    "groups": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "group_id": {
                                    "type": "integer",
                                    "description": "ID of the modifier group (/v1/modifier-groups)."
                                },
                                "selection_rule": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "min_select": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 99,
                                            "description": "How many options must be chosen on this product."
                                        },
                                        "max_select": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "minimum": 1,
                                            "maximum": 99,
                                            "description": "How many options can be chosen on this product; null — no limit."
                                        }
                                    },
                                    "description": "Selection rule on this product instead of the group rule; null — the group rule."
                                }
                            },
                            "required": [
                                "group_id"
                            ]
                        },
                        "maxItems": 50,
                        "uniqueItems": true,
                        "description": "The product modifier groups in display order. On write, the whole set."
                    },
                    "option_prices": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "option_id": {
                                    "type": "integer",
                                    "description": "ID of an option from the product groups."
                                },
                                "is_available": {
                                    "type": "boolean",
                                    "description": "false — the option is not offered on this variant; such a row has no surcharge."
                                },
                                "price_delta": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": -100000000,
                                    "maximum": 100000000,
                                    "description": "Option surcharge on this variant, an integer in minor units of the store currency; null only for an unavailable option."
                                },
                                "variant_id": {
                                    "type": "integer",
                                    "description": "ID of the product variant."
                                }
                            },
                            "required": [
                                "option_id",
                                "is_available",
                                "variant_id"
                            ]
                        },
                        "maxItems": 2000,
                        "description": "Surcharge and availability of options on the product variants instead of the option surcharge. On write, replaces the overrides as a whole; without the field the previous ones stay, except those of removed groups."
                    }
                },
                "required": [
                    "groups"
                ]
            },
            "ReplaceProductOptionsRequest": {
                "type": "object",
                "properties": {
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "key": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]*$",
                                    "maxLength": 32,
                                    "description": "Machine key of the option, unique within the product, such as size."
                                },
                                "name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 120
                                    },
                                    "description": "Name of the option by language."
                                },
                                "values": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "value": {
                                                "type": "object",
                                                "additionalProperties": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 120
                                                },
                                                "description": "The value by language, such as {\"es\": \"Rojo\", \"en\": \"Red\"}."
                                            },
                                            "swatch_color": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "pattern": "^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
                                                "maxLength": 16,
                                                "description": "Color of the swatch, a hex code such as #C0392B; null when the value has no swatch."
                                            },
                                            "id": {
                                                "type": [
                                                    "integer",
                                                    "null"
                                                ],
                                                "description": "ID of the value. Variants refer to it in option_values."
                                            }
                                        },
                                        "required": [
                                            "value"
                                        ]
                                    },
                                    "minItems": 1,
                                    "maxItems": 50,
                                    "description": "Values of the option in order."
                                },
                                "id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "ID of the option."
                                }
                            },
                            "required": [
                                "key",
                                "name",
                                "values"
                            ]
                        },
                        "maxItems": 10,
                        "description": "Options the variants differ by, such as size or color, in order."
                    },
                    "variants": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the variant."
                                },
                                "archive": {
                                    "type": "boolean",
                                    "description": "true — archive the variant instead of giving it values."
                                },
                                "value_indexes": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 49
                                    },
                                    "maxItems": 10,
                                    "description": "Values of the variant: for every option, the index of the value in options[i].values of this request, so new values without an id can be named."
                                }
                            },
                            "required": [
                                "id"
                            ]
                        },
                        "maxItems": 200,
                        "description": "Layout of every live variant of the product: a combination of values or the archive. A variant missing from the layout is rejected: it may have been added after you read the product."
                    }
                },
                "required": [
                    "options",
                    "variants"
                ]
            },
            "ReplaceVariantRecipeRequest": {
                "type": "object",
                "properties": {
                    "components": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "variant_id": {
                                    "type": "integer",
                                    "description": "ID of the component variant: an ingredient or a prep of the store."
                                },
                                "quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Amount of the component per portion of a dish or per batch of a prep, a decimal string in the unit of the component (stock_unit of its product); null — to taste: the component is listed but not written off."
                                },
                                "measure_mode": {
                                    "type": "string",
                                    "enum": [
                                        "fixed",
                                        "captured",
                                        "proportional",
                                        "by_output"
                                    ],
                                    "description": "How production measures the component: fixed — the planned amount; captured — weighed at production; proportional — scaled to a weighed component. Only production of preps reads it."
                                }
                            },
                            "required": [
                                "variant_id",
                                "quantity"
                            ]
                        },
                        "maxItems": 100,
                        "description": "Components of the recipe in order: ingredients and preps with their amounts. The whole list replaces the recipe; an empty list clears it."
                    },
                    "yield_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Output of one batch of a prep, a decimal string in the unit of the prep. Required for a prep; null for a dish. With yield checkpoints in the production steps, the steps set the output."
                    },
                    "option_recipes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "option_id": {
                                    "type": "integer",
                                    "description": "ID of a per-dish option from the product modifier groups."
                                },
                                "components": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "variant_id": {
                                                "type": "integer",
                                                "description": "ID of the product variant."
                                            },
                                            "quantity": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 32,
                                                "description": "Component amount for one use of the option, a decimal string in the unit of the component; null — to taste."
                                            }
                                        },
                                        "required": [
                                            "variant_id",
                                            "quantity"
                                        ]
                                    },
                                    "maxItems": 100,
                                    "description": "What the option consumes when taken with this variant: ingredients and preps with their amount."
                                }
                            },
                            "required": [
                                "option_id",
                                "components"
                            ]
                        },
                        "maxItems": 50,
                        "uniqueItems": true,
                        "description": "Amounts of per-dish options (recipe_per_variant) in this variant: a block for each such option of the product groups. Empty components — no amount, and the option is not offered on this variant. On write, a block sets the option amount as a whole, empty components remove it; options missing from the list and a body without the field are left as they are."
                    }
                },
                "required": [
                    "components"
                ]
            },
            "SetCustomerWholesalePriceListRequest": {
                "type": "object",
                "properties": {
                    "price_list_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The customer's wholesale price list; null removes the assignment — wholesale sales to the customer go at base prices."
                    }
                },
                "required": [
                    "price_list_id"
                ]
            },
            "SetInventoryLevelRequest": {
                "type": "object",
                "properties": {
                    "variant_id": {
                        "type": "integer",
                        "description": "ID of the variant. Together with location_id it identifies the stock level; a pair missing from the list has zero stock."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "ID of the store location."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500,
                        "description": "Comment of the movement."
                    },
                    "lot_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "Lot the difference goes to, for a variant tracked by lots."
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Expiry date of a new lot, in the store time zone."
                    },
                    "on_hand": {
                        "type": "string",
                        "pattern": "^-?\\d{1,15}(\\.\\d{1,15})?$",
                        "maxLength": 32,
                        "description": "Physical stock at the location across all its bins, a decimal string in the unit of the variant. Setting stock names and checks this value."
                    },
                    "expected_on_hand": {
                        "type": "string",
                        "pattern": "^-?\\d{1,15}(\\.\\d{1,15})?$",
                        "maxLength": 32,
                        "description": "The on-hand stock you counted against, a decimal string. If the stock changed since, the request gets 409 stock_on_hand_changed and changes nothing."
                    }
                },
                "required": [
                    "variant_id",
                    "location_id",
                    "on_hand",
                    "expected_on_hand"
                ]
            },
            "SetOrderShipmentTrackingRequest": {
                "type": "object",
                "properties": {
                    "tracking_number": {
                        "type": "string",
                        "pattern": "^[\\p{L}\\p{N}](?:[\\p{L}\\p{N} .\\/_-]*[\\p{L}\\p{N}])?$",
                        "maxLength": 64,
                        "description": "The number at the delivery service: letters and digits, with spaces, dots, slashes, hyphens and underscores allowed inside; up to 64 characters."
                    },
                    "tracking_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 500,
                        "description": "The service's tracking page, http or https; null or absent — no link."
                    },
                    "carrier_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100,
                        "description": "The service name as the customer will see it: “Correo Argentino”, “OCA”; null or absent — no name."
                    }
                },
                "required": [
                    "tracking_number"
                ]
            },
            "SetOrderStatusRequest": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "maxLength": 50,
                        "description": "Status of the order: a code from the status list of the store (/v1/order-statuses). A store can add its own statuses; status_group gives the lasting meaning."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500,
                        "description": "Comment to the change, kept in the history of the order."
                    },
                    "delivery_failure_reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "customer_absent",
                            "refused",
                            "wrong_address",
                            "no_contact",
                            "other",
                            null
                        ],
                        "description": "For a move to a status of the delivery_failed group — why: customer_absent — nobody at the address; refused — the customer refused the order; wrong_address — the address was not found; no_contact — the customer could not be reached; other — another reason, explained in comment."
                    }
                },
                "required": [
                    "status"
                ]
            },
            "SetPriceListItemsRequest": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "variant_id": {
                                    "type": "integer",
                                    "description": "Variant ID (/v1/variants). Gift cards and meal plans have no location price."
                                },
                                "price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 10000000000,
                                    "description": "Price in minor units of the store currency, above zero — for a row priced in store money: the row's list_price_currency is null, for a new row — the variant's."
                                },
                                "compare_at_price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 10000000000,
                                    "description": "Compare-at price in the store currency, above price; null or omitted — none. Wholesale lists have none."
                                },
                                "list_price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 10000000000,
                                    "description": "Price in minor units of the price list currency, above zero — for a row priced in that currency (the row's list_price_currency, for a new row — the variant's). The store money price is converted by the system."
                                },
                                "list_compare_at_price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 10000000000,
                                    "description": "Compare-at price in the price list currency, above list_price; null or omitted — none. Wholesale lists have none."
                                }
                            },
                            "required": [
                                "variant_id"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 1000,
                        "uniqueItems": true,
                        "description": "Fixed prices, up to 1000 per request, each variant once. An existing row gets the new price; the batch is written in full or not at all."
                    }
                },
                "required": [
                    "items"
                ]
            },
            "SetPriceListModifierItemsRequest": {
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "modifier_option_id": {
                                    "type": "integer",
                                    "description": "Modifier option ID (/v1/modifier-groups)."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Variant the surcharge applies to; null or omitted — all of the item's variants. The variant's item must offer the option."
                                },
                                "price_delta": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": -10000000000,
                                    "maximum": 10000000000,
                                    "description": "Surcharge in minor units of the store currency, may be negative — for a row priced in store money: the row's list_price_currency is null, for a new row — the option's."
                                },
                                "list_price_delta": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": -10000000000,
                                    "maximum": 10000000000,
                                    "description": "Surcharge in minor units of the price list currency, may be negative — for a row priced in that currency. The store money amount is converted by the system."
                                }
                            },
                            "required": [
                                "modifier_option_id"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 1000,
                        "description": "Fixed surcharges, up to 1000 per request, each option and variant pair once. An existing row gets the new surcharge; the batch is written in full or not at all."
                    }
                },
                "required": [
                    "items"
                ]
            },
            "SettlementAgreement": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "bilateral",
                            "tripartite"
                        ],
                        "description": "bilateral — bilateral offset: the supplier and the customer are the same party; tripartite — three-party offset: the customer's debt is set off against the store's debt to another party, the supplier, with the consent of all three."
                    },
                    "legal_entity_id": {
                        "type": "integer",
                        "description": "Store legal entity that is a party to the agreement (/v1/legal-entities)."
                    },
                    "supplier_id": {
                        "type": "integer",
                        "description": "Creditor supplier ID (/v1/suppliers)."
                    },
                    "customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Debtor customer ID (/v1/customers); null if the customer was erased. Requires access to customers."
                    },
                    "customer_name": {
                        "type": "string",
                        "description": "Customer name when the agreement was created. Requires access to customers."
                    },
                    "reference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Signed agreement number; null if not set."
                    },
                    "signed_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Signing date, YYYY-MM-DD; null if not set."
                    },
                    "valid_from": {
                        "type": "string",
                        "description": "Start of the term, YYYY-MM-DD."
                    },
                    "valid_until": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "End of the term, YYYY-MM-DD inclusive; null — open-ended."
                    },
                    "schedule": {
                        "type": "string",
                        "enum": [
                            "manual",
                            "weekly",
                            "monthly"
                        ],
                        "description": "Recurring offset: manual — manual only; weekly — once a week; monthly — once a month."
                    },
                    "schedule_day": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Run day: for weekly, the ISO weekday (1 — Monday); for monthly, the day of the month 1–31 (the last day in a shorter month); null for manual."
                    },
                    "next_run_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Date of the next recurring offset, YYYY-MM-DD in the store time zone; null — no more runs."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "kind",
                    "legal_entity_id",
                    "supplier_id",
                    "reference",
                    "signed_on",
                    "valid_from",
                    "valid_until",
                    "schedule",
                    "schedule_day",
                    "next_run_on",
                    "note",
                    "created_at",
                    "updated_at"
                ]
            },
            "SettlementOffset": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "number": {
                        "type": "string",
                        "description": "Offset document number."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "posted",
                            "voided"
                        ],
                        "description": "posted — posted; voided — voided: settlements created by the offset are removed and the debts are open again."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "bilateral",
                            "tripartite"
                        ],
                        "description": "bilateral — bilateral offset; tripartite — three-party offset under agreement agreement_id."
                    },
                    "legal_entity_id": {
                        "type": "integer",
                        "description": "Store legal entity that posted the offset (/v1/legal-entities)."
                    },
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "agreement_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Offset agreement ID (/v1/settlement-agreements); null for a bilateral offset without an agreement."
                    },
                    "customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Customer ID (/v1/customers); null if the customer was erased. Requires access to customers."
                    },
                    "customer_name": {
                        "type": "string",
                        "description": "Customer name when the offset was posted. Requires access to customers."
                    },
                    "occurred_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Offset date, YYYY-MM-DD in the store time zone."
                    },
                    "total": {
                        "type": "integer",
                        "description": "Offset amount: that much is set off against both the customer's debts and the supplier's bills."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "posted_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the offset was posted."
                    },
                    "voided_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the offset was voided; null for a posted one."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "number",
                    "status",
                    "kind",
                    "legal_entity_id",
                    "supplier_id",
                    "agreement_id",
                    "occurred_on",
                    "total",
                    "currency",
                    "note",
                    "posted_at",
                    "voided_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "SettlementOffsetLine": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "settlement_offset_id": {
                        "type": "integer",
                        "description": "Offset ID (/v1/settlement-offsets)."
                    },
                    "side": {
                        "type": "string",
                        "enum": [
                            "receivable",
                            "payable"
                        ],
                        "description": "receivable — the customer's debt to the store (an order or the customer account debt); payable — the store's debt to the supplier (a bill)."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Sort position: lower comes first."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Amount set off."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the order whose debt was set off (/v1/orders); null on other lines."
                    },
                    "customer_account_entry_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the customer account entry of kind offset by which the offset reduced the customer's debt (/v1/customer-account-entries); null on other lines. Voiding writes its reversal."
                    },
                    "payment_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the order payment created by the offset (/v1/payments); null on other lines and after voiding."
                    },
                    "supplier_bill_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Supplier bill ID (/v1/supplier-bills); null on customer lines. If a delivery debt was replaced by an invoice — the invoice."
                    },
                    "supplier_bill_payment_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the bill payment created by the offset (/v1/supplier-bill-payments); null on customer lines and after voiding."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "settlement_offset_id",
                    "side",
                    "position",
                    "amount",
                    "currency",
                    "order_id",
                    "customer_account_entry_id",
                    "payment_id",
                    "supplier_bill_id",
                    "supplier_bill_payment_id",
                    "created_at",
                    "updated_at"
                ]
            },
            "StockMovement": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "variant_id": {
                        "type": "integer",
                        "description": "Product variant ID (/v1/variants)."
                    },
                    "location_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Location of the movement (/v1/locations); null for a movement from the journal before locations, visible only to an app not limited to locations."
                    },
                    "lot_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Lot ID (/v1/lots); null for a product without lots."
                    },
                    "quantity": {
                        "type": "string",
                        "description": "Signed change to the location's physical stock, as a decimal string in the variant unit: above zero came in, below zero went out. The sum per variant × location pair is its on_hand."
                    },
                    "on_hand_after": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Physical stock of the location after the movement — the same as the inventory level on_hand, as a decimal string; null for a movement from the journal before locations."
                    },
                    "reason": {
                        "type": "string",
                        "enum": [
                            "order_reserve",
                            "order_release",
                            "restock",
                            "refund_restock",
                            "return_restock",
                            "pos_tab_round",
                            "order_edit",
                            "spoilage",
                            "short_pick",
                            "manual_adjust",
                            "shrinkage",
                            "internal_use",
                            "type_change_writeoff",
                            "prep_consumption_writeoff",
                            "unit_merge",
                            "measure_basis_change",
                            "piece_reweigh",
                            "piece_shrinkage",
                            "external_inbound",
                            "external_reconcile",
                            "receipt_void",
                            "receipt_correction",
                            "supplier_return",
                            "supplier_return_void",
                            "supplier_return_correction",
                            "import_revert",
                            "lot_relabel",
                            "stocktake",
                            "bin_transfer",
                            "location_transfer",
                            "group_transfer_out",
                            "group_transfer_in",
                            "group_transfer_return",
                            "production_consume",
                            "production_output",
                            "production_void",
                            "restock_void",
                            "spoilage_void",
                            "shrinkage_void",
                            "internal_use_void",
                            "manual_adjust_void",
                            "short_pick_void"
                        ],
                        "description": "Movement reason — the full stock list. Group by category instead: a new reason arrives in one of the known columns."
                    },
                    "category": {
                        "type": "string",
                        "enum": [
                            "sale",
                            "receipt",
                            "external",
                            "production_output",
                            "production_consume",
                            "spoilage",
                            "shrinkage",
                            "internal_use",
                            "stocktake",
                            "correction",
                            "supplier_return",
                            "transfer",
                            "group_transfer",
                            "technical"
                        ],
                        "description": "Stock ledger column: sale — sale and its returns; receipt — goods receipt and its reversal; external — import and reconciliation with an external system; production_output and production_consume — production output and consumption; spoilage — spoilage; shrinkage — shrinkage; internal_use — own use; stocktake — stocktake variance; correction — record correction; supplier_return — return to supplier; transfer — relocation and transfer; group_transfer — transfer between stores of the group, at cost; technical — change of stock unit."
                    },
                    "document": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "goods_receipt",
                                    "stocktake",
                                    "stock_write_off",
                                    "production_order",
                                    "location_transfer",
                                    "group_transfer",
                                    "supplier_return",
                                    "order"
                                ],
                                "description": "Document type: goods_receipt — goods receipt (/v1/goods-receipts); stocktake — stock count (/v1/stocktakes); stock_write_off — write-off; production_order — production order; location_transfer — transfer between locations (/v1/location-transfers); group_transfer — transfer between stores of the group, this store's copy; supplier_return — return to supplier (/v1/supplier-returns); order — order (/v1/orders). An order movement inside a document belongs to that document."
                            },
                            "id": {
                                "type": "integer",
                                "description": "Document ID."
                            }
                        },
                        "required": [
                            "type",
                            "id"
                        ],
                        "description": "Primary document of the movement; null for a manual correction, picking or a technical movement."
                    },
                    "write_off_reason_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Write-off reason ID (/v1/write-off-reasons); null for other movements."
                    },
                    "reverses_movement_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the movement this one reverses; null for a regular movement."
                    },
                    "posting_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Posting: one UUID shared by all movements of one operation; null for a movement before postings."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff comment on a manual correction; null if there is none."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    }
                },
                "required": [
                    "id",
                    "variant_id",
                    "location_id",
                    "lot_id",
                    "quantity",
                    "on_hand_after",
                    "reason",
                    "category",
                    "document",
                    "write_off_reason_id",
                    "reverses_movement_id",
                    "posting_id",
                    "comment",
                    "created_at"
                ]
            },
            "Stocktake": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Stock count number in the store."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "ID of the counted location (/v1/locations)."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "committing",
                            "committed",
                            "voided"
                        ],
                        "description": "draft — counting is in progress; committing — adjustments are being written in the background; committed — posted, the adjustments are stock movements with document.type = stocktake; voided — the draft was cancelled, there are no movements. A failed posting returns the count to draft."
                    },
                    "blind": {
                        "type": "boolean",
                        "description": "Blind count: while the count is a draft, expected and variance of its lines are null."
                    },
                    "coverage": {
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "full",
                                    "category",
                                    "selection"
                                ],
                                "description": "full — the whole location; category — selected categories; selection — items added while counting."
                            },
                            "category_ids": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "integer"
                                },
                                "description": "Category IDs (/v1/categories) for the category coverage; null otherwise."
                            }
                        },
                        "required": [
                            "type",
                            "category_ids"
                        ],
                        "description": "What is counted."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Note on the count; null if there is none."
                    },
                    "submitted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the counter handed the count over for posting; null if not handed over."
                    },
                    "committed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the adjustments were applied; null if the count is not posted."
                    },
                    "voided_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the draft was cancelled; null if it was not."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "number",
                    "location_id",
                    "status",
                    "blind",
                    "coverage",
                    "note",
                    "submitted_at",
                    "committed_at",
                    "voided_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "StocktakeLine": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "stocktake_id": {
                        "type": "integer",
                        "description": "Stock count ID (/v1/stocktakes)."
                    },
                    "variant_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Product variant ID (/v1/variants). null — the item was erased from the catalog before stock count lines started holding it (November 2026); such a line has no quantities."
                    },
                    "lot_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Lot ID (/v1/lots); null for the lot-less axis. At a location with bins an item has a line per bin and lot — their sum is the location figure."
                    },
                    "expected": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Book quantity of the axis at the time of counting, as a decimal string in the variant unit — the base of the variance. null for a blind count while it is a draft."
                    },
                    "counted": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Quantity counted on the axis; null — not counted yet, and posting leaves such a line alone."
                    },
                    "variance": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Variance: counted minus expected. null while the line is not counted or the book quantity is hidden."
                    },
                    "adjustment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Adjustment applied by posting, signed. It may differ from variance: sales between counting and posting and packed pieces held by orders are not in it. null before posting."
                    },
                    "on_hand_after": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Physical on-hand of the item at the location right after posting — the same for all lines of the item. null before posting and for a skipped line."
                    },
                    "skip_reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "variant_deleted",
                            "not_tracked",
                            null
                        ],
                        "description": "Why posting skipped a counted line: variant_deleted — the item was deleted; not_tracked — stock tracking was switched off for the item. null — the line was not skipped."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "stocktake_id",
                    "variant_id",
                    "lot_id",
                    "expected",
                    "counted",
                    "variance",
                    "adjustment",
                    "on_hand_after",
                    "skip_reason",
                    "created_at",
                    "updated_at"
                ]
            },
            "Store": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the store."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name of the store by language."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the store, an ISO 4217 code. Every money amount of the API is an integer in its minor units: cents for USD, ARS or BRL, whole pesos for CLP."
                    },
                    "timezone": {
                        "type": "string",
                        "description": "Time zone of the store, an IANA name. Calendar dates of the API, such as reopens_on, are dates in this zone."
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Country of the store, an ISO 3166-1 alpha-2 code; null when not set."
                    },
                    "default_locale": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Main language of the store content; null when not set."
                    },
                    "supported_locales": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Languages the store fills its content in."
                    },
                    "marketing_consent_mode": {
                        "type": "string",
                        "enum": [
                            "opt_out",
                            "opt_in"
                        ],
                        "description": "Which consent to marketing messages the store finds enough: opt_out — everyone who has not unsubscribed; opt_in — only customers who agreed explicitly (marketing_consents of the customer). WhatsApp always requires explicit consent."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "currency",
                    "timezone",
                    "country",
                    "default_locale",
                    "supported_locales",
                    "marketing_consent_mode"
                ]
            },
            "Supplier": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "name": {
                        "type": "string",
                        "description": "Supplier name as the store sees it."
                    },
                    "legal_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Legal name; null if not set."
                    },
                    "tax_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Tax number as the store entered it (CUIT in Argentina); null if not set."
                    },
                    "tax_id_country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Country of the tax number, ISO 3166-1 alpha-2; null if the number is not set."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — the supplier is turned off: no new orders are placed with it, documents remain."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Purchase currency with the supplier, ISO 4217: min_order_amount and its order prices are in it."
                    },
                    "payment_term_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Payment term in days: the bill due date due_on is calculated from it. null — no term."
                    },
                    "prices_include_tax": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "true — the supplier quotes prices with tax, false — without tax; null — by the store rule."
                    },
                    "settlement_mode": {
                        "type": "string",
                        "enum": [
                            "on_receipt",
                            "on_sale"
                        ],
                        "description": "on_receipt — regular purchase: the debt arises on receipt; on_sale — consignment: the store pays for what was sold under a consignment settlement."
                    },
                    "consignment_loss_policy": {
                        "type": "string",
                        "enum": [
                            "return_to_supplier",
                            "our_cost"
                        ],
                        "description": "Who pays for expired and missing consignment goods: return_to_supplier — goods go back to the supplier; our_cost — the store bears the loss."
                    },
                    "lead_time_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Delivery lead time in days from the order; null if not set."
                    },
                    "min_order_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Minimum order amount in minor units of currency; null — no minimum."
                    },
                    "customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the same counterparty as a customer (/v1/customers): the store offsets mutual debts through it. null if not linked. Requires access to customers."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "external_id",
                    "name",
                    "legal_name",
                    "tax_id",
                    "tax_id_country",
                    "is_active",
                    "currency",
                    "payment_term_days",
                    "prices_include_tax",
                    "settlement_mode",
                    "consignment_loss_policy",
                    "lead_time_days",
                    "min_order_amount",
                    "created_at",
                    "updated_at"
                ]
            },
            "SupplierBalance": {
                "type": "object",
                "properties": {
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Store legal entity the balance is limited to; null — all legal entities."
                    },
                    "as_of": {
                        "type": "string",
                        "description": "Store day the overdue aging is computed for, YYYY-MM-DD."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "total_due": {
                        "type": "integer",
                        "description": "Total debt: bills_outstanding + settled_pending_bill + accrued_unsettled + received_unbilled − returns_expected − advances_unapplied − payments_unapplied."
                    },
                    "has_open_items": {
                        "type": "boolean",
                        "description": "Whether there are open items: the total may be zero when items offset each other."
                    },
                    "bills_outstanding": {
                        "type": "integer",
                        "description": "Unpaid posted bills — what can be paid now; credit notes reduce it."
                    },
                    "overdue": {
                        "type": "integer",
                        "description": "Part of bills_outstanding past its due date; by overdue age it splits into overdue_1_30, overdue_31_60, overdue_61_90 and overdue_90_plus, which add up to overdue."
                    },
                    "overdue_1_30": {
                        "type": "integer",
                        "description": "Overdue age bucket of overdue; its bounds in store calendar days are in the field name."
                    },
                    "overdue_31_60": {
                        "type": "integer",
                        "description": "Overdue age bucket of overdue; its bounds in store calendar days are in the field name."
                    },
                    "overdue_61_90": {
                        "type": "integer",
                        "description": "Overdue age bucket of overdue; its bounds in store calendar days are in the field name."
                    },
                    "overdue_90_plus": {
                        "type": "integer",
                        "description": "Last overdue age bucket of overdue: everything older than overdue_61_90."
                    },
                    "not_due": {
                        "type": "integer",
                        "description": "Part of bills_outstanding not yet due (today or later)."
                    },
                    "due_soon": {
                        "type": "integer",
                        "description": "Part of not_due due within the next week."
                    },
                    "no_due_date": {
                        "type": "integer",
                        "description": "Part of bills_outstanding without a due date."
                    },
                    "settled_pending_bill": {
                        "type": "integer",
                        "description": "Recognized by a consignment settlement, no posted bill yet."
                    },
                    "accrued_unsettled": {
                        "type": "integer",
                        "description": "Sold on consignment and not yet included in a settlement."
                    },
                    "received_unbilled": {
                        "type": "integer",
                        "description": "Received in deliveries not covered by any posted bill: debt without a document."
                    },
                    "returns_expected": {
                        "type": "integer",
                        "description": "Counterclaim for shipped returns not yet compensated; reduces the debt."
                    },
                    "advances_unapplied": {
                        "type": "integer",
                        "description": "Purchase order advances not yet applied to bills; reduce the debt."
                    },
                    "payments_unapplied": {
                        "type": "integer",
                        "description": "Money journal payments not yet applied to bills, net of money the supplier returned; reduce the debt."
                    }
                },
                "required": [
                    "supplier_id",
                    "legal_entity_id",
                    "as_of",
                    "currency",
                    "total_due",
                    "has_open_items",
                    "bills_outstanding",
                    "overdue",
                    "overdue_1_30",
                    "overdue_31_60",
                    "overdue_61_90",
                    "overdue_90_plus",
                    "not_due",
                    "due_soon",
                    "no_due_date",
                    "settled_pending_bill",
                    "accrued_unsettled",
                    "received_unbilled",
                    "returns_expected",
                    "advances_unapplied",
                    "payments_unapplied"
                ]
            },
            "SupplierBill": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "invoice",
                            "debit_note",
                            "credit_note"
                        ],
                        "description": "invoice — invoice; debit_note — debit note: increases the debt; credit_note — credit note: decreases the debt (return, discount, correction). Document amounts are always positive, kind sets the sign."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "posted",
                            "void"
                        ],
                        "description": "draft — draft: not in the books; posted — posted: in payables and the purchase book, immutable; void — voided: not included anywhere."
                    },
                    "fiscal": {
                        "type": "boolean",
                        "description": "false — debt for a delivery without an invoice: no ARCA details, not in the purchase book; true — invoice or note."
                    },
                    "legal_entity_id": {
                        "type": "integer",
                        "description": "ID of the buying store legal entity (/v1/legal-entities)."
                    },
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "related_bill_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the document the note corrects; null for an invoice and a note without a reference."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Document number as the store entered it; null for a debt without an invoice."
                    },
                    "issued_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Document date, YYYY-MM-DD in the store time zone."
                    },
                    "tax_period": {
                        "type": "string",
                        "description": "Tax period in which the document is recorded in the purchase book, YYYY-MM."
                    },
                    "due_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Due date, YYYY-MM-DD in the store time zone; null — no due date."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Document currency, ISO 4217: all amounts except base_total are in it."
                    },
                    "exchange_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Rate of the document currency to the store currency as a decimal string; null for a document in the store currency."
                    },
                    "net_taxed": {
                        "type": "integer",
                        "description": "VAT taxable base."
                    },
                    "net_exempt": {
                        "type": "integer",
                        "description": "VAT exempt amount."
                    },
                    "net_untaxed": {
                        "type": "integer",
                        "description": "Amount outside the scope of VAT."
                    },
                    "tax_total": {
                        "type": "integer",
                        "description": "Document VAT."
                    },
                    "perceptions_total": {
                        "type": "integer",
                        "description": "Perceptions: amounts the supplier added to the payment on account of the store future taxes."
                    },
                    "other_taxes_total": {
                        "type": "integer",
                        "description": "Internal and other taxes of the document."
                    },
                    "total": {
                        "type": "integer",
                        "description": "Document total: base, taxes and perceptions."
                    },
                    "base_total": {
                        "type": "integer",
                        "description": "Total in the store currency at the document rate."
                    },
                    "paid_total": {
                        "type": "integer",
                        "description": "Amount settled in the document currency: by money, offset, credit note, advance, journal payment or outside the system. Every settlement moves the bill in the feed."
                    },
                    "outstanding": {
                        "type": "integer",
                        "description": "Unsettled part in the document currency: total − paid_total. For a credit note, the unapplied credit; negative for an overpaid document."
                    },
                    "tax_lines": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/TaxLine"
                        },
                        "description": "VAT by rate: taxed, exempt and outside the scope. null — the document has no tax or the rate of the taxed part cannot be determined."
                    },
                    "additional_taxes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "perception",
                                        "withholding",
                                        "internal",
                                        "other"
                                    ],
                                    "description": "perception — perception: increases the amount payable and is credited by the store; withholding — withholding: the store withholds it on payment and pays it to the treasury, the amount transferred decreases; internal — internal taxes (excise); other — other taxes."
                                },
                                "regime": {
                                    "type": "string",
                                    "enum": [
                                        "vat",
                                        "income",
                                        "turnover",
                                        "municipal",
                                        "internal",
                                        "social",
                                        "other"
                                    ],
                                    "description": "Which tax: vat — VAT, income — income tax, turnover — turnover tax (Ingresos Brutos), municipal — municipal and others."
                                },
                                "jurisdiction": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Tax jurisdiction, for example the Ingresos Brutos province; null if the tax does not need one."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Tax amount."
                                },
                                "certificate_number": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Withholding or perception certificate number; null if there is none."
                                }
                            },
                            "required": [
                                "kind",
                                "regime",
                                "jurisdiction",
                                "amount",
                                "certificate_number"
                            ]
                        },
                        "description": "Taxes beyond VAT: perceptions, withholdings, internal and other. The document carries only their amount, without base or rate."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "description": {
                                    "type": "string",
                                    "description": "Line description as in the document."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Product variant ID (/v1/variants); null for a line not about a product."
                                },
                                "quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity as a decimal string; null if not stated."
                                },
                                "unit_amount": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Unit price without tax; null if not stated."
                                },
                                "net_amount": {
                                    "type": "integer",
                                    "description": "Line amount without tax."
                                },
                                "tax_kind": {
                                    "type": "string",
                                    "enum": [
                                        "taxed",
                                        "exempt",
                                        "untaxed"
                                    ],
                                    "description": "taxed — taxed at a rate; exempt — exempt; untaxed — outside the scope of tax."
                                },
                                "rate_bps": {
                                    "type": "integer",
                                    "description": "VAT rate in basis points: 2100 is 21 %."
                                },
                                "tax_amount": {
                                    "type": "integer",
                                    "description": "Line VAT."
                                }
                            },
                            "required": [
                                "description",
                                "variant_id",
                                "quantity",
                                "unit_amount",
                                "net_amount",
                                "tax_kind",
                                "rate_bps",
                                "tax_amount"
                            ]
                        },
                        "description": "Document lines in order; a document entered by totals has no lines."
                    },
                    "vendor": {
                        "type": "object",
                        "properties": {
                            "tax_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Supplier tax number on the document; null if not stated."
                            },
                            "legal_name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Supplier name on the document; null if not stated."
                            }
                        },
                        "required": [
                            "tax_id",
                            "legal_name"
                        ],
                        "description": "Supplier details as printed on the document: they stay the same if the supplier record is corrected later."
                    },
                    "goods_receipt_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the goods receipt that created this delivery debt; null if the document was not created by a receipt."
                    },
                    "goods_receipt_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "Goods receipts the document covers (/v1/goods-receipts): deliveries matched to the invoice, or the delivery behind a delivery debt."
                    },
                    "purchase_order_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "Purchase orders the document relates to (/v1/purchase-orders)."
                    },
                    "supplier_return_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "Supplier returns the credit note was issued for (/v1/supplier-returns)."
                    },
                    "consignment_settlement_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the consignment settlement the document was issued for; null for others."
                    },
                    "match_status": {
                        "type": "string",
                        "enum": [
                            "unmatched",
                            "matched",
                            "flagged"
                        ],
                        "description": "Match with the goods receipt: unmatched — not linked to a receipt; matched — linked and matching; flagged — linked with a discrepancy. Does not block payment."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "approved_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the document was approved for payment; null if not approved."
                    },
                    "posted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the document was posted; null for a draft."
                    },
                    "voided_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the document was voided; null if not voided."
                    },
                    "ar": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "document_type_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "ARCA comprobante type code: 001 — invoice A, 006 — invoice B, 011 — invoice C; null if not stated."
                            },
                            "point_of_sale": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Supplier point of sale (punto de venta); null if not stated."
                            },
                            "authorization_kind": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "CAE",
                                    "CAEA",
                                    "CAI",
                                    null
                                ],
                                "description": "CAE — electronic document; CAEA — code issued for a period; CAI — printed form; null — no authorization (for example, a foreign document)."
                            },
                            "authorization_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Authorization code; null if not stated."
                            },
                            "authorization_expires_on": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date",
                                "description": "Authorization code expiry date, YYYY-MM-DD; null if not stated."
                            },
                            "verification_status": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "verified",
                                    "rejected",
                                    "unavailable",
                                    "pending",
                                    null
                                ],
                                "description": "Document check with ARCA: verified — confirmed; rejected — ARCA did not recognize it; unavailable — could not be checked; pending — awaiting the check; null — not checked."
                            },
                            "credit_fiscal_amount": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Creditable part of VAT under proportional credit; null — the whole tax is creditable."
                            },
                            "import": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "kind": {
                                        "type": "string",
                                        "enum": [
                                            "goods",
                                            "services"
                                        ],
                                        "description": "goods — import of goods under a customs declaration; services — services from a provider abroad."
                                    },
                                    "customs_declaration": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Customs declaration number (despacho) of an import of goods; null if not given."
                                    },
                                    "document_kind": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "invoice",
                                            "contract",
                                            "other",
                                            null
                                        ],
                                        "description": "Document of the service provider: invoice, contract or other (with a description); null if not given."
                                    },
                                    "document_description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Description of a document of kind other; null for the rest."
                                    },
                                    "provider_tax_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Tax ID of the provider in their country; null if not given."
                                    },
                                    "tax_paid_on": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date",
                                        "description": "Date VAT on the imported services was paid, YYYY-MM-DD; null if not given."
                                    },
                                    "tax_paid_amount": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "description": "VAT paid on the imported services in the document currency; null if not given."
                                    },
                                    "payment_reference": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Identifier of the tax payment; null if not given."
                                    },
                                    "payment_entity_tax_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "CUIT of the bank the tax was paid through; null if not given."
                                    }
                                },
                                "required": [
                                    "kind",
                                    "customs_declaration",
                                    "document_kind",
                                    "document_description",
                                    "provider_tax_id",
                                    "tax_paid_on",
                                    "tax_paid_amount",
                                    "payment_reference",
                                    "payment_entity_tax_id"
                                ],
                                "description": "Import of goods or services — its own layout of the ARCA import ledger; null for a domestic document."
                            }
                        },
                        "required": [
                            "document_type_code",
                            "point_of_sale",
                            "authorization_kind",
                            "authorization_code",
                            "authorization_expires_on",
                            "verification_status",
                            "credit_fiscal_amount",
                            "import"
                        ],
                        "description": "ARCA details of the invoice or note; null for a debt for a delivery without an invoice."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "kind",
                    "status",
                    "fiscal",
                    "legal_entity_id",
                    "supplier_id",
                    "related_bill_id",
                    "number",
                    "issued_on",
                    "tax_period",
                    "due_on",
                    "currency",
                    "exchange_rate",
                    "net_taxed",
                    "net_exempt",
                    "net_untaxed",
                    "tax_total",
                    "perceptions_total",
                    "other_taxes_total",
                    "total",
                    "base_total",
                    "paid_total",
                    "outstanding",
                    "tax_lines",
                    "additional_taxes",
                    "lines",
                    "vendor",
                    "goods_receipt_id",
                    "goods_receipt_ids",
                    "purchase_order_ids",
                    "supplier_return_ids",
                    "consignment_settlement_id",
                    "match_status",
                    "note",
                    "approved_at",
                    "posted_at",
                    "voided_at",
                    "ar",
                    "created_at",
                    "updated_at"
                ]
            },
            "SupplierBillPayment": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "supplier_bill_id": {
                        "type": "integer",
                        "description": "Supplier bill ID (/v1/supplier-bills)."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "money",
                            "offset",
                            "credit_note",
                            "advance",
                            "journal",
                            "out_of_band"
                        ],
                        "description": "What settled the debt: money — money from a money account; offset — offset against a mutual debt; credit_note — a credit note (the line exists on both the invoice and the note); advance — a purchase order advance; journal — an expense already recorded in the money journal; out_of_band — paid outside the system, without a money account."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Settled amount in the supplier bill currency."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Supplier bill currency, ISO 4217."
                    },
                    "withheld_amount": {
                        "type": "integer",
                        "description": "Withheld on payment, in the supplier bill currency; the supplier received amount minus withheld_amount."
                    },
                    "money_account_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the money account (/v1/money-accounts) the payment came from; null for payments without store money."
                    },
                    "account_amount": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Transferred from the money account, in its currency, as a decimal string; null if there is no money account."
                    },
                    "base_amount": {
                        "type": "integer",
                        "description": "Equivalent in the store currency on the payment date."
                    },
                    "exchange_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Rate on the payment date as a decimal string; null if no conversion took place."
                    },
                    "paid_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Payment date, YYYY-MM-DD in the store time zone."
                    },
                    "settlement_offset_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the offset document for kind offset; null for others."
                    },
                    "counterpart_bill_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the counterpart document for kind credit_note: the note on an invoice, the invoice on a note; null for others."
                    },
                    "purchase_order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the purchase order whose advance settled the document, for kind advance; null for others."
                    },
                    "money_transaction_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the money journal expense (/v1/money-transactions) applied to the bill, for kind journal; null for others. Money of kind money is a journal transaction with source supplier_bill_payment and the ID of this payment."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "supplier_bill_id",
                    "kind",
                    "amount",
                    "currency",
                    "withheld_amount",
                    "money_account_id",
                    "account_amount",
                    "base_amount",
                    "exchange_rate",
                    "paid_on",
                    "settlement_offset_id",
                    "counterpart_bill_id",
                    "purchase_order_id",
                    "money_transaction_id",
                    "note",
                    "created_at",
                    "updated_at"
                ]
            },
            "SupplierReturn": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "number": {
                        "type": "string",
                        "description": "Return number."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "shipped",
                            "closed",
                            "void"
                        ],
                        "description": "draft — stock untouched, lines editable; shipped — shipped to the supplier, stock written off, compensation expected; closed — compensation received or the refusal handled; void — voided, stock restored."
                    },
                    "reason": {
                        "type": "string",
                        "enum": [
                            "defect",
                            "wrong_item",
                            "surplus",
                            "recall",
                            "expiry",
                            "other"
                        ],
                        "description": "Return reason: defect — defective; wrong_item — wrong item; surplus — surplus; recall — batch recall; expiry — expired; other — other."
                    },
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Store legal entity the credit note is expected for (/v1/legal-entities); null on older returns."
                    },
                    "location_id": {
                        "type": "integer",
                        "description": "Location the goods left from (/v1/locations)."
                    },
                    "goods_receipt_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Source goods receipt (/v1/goods-receipts); null — a return without a receipt, priced at cost."
                    },
                    "purchase_order_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Purchase order (/v1/purchase-orders); null without an order."
                    },
                    "issued_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Document date — the day in the statement and on paper, YYYY-MM-DD; null on a draft."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Return currency, ISO 4217: line prices, subtotal and settled_amount are in it."
                    },
                    "exchange_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Rate of the return currency to the store currency as a decimal string, captured on shipping; null before shipping."
                    },
                    "subtotal": {
                        "type": "integer",
                        "description": "Value of the return lines in the return currency."
                    },
                    "base_subtotal": {
                        "type": "integer",
                        "description": "Value of the lines in the store currency at the captured rate."
                    },
                    "expected_settlement": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "credit_note",
                            "replacement",
                            "refund",
                            "rejected",
                            "none",
                            null
                        ],
                        "description": "What is expected from the supplier, set on shipping: credit_note — a credit note; replacement — replacement goods; refund — money; none — no compensation; null — not set."
                    },
                    "settlement": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "credit_note",
                            "replacement",
                            "refund",
                            "rejected",
                            "none",
                            null
                        ],
                        "description": "What was received on closing: credit_note — a credit note; replacement — replacement; refund — money; rejected — the supplier refused; none — no compensation; null — not closed."
                    },
                    "settled_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Amount the supplier accepted, in the return currency; null — not yet accepted."
                    },
                    "base_settled_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Accepted amount in the store currency at the captured rate; null — not yet accepted."
                    },
                    "shipped_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the goods were shipped to the supplier; null on a draft."
                    },
                    "closed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the return was closed; null if not closed."
                    },
                    "voided_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the return was voided; null on an active return."
                    },
                    "void_reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Why the return was voided; null on an active return and on older documents."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Product variant ID (/v1/variants)."
                                },
                                "lot_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Lot of the line (/v1/lots); null for a product without lots."
                                },
                                "goods_receipt_line_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Source receipt line (lines[].id of the receipt) the price comes from; null on a line without a receipt."
                                },
                                "purchase_order_line_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Purchase order line (lines[].id of the order); null without an order."
                                },
                                "unit": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Base unit of the line quantities: pcs — pieces, g — grams, ml — milliliters."
                                },
                                "quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity shipped to the supplier, a decimal string in the base unit."
                                },
                                "settled_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "How much of it the supplier accepted."
                                },
                                "unit_cost": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Price in the return currency per cost_per_quantity; null — no price."
                                },
                                "cost_per_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Quantity in the base unit the price is for: \"1000\" on a weighed product means per kilogram."
                                },
                                "store_unit_cost_micro": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "The same price in the store currency, in millionths of the minor unit; null — no price."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Value of what was shipped at the line price; lines add up to subtotal."
                                },
                                "settled_amount": {
                                    "type": "integer",
                                    "description": "Value of what the supplier accepted at the line price."
                                },
                                "reason": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "defect",
                                        "wrong_item",
                                        "surplus",
                                        "recall",
                                        "expiry",
                                        "other",
                                        null
                                    ],
                                    "description": "Line reason with the same codes as the document reason; null — the document reason applies."
                                },
                                "note": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Line note; null if there is none."
                                }
                            },
                            "required": [
                                "id",
                                "variant_id",
                                "lot_id",
                                "goods_receipt_line_id",
                                "purchase_order_line_id",
                                "unit",
                                "quantity",
                                "settled_quantity",
                                "unit_cost",
                                "cost_per_quantity",
                                "store_unit_cost_micro",
                                "amount",
                                "settled_amount",
                                "reason",
                                "note"
                            ]
                        },
                        "description": "Return lines."
                    },
                    "corrections": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "number": {
                                    "type": "string",
                                    "description": "Correction number."
                                },
                                "reason": {
                                    "type": "string",
                                    "description": "Why it was corrected; printed on the document and visible to the supplier."
                                },
                                "subtotal_before": {
                                    "type": "integer",
                                    "description": "subtotal before the correction."
                                },
                                "subtotal_after": {
                                    "type": "integer",
                                    "description": "subtotal after the correction."
                                },
                                "lines": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "supplier_return_line_id": {
                                                "type": [
                                                    "integer",
                                                    "null"
                                                ],
                                                "description": "Return line ID (lines[].id); null — the correction removed the line."
                                            },
                                            "variant_id": {
                                                "type": [
                                                    "integer",
                                                    "null"
                                                ],
                                                "description": "Product variant of the line (/v1/variants)."
                                            },
                                            "quantity_before": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Quantity before the correction, in the base unit."
                                            },
                                            "quantity_after": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Quantity after the correction, in the base unit."
                                            },
                                            "reason_before": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "enum": [
                                                    "defect",
                                                    "wrong_item",
                                                    "surplus",
                                                    "recall",
                                                    "expiry",
                                                    "other",
                                                    null
                                                ],
                                                "description": "Line reason before the correction; null — the document reason applies."
                                            },
                                            "reason_after": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "enum": [
                                                    "defect",
                                                    "wrong_item",
                                                    "surplus",
                                                    "recall",
                                                    "expiry",
                                                    "other",
                                                    null
                                                ],
                                                "description": "Line reason after the correction; null — the document reason applies."
                                            }
                                        },
                                        "required": [
                                            "supplier_return_line_id",
                                            "variant_id",
                                            "quantity_before",
                                            "quantity_after",
                                            "reason_before",
                                            "reason_after"
                                        ]
                                    },
                                    "description": "Corrected lines, before and after."
                                },
                                "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the correction was posted."
                                }
                            },
                            "required": [
                                "id",
                                "number",
                                "reason",
                                "subtotal_before",
                                "subtotal_after",
                                "lines",
                                "created_at"
                            ]
                        },
                        "description": "Corrections of the shipped return in order."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "number",
                    "status",
                    "reason",
                    "supplier_id",
                    "legal_entity_id",
                    "location_id",
                    "goods_receipt_id",
                    "purchase_order_id",
                    "issued_on",
                    "currency",
                    "exchange_rate",
                    "subtotal",
                    "base_subtotal",
                    "expected_settlement",
                    "settlement",
                    "settled_amount",
                    "base_settled_amount",
                    "shipped_at",
                    "closed_at",
                    "voided_at",
                    "void_reason",
                    "note",
                    "lines",
                    "corrections",
                    "created_at",
                    "updated_at"
                ]
            },
            "SupplierSettlementMode": {
                "type": "string",
                "enum": [
                    "on_receipt",
                    "on_sale"
                ]
            },
            "SupplierStatement": {
                "type": "object",
                "properties": {
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Store legal entity the statement is built for; null — all legal entities."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "from": {
                        "type": "string",
                        "description": "First day of the period, YYYY-MM-DD in the store time zone; without from in the request — the day of the first statement line."
                    },
                    "to": {
                        "type": "string",
                        "description": "Last day of the period, YYYY-MM-DD in the store time zone."
                    },
                    "opening_balance": {
                        "type": "integer",
                        "description": "Debt at the start of the period: the sum of lines before from."
                    },
                    "closing_balance": {
                        "type": "integer",
                        "description": "Debt at the end of the period: opening_balance plus the period lines. For today it equals total_due of the balance."
                    },
                    "increase_total": {
                        "type": "integer",
                        "description": "Sum of debt increases in the period."
                    },
                    "decrease_total": {
                        "type": "integer",
                        "description": "Sum of debt decreases in the period, as a positive number."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "date": {
                                    "type": "string",
                                    "description": "Line date, YYYY-MM-DD in the store time zone."
                                },
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "bill",
                                        "credit_note",
                                        "payment",
                                        "offset",
                                        "out_of_band_payment",
                                        "journal_payment",
                                        "supplier_refund",
                                        "advance",
                                        "fx_difference",
                                        "unbilled_receipt",
                                        "settlement",
                                        "accrual",
                                        "return_claim"
                                    ],
                                    "description": "bill — posted invoice or debit note; credit_note — credit note; payment — money payment from the bill; offset — offset; out_of_band_payment — paid outside the system; journal_payment — money journal payment; supplier_refund — money the supplier returned; advance — purchase order advance; fx_difference — exchange difference; unbilled_receipt — delivery without a posted bill; settlement — consignment settlement without a posted bill; accrual — sold and not yet settled; return_claim — shipped return not yet compensated."
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Signed line amount: plus — the debt grew, minus — it shrank."
                                },
                                "balance": {
                                    "type": "integer",
                                    "description": "Debt after the line."
                                },
                                "document": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "enum": [
                                                "supplier_bill",
                                                "money_transaction",
                                                "purchase_order",
                                                "goods_receipt",
                                                "consignment_settlement",
                                                "supplier_return"
                                            ],
                                            "description": "Document kind: supplier_bill, money_transaction, purchase_order, goods_receipt, consignment_settlement or supplier_return."
                                        },
                                        "id": {
                                            "type": "integer",
                                            "description": "Document ID."
                                        },
                                        "number": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Document number; null if it has none."
                                        }
                                    },
                                    "required": [
                                        "type",
                                        "id",
                                        "number"
                                    ],
                                    "description": "Line document; null for consignment accruals."
                                },
                                "supplier_bill_payment_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Bill payment ID (/v1/supplier-bill-payments) on a payment line; null otherwise."
                                },
                                "money_transaction_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "ID of the money journal transaction (/v1/money-transactions) that paid the advance, on an advance line; null otherwise."
                                },
                                "settlement_offset_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Offset ID (/v1/settlement-offsets) on an offset line; null otherwise."
                                },
                                "document_amount": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "currency": {
                                            "type": "string",
                                            "description": "Document currency, ISO 4217."
                                        },
                                        "amount": {
                                            "type": "integer",
                                            "description": "Amount in minor units of the document currency."
                                        }
                                    },
                                    "required": [
                                        "currency",
                                        "amount"
                                    ],
                                    "description": "Amount in the document currency when it is not the store currency; null — store currency."
                                }
                            },
                            "required": [
                                "date",
                                "kind",
                                "amount",
                                "balance",
                                "document",
                                "supplier_bill_payment_id",
                                "money_transaction_id",
                                "settlement_offset_id",
                                "document_amount"
                            ]
                        },
                        "description": "Period lines by date: within a day, what creates debt comes first, then what settles it."
                    }
                },
                "required": [
                    "supplier_id",
                    "legal_entity_id",
                    "currency",
                    "from",
                    "to",
                    "opening_balance",
                    "closing_balance",
                    "increase_total",
                    "decrease_total",
                    "lines"
                ]
            },
            "TaxClass": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name of the tax class by language, as the store shows it."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "taxed",
                            "exempt",
                            "untaxed"
                        ],
                        "description": "Kind of tax: taxed — at the rate; exempt — exempt by law; untaxed — outside the scope of the tax. Fiscal documents keep exempt and untaxed apart."
                    },
                    "rate_bps": {
                        "type": "integer",
                        "description": "Tax rate in basis points: 2100 is 21 %. 0 for exempt and untaxed."
                    },
                    "is_default": {
                        "type": "boolean",
                        "description": "The default class of the store: products without their own class and delivery are taxed by it. At most one class of the store is the default."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "kind",
                    "rate_bps",
                    "is_default",
                    "created_at",
                    "updated_at"
                ]
            },
            "TaxLine": {
                "type": "object",
                "properties": {
                    "regime": {
                        "type": "string",
                        "enum": [
                            "vat",
                            "income",
                            "turnover",
                            "municipal",
                            "internal",
                            "social",
                            "other"
                        ],
                        "description": "Which tax: vat — value added tax (IVA); income — income tax; turnover — gross receipts tax (Ingresos Brutos); municipal — a municipal levy; internal — excise; social — social security; other. Tax of a sale is vat: the tax class of a product classifies value added tax."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "taxed",
                            "exempt",
                            "untaxed"
                        ],
                        "description": "taxed — at the rate; exempt — exempt by law; untaxed — outside the scope of the tax. exempt and untaxed lines have rate_bps 0 and amount 0: the amount is in base."
                    },
                    "rate_bps": {
                        "type": "integer",
                        "description": "Rate in basis points: 2100 is 21 %."
                    },
                    "base": {
                        "type": "integer",
                        "description": "Base of the tax, without the tax. Prices include tax: base + amount is what the customer paid for this part."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Amount of the tax. The tax of a sale is calculated per rate for the whole order, the base rounded to the nearest unit and the tax as the rest; items and delivery get shares of it, so their lines add up to the line of the order."
                    },
                    "jurisdiction": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Province or municipality for taxes that need one (turnover, municipal); otherwise null."
                    }
                },
                "required": [
                    "regime",
                    "kind",
                    "rate_bps",
                    "base",
                    "amount",
                    "jurisdiction"
                ]
            },
            "TaxPeriod": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "legal_entity_id": {
                        "type": "integer",
                        "description": "ID of the legal entity of the period."
                    },
                    "regime": {
                        "type": "string",
                        "enum": [
                            "vat",
                            "income",
                            "turnover",
                            "municipal",
                            "internal",
                            "social",
                            "other"
                        ],
                        "description": "Tax of the period, a tax line kind: vat — VAT (IVA), turnover — turnover tax (Ingresos Brutos) and others."
                    },
                    "period": {
                        "type": "string",
                        "description": "Month of the period, YYYY-MM."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "open",
                            "closed"
                        ],
                        "description": "closed — the period is filed: documents dated in it do not change and its data is final; open — the period was reopened. A month without a row is open."
                    },
                    "closed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the period was closed; null for an open one."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "legal_entity_id",
                    "regime",
                    "period",
                    "status",
                    "closed_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "TaxWithholding": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "legal_entity_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the store legal entity (/v1/legal-entities) the tax was withheld from or that withheld it; null if the legal entity was deleted."
                    },
                    "direction": {
                        "type": "string",
                        "enum": [
                            "suffered",
                            "practiced"
                        ],
                        "description": "suffered — withheld from the store (settlement provider, bank, customer acting as an agent): its tax advance; practiced — the store withheld it by paying a supplier less: an obligation to remit to the tax authority, with no credit."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "withholding",
                            "perception"
                        ],
                        "description": "withholding — withheld from a payout; perception — added to the amount due."
                    },
                    "regime": {
                        "type": "string",
                        "enum": [
                            "vat",
                            "income",
                            "turnover",
                            "municipal",
                            "internal",
                            "social",
                            "other"
                        ],
                        "description": "Which tax was withheld: vat — VAT (IVA), income — income tax (Ganancias), turnover — turnover tax (Ingresos Brutos), municipal — municipal and others."
                    },
                    "jurisdiction": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Province or municipality for taxes that need one (turnover, municipal); otherwise null."
                    },
                    "credit_regime": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "vat",
                            "income",
                            "turnover",
                            "municipal",
                            "internal",
                            "social",
                            "other",
                            null
                        ],
                        "description": "Which tax the store credits the withholding against; null — nothing to credit it against (a refund claim) or the store withheld it (practiced)."
                    },
                    "credit_period": {
                        "type": "string",
                        "description": "Credit month, YYYY-MM: may differ from the withholding month."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Withheld amount in minor units of the store currency."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Currency of the amounts, an ISO 4217 code: the currency of the store."
                    },
                    "base_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Taxable base the tax was withheld from, in minor units of the currency; null if the basis has none."
                    },
                    "rate_bps": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Rate in hundredths of a percent: 250 is 2.5%; null if the basis has no rate."
                    },
                    "rate_source": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "padron",
                            "default",
                            "manual",
                            "import",
                            null
                        ],
                        "description": "Where the rate comes from: padron — the tax authority register; default — the default rate in the agent settings; manual — a staff member set the amount; import — the rate from the agent paper. null if there is no rate."
                    },
                    "counterparty_tax_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Tax ID of the counterparty: the agent that withheld from the store, or the supplier the store withheld from; null if unknown."
                    },
                    "counterparty_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Counterparty name at the time of withholding, as printed on the certificate; null if unknown."
                    },
                    "occurred_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Withholding date, YYYY-MM-DD."
                    },
                    "certificate_number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Certificate number: the agent paper number for tax withheld from the store, a number from the store series for tax the store withheld; null if there is no certificate."
                    },
                    "source": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "payment_settlement",
                                    "supplier_bill_payment",
                                    "money_transaction",
                                    "statement_line",
                                    "import_row",
                                    "account_payment_withholding"
                                ],
                                "description": "payment_settlement — provider settlement of a payment (id is /v1/payments); supplier_bill_payment — a supplier bill payment (id is /v1/supplier-bill-payments); money_transaction — a payout in the money journal (id is /v1/money-transactions); statement_line — a bank statement line; import_row — a row of an uploaded agent register; account_payment_withholding — a certificate given with a customer debt payment: the customer account entry points to it with tax_withholding_id. The last three have an internal id."
                            },
                            "id": {
                                "type": "integer",
                                "description": "ID of the source record."
                            }
                        },
                        "required": [
                            "type",
                            "id"
                        ],
                        "description": "The record that booked the withholding; null — entered by a staff member."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Staff note; null if there is none."
                    },
                    "annulled_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the store annulled its certificate: the amount is no longer to remit, and the number stays taken. null for a live record."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "legal_entity_id",
                    "direction",
                    "kind",
                    "regime",
                    "jurisdiction",
                    "credit_regime",
                    "credit_period",
                    "amount",
                    "currency",
                    "base_amount",
                    "rate_bps",
                    "rate_source",
                    "counterparty_tax_id",
                    "counterparty_name",
                    "occurred_on",
                    "certificate_number",
                    "source",
                    "note",
                    "annulled_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "UpdateCategoryRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50000
                        },
                        "description": "Description by language in Markdown (GitHub Flavored): an object of the filled languages."
                    },
                    "slug": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Address of the category on the storefront, unique in the store."
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the parent category; null for a top-level category. Categories come as a flat list, the tree is built by this field."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Position among the sibling categories: lower comes first."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false hides the category from the storefront."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    }
                }
            },
            "UpdateCustomerAddressRequest": {
                "type": "object",
                "properties": {
                    "label": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "Name of the address, such as Home or Work; null when not given."
                    },
                    "street": {
                        "type": "string",
                        "maxLength": 255,
                        "description": "Street."
                    },
                    "house": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "House number."
                    },
                    "apartment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Apartment or office."
                    },
                    "floor": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16,
                        "description": "Floor."
                    },
                    "entrance": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16,
                        "description": "Entrance."
                    },
                    "district": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "District or neighborhood."
                    },
                    "postal_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16,
                        "description": "Postal code."
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500,
                        "description": "Comment for the courier, such as how to get in; null when not given."
                    },
                    "location": {
                        "type": "object",
                        "properties": {
                            "lat": {
                                "type": "number",
                                "minimum": -90,
                                "maximum": 90,
                                "description": "Latitude in degrees."
                            },
                            "lng": {
                                "type": "number",
                                "minimum": -180,
                                "maximum": 180,
                                "description": "Longitude in degrees."
                            }
                        },
                        "description": "Point of the address on the map; null when the address came from another system and has not been located yet."
                    },
                    "is_default": {
                        "type": "boolean",
                        "description": "The main address of the customer. When the main address is deleted, the newest address becomes the main one."
                    }
                }
            },
            "UpdateCustomerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "pattern": "\\S",
                        "maxLength": 120,
                        "description": "Name of the customer; null when unknown."
                    },
                    "language": {
                        "$ref": "#/components/schemas/Locale",
                        "description": "Language the store writes to the customer in: ru, en or es."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID of the customer, its ID in your system; null when not set. After two customers are merged, the ID of the merged one also finds the surviving customer; the response shows the main ID."
                    }
                }
            },
            "UpdateDraftOrderRequest": {
                "type": "object",
                "properties": {
                    "customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The customer of the draft (/v1/customers); null until chosen."
                    },
                    "delivery_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Delivery method (/v1/delivery-methods); null until chosen."
                    },
                    "address_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Address from the address book of the customer, for a method with delivery; null when not chosen."
                    },
                    "pickup_location_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Pickup point for a pickup method. A method with one pickup point uses it by itself; with several the draft must name one."
                    },
                    "delivery_slots": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "from": {
                                    "type": "string",
                                    "description": "Start of the window."
                                },
                                "to": {
                                    "type": "string",
                                    "description": "End of the window."
                                }
                            },
                            "required": [
                                "from",
                                "to"
                            ]
                        },
                        "maxItems": 50,
                        "description": "Delivery windows chosen for a method that works with windows."
                    },
                    "delivery_cost_override": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Delivery price set by hand instead of the calculation of the method; null — by the rules of the method."
                    },
                    "payment_method": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "cash",
                            "mercadopago",
                            "crypto",
                            "bybit",
                            "trc20",
                            "balance",
                            "modo",
                            "payway",
                            "mercadopago_qr",
                            "mercadopago_point",
                            "mercadopago_transfer",
                            "gift_card",
                            "subscription",
                            "deposit",
                            "external",
                            "manual",
                            "offset",
                            "on_account",
                            "exchange_credit",
                            "bonpunto",
                            "service_package",
                            null
                        ],
                        "description": "Payment method the draft will be placed with: discounts for the method and compatibility with the delivery depend on it."
                    },
                    "manual_payment_method_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "description": "Manual payment method of the store when payment_method is manual; otherwise null."
                    },
                    "promocode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "Promo code applied to the draft; null when none."
                    },
                    "customer_comment": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "Comment of the customer to the order. Only with the customers:read scope."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "Internal note of the store: it goes to the order, the customer does not see it."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the line in the draft."
                                },
                                "variant_id": {
                                    "type": "integer",
                                    "description": "Variant of the line; null for a custom line."
                                },
                                "quantity": {
                                    "type": "string",
                                    "maxLength": 32,
                                    "description": "Quantity, a decimal string in unit: pieces for an item sold by the piece, the measure for an item sold by weight or volume (\"480\" grams)."
                                },
                                "modifiers": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "option_id": {
                                                "type": "integer",
                                                "description": "ID of the modifier option."
                                            },
                                            "quantity": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 99,
                                                "description": "How many times the modifier is added."
                                            }
                                        },
                                        "required": [
                                            "option_id"
                                        ]
                                    },
                                    "maxItems": 50,
                                    "description": "Modifiers of the line, such as extra toppings of a dish."
                                }
                            },
                            "required": [
                                "variant_id",
                                "quantity"
                            ]
                        },
                        "maxItems": 200,
                        "uniqueItems": true,
                        "description": "Items of the draft. An open draft is priced live by the catalog, discounts and delivery; a closed draft keeps its items without prices."
                    }
                }
            },
            "UpdateModifierGroupRequest": {
                "type": "object",
                "properties": {
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "external_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                                },
                                "name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                                },
                                "price_delta": {
                                    "type": "integer",
                                    "minimum": -100000000,
                                    "maximum": 100000000,
                                    "description": "Surcharge on the item price per portion of the option, an integer in minor units of the store currency; negative — a discount. A product can set its own surcharge by variant."
                                },
                                "max_quantity": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 99,
                                    "description": "How many times the option can be taken in one item; null — no own limit, only the group max_select applies."
                                },
                                "duration_minutes": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 5,
                                    "maximum": 120,
                                    "description": "How many minutes the option adds to a bookable service, a multiple of 5; null — none. Has no effect on other kinds of items."
                                },
                                "is_active": {
                                    "type": "boolean",
                                    "description": "false — the option is turned off and not offered."
                                },
                                "is_default": {
                                    "type": "boolean",
                                    "description": "The option is preselected: the storefront and the POS check it at once, and the server fills a required group left empty with it."
                                },
                                "adds_ingredients": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ],
                                    "description": "Whether this option changes the composition; null — as the group (adds_ingredients)."
                                },
                                "recipe_per_variant": {
                                    "type": "boolean",
                                    "description": "Consumption depends on the dish: no general composition, the amount is set by the recipe of each variant (option_recipes); without it the option is not offered on that variant."
                                },
                                "nutrition": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "kcal": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 1000000,
                                            "description": "Energy, kcal."
                                        },
                                        "protein_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Protein, mg."
                                        },
                                        "fat_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Fat, mg."
                                        },
                                        "carbs_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Carbohydrates, mg."
                                        }
                                    },
                                    "description": "Nutrition of one use of the option declared by the store: all four numbers or null — then the option composition computes it."
                                },
                                "recipe": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "variant_id": {
                                                "type": "integer",
                                                "description": "ID of the product variant."
                                            },
                                            "quantity": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 32,
                                                "description": "Component amount for one use of the option, a decimal string in the unit of the component; null — to taste: in the composition but not consumed."
                                            }
                                        },
                                        "required": [
                                            "variant_id",
                                            "quantity"
                                        ]
                                    },
                                    "maxItems": 100,
                                    "description": "General composition of the option — what it consumes in any dish: ingredients and preps with their amount. Empty for a per-dish option. On write, the whole list, an empty one clears it; without the field the composition is left as it is."
                                }
                            }
                        },
                        "minItems": 1,
                        "maxItems": 100,
                        "uniqueItems": true,
                        "description": "Options in display order. On write, the whole set: a row finds its option by id or external_id, the found one gets the fields sent, a row without an option is new and carries name; an option missing from the set is archived and removed from open draft orders."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "min_select": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 99,
                        "description": "How many options the customer must choose: 0 — the group is optional. A product can set its own rule (selection_rule)."
                    },
                    "max_select": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 99,
                        "description": "How many options can be chosen in total, repeats included; null — no limit."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — the group is turned off and not offered on products."
                    },
                    "adds_ingredients": {
                        "type": "boolean",
                        "description": "Whether the group options change the dish composition; with true, an option without its own composition makes the item composition unknown (allergens)."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    }
                }
            },
            "UpdateMoneyTransactionRequest": {
                "type": "object",
                "properties": {
                    "account_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "ID of the money account of the movement."
                    },
                    "direction": {
                        "$ref": "#/components/schemas/MoneyTransactionDirection",
                        "description": "income — money into the account; expense — money out of the account."
                    },
                    "account_amount": {
                        "type": "string",
                        "maxLength": 37,
                        "description": "Amount in the account currency, as a decimal string."
                    },
                    "amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 100000000000000,
                        "description": "Posting amount in the minor units of the store currency, always positive: direction gives the sign. For a foreign-currency account it is converted at the snapshot rate."
                    },
                    "occurred_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Accounting date, YYYY-MM-DD in the store time zone."
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Moment of the movement."
                    },
                    "category_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Category ID; null for a transfer between accounts or a movement without a category."
                    },
                    "supplier_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the supplier counterparty; null if there is none."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "Movement comment as a person or a document wrote it; null if there is none."
                    }
                }
            },
            "UpdateMoneyTransferRequest": {
                "type": "object",
                "properties": {
                    "from_account_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "ID of the money account the money left."
                    },
                    "to_account_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "ID of the money account the money arrived at."
                    },
                    "from_amount": {
                        "type": "string",
                        "maxLength": 37,
                        "description": "Amount taken from from_account_id in its currency, as a decimal string."
                    },
                    "to_amount": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 37,
                        "description": "Amount credited to to_account_id in its currency, as a decimal string. In the same currency it equals from_amount: any difference is the fee."
                    },
                    "fee": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 37,
                        "description": "Transfer fee in the currency of the source account, as a decimal string — an expense on the system category bank_fees; null when there is no fee."
                    },
                    "occurred_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Accounting date of the transfer, YYYY-MM-DD in the store time zone."
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Moment of the transfer."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1000,
                        "description": "Description of the transfer; null when not set."
                    }
                }
            },
            "UpdatePriceListRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "New name of a wholesale list, up to 120 characters. A location list is named by its location — the field is rejected."
                    },
                    "adjustment_bp": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 50000,
                        "description": "New adjustment in basis points (1% = 100): over the base price for a location list, from −9000 to 50000; over cost for a wholesale list, from 0. Omitted — unchanged."
                    },
                    "rounding": {
                        "type": "object",
                        "properties": {
                            "mode": {
                                "$ref": "#/components/schemas/DiscountRoundingMode",
                                "description": "Rounding direction: nearest, up or down."
                            },
                            "precision": {
                                "type": "integer",
                                "description": "Rounding position in digits of major units: 2 — to cents, 0 — to whole units, -2 — to hundreds. Allowed: the positions from the store's price settings and the currency's minor unit position — no rounding."
                            }
                        },
                        "description": "New rounding of the list's prices — mode and precision together; omitted — unchanged. Fixed prices and prices of items sold by weight or volume are not rounded."
                    }
                }
            },
            "UpdateProductMediaRequest": {
                "type": "object",
                "properties": {
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000,
                        "description": "Place in the gallery, starting from zero."
                    },
                    "is_primary": {
                        "type": "boolean",
                        "description": "The main photo: the storefront shows it first."
                    }
                }
            },
            "UpdateProductRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "short_description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        },
                        "description": "Short description by language, plain text for product lists."
                    },
                    "description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50000
                        },
                        "description": "Description by language in Markdown (GitHub Flavored): an object of the filled languages."
                    },
                    "slug": {
                        "type": "string",
                        "maxLength": 160,
                        "description": "Address of the product on the storefront, unique in the store."
                    },
                    "brand_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the brand of the product; null when not set."
                    },
                    "tax_class_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the tax class of the product (/v1/tax-classes); null — the default class of the store. A sale keeps the rate of its item: a change of class affects future sales only."
                    },
                    "category_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "IDs of the categories the product is in, ascending."
                    },
                    "primary_category_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The main category among category_ids; null when the product has no main category."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false takes the product off sale and hides it from the storefront."
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product appears on the storefront; null — right away."
                    },
                    "unpublished_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product leaves the storefront; null — it stays."
                    },
                    "sale_schedule": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "days": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 7
                                    },
                                    "minItems": 1,
                                    "maxItems": 7,
                                    "description": "Window days, ISO: 1 is Monday, 7 is Sunday."
                                },
                                "from": {
                                    "type": "string",
                                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$",
                                    "description": "Window start, “HH:MM” on the store clock."
                                },
                                "to": {
                                    "type": "string",
                                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$",
                                    "description": "Window end, “HH:MM”, exclusive; “24:00” means until the end of the day. An end earlier than the start makes the window run past midnight; it belongs to its start day."
                                }
                            },
                            "required": [
                                "days",
                                "from",
                                "to"
                            ]
                        },
                        "maxItems": 14,
                        "description": "When the item can be ordered — week windows in the store time zone; null means always. Outside a window the product stays visible and can go to the cart, and checkout checks the schedule against the order fulfilment time."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "variants": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "external_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "External ID of the variant, its ID in your system: the key the row is matched by."
                                },
                                "sku": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 64,
                                    "description": "Stock keeping unit (SKU); null when not set."
                                },
                                "name": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "description": "Name of the variant by language, such as {\"es\": \"Grande\"}."
                                },
                                "price": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Price for price_per_quantity units, an integer in minor units of currency."
                                },
                                "track_inventory": {
                                    "type": "boolean",
                                    "description": "The store counts the stock of the variant; false — it is sold without counting stock."
                                },
                                "is_active": {
                                    "type": "boolean",
                                    "description": "false takes the variant off sale."
                                },
                                "position": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Position among the variants of the product: lower comes first."
                                },
                                "list_price": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Price as the owner set it, in minor units of list_price_currency; null — the price is set in store money (price). For such a variant price is derived from the price list rate and is not accepted as input."
                                },
                                "list_price_currency": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "ARS",
                                        "USD",
                                        "BRL",
                                        "CLP",
                                        "COP",
                                        "MXN",
                                        "PEN",
                                        "RUB",
                                        null
                                    ],
                                    "description": "Currency of the set price (store price list in a foreign currency); null — the price is in the store currency currency. As input: the store price list currency or currency."
                                },
                                "compare_at_price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "maximum": 10000000000,
                                    "description": "Price before the discount, shown crossed out; null when there is no discount."
                                },
                                "weight_grams": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Shipping weight in grams; null when not set."
                                },
                                "length_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Length of the package in millimeters; null when not set."
                                },
                                "width_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Width of the package in millimeters; null when not set."
                                },
                                "height_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Height of the package in millimeters; null when not set."
                                },
                                "sale_starts_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the sale starts: compare_at_price is shown from this moment; null — no start limit."
                                },
                                "sale_ends_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the sale ends; null — no end limit."
                                },
                                "sold_by": {
                                    "type": "string",
                                    "enum": [
                                        "each",
                                        "weight",
                                        "volume"
                                    ],
                                    "description": "How the variant is sold: each — by the piece; weight — by weight; volume — by volume."
                                },
                                "price_per_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "How many units the price is for, a decimal string: one piece, or 1000 for a price per kilogram of a variant sold by weight. null when a variant sold by weight or volume has none set."
                                },
                                "measure_step": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Step of the quantity in a line of a variant sold by weight or volume, in its unit; null when not set."
                                },
                                "min_measure_qty": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Smallest quantity in a line of a variant sold by weight or volume; null when not set."
                                },
                                "max_measure_qty": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Largest quantity in a line of a variant sold by weight or volume; null when not set."
                                },
                                "net_content": {
                                    "type": "object",
                                    "properties": {
                                        "quantity": {
                                            "type": "string",
                                            "maxLength": 32,
                                            "description": "Measure as a decimal string in unit: \"500\", \"0.5\"."
                                        },
                                        "unit": {
                                            "type": "string",
                                            "enum": [
                                                "g",
                                                "ml"
                                            ],
                                            "description": "Unit of the measure: g — grams; ml — millilitres."
                                        }
                                    },
                                    "description": "Net content of one piece: a 500 g pack, a 1000 ml bottle. A pack of several units of another variant takes it from that variant, a prepacked piece from its own measure; it can be written only for a plain variant sold by piece. null for variants sold by weight or volume and for pieces without a net content."
                                },
                                "barcodes": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "enum": [
                                                    "ean13",
                                                    "ean8",
                                                    "upca",
                                                    "upce",
                                                    "code128",
                                                    "code39",
                                                    "gtin",
                                                    "itf",
                                                    "qr",
                                                    "datamatrix",
                                                    "other"
                                                ],
                                                "description": "Symbology: ean13, ean8, upca, upce, code128, code39, gtin, itf, qr, datamatrix or other."
                                            },
                                            "value": {
                                                "type": "string",
                                                "description": "The barcode."
                                            },
                                            "is_primary": {
                                                "type": [
                                                    "boolean",
                                                    "null"
                                                ],
                                                "description": "The main barcode of the variant: labels and receipts show it."
                                            }
                                        },
                                        "required": [
                                            "type",
                                            "value"
                                        ]
                                    },
                                    "maxItems": 20,
                                    "description": "Barcodes of the variant."
                                },
                                "option_values": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "option_id": {
                                                "type": "integer",
                                                "description": "ID of the option in options of the product."
                                            },
                                            "value_id": {
                                                "type": "integer",
                                                "description": "ID of the value in values of that option."
                                            }
                                        },
                                        "required": [
                                            "option_id",
                                            "value_id"
                                        ]
                                    },
                                    "maxItems": 10,
                                    "description": "Option values of the variant: one value of every option of the product."
                                }
                            }
                        },
                        "minItems": 1,
                        "maxItems": 200,
                        "description": "Variant rows written together with the card. A row is found by its external_id: a variant of the product with this ID is changed by the sent fields, without one a variant is created; variants not mentioned stay as they are. Creating a product needs at least one row with a price."
                    }
                }
            },
            "UpdateRecommendationRuleRequest": {
                "type": "object",
                "properties": {
                    "source_type": {
                        "$ref": "#/components/schemas/RecommendationRuleSource",
                        "description": "What the rule applies to: category — products of the category and its subcategories; collection — products of the collection."
                    },
                    "source_id": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "ID of the category or collection the rule applies to. A source has one rule."
                    },
                    "target_collection_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the collection whose products the rule offers after its own; null — no collection."
                    },
                    "product_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 20,
                        "uniqueItems": true,
                        "description": "IDs of the products the rule offers, in shelf order; at most 20."
                    },
                    "exclusive": {
                        "type": "boolean",
                        "description": "true — “only this rule”: rules below and automatic picks do not fill the shelf; without products and a collection it hides the shelf."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false turns the rule off: it is kept but does not apply."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Priority: a rule with a lower value applies earlier."
                    }
                }
            },
            "UpdateSupplierBillRequest": {
                "type": "object",
                "properties": {
                    "kind": {
                        "type": "string",
                        "enum": [
                            "invoice",
                            "debit_note",
                            "credit_note"
                        ],
                        "description": "invoice — invoice; debit_note — debit note: increases the debt; credit_note — credit note: decreases the debt (return, discount, correction). Document amounts are always positive, kind sets the sign."
                    },
                    "fiscal": {
                        "type": "boolean",
                        "description": "false — debt for a delivery without an invoice: no ARCA details, not in the purchase book; true — invoice or note."
                    },
                    "legal_entity_id": {
                        "type": "integer",
                        "description": "ID of the buying store legal entity (/v1/legal-entities)."
                    },
                    "supplier_id": {
                        "type": "integer",
                        "description": "Supplier ID (/v1/suppliers)."
                    },
                    "related_bill_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the document the note corrects; null for an invoice and a note without a reference."
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20,
                        "description": "Document number as the store entered it; null for a debt without an invoice."
                    },
                    "issued_on": {
                        "type": "string",
                        "format": "date",
                        "description": "Document date, YYYY-MM-DD in the store time zone."
                    },
                    "tax_period": {
                        "type": "string",
                        "description": "Tax period in which the document is recorded in the purchase book, YYYY-MM."
                    },
                    "due_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Due date, YYYY-MM-DD in the store time zone; null — no due date."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB"
                        ],
                        "description": "Document currency, ISO 4217: all amounts except base_total are in it."
                    },
                    "exchange_rate": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^\\d{1,14}(\\.\\d{1,10})?$",
                        "maxLength": 1000000000000,
                        "description": "Rate of the document currency to the store currency as a decimal string; null for a document in the store currency."
                    },
                    "net_taxed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "VAT taxable base."
                    },
                    "net_exempt": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "VAT exempt amount."
                    },
                    "net_untaxed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Amount outside the scope of VAT."
                    },
                    "tax_total": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Document VAT."
                    },
                    "total": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Document total: base, taxes and perceptions."
                    },
                    "note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000,
                        "description": "Staff note; null if there is none."
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "description": {
                                    "type": "string",
                                    "maxLength": 300,
                                    "description": "Line description as in the document."
                                },
                                "variant_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "description": "Product variant ID (/v1/variants); null for a line not about a product."
                                },
                                "quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "pattern": "^\\d{1,14}(\\.\\d{1,6})?$",
                                    "minLength": 0,
                                    "maxLength": 1000000000000,
                                    "description": "Quantity as a decimal string; null if not stated."
                                },
                                "unit_amount": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Unit price without tax; null if not stated."
                                },
                                "net_amount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Line amount without tax."
                                },
                                "tax_kind": {
                                    "type": "string",
                                    "enum": [
                                        "taxed",
                                        "exempt",
                                        "untaxed"
                                    ],
                                    "description": "taxed — taxed at a rate; exempt — exempt; untaxed — outside the scope of tax."
                                },
                                "rate_bps": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000,
                                    "description": "VAT rate in basis points: 2100 is 21 %."
                                },
                                "tax_amount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Line VAT."
                                }
                            },
                            "required": [
                                "description",
                                "net_amount",
                                "tax_kind"
                            ]
                        },
                        "maxItems": 500,
                        "description": "Document lines in order; a document entered by totals has no lines."
                    },
                    "additional_taxes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "perception",
                                        "withholding",
                                        "internal",
                                        "other"
                                    ],
                                    "description": "perception — perception: increases the amount payable and is credited by the store; withholding — withholding: the store withholds it on payment and pays it to the treasury, the amount transferred decreases; internal — internal taxes (excise); other — other taxes."
                                },
                                "regime": {
                                    "type": "string",
                                    "enum": [
                                        "vat",
                                        "income",
                                        "turnover",
                                        "municipal",
                                        "internal",
                                        "social",
                                        "other"
                                    ],
                                    "description": "Which tax: vat — VAT, income — income tax, turnover — turnover tax (Ingresos Brutos), municipal — municipal and others."
                                },
                                "jurisdiction": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "pattern": "^[A-Z]{2}-[A-Z0-9]{1,5}$",
                                    "maxLength": 8,
                                    "description": "Tax jurisdiction, for example the Ingresos Brutos province; null if the tax does not need one."
                                },
                                "amount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Tax amount."
                                },
                                "certificate_number": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 64,
                                    "description": "Withholding or perception certificate number; null if there is none."
                                }
                            },
                            "required": [
                                "kind",
                                "regime",
                                "amount"
                            ]
                        },
                        "maxItems": 50,
                        "description": "Taxes beyond VAT: perceptions, withholdings, internal and other. The document carries only their amount, without base or rate."
                    },
                    "goods_receipt_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 100,
                        "description": "Goods receipts the document covers (/v1/goods-receipts): deliveries matched to the invoice, or the delivery behind a delivery debt."
                    },
                    "purchase_order_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 100,
                        "description": "Purchase orders the document relates to (/v1/purchase-orders)."
                    },
                    "supplier_return_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 100,
                        "description": "Supplier returns the credit note was issued for (/v1/supplier-returns)."
                    },
                    "ar": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "document_type_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 3,
                                "description": "ARCA comprobante type code: 001 — invoice A, 006 — invoice B, 011 — invoice C; null if not stated."
                            },
                            "point_of_sale": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 99999,
                                "description": "Supplier point of sale (punto de venta); null if not stated."
                            },
                            "authorization_kind": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "CAE",
                                    "CAEA",
                                    "CAI",
                                    null
                                ],
                                "description": "CAE — electronic document; CAEA — code issued for a period; CAI — printed form; null — no authorization (for example, a foreign document)."
                            },
                            "authorization_code": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 14,
                                "description": "Authorization code; null if not stated."
                            },
                            "authorization_expires_on": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date",
                                "description": "Authorization code expiry date, YYYY-MM-DD; null if not stated."
                            },
                            "credit_fiscal_amount": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 10000000000,
                                "description": "Creditable part of VAT under proportional credit; null — the whole tax is creditable."
                            },
                            "import": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "kind": {
                                        "type": "string",
                                        "enum": [
                                            "goods",
                                            "services"
                                        ],
                                        "description": "goods — import of goods under a customs declaration; services — services from a provider abroad."
                                    },
                                    "customs_declaration": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 16,
                                        "description": "Customs declaration number (despacho) of an import of goods; null if not given."
                                    },
                                    "document_kind": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "invoice",
                                            "contract",
                                            "other",
                                            null
                                        ],
                                        "description": "Document of the service provider: invoice, contract or other (with a description); null if not given."
                                    },
                                    "document_description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20,
                                        "description": "Description of a document of kind other; null for the rest."
                                    },
                                    "provider_tax_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20,
                                        "description": "Tax ID of the provider in their country; null if not given."
                                    },
                                    "tax_paid_on": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date",
                                        "description": "Date VAT on the imported services was paid, YYYY-MM-DD; null if not given."
                                    },
                                    "tax_paid_amount": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 10000000000,
                                        "description": "VAT paid on the imported services in the document currency; null if not given."
                                    },
                                    "payment_reference": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20,
                                        "description": "Identifier of the tax payment; null if not given."
                                    },
                                    "payment_entity_tax_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 11,
                                        "description": "CUIT of the bank the tax was paid through; null if not given."
                                    }
                                },
                                "description": "Import of goods or services — its own layout of the ARCA import ledger; null for a domestic document."
                            }
                        },
                        "description": "ARCA details of the invoice or note; null for a debt for a delivery without an invoice."
                    }
                }
            },
            "UpdateSupplierRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Supplier name as the store sees it."
                    },
                    "legal_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 200,
                        "description": "Legal name; null if not set."
                    },
                    "tax_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Tax number as the store entered it (CUIT in Argentina); null if not set."
                    },
                    "tax_id_country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Country of the tax number, ISO 3166-1 alpha-2; null if the number is not set."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — the supplier is turned off: no new orders are placed with it, documents remain."
                    },
                    "payment_term_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 365,
                        "description": "Payment term in days: the bill due date due_on is calculated from it. null — no term."
                    },
                    "prices_include_tax": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "true — the supplier quotes prices with tax, false — without tax; null — by the store rule."
                    },
                    "settlement_mode": {
                        "$ref": "#/components/schemas/SupplierSettlementMode",
                        "description": "on_receipt — regular purchase: the debt arises on receipt; on_sale — consignment: the store pays for what was sold under a consignment settlement."
                    },
                    "consignment_loss_policy": {
                        "$ref": "#/components/schemas/ConsignmentLossPolicy",
                        "description": "Who pays for expired and missing consignment goods: return_to_supplier — goods go back to the supplier; our_cost — the store bears the loss."
                    },
                    "lead_time_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 365,
                        "description": "Delivery lead time in days from the order; null if not set."
                    },
                    "min_order_amount": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Minimum order amount in minor units of currency; null — no minimum."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Purchase currency with the supplier, ISO 4217: min_order_amount and its order prices are in it."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    }
                }
            },
            "UpdateVariantRequest": {
                "type": "object",
                "properties": {
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "Stock keeping unit (SKU); null when not set."
                    },
                    "name": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name of the variant by language, such as {\"es\": \"Grande\"}."
                    },
                    "price": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Price for price_per_quantity units, an integer in minor units of currency."
                    },
                    "track_inventory": {
                        "type": "boolean",
                        "description": "The store counts the stock of the variant; false — it is sold without counting stock."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false takes the variant off sale."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Position among the variants of the product: lower comes first."
                    },
                    "list_price": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Price as the owner set it, in minor units of list_price_currency; null — the price is set in store money (price). For such a variant price is derived from the price list rate and is not accepted as input."
                    },
                    "list_price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB",
                            null
                        ],
                        "description": "Currency of the set price (store price list in a foreign currency); null — the price is in the store currency currency. As input: the store price list currency or currency."
                    },
                    "compare_at_price": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "maximum": 10000000000,
                        "description": "Price before the discount, shown crossed out; null when there is no discount."
                    },
                    "weight_grams": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Shipping weight in grams; null when not set."
                    },
                    "length_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Length of the package in millimeters; null when not set."
                    },
                    "width_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Width of the package in millimeters; null when not set."
                    },
                    "height_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Height of the package in millimeters; null when not set."
                    },
                    "sale_starts_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale starts: compare_at_price is shown from this moment; null — no start limit."
                    },
                    "sale_ends_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale ends; null — no end limit."
                    },
                    "sold_by": {
                        "type": "string",
                        "enum": [
                            "each",
                            "weight",
                            "volume"
                        ],
                        "description": "How the variant is sold: each — by the piece; weight — by weight; volume — by volume."
                    },
                    "price_per_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "How many units the price is for, a decimal string: one piece, or 1000 for a price per kilogram of a variant sold by weight. null when a variant sold by weight or volume has none set."
                    },
                    "measure_step": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Step of the quantity in a line of a variant sold by weight or volume, in its unit; null when not set."
                    },
                    "min_measure_qty": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Smallest quantity in a line of a variant sold by weight or volume; null when not set."
                    },
                    "max_measure_qty": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Largest quantity in a line of a variant sold by weight or volume; null when not set."
                    },
                    "net_content": {
                        "type": "object",
                        "properties": {
                            "quantity": {
                                "type": "string",
                                "maxLength": 32,
                                "description": "Measure as a decimal string in unit: \"500\", \"0.5\"."
                            },
                            "unit": {
                                "type": "string",
                                "enum": [
                                    "g",
                                    "ml"
                                ],
                                "description": "Unit of the measure: g — grams; ml — millilitres."
                            }
                        },
                        "description": "Net content of one piece: a 500 g pack, a 1000 ml bottle. A pack of several units of another variant takes it from that variant, a prepacked piece from its own measure; it can be written only for a plain variant sold by piece. null for variants sold by weight or volume and for pieces without a net content."
                    },
                    "barcodes": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "ean13",
                                        "ean8",
                                        "upca",
                                        "upce",
                                        "code128",
                                        "code39",
                                        "gtin",
                                        "itf",
                                        "qr",
                                        "datamatrix",
                                        "other"
                                    ],
                                    "description": "Symbology: ean13, ean8, upca, upce, code128, code39, gtin, itf, qr, datamatrix or other."
                                },
                                "value": {
                                    "type": "string",
                                    "description": "The barcode."
                                },
                                "is_primary": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ],
                                    "description": "The main barcode of the variant: labels and receipts show it."
                                }
                            },
                            "required": [
                                "type",
                                "value"
                            ]
                        },
                        "maxItems": 20,
                        "description": "Barcodes of the variant."
                    },
                    "option_values": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "option_id": {
                                    "type": "integer",
                                    "description": "ID of the option in options of the product."
                                },
                                "value_id": {
                                    "type": "integer",
                                    "description": "ID of the value in values of that option."
                                }
                            },
                            "required": [
                                "option_id",
                                "value_id"
                            ]
                        },
                        "maxItems": 10,
                        "description": "Option values of the variant: one value of every option of the product."
                    },
                    "stock_source_variant_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "For a pack of several units of another variant: that variant. The pack sells from its stock and has no stock levels of its own. null for an ordinary variant."
                    },
                    "stock_source_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "How much of the base variant one piece of the pack takes, a decimal string in the unit of the base variant; null for an ordinary variant."
                    }
                }
            },
            "UpdateWebhookEndpointRequest": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "maxLength": 2048,
                        "description": "HTTPS address deliveries are sent to."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255,
                        "description": "Description of the endpoint; null when not given."
                    },
                    "enabled_events": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "order.created",
                                "order.updated",
                                "order.status_changed",
                                "order.paid",
                                "order.cancelled",
                                "payment.created",
                                "payment.succeeded",
                                "payment.status_changed",
                                "payment.updated",
                                "refund.created",
                                "refund.completed",
                                "refund.status_changed",
                                "refund.updated",
                                "fiscal_document.created",
                                "fiscal_document.updated",
                                "fiscal_document.issued",
                                "fiscal_document.failed",
                                "fiscal_document.annulled",
                                "tax_period.status_changed",
                                "money_transaction.created",
                                "money_transaction.updated",
                                "money_transaction.deleted",
                                "pos_shift.opened",
                                "pos_shift.closed",
                                "pos_shift.updated",
                                "pos_cash_movement.created",
                                "gift_card.created",
                                "gift_card.updated",
                                "gift_card_transaction.created",
                                "customer_account.created",
                                "customer_account.updated",
                                "customer_account_entry.created",
                                "customer_account_entry.updated",
                                "supplier.created",
                                "supplier.updated",
                                "supplier.deleted",
                                "supplier_bill.created",
                                "supplier_bill.updated",
                                "supplier_bill.posted",
                                "supplier_bill.voided",
                                "supplier_bill.deleted",
                                "supplier_bill_payment.created",
                                "supplier_bill_payment.updated",
                                "supplier_bill_payment.deleted",
                                "settlement_agreement.created",
                                "settlement_agreement.updated",
                                "settlement_agreement.deleted",
                                "settlement_offset.created",
                                "settlement_offset.updated",
                                "settlement_offset.voided",
                                "purchase_order.created",
                                "purchase_order.updated",
                                "purchase_order.status_changed",
                                "purchase_order.deleted",
                                "goods_receipt.created",
                                "goods_receipt.updated",
                                "goods_receipt.voided",
                                "supplier_return.created",
                                "supplier_return.updated",
                                "supplier_return.status_changed",
                                "supplier_return.deleted",
                                "consignment_settlement.created",
                                "consignment_settlement.updated",
                                "consignment_settlement.posted",
                                "consignment_settlement.voided",
                                "tax_withholding.created",
                                "tax_withholding.updated",
                                "tax_withholding.annulled",
                                "tax_withholding.deleted",
                                "product.created",
                                "product.updated",
                                "product.deleted",
                                "inventory_level.updated",
                                "stock_movement.created",
                                "stock_movement.updated",
                                "lot.created",
                                "lot.updated",
                                "lot.deleted",
                                "location_transfer.created",
                                "location_transfer.updated",
                                "stocktake.created",
                                "stocktake.status_changed",
                                "stocktake.updated",
                                "customer.created",
                                "customer.updated",
                                "customer.deleted",
                                "customer_group.created",
                                "customer_group.updated",
                                "customer_group.deleted",
                                "price_list.created",
                                "price_list.updated",
                                "price_list.deleted",
                                "bulk_operation.finished"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 93,
                        "uniqueItems": true,
                        "description": "Event types the endpoint is subscribed to, such as order.created; the types are those of GET /v1/events. A type whose read scope the app lost is not delivered."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "enabled",
                            "disabled"
                        ],
                        "description": "enabled — deliveries go; disabled — turned off by the app or by the platform (disabled_reason)."
                    }
                }
            },
            "Upload": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "file_name": {
                        "type": "string",
                        "description": "Name of the file given when the upload started."
                    },
                    "size": {
                        "type": "integer",
                        "description": "Size of the whole file in bytes."
                    },
                    "received": {
                        "type": "integer",
                        "description": "Bytes received: the offset of the next chunk."
                    },
                    "complete": {
                        "type": "boolean",
                        "description": "The file is assembled: a bulk operation can take it by id. After that the upload is gone."
                    },
                    "chunk_bytes": {
                        "type": "integer",
                        "description": "Largest size of one chunk in bytes."
                    },
                    "expires_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "After this moment an unused upload is deleted."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    }
                },
                "required": [
                    "id",
                    "file_name",
                    "size",
                    "received",
                    "complete",
                    "chunk_bytes",
                    "expires_at",
                    "created_at"
                ]
            },
            "UpsertCategoryRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50000
                        },
                        "description": "Description by language in Markdown (GitHub Flavored): an object of the filled languages."
                    },
                    "slug": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Address of the category on the storefront, unique in the store."
                    },
                    "parent_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the parent category; null for a top-level category. Categories come as a flat list, the tree is built by this field."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Position among the sibling categories: lower comes first."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false hides the category from the storefront."
                    }
                }
            },
            "UpsertCustomerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "pattern": "\\S",
                        "maxLength": 120,
                        "description": "Name of the customer; null when unknown."
                    },
                    "language": {
                        "$ref": "#/components/schemas/Locale",
                        "description": "Language the store writes to the customer in: ru, en or es."
                    },
                    "phone": {
                        "type": "string",
                        "maxLength": 32,
                        "description": "Main phone of the customer in E.164 format, such as +5491123456789; null when unknown."
                    },
                    "email": {
                        "type": "string",
                        "maxLength": 254,
                        "description": "Email of the customer; null when unknown."
                    }
                }
            },
            "UpsertModifierGroupRequest": {
                "type": "object",
                "properties": {
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer",
                                    "description": "ID of the record, unique among records of its kind in the store."
                                },
                                "external_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                                },
                                "name": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                                },
                                "price_delta": {
                                    "type": "integer",
                                    "minimum": -100000000,
                                    "maximum": 100000000,
                                    "description": "Surcharge on the item price per portion of the option, an integer in minor units of the store currency; negative — a discount. A product can set its own surcharge by variant."
                                },
                                "max_quantity": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 99,
                                    "description": "How many times the option can be taken in one item; null — no own limit, only the group max_select applies."
                                },
                                "duration_minutes": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 5,
                                    "maximum": 120,
                                    "description": "How many minutes the option adds to a bookable service, a multiple of 5; null — none. Has no effect on other kinds of items."
                                },
                                "is_active": {
                                    "type": "boolean",
                                    "description": "false — the option is turned off and not offered."
                                },
                                "is_default": {
                                    "type": "boolean",
                                    "description": "The option is preselected: the storefront and the POS check it at once, and the server fills a required group left empty with it."
                                },
                                "adds_ingredients": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ],
                                    "description": "Whether this option changes the composition; null — as the group (adds_ingredients)."
                                },
                                "recipe_per_variant": {
                                    "type": "boolean",
                                    "description": "Consumption depends on the dish: no general composition, the amount is set by the recipe of each variant (option_recipes); without it the option is not offered on that variant."
                                },
                                "nutrition": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "kcal": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 1000000,
                                            "description": "Energy, kcal."
                                        },
                                        "protein_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Protein, mg."
                                        },
                                        "fat_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Fat, mg."
                                        },
                                        "carbs_mg": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 100000000,
                                            "description": "Carbohydrates, mg."
                                        }
                                    },
                                    "description": "Nutrition of one use of the option declared by the store: all four numbers or null — then the option composition computes it."
                                },
                                "recipe": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "variant_id": {
                                                "type": "integer",
                                                "description": "ID of the product variant."
                                            },
                                            "quantity": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 32,
                                                "description": "Component amount for one use of the option, a decimal string in the unit of the component; null — to taste: in the composition but not consumed."
                                            }
                                        },
                                        "required": [
                                            "variant_id",
                                            "quantity"
                                        ]
                                    },
                                    "maxItems": 100,
                                    "description": "General composition of the option — what it consumes in any dish: ingredients and preps with their amount. Empty for a per-dish option. On write, the whole list, an empty one clears it; without the field the composition is left as it is."
                                }
                            }
                        },
                        "minItems": 1,
                        "maxItems": 100,
                        "uniqueItems": true,
                        "description": "Options in display order. On write, the whole set: a row finds its option by id or external_id, the found one gets the fields sent, a row without an option is new and carries name; an option missing from the set is archived and removed from open draft orders."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "min_select": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 99,
                        "description": "How many options the customer must choose: 0 — the group is optional. A product can set its own rule (selection_rule)."
                    },
                    "max_select": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 99,
                        "description": "How many options can be chosen in total, repeats included; null — no limit."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false — the group is turned off and not offered on products."
                    },
                    "adds_ingredients": {
                        "type": "boolean",
                        "description": "Whether the group options change the dish composition; with true, an option without its own composition makes the item composition unknown (allergens)."
                    }
                }
            },
            "UpsertProductRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "short_description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        },
                        "description": "Short description by language, plain text for product lists."
                    },
                    "description": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 50000
                        },
                        "description": "Description by language in Markdown (GitHub Flavored): an object of the filled languages."
                    },
                    "slug": {
                        "type": "string",
                        "maxLength": 160,
                        "description": "Address of the product on the storefront, unique in the store."
                    },
                    "brand_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the brand of the product; null when not set."
                    },
                    "tax_class_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the tax class of the product (/v1/tax-classes); null — the default class of the store. A sale keeps the rate of its item: a change of class affects future sales only."
                    },
                    "category_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "IDs of the categories the product is in, ascending."
                    },
                    "primary_category_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The main category among category_ids; null when the product has no main category."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false takes the product off sale and hides it from the storefront."
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product appears on the storefront; null — right away."
                    },
                    "unpublished_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the product leaves the storefront; null — it stays."
                    },
                    "sale_schedule": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "days": {
                                    "type": "array",
                                    "items": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 7
                                    },
                                    "minItems": 1,
                                    "maxItems": 7,
                                    "description": "Window days, ISO: 1 is Monday, 7 is Sunday."
                                },
                                "from": {
                                    "type": "string",
                                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$",
                                    "description": "Window start, “HH:MM” on the store clock."
                                },
                                "to": {
                                    "type": "string",
                                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$",
                                    "description": "Window end, “HH:MM”, exclusive; “24:00” means until the end of the day. An end earlier than the start makes the window run past midnight; it belongs to its start day."
                                }
                            },
                            "required": [
                                "days",
                                "from",
                                "to"
                            ]
                        },
                        "maxItems": 14,
                        "description": "When the item can be ordered — week windows in the store time zone; null means always. Outside a window the product stays visible and can go to the cart, and checkout checks the schedule against the order fulfilment time."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "goods",
                            "dish",
                            "ingredient",
                            "prep"
                        ],
                        "description": "Kind of product: goods — goods for sale; dish — a dish cooked to order; ingredient — raw material for recipes; prep — a semi-finished item made in-house; manufactured — made by the own production of the store; meal_program — a meal subscription; bundle — a set of other products; gift_card — a gift card; service — a service booked in advance."
                    },
                    "stock_unit": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "unit": {
                                "type": "string",
                                "enum": [
                                    "g",
                                    "ml",
                                    "pcs"
                                ],
                                "description": "Base unit: g — grams, ml — milliliters, pcs — pieces. Quantities of the variants of the product are decimal strings in this unit."
                            },
                            "purchase_unit": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 16,
                                "description": "Name of the purchase package, such as kg or box; null — the item is bought in its base unit."
                            },
                            "purchase_quantity": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 32,
                                "description": "How many base units are in one purchase package, a decimal string, such as 1000 for a kilogram of an item kept in grams."
                            }
                        },
                        "description": "Stock unit of an item with stock by measure (ingredient, prep, manufactured): stock, recipes and yield are kept in it. null for goods and dishes — their unit is the selling axis of the variant."
                    },
                    "variants": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "external_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "External ID of the variant, its ID in your system: the key the row is matched by."
                                },
                                "sku": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 64,
                                    "description": "Stock keeping unit (SKU); null when not set."
                                },
                                "name": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "description": "Name of the variant by language, such as {\"es\": \"Grande\"}."
                                },
                                "price": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Price for price_per_quantity units, an integer in minor units of currency."
                                },
                                "track_inventory": {
                                    "type": "boolean",
                                    "description": "The store counts the stock of the variant; false — it is sold without counting stock."
                                },
                                "is_active": {
                                    "type": "boolean",
                                    "description": "false takes the variant off sale."
                                },
                                "position": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Position among the variants of the product: lower comes first."
                                },
                                "list_price": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000000000,
                                    "description": "Price as the owner set it, in minor units of list_price_currency; null — the price is set in store money (price). For such a variant price is derived from the price list rate and is not accepted as input."
                                },
                                "list_price_currency": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "ARS",
                                        "USD",
                                        "BRL",
                                        "CLP",
                                        "COP",
                                        "MXN",
                                        "PEN",
                                        "RUB",
                                        null
                                    ],
                                    "description": "Currency of the set price (store price list in a foreign currency); null — the price is in the store currency currency. As input: the store price list currency or currency."
                                },
                                "compare_at_price": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "maximum": 10000000000,
                                    "description": "Price before the discount, shown crossed out; null when there is no discount."
                                },
                                "weight_grams": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Shipping weight in grams; null when not set."
                                },
                                "length_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Length of the package in millimeters; null when not set."
                                },
                                "width_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Width of the package in millimeters; null when not set."
                                },
                                "height_mm": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 2147483647,
                                    "description": "Height of the package in millimeters; null when not set."
                                },
                                "sale_starts_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the sale starts: compare_at_price is shown from this moment; null — no start limit."
                                },
                                "sale_ends_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time",
                                    "description": "When the sale ends; null — no end limit."
                                },
                                "sold_by": {
                                    "type": "string",
                                    "enum": [
                                        "each",
                                        "weight",
                                        "volume"
                                    ],
                                    "description": "How the variant is sold: each — by the piece; weight — by weight; volume — by volume."
                                },
                                "price_per_quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "How many units the price is for, a decimal string: one piece, or 1000 for a price per kilogram of a variant sold by weight. null when a variant sold by weight or volume has none set."
                                },
                                "measure_step": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Step of the quantity in a line of a variant sold by weight or volume, in its unit; null when not set."
                                },
                                "min_measure_qty": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Smallest quantity in a line of a variant sold by weight or volume; null when not set."
                                },
                                "max_measure_qty": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 32,
                                    "description": "Largest quantity in a line of a variant sold by weight or volume; null when not set."
                                },
                                "net_content": {
                                    "type": "object",
                                    "properties": {
                                        "quantity": {
                                            "type": "string",
                                            "maxLength": 32,
                                            "description": "Measure as a decimal string in unit: \"500\", \"0.5\"."
                                        },
                                        "unit": {
                                            "type": "string",
                                            "enum": [
                                                "g",
                                                "ml"
                                            ],
                                            "description": "Unit of the measure: g — grams; ml — millilitres."
                                        }
                                    },
                                    "description": "Net content of one piece: a 500 g pack, a 1000 ml bottle. A pack of several units of another variant takes it from that variant, a prepacked piece from its own measure; it can be written only for a plain variant sold by piece. null for variants sold by weight or volume and for pieces without a net content."
                                },
                                "barcodes": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "enum": [
                                                    "ean13",
                                                    "ean8",
                                                    "upca",
                                                    "upce",
                                                    "code128",
                                                    "code39",
                                                    "gtin",
                                                    "itf",
                                                    "qr",
                                                    "datamatrix",
                                                    "other"
                                                ],
                                                "description": "Symbology: ean13, ean8, upca, upce, code128, code39, gtin, itf, qr, datamatrix or other."
                                            },
                                            "value": {
                                                "type": "string",
                                                "description": "The barcode."
                                            },
                                            "is_primary": {
                                                "type": [
                                                    "boolean",
                                                    "null"
                                                ],
                                                "description": "The main barcode of the variant: labels and receipts show it."
                                            }
                                        },
                                        "required": [
                                            "type",
                                            "value"
                                        ]
                                    },
                                    "maxItems": 20,
                                    "description": "Barcodes of the variant."
                                },
                                "option_values": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "option_id": {
                                                "type": "integer",
                                                "description": "ID of the option in options of the product."
                                            },
                                            "value_id": {
                                                "type": "integer",
                                                "description": "ID of the value in values of that option."
                                            }
                                        },
                                        "required": [
                                            "option_id",
                                            "value_id"
                                        ]
                                    },
                                    "maxItems": 10,
                                    "description": "Option values of the variant: one value of every option of the product."
                                }
                            }
                        },
                        "minItems": 1,
                        "maxItems": 200,
                        "description": "Variant rows written together with the card. A row is found by its external_id: a variant of the product with this ID is changed by the sent fields, without one a variant is created; variants not mentioned stay as they are. Creating a product needs at least one row with a price."
                    }
                }
            },
            "UpsertVariantRequest": {
                "type": "object",
                "properties": {
                    "product_id": {
                        "type": "integer",
                        "description": "ID of the product."
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64,
                        "description": "Stock keeping unit (SKU); null when not set."
                    },
                    "name": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name of the variant by language, such as {\"es\": \"Grande\"}."
                    },
                    "price": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Price for price_per_quantity units, an integer in minor units of currency."
                    },
                    "track_inventory": {
                        "type": "boolean",
                        "description": "The store counts the stock of the variant; false — it is sold without counting stock."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false takes the variant off sale."
                    },
                    "position": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Position among the variants of the product: lower comes first."
                    },
                    "list_price": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000000,
                        "description": "Price as the owner set it, in minor units of list_price_currency; null — the price is set in store money (price). For such a variant price is derived from the price list rate and is not accepted as input."
                    },
                    "list_price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "ARS",
                            "USD",
                            "BRL",
                            "CLP",
                            "COP",
                            "MXN",
                            "PEN",
                            "RUB",
                            null
                        ],
                        "description": "Currency of the set price (store price list in a foreign currency); null — the price is in the store currency currency. As input: the store price list currency or currency."
                    },
                    "compare_at_price": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "maximum": 10000000000,
                        "description": "Price before the discount, shown crossed out; null when there is no discount."
                    },
                    "weight_grams": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Shipping weight in grams; null when not set."
                    },
                    "length_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Length of the package in millimeters; null when not set."
                    },
                    "width_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Width of the package in millimeters; null when not set."
                    },
                    "height_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2147483647,
                        "description": "Height of the package in millimeters; null when not set."
                    },
                    "sale_starts_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale starts: compare_at_price is shown from this moment; null — no start limit."
                    },
                    "sale_ends_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale ends; null — no end limit."
                    },
                    "sold_by": {
                        "type": "string",
                        "enum": [
                            "each",
                            "weight",
                            "volume"
                        ],
                        "description": "How the variant is sold: each — by the piece; weight — by weight; volume — by volume."
                    },
                    "price_per_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "How many units the price is for, a decimal string: one piece, or 1000 for a price per kilogram of a variant sold by weight. null when a variant sold by weight or volume has none set."
                    },
                    "measure_step": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Step of the quantity in a line of a variant sold by weight or volume, in its unit; null when not set."
                    },
                    "min_measure_qty": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Smallest quantity in a line of a variant sold by weight or volume; null when not set."
                    },
                    "max_measure_qty": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "Largest quantity in a line of a variant sold by weight or volume; null when not set."
                    },
                    "net_content": {
                        "type": "object",
                        "properties": {
                            "quantity": {
                                "type": "string",
                                "maxLength": 32,
                                "description": "Measure as a decimal string in unit: \"500\", \"0.5\"."
                            },
                            "unit": {
                                "type": "string",
                                "enum": [
                                    "g",
                                    "ml"
                                ],
                                "description": "Unit of the measure: g — grams; ml — millilitres."
                            }
                        },
                        "description": "Net content of one piece: a 500 g pack, a 1000 ml bottle. A pack of several units of another variant takes it from that variant, a prepacked piece from its own measure; it can be written only for a plain variant sold by piece. null for variants sold by weight or volume and for pieces without a net content."
                    },
                    "barcodes": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "ean13",
                                        "ean8",
                                        "upca",
                                        "upce",
                                        "code128",
                                        "code39",
                                        "gtin",
                                        "itf",
                                        "qr",
                                        "datamatrix",
                                        "other"
                                    ],
                                    "description": "Symbology: ean13, ean8, upca, upce, code128, code39, gtin, itf, qr, datamatrix or other."
                                },
                                "value": {
                                    "type": "string",
                                    "description": "The barcode."
                                },
                                "is_primary": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ],
                                    "description": "The main barcode of the variant: labels and receipts show it."
                                }
                            },
                            "required": [
                                "type",
                                "value"
                            ]
                        },
                        "maxItems": 20,
                        "description": "Barcodes of the variant."
                    },
                    "option_values": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "option_id": {
                                    "type": "integer",
                                    "description": "ID of the option in options of the product."
                                },
                                "value_id": {
                                    "type": "integer",
                                    "description": "ID of the value in values of that option."
                                }
                            },
                            "required": [
                                "option_id",
                                "value_id"
                            ]
                        },
                        "maxItems": 10,
                        "description": "Option values of the variant: one value of every option of the product."
                    },
                    "stock_source_variant_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "For a pack of several units of another variant: that variant. The pack sells from its stock and has no stock levels of its own. null for an ordinary variant."
                    },
                    "stock_source_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 32,
                        "description": "How much of the base variant one piece of the pack takes, a decimal string in the unit of the base variant; null for an ordinary variant."
                    },
                    "sibling_name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        },
                        "description": "Name by language of the only variant of the product, which this request makes one of several: the only variant has no name of its own, one of several must have it."
                    }
                }
            },
            "ValidationProblem": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Machine type of the problem: a stable code to branch on, such as insufficient_scope. Every type has a page in the error catalog."
                    },
                    "title": {
                        "type": "string",
                        "description": "Short summary of the problem in the language of the request."
                    },
                    "status": {
                        "type": "integer",
                        "description": "HTTP status of the response."
                    },
                    "detail": {
                        "type": "string",
                        "description": "Explanation of this occurrence in the language of the request."
                    },
                    "errors": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "description": "Invalid fields: name of the field (nested ones with dots, such as variants.0.price) → messages."
                    }
                },
                "required": [
                    "type",
                    "title",
                    "status",
                    "errors"
                ]
            },
            "Variant": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "External ID: the ID of the record in your system; null when the app has not set one. Every app sees only its own IDs."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the product card: variants change under the common version of the card, so a change of any variant or of the card moves it."
                    },
                    "product_id": {
                        "type": "integer",
                        "description": "ID of the product."
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Stock keeping unit (SKU); null when not set."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name of the variant by language, such as {\"es\": \"Grande\"}."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Position among the variants of the product: lower comes first."
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "false takes the variant off sale."
                    },
                    "barcodes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "value": {
                                    "type": "string",
                                    "description": "The barcode."
                                },
                                "type": {
                                    "type": "string",
                                    "description": "Symbology: ean13, ean8, upca, upce, code128, code39, gtin, itf, qr, datamatrix or other."
                                },
                                "is_primary": {
                                    "type": "boolean",
                                    "description": "The main barcode of the variant: labels and receipts show it."
                                }
                            },
                            "required": [
                                "value",
                                "type",
                                "is_primary"
                            ]
                        },
                        "description": "Barcodes of the variant."
                    },
                    "option_values": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "option_id": {
                                    "type": "integer",
                                    "description": "ID of the option in options of the product."
                                },
                                "value_id": {
                                    "type": "integer",
                                    "description": "ID of the value in values of that option."
                                }
                            },
                            "required": [
                                "option_id",
                                "value_id"
                            ]
                        },
                        "description": "Option values of the variant: one value of every option of the product."
                    },
                    "sold_by": {
                        "type": "string",
                        "enum": [
                            "each",
                            "weight",
                            "volume"
                        ],
                        "description": "How the variant is sold: each — by the piece; weight — by weight; volume — by volume."
                    },
                    "unit": {
                        "type": "string",
                        "enum": [
                            "pcs",
                            "g",
                            "ml"
                        ],
                        "description": "Unit of every quantity of the variant: pcs — pieces; g — grams; ml — milliliters."
                    },
                    "quantity_decimals": {
                        "type": "integer",
                        "enum": [
                            0,
                            3
                        ],
                        "description": "Decimals of the quantities of the variant: 0 for pieces, 3 for weight and volume."
                    },
                    "price": {
                        "type": "integer",
                        "description": "Price for price_per_quantity units, an integer in minor units of currency."
                    },
                    "compare_at_price": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Price before the discount, shown crossed out; null when there is no discount."
                    },
                    "list_price": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Price as the owner set it, in minor units of list_price_currency; null — the price is set in store money (price). For such a variant price is derived from the price list rate and is not accepted as input."
                    },
                    "list_price_currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Currency of the set price (store price list in a foreign currency); null — the price is in the store currency currency. As input: the store price list currency or currency."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Currency of the prices, an ISO 4217 code: the currency of the store."
                    },
                    "price_per_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "How many units the price is for, a decimal string: one piece, or 1000 for a price per kilogram of a variant sold by weight. null when a variant sold by weight or volume has none set."
                    },
                    "measure_step": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Step of the quantity in a line of a variant sold by weight or volume, in its unit; null when not set."
                    },
                    "min_measure_qty": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Smallest quantity in a line of a variant sold by weight or volume; null when not set."
                    },
                    "max_measure_qty": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Largest quantity in a line of a variant sold by weight or volume; null when not set."
                    },
                    "net_content": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "quantity": {
                                "type": "string",
                                "description": "Measure as a decimal string in unit: \"500\", \"0.5\"."
                            },
                            "unit": {
                                "type": "string",
                                "enum": [
                                    "g",
                                    "ml"
                                ],
                                "description": "Unit of the measure: g — grams; ml — millilitres."
                            }
                        },
                        "required": [
                            "quantity",
                            "unit"
                        ],
                        "description": "Net content of one piece: a 500 g pack, a 1000 ml bottle. A pack of several units of another variant takes it from that variant, a prepacked piece from its own measure; it can be written only for a plain variant sold by piece. null for variants sold by weight or volume and for pieces without a net content."
                    },
                    "sale_starts_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale starts: compare_at_price is shown from this moment; null — no start limit."
                    },
                    "sale_ends_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the sale ends; null — no end limit."
                    },
                    "cost_price_micro": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Cost for cost_per_quantity units in millionths of the minor unit of currency: 1.50 USD = 150000000. Only with the costs:read scope."
                    },
                    "cost_per_quantity": {
                        "type": "string",
                        "description": "How many units the cost is for, a decimal string: the purchase unit, such as 1000 g. Only with the costs:read scope."
                    },
                    "track_inventory": {
                        "type": "boolean",
                        "description": "The store counts the stock of the variant; false — it is sold without counting stock."
                    },
                    "stock_source_variant_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "For a pack of several units of another variant: that variant. The pack sells from its stock and has no stock levels of its own. null for an ordinary variant."
                    },
                    "stock_source_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "How much of the base variant one piece of the pack takes, a decimal string in the unit of the base variant; null for an ordinary variant."
                    },
                    "weight_grams": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Shipping weight in grams; null when not set."
                    },
                    "length_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Length of the package in millimeters; null when not set."
                    },
                    "width_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Width of the package in millimeters; null when not set."
                    },
                    "height_mm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Height of the package in millimeters; null when not set."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the record was archived; null for a live record."
                    }
                },
                "required": [
                    "id",
                    "external_id",
                    "version",
                    "product_id",
                    "sku",
                    "name",
                    "position",
                    "is_active",
                    "barcodes",
                    "option_values",
                    "sold_by",
                    "unit",
                    "quantity_decimals",
                    "price",
                    "compare_at_price",
                    "list_price",
                    "list_price_currency",
                    "currency",
                    "price_per_quantity",
                    "measure_step",
                    "min_measure_qty",
                    "max_measure_qty",
                    "net_content",
                    "sale_starts_at",
                    "sale_ends_at",
                    "track_inventory",
                    "stock_source_variant_id",
                    "stock_source_quantity",
                    "weight_grams",
                    "length_mm",
                    "width_mm",
                    "height_mm",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ]
            },
            "VariantRecipe": {
                "type": "object",
                "properties": {
                    "variant_id": {
                        "type": "integer",
                        "description": "ID of the variant the recipe belongs to: a dish, a prep or another item made of components."
                    },
                    "product_id": {
                        "type": "integer",
                        "description": "ID of the product of the variant. The recipe is versioned on its card: ETag and If-Match carry the product version."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the product card: the counter that If-Match checks. A recipe change moves it; the same recipe sent again does not."
                    },
                    "components": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "variant_id": {
                                    "type": "integer",
                                    "description": "ID of the component variant: an ingredient or a prep of the store."
                                },
                                "quantity": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "description": "Amount of the component per portion of a dish or per batch of a prep, a decimal string in the unit of the component (stock_unit of its product); null — to taste: the component is listed but not written off."
                                },
                                "measure_mode": {
                                    "type": "string",
                                    "enum": [
                                        "fixed",
                                        "captured",
                                        "proportional"
                                    ],
                                    "description": "How production measures the component: fixed — the planned amount; captured — weighed at production; proportional — scaled to a weighed component. Only production of preps reads it."
                                }
                            },
                            "required": [
                                "variant_id",
                                "quantity",
                                "measure_mode"
                            ]
                        },
                        "description": "Components of the recipe in order: ingredients and preps with their amounts. The whole list replaces the recipe; an empty list clears it."
                    },
                    "yield_quantity": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Output of one batch of a prep, a decimal string in the unit of the prep. Required for a prep; null for a dish. With yield checkpoints in the production steps, the steps set the output."
                    },
                    "option_recipes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "option_id": {
                                    "type": "integer",
                                    "description": "ID of a per-dish option from the product modifier groups."
                                },
                                "components": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "variant_id": {
                                                "type": "integer",
                                                "description": "ID of the product variant."
                                            },
                                            "quantity": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "Component amount for one use of the option, a decimal string in the unit of the component; null — to taste."
                                            }
                                        },
                                        "required": [
                                            "variant_id",
                                            "quantity"
                                        ]
                                    },
                                    "description": "What the option consumes when taken with this variant: ingredients and preps with their amount."
                                }
                            },
                            "required": [
                                "option_id",
                                "components"
                            ]
                        },
                        "description": "Amounts of per-dish options (recipe_per_variant) in this variant: a block for each such option of the product groups. Empty components — no amount, and the option is not offered on this variant. On write, a block sets the option amount as a whole, empty components remove it; options missing from the list and a body without the field are left as they are."
                    }
                },
                "required": [
                    "variant_id",
                    "product_id",
                    "version",
                    "components",
                    "yield_quantity",
                    "option_recipes"
                ]
            },
            "WebhookDelivery": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "endpoint_id": {
                        "type": "integer",
                        "description": "ID of the webhook endpoint."
                    },
                    "event_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "ID of the event in GET /v1/events, the same as webhook-id of the delivery; null for a test event."
                    },
                    "event_type": {
                        "type": "string",
                        "description": "Type of the event; ping for a test event."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "succeeded",
                            "failed"
                        ],
                        "description": "pending — waiting for an attempt; succeeded — the receiver responded 2xx; failed — the retries are exhausted."
                    },
                    "attempt_count": {
                        "type": "integer",
                        "description": "Attempts made."
                    },
                    "next_attempt_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the next attempt goes; null when the delivery is closed."
                    },
                    "last_attempt": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/WebhookDeliveryAttempt"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The last attempt; null before the first. Only in the list."
                    },
                    "attempts": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookDeliveryAttempt"
                        },
                        "description": "All attempts in order. Only for one delivery."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "endpoint_id",
                    "event_id",
                    "event_type",
                    "status",
                    "attempt_count",
                    "next_attempt_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "WebhookDeliveryAttempt": {
                "type": "object",
                "properties": {
                    "number": {
                        "type": "integer",
                        "description": "Number of the attempt, from 1."
                    },
                    "manual": {
                        "type": "boolean",
                        "description": "The attempt was made on a retry request, not by the schedule."
                    },
                    "started_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the attempt started."
                    },
                    "duration_ms": {
                        "type": "integer",
                        "description": "How long the attempt took, in milliseconds."
                    },
                    "response_status": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "HTTP status the receiver responded with; null when there was no response."
                    },
                    "response_body": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Beginning of the response body of the receiver; null when there was none."
                    },
                    "error": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "invalid_url",
                            "blocked",
                            "dns",
                            "connection",
                            "tls",
                            "timeout",
                            "unreachable",
                            "redirect",
                            "http_error",
                            null
                        ],
                        "description": "Why the attempt failed; null when the receiver responded 2xx. redirect — a 3xx response, redirects are not followed; http_error — another status; timeout — no response in 10 seconds; tls, connection, dns, unreachable — the network; blocked — the address leads to an internal network; invalid_url — the address does not pass the check."
                    }
                },
                "required": [
                    "number",
                    "manual",
                    "started_at",
                    "duration_ms",
                    "response_status",
                    "response_body",
                    "error"
                ]
            },
            "WebhookEndpoint": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version of the record: it grows with every change. Send it as the ETag in If-Match to change the record."
                    },
                    "url": {
                        "type": "string",
                        "description": "HTTPS address deliveries are sent to."
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Description of the endpoint; null when not given."
                    },
                    "enabled_events": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Event types the endpoint is subscribed to, such as order.created; the types are those of GET /v1/events. A type whose read scope the app lost is not delivered."
                    },
                    "api_version": {
                        "type": "string",
                        "const": "v1",
                        "description": "Version of the API whose format the body of the deliveries follows, fixed when the endpoint was created."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "enabled",
                            "disabled"
                        ],
                        "description": "enabled — deliveries go; disabled — turned off by the app or by the platform (disabled_reason)."
                    },
                    "disabled_reason": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "failing",
                            null
                        ],
                        "description": "Why the platform turned the endpoint off: failing — for 72 hours deliveries went without a single success. null when the endpoint is enabled or the app turned it off. Enabling it clears the reason."
                    },
                    "failing_since": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Since when deliveries to the endpoint go without a single success; after 72 hours the platform turns it off. null when the last delivery succeeded."
                    },
                    "previous_secret_expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "After a rotation the deliveries are also signed with the previous secret until this moment; null when there is no previous secret."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "version",
                    "url",
                    "description",
                    "enabled_events",
                    "api_version",
                    "status",
                    "disabled_reason",
                    "failing_since",
                    "previous_secret_expires_at",
                    "created_at",
                    "updated_at"
                ]
            },
            "WebhookEndpointSecret": {
                "type": "object",
                "properties": {
                    "endpoint_id": {
                        "type": "integer",
                        "description": "ID of the webhook endpoint."
                    },
                    "secret": {
                        "type": "string",
                        "description": "Signing secret by Standard Webhooks: whsec_ and the base64 key of HMAC-SHA256. Keep it on your server only."
                    }
                },
                "required": [
                    "endpoint_id",
                    "secret"
                ]
            },
            "WriteOffReason": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "ID of the record, unique among records of its kind in the store."
                    },
                    "name": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "description": "Name by language: an object of the filled languages, for example {\"es\": \"Café\", \"en\": \"Coffee\"}."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "spoilage",
                            "shrinkage",
                            "internal_use"
                        ],
                        "description": "Accounting kind of the write-off: spoilage — goods spoiled or damaged; shrinkage — goods are missing; internal_use — the business used the goods itself."
                    },
                    "requires_comment": {
                        "type": "boolean",
                        "description": "A write-off with this reason needs a comment."
                    },
                    "selectable": {
                        "type": "boolean",
                        "description": "The reason can be named in a new write-off: it is not archived and not a system reason that only the store writes itself."
                    },
                    "position": {
                        "type": "integer",
                        "description": "Sort position: lower comes first."
                    },
                    "archived_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "When the reason was archived; null for a live reason. An archived reason stays in the list: past write-offs refer to it."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record was created."
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the record last changed."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "kind",
                    "requires_comment",
                    "selectable",
                    "position",
                    "archived_at",
                    "created_at",
                    "updated_at"
                ]
            }
        },
        "responses": {
            "Unauthenticated": {
                "description": "The token is missing, invalid, expired or revoked",
                "headers": {
                    "WWW-Authenticate": {
                        "$ref": "#/components/headers/WwwAuthenticate"
                    },
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        }
                    }
                }
            },
            "Forbidden": {
                "description": "The plan, the IP address or the token scopes do not allow the request",
                "headers": {
                    "WWW-Authenticate": {
                        "$ref": "#/components/headers/WwwAuthenticateOptional"
                    },
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/ForbiddenProblem"
                        }
                    }
                }
            },
            "NotFound": {
                "description": "The object does not exist or is not available to the app",
                "headers": {
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        }
                    }
                }
            },
            "Conflict": {
                "description": "A request with the same idempotency key is in progress, the data changed after it was read, the external ID belongs to another record, the plan or webhook endpoint limit is reached, or the change needs consent to its consequences",
                "headers": {
                    "Retry-After": {
                        "$ref": "#/components/headers/RetryAfterOptional"
                    },
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/ConflictProblem"
                        }
                    }
                }
            },
            "PreconditionFailed": {
                "description": "The record changed after it was read: the version in If-Match is not current",
                "headers": {
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        }
                    }
                }
            },
            "PreconditionRequired": {
                "description": "The request needs If-Match with the ETag of the record",
                "headers": {
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        }
                    }
                }
            },
            "RangeNotSatisfiable": {
                "description": "The range starts beyond the written result",
                "headers": {
                    "Content-Range": {
                        "$ref": "#/components/headers/ContentRange"
                    },
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        }
                    }
                }
            },
            "CursorExpired": {
                "description": "The sync cursor is older than the deletion retention period or was issued before the database was restored",
                "headers": {
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        }
                    }
                }
            },
            "ValidationFailed": {
                "description": "A parameter is invalid or unknown",
                "headers": {
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/ValidationProblem"
                        }
                    }
                }
            },
            "TooManyRequests": {
                "description": "The rate limit is exhausted",
                "headers": {
                    "Retry-After": {
                        "$ref": "#/components/headers/RetryAfter"
                    },
                    "RateLimit": {
                        "$ref": "#/components/headers/RateLimit"
                    },
                    "RateLimit-Policy": {
                        "$ref": "#/components/headers/RateLimitPolicy"
                    },
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/RateLimitProblem"
                        }
                    }
                }
            },
            "ServiceUnavailable": {
                "description": "The store is temporarily unavailable",
                "headers": {
                    "Retry-After": {
                        "$ref": "#/components/headers/RetryAfterOptional"
                    },
                    "X-Request-Id": {
                        "$ref": "#/components/headers/RequestId"
                    }
                },
                "content": {
                    "application/problem+json": {
                        "schema": {
                            "$ref": "#/components/schemas/Problem"
                        }
                    }
                }
            }
        },
        "parameters": {
            "AcceptLanguage": {
                "name": "Accept-Language",
                "in": "header",
                "required": false,
                "description": "Language of error texts: es, en or ru. English by default.",
                "schema": {
                    "type": "string",
                    "examples": [
                        "es"
                    ]
                }
            },
            "IdempotencyKey": {
                "name": "Idempotency-Key",
                "in": "header",
                "required": false,
                "description": "Unique key of the attempt, for example a UUID. A retry with the same key and body gets the saved response instead of a second write. Keys live 24 hours.",
                "schema": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "examples": [
                        "8e03978e-40d5-43e8-bc93-6894a57f9324"
                    ]
                }
            },
            "IdempotencyKeyRequired": {
                "name": "Idempotency-Key",
                "in": "header",
                "required": true,
                "description": "Required key of the attempt, for example a UUID: a duplicate of this command with the tax authority cannot be undone. A retry with the same key and body gets the saved response. Keys live 24 hours.",
                "schema": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "examples": [
                        "8e03978e-40d5-43e8-bc93-6894a57f9324"
                    ]
                }
            },
            "IfMatch": {
                "name": "If-Match",
                "in": "header",
                "required": true,
                "description": "ETag of the record from the last read, for example \"7\". The change applies only if nobody changed the record since then; otherwise 412. Without it — 428.",
                "schema": {
                    "type": "string",
                    "examples": [
                        "\"7\""
                    ]
                }
            },
            "IfMatchUpsert": {
                "name": "If-Match",
                "in": "header",
                "required": false,
                "description": "ETag of the record from the last read. Required when a record with this external ID exists (otherwise 428) and must be absent when it does not.",
                "schema": {
                    "type": "string",
                    "examples": [
                        "\"7\""
                    ]
                }
            },
            "IfNoneMatch": {
                "name": "If-None-Match",
                "in": "header",
                "required": false,
                "description": "* — create only: if a record with this external ID already exists, the request gets 412.",
                "schema": {
                    "type": "string",
                    "enum": [
                        "*"
                    ]
                }
            },
            "Range": {
                "name": "Range",
                "in": "header",
                "required": false,
                "description": "One byte range to resume a download: bytes=<from>- or bytes=<from>-<to>. The result of a running operation only grows: continue with bytes=<downloaded>- without If-Range; 416 means no new lines yet. Several ranges get the whole result.",
                "schema": {
                    "type": "string",
                    "examples": [
                        "bytes=1048576-"
                    ]
                }
            },
            "IfRange": {
                "name": "If-Range",
                "in": "header",
                "required": false,
                "description": "ETag of the result from the previous response. The range is served only if nothing was appended since then; otherwise the whole result (200).",
                "schema": {
                    "type": "string",
                    "examples": [
                        "\"52428800\""
                    ]
                }
            }
        },
        "headers": {
            "RateLimit": {
                "description": "Requests left in a row and seconds until the bucket is full again, per policy.",
                "required": true,
                "schema": {
                    "type": "string",
                    "examples": [
                        "\"app\";r=87;t=3, \"store\";r=390;t=1"
                    ]
                }
            },
            "RateLimitPolicy": {
                "description": "Rate limit policies: quota per window in seconds.",
                "required": true,
                "schema": {
                    "type": "string",
                    "examples": [
                        "\"app\";q=300;w=60, \"store\";q=1200;w=60"
                    ]
                }
            },
            "RequestId": {
                "description": "Request ID. Quote it when you contact support.",
                "required": true,
                "schema": {
                    "type": "string"
                }
            },
            "IdempotentReplayed": {
                "description": "true when this is the saved response of an earlier request with the same Idempotency-Key.",
                "required": false,
                "schema": {
                    "type": "string",
                    "enum": [
                        "true"
                    ]
                }
            },
            "ETag": {
                "description": "Version of the record. Send it in If-Match to change the record.",
                "required": true,
                "schema": {
                    "type": "string",
                    "examples": [
                        "\"7\""
                    ]
                }
            },
            "Location": {
                "description": "Address of the created record; for an accepted request (202), the address to follow its outcome.",
                "required": true,
                "schema": {
                    "type": "string",
                    "format": "uri"
                }
            },
            "AcceptRanges": {
                "description": "bytes — the result is served in ranges. A compressed response (Content-Encoding: gzip) has no such header: it cannot be resumed.",
                "required": false,
                "schema": {
                    "type": "string",
                    "enum": [
                        "bytes"
                    ]
                }
            },
            "ContentRange": {
                "description": "The served range and the written length: bytes 0-1023/52428800; on 416 — bytes */52428800.",
                "required": true,
                "schema": {
                    "type": "string",
                    "examples": [
                        "bytes 1048576-52428799/52428800"
                    ]
                }
            },
            "ResultETag": {
                "description": "Tag of the result: it changes when the result grows. Send it in If-Range to resume the same version. A compressed response has a weak tag (W/) that does not work in If-Range.",
                "required": true,
                "schema": {
                    "type": "string",
                    "examples": [
                        "\"52428800\""
                    ]
                }
            },
            "RetryAfter": {
                "description": "Seconds to wait before retrying.",
                "required": true,
                "schema": {
                    "type": "integer",
                    "minimum": 0
                }
            },
            "RetryAfterOptional": {
                "description": "Seconds to wait before retrying.",
                "required": false,
                "schema": {
                    "type": "integer",
                    "minimum": 0
                }
            },
            "WwwAuthenticate": {
                "description": "Authentication scheme (RFC 6750).",
                "required": true,
                "schema": {
                    "type": "string",
                    "examples": [
                        "Bearer"
                    ]
                }
            },
            "WwwAuthenticateOptional": {
                "description": "Authentication scheme (RFC 6750).",
                "required": false,
                "schema": {
                    "type": "string",
                    "examples": [
                        "Bearer error=\"insufficient_scope\", scope=\"locations:read\""
                    ]
                }
            }
        },
        "securitySchemes": {
            "apiToken": {
                "type": "http",
                "scheme": "bearer",
                "description": "App token from the store settings, sent as Authorization: Bearer <token>."
            }
        }
    }
}
