{"openapi":"3.0.0","paths":{"/v1/organization-api/company/company-workflow/onboard":{"post":{"description":"Creates a company, linked account, default outlet, plan assignment, default roles, and a Stripe customer. Runs in a single transaction, then finalizes any external customer setup. The target organization is resolved from the supplied `x-org-api-key`; the organization must have an org owner.","operationId":"CompanyWorkflowController_onboardCompany","parameters":[],"requestBody":{"required":true,"description":"Company onboarding payload. The target organization is resolved from the API key — do not send `organizationId` in the body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardCompanyDto"}}}},"responses":{"200":{"description":"Company onboarded successfully. Returns the new company document (including `accountId` and `organizationId` links). A default outlet and plan association are also created; those ids are not duplicated on the company object."},"400":{"description":"Request validation failed, plan or organization is invalid, or a required relation could not be satisfied (e.g. no org owner).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid `x-org-api-key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"API key is not bound to an organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Organization, plan, or another prerequisite resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"security":[{"X-Org-Api-Key":[]}],"summary":"Onboard a new company under an organization","tags":["Company"]}},"/v1/customer":{"post":{"description":"Creates a new customer record.","operationId":"CustomerController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreateDto"}}}},"responses":{"201":{"description":"The customer has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new customer","tags":["Customer"]}},"/v1/customer/{id}":{"get":{"description":"Retrieves a single customer by its unique identifier.","operationId":"CustomerController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Customer ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The customer has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The customer was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a customer by ID","tags":["Customer"]},"patch":{"description":"Updates an existing customer record.","operationId":"CustomerController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Customer ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdateDto"}}}},"responses":{"200":{"description":"The customer has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a customer by ID","tags":["Customer"]},"delete":{"description":"Deletes a customer by its unique identifier.","operationId":"CustomerController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Customer ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The customer has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The customer was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a customer by ID","tags":["Customer"]}},"/v1/customers":{"post":{"description":"Bulk creates multiple customers in a single request. Returns per-item results with success/error status for each item.","operationId":"CustomersController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateRequestDto"}}}},"responses":{"200":{"description":"Bulk operation completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/CustomerResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid (e.g., malformed body, exceeds max items).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk create customers","tags":["Customers"]},"get":{"description":"Retrieves a list of customers. Supports filtering by fields, sorting, and pagination.","operationId":"CustomersController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt","email","firstName","lastName"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"searchByEmail","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByFirstName","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByLastName","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByPhone","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"outletId","required":false,"in":"query","description":"Filter by outletId","schema":{"type":"string"}},{"name":"source","required":false,"in":"query","description":"Filter by source","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","description":"Filter by tags. Supports comma-separated values for matching any item in the array","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read customers","tags":["Customers"]},"patch":{"description":"Updates multiple customers in a single request. Each item must include an id and the fields to update. Returns per-item results.","operationId":"CustomersController_updateMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequestDto"}}}},"responses":{"200":{"description":"Bulk update completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/CustomerResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk update customers","tags":["Customers"]},"delete":{"description":"Deletes multiple customers in a single request. Each item must include an id. Returns per-item results.","operationId":"CustomersController_deleteMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequestDto"}}}},"responses":{"200":{"description":"Bulk delete completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/BulkItemSuccessResultDto"},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk delete customers","tags":["Customers"]}},"/v1/inventory":{"post":{"description":"Creates a new inventory record.","operationId":"InventoryController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryCreateDto"}}}},"responses":{"201":{"description":"The inventory has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new inventory","tags":["Inventory"]}},"/v1/inventory/{id}":{"get":{"description":"Retrieves a single inventory by its unique identifier.","operationId":"InventoryController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Inventory ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The inventory has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The inventory was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a inventory by ID","tags":["Inventory"]},"patch":{"description":"Updates an existing inventory record.","operationId":"InventoryController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Inventory ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUpdateDto"}}}},"responses":{"200":{"description":"The inventory has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a inventory by ID","tags":["Inventory"]},"delete":{"description":"Deletes a inventory by its unique identifier.","operationId":"InventoryController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Inventory ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The inventory has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The inventory was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a inventory by ID","tags":["Inventory"]}},"/v1/inventories":{"post":{"description":"Bulk creates multiple inventories in a single request. Returns per-item results with success/error status for each item.","operationId":"InventoriesController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateRequestDto"}}}},"responses":{"200":{"description":"Bulk operation completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/InventoryResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid (e.g., malformed body, exceeds max items).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk create inventories","tags":["Inventories"]},"get":{"description":"Retrieves a list of inventories. Supports filtering by fields, sorting, and pagination.","operationId":"InventoriesController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"productId","required":false,"in":"query","description":"Filter by productId","schema":{"type":"string"}},{"name":"variantId","required":false,"in":"query","description":"Filter by variantId","schema":{"type":"string"}},{"name":"outletId","required":false,"in":"query","description":"Filter by outletId","schema":{"type":"string"}},{"name":"manageStock","required":false,"in":"query","description":"Filter by manageStock","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InventoryResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read inventories","tags":["Inventories"]},"patch":{"description":"Updates multiple inventories in a single request. Each item must include an id and the fields to update. Returns per-item results.","operationId":"InventoriesController_updateMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequestDto"}}}},"responses":{"200":{"description":"Bulk update completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/InventoryResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk update inventories","tags":["Inventories"]},"delete":{"description":"Deletes multiple inventories in a single request. Each item must include an id. Returns per-item results.","operationId":"InventoriesController_deleteMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequestDto"}}}},"responses":{"200":{"description":"Bulk delete completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/BulkItemSuccessResultDto"},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk delete inventories","tags":["Inventories"]}},"/v1/inventories/set-levels":{"post":{"description":"Upserts absolute on-hand quantities for a list of (productId, variantId, outletId) tuples scoped to the API-key company. Existing live rows are overwritten; missing rows are created. Writes exactly the tuples supplied — no outlet fan-out, no zero-fill. Does NOT revive soft-deleted rows (a soft-deleted tuple is re-inserted as a new live row). Records StockChange RECOUNT history for managed tuples whose quantity changed.","operationId":"setInventoryLevels","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetInventoryLevelsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetInventoryLevelsResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Set absolute inventory levels by (product, variant, outlet) tuple","tags":["Inventories"]}},"/v1/inventories/adjust":{"post":{"description":"Applies a signed delta to the on-hand quantity of a single (variantId, outletId) tuple scoped to the API-key company. Negative deltas are booked as an EXTERNAL_SALE, positive as an EXTERNAL_RESTOCK; neither rejects on insufficient stock. `idempotencyKey` is required — a retry with the same key is a safe no-op. Returns the post-adjustment inventory state; advance your sync watermark from `quantity`. This is a routed sync-lane operation: it is only available when inventory writes are routed to the inventory service, and responds 501 Not Implemented otherwise.","operationId":"adjustInventory","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustInventoryDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustInventoryResponseDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"501":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Apply a signed, relative stock movement to one (variant, outlet) tuple","tags":["Inventories"]}},"/v1/stock-change/{id}":{"get":{"description":"Retrieves a single stockchange by its unique identifier.","operationId":"StockChangeController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"StockChange ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The stockchange has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockChangeResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The stockchange was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a stockchange by ID","tags":["StockChange"]}},"/v1/stock-changes":{"get":{"description":"Retrieves a list of stockchanges. Supports filtering by fields, sorting, and pagination.","operationId":"StockChangesController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StockChangeResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read stockchanges","tags":["StockChanges"]}},"/v1/catalog-visibility":{"post":{"description":"Creates a new catalogvisibility record.","operationId":"CatalogVisibilityController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVisibilityCreateDto"}}}},"responses":{"201":{"description":"The catalogvisibility has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVisibilityResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new catalogvisibility","tags":["CatalogVisibility"]}},"/v1/catalog-visibility/{id}":{"get":{"description":"Retrieves a single catalogvisibility by its unique identifier.","operationId":"CatalogVisibilityController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"CatalogVisibility ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The catalogvisibility has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVisibilityResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The catalogvisibility was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a catalogvisibility by ID","tags":["CatalogVisibility"]},"patch":{"description":"Updates an existing catalogvisibility record.","operationId":"CatalogVisibilityController_update","parameters":[{"name":"id","required":true,"in":"path","description":"CatalogVisibility ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVisibilityUpdateDto"}}}},"responses":{"200":{"description":"The catalogvisibility has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVisibilityResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a catalogvisibility by ID","tags":["CatalogVisibility"]},"delete":{"description":"Deletes a catalogvisibility by its unique identifier.","operationId":"CatalogVisibilityController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"CatalogVisibility ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The catalogvisibility has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The catalogvisibility was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a catalogvisibility by ID","tags":["CatalogVisibility"]}},"/v1/catalog-visibilities":{"post":{"description":"Bulk creates multiple catalogvisibilities in a single request. Returns per-item results with success/error status for each item.","operationId":"CatalogVisibilitiesController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateRequestDto"}}}},"responses":{"200":{"description":"Bulk operation completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/CatalogVisibilityResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid (e.g., malformed body, exceeds max items).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk create catalogvisibilities","tags":["CatalogVisibilities"]},"get":{"description":"Retrieves a list of catalogvisibilities. Supports filtering by fields, sorting, and pagination.","operationId":"CatalogVisibilitiesController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"productId","required":false,"in":"query","description":"Filter by productId","schema":{"type":"string"}},{"name":"variantId","required":false,"in":"query","description":"Filter by variantId","schema":{"type":"string"}},{"name":"outletId","required":false,"in":"query","description":"Filter by outletId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogVisibilityResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read catalogvisibilities","tags":["CatalogVisibilities"]},"patch":{"description":"Updates multiple catalogvisibilities in a single request. Each item must include an id and the fields to update. Returns per-item results.","operationId":"CatalogVisibilitiesController_updateMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequestDto"}}}},"responses":{"200":{"description":"Bulk update completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/CatalogVisibilityResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk update catalogvisibilities","tags":["CatalogVisibilities"]},"delete":{"description":"Deletes multiple catalogvisibilities in a single request. Each item must include an id. Returns per-item results.","operationId":"CatalogVisibilitiesController_deleteMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequestDto"}}}},"responses":{"200":{"description":"Bulk delete completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/BulkItemSuccessResultDto"},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk delete catalogvisibilities","tags":["CatalogVisibilities"]}},"/v1/custom-tables":{"get":{"description":"Retrieves a list of custom tables: structure. Supports filtering by fields, sorting, and pagination.","operationId":"CustomTablesController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved a list of custom tables: structure"},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read custom tables: structure","tags":["Custom Tables: Structure"]}},"/v1/custom-table-fields":{"get":{"description":"Retrieves a list of custom tables: structure. Supports filtering by fields, sorting, and pagination.","operationId":"CustomTableFieldsController_findAll","parameters":[{"name":"tableId","required":true,"in":"query","description":"Filter by custom table ID","schema":{"type":"string"}},{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved a list of custom tables: structure"},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read custom tables: structure","tags":["Custom Tables: Structure"]}},"/v1/custom-table-row":{"post":{"description":"Creates a new custom tables: content record.","operationId":"CustomTableRowController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomTableRowDto"}}}},"responses":{"201":{"description":"The custom tables: content has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableRowResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new custom tables: content","tags":["Custom Tables: Content"]}},"/v1/custom-table-row/{id}":{"get":{"description":"Retrieves a single custom tables: content by its unique identifier.","operationId":"CustomTableRowController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Custom Tables: Content ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The custom tables: content has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableRowResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The custom tables: content was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a custom tables: content by ID","tags":["Custom Tables: Content"]},"patch":{"description":"Updates an existing custom tables: content record.","operationId":"CustomTableRowController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Custom Tables: Content ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomTableRowDto"}}}},"responses":{"200":{"description":"The custom tables: content has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableRowResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a custom tables: content by ID","tags":["Custom Tables: Content"]},"delete":{"description":"Deletes a custom tables: content by its unique identifier.","operationId":"CustomTableRowController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Custom Tables: Content ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The custom tables: content has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The custom tables: content was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a custom tables: content by ID","tags":["Custom Tables: Content"]}},"/v1/custom-table-rows":{"get":{"description":"Retrieves a list of custom tables: content. Supports filtering by fields, sorting, and pagination.","operationId":"CustomTableRowsController_findAll","parameters":[{"name":"tableId","required":false,"in":"query","description":"Filter by custom table ID","schema":{"type":"string"}},{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved a list of custom tables: content"},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read custom tables: content","tags":["Custom Tables: Content"]}},"/v1/custom-table-value":{"post":{"description":"Creates a new custom tables: content record.","operationId":"CustomTableValueController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomTableValueDto"}}}},"responses":{"201":{"description":"The custom tables: content has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableValueResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new custom tables: content","tags":["Custom Tables: Content"]}},"/v1/custom-table-value/{id}":{"get":{"description":"Retrieves a single custom tables: content by its unique identifier.","operationId":"CustomTableValueController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Custom Tables: Content ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The custom tables: content has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableValueResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The custom tables: content was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a custom tables: content by ID","tags":["Custom Tables: Content"]},"patch":{"description":"Updates an existing custom tables: content record.","operationId":"CustomTableValueController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Custom Tables: Content ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomTableValueDto"}}}},"responses":{"200":{"description":"The custom tables: content has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableValueResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a custom tables: content by ID","tags":["Custom Tables: Content"]},"delete":{"description":"Deletes a custom tables: content by its unique identifier.","operationId":"CustomTableValueController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Custom Tables: Content ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The custom tables: content has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The custom tables: content was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a custom tables: content by ID","tags":["Custom Tables: Content"]}},"/v1/custom-table-values":{"get":{"description":"Retrieves a list of custom tables: content. Supports filtering by fields, sorting, and pagination.","operationId":"CustomTableValuesController_findAll","parameters":[{"name":"tableId","required":false,"in":"query","description":"Filter by custom table ID","schema":{"type":"string"}},{"name":"rowId","required":false,"in":"query","description":"Filter by custom table row ID","schema":{"type":"string"}},{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved a list of custom tables: content"},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read custom tables: content","tags":["Custom Tables: Content"]}},"/v1/custom-table-data/{tableName}":{"post":{"description":"Creates a new row (and its cell values) under the table resolved from the path `tableName`.","operationId":"CustomTableDataController_create","parameters":[{"name":"tableName","required":true,"in":"path","description":"Logical custom table name in kebab-case. Must resolve to a table for this company (`POST /custom-table-data/{tableName}`).","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"JSON object whose keys are **field names** from that table’s schema (see `CreateCustomTableDataDto` in components). The server persists the row under the resolved table id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomTableDataDto"}}}},"responses":{"201":{"description":"Assembled row payload after create (`CustomTableDataResponseDto`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableDataResponseDto"}}}},"400":{"description":"Validation failure, unknown fields, or other request errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"`tableName` does not resolve to a table for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Create row in a custom table (by table name)","tags":["Custom Tables: Content"]},"get":{"description":"Returns a paginated list of assembled rows for the table resolved from the path `tableName`.","operationId":"CustomTableDatasController_findAll","parameters":[{"name":"tableName","required":true,"in":"path","description":"Logical custom table name in kebab-case for this company. Must match an existing custom table (`GET /custom-table-data/{tableName}`); otherwise **404**.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Maximum rows to return (default: `100`, max: `1000`). Invalid values can yield **400**.","schema":{"type":"number"}},{"name":"skip","required":false,"in":"query","description":"Number of rows to skip before returning results (default: `0`). Parsed with `limit` via `parseListQuery`.","schema":{"type":"number"}}],"responses":{"200":{"description":"`data`: assembled rows (each item maps field names to values). `meta`: `count` (total matching rows), `skip`, and `limit` as applied.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomTableDataResponseDto"}},"meta":{"$ref":"#/components/schemas/ListMetaDto"}}}}}},"400":{"description":"Invalid paging parameters or other request errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"No custom table exists for this `tableName` in the current company scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"List rows in a custom table (by table name)","tags":["Custom Tables: Content"]}},"/v1/custom-table-data/{tableName}/{rowId}":{"get":{"description":"Returns a single assembled row for the given table name and row id.","operationId":"CustomTableDataController_findOne","parameters":[{"name":"tableName","required":true,"in":"path","description":"Logical custom table name in kebab-case for this company. Must match an existing custom table; otherwise **404**.","schema":{"type":"string"}},{"name":"rowId","required":true,"in":"path","description":"MongoDB ObjectId of the custom table row (`_id`). Must be valid; the row’s `tableId` must match the table resolved from `tableName` (otherwise **404** or **400** if the row belongs to another table).","schema":{"type":"string"}}],"responses":{"200":{"description":"Field-name → value map (`CustomTableDataResponseDto`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableDataResponseDto"}}}},"400":{"description":"Invalid `rowId`, or row exists but is not under the resolved table.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Missing table or row in scope (`GET /custom-table-data/{tableName}/{rowId}`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get one row from a custom table (by table name and row id)","tags":["Custom Tables: Content"]},"put":{"description":"Updates cell values for an existing row at the given path.","operationId":"CustomTableDataController_update","parameters":[{"name":"tableName","required":true,"in":"path","description":"Logical custom table name in kebab-case; must resolve for this company.","schema":{"type":"string"}},{"name":"rowId","required":true,"in":"path","description":"MongoDB ObjectId of the row to update; must belong to the table resolved from `tableName`.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Partial or full field map per schema — see `UpdateCustomTableDataDto` in components.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomTableDataDto"}}}},"responses":{"200":{"description":"Updated assembled row (`CustomTableDataResponseDto`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTableDataResponseDto"}}}},"400":{"description":"Validation failure, wrong table, or invalid `rowId` (same **400** semantics as GET by id).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Same **404** semantics as GET by id (missing table or row).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update row in a custom table (by table name and row id)","tags":["Custom Tables: Content"]},"delete":{"description":"Deletes the row under the table resolved from `tableName`.","operationId":"CustomTableDataController_delete","parameters":[{"name":"tableName","required":true,"in":"path","description":"Logical custom table name in kebab-case; must resolve for this company.","schema":{"type":"string"}},{"name":"rowId","required":true,"in":"path","description":"MongoDB ObjectId of the row; must belong to the resolved table.","schema":{"type":"string"}}],"responses":{"200":{"description":"Small acknowledgement payload (`DeleteResponseDto`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Invalid `rowId`, or row is not under the given table.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Row or table missing in scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete row from a custom table (by table name and row id)","tags":["Custom Tables: Content"]}},"/v1/product":{"post":{"description":"Creates a new product record.","operationId":"ProductController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateDto"}}}},"responses":{"201":{"description":"The product has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new product","tags":["Product"]}},"/v1/product/{id}":{"get":{"description":"Retrieves a single product by its unique identifier.","operationId":"ProductController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The product has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The product was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a product by ID","tags":["Product"]},"patch":{"description":"Updates an existing product record.","operationId":"ProductController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Product ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdateDto"}}}},"responses":{"200":{"description":"The product has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a product by ID","tags":["Product"]},"delete":{"description":"Deletes a product by its unique identifier.","operationId":"ProductController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The product has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The product was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a product by ID","tags":["Product"]}},"/v1/products":{"post":{"description":"Bulk creates multiple products in a single request. Returns per-item results with success/error status for each item.","operationId":"ProductsController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateRequestDto"}}}},"responses":{"200":{"description":"Bulk operation completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/ProductResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid (e.g., malformed body, exceeds max items).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk create products","tags":["Products"]},"get":{"description":"Retrieves a list of products. Supports filtering by fields, sorting, and pagination.","operationId":"ProductsController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt","name","sku","status","barcode"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"searchByName","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByDescription","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByShortDescription","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"productType","required":false,"in":"query","description":"Filter by productType","schema":{"type":"string"}},{"name":"source","required":false,"in":"query","description":"Filter by source","schema":{"type":"string"}},{"name":"tags","required":false,"in":"query","description":"Filter by tags. Supports comma-separated values for matching any item in the array","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status. Allowed values: active, inactive, draft","schema":{"enum":["active","inactive","draft"],"type":"string"}},{"name":"notSoldInPos","required":false,"in":"query","description":"Filter by notSoldInPos","schema":{"type":"boolean"}},{"name":"notSoldOnline","required":false,"in":"query","description":"Filter by notSoldOnline","schema":{"type":"boolean"}},{"name":"minPrice","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by minPrice using range operators","schema":{"type":"object","properties":{"gte":{"type":"number"},"lte":{"type":"number"},"gt":{"type":"number"},"lt":{"type":"number"}}}},{"name":"maxPrice","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by maxPrice using range operators","schema":{"type":"object","properties":{"gte":{"type":"number"},"lte":{"type":"number"},"gt":{"type":"number"},"lt":{"type":"number"}}}},{"name":"supplier","required":false,"in":"query","description":"Filter by supplier","schema":{"type":"string"}},{"name":"taxTable","required":false,"in":"query","description":"Filter by taxTable","schema":{"type":"string"}},{"name":"bookingRulesId","required":false,"in":"query","description":"Filter by bookingRulesId","schema":{"type":"string"}},{"name":"defaultVariantId","required":false,"in":"query","description":"Filter by defaultVariantId","schema":{"type":"string"}},{"name":"categories","required":false,"in":"query","description":"Filter by categories. Supports comma-separated values for matching any item in the array","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read products","tags":["Products"]},"patch":{"description":"Updates multiple products in a single request. Each item must include an id and the fields to update. Returns per-item results.","operationId":"ProductsController_updateMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequestDto"}}}},"responses":{"200":{"description":"Bulk update completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/ProductResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk update products","tags":["Products"]},"delete":{"description":"Deletes multiple products in a single request. Each item must include an id. Returns per-item results.","operationId":"ProductsController_deleteMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequestDto"}}}},"responses":{"200":{"description":"Bulk delete completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/BulkItemSuccessResultDto"},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk delete products","tags":["Products"]}},"/v1/outlet":{"post":{"description":"Creates a new outlet record.","operationId":"OutletController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutletCreateDto"}}}},"responses":{"201":{"description":"The outlet has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutletResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new outlet","tags":["Outlet"]}},"/v1/outlet/{id}":{"get":{"description":"Retrieves a single outlet by its unique identifier.","operationId":"OutletController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Outlet ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The outlet has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutletResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The outlet was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a outlet by ID","tags":["Outlet"]},"patch":{"description":"Updates an existing outlet record.","operationId":"OutletController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Outlet ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutletUpdateDto"}}}},"responses":{"200":{"description":"The outlet has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutletResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a outlet by ID","tags":["Outlet"]},"delete":{"description":"Deletes a outlet by its unique identifier.","operationId":"OutletController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Outlet ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The outlet has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The outlet was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a outlet by ID","tags":["Outlet"]}},"/v1/outlets":{"post":{"description":"Bulk creates multiple outlets in a single request. Returns per-item results with success/error status for each item.","operationId":"OutletsController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateRequestDto"}}}},"responses":{"200":{"description":"Bulk operation completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/OutletResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid (e.g., malformed body, exceeds max items).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk create outlets","tags":["Outlets"]},"get":{"description":"Retrieves a list of outlets. Supports filtering by fields, sorting, and pagination.","operationId":"OutletsController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt","name","sequenceNumber"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"searchByName","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByAddress","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByCity","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByState","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByCountry","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByPostCode","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByPhone","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByAlias","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByExternalId","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"stations","required":false,"in":"query","description":"Filter by stations. Supports comma-separated values for matching any item in the array","schema":{"type":"string"}},{"name":"stripeAccountId","required":false,"in":"query","description":"Filter by stripeAccountId","schema":{"type":"string"}},{"name":"externalId","required":false,"in":"query","description":"Filter by externalId","schema":{"type":"string"}},{"name":"source","required":false,"in":"query","description":"Filter by source","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OutletResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read outlets","tags":["Outlets"]},"patch":{"description":"Updates multiple outlets in a single request. Each item must include an id and the fields to update. Returns per-item results.","operationId":"OutletsController_updateMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequestDto"}}}},"responses":{"200":{"description":"Bulk update completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/OutletResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk update outlets","tags":["Outlets"]},"delete":{"description":"Deletes multiple outlets in a single request. Each item must include an id. Returns per-item results.","operationId":"OutletsController_deleteMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequestDto"}}}},"responses":{"200":{"description":"Bulk delete completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/BulkItemSuccessResultDto"},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk delete outlets","tags":["Outlets"]}},"/v1/category":{"post":{"description":"Creates a new category record.","operationId":"CategoryController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreateDto"}}}},"responses":{"201":{"description":"The category has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new category","tags":["Category"]}},"/v1/category/{id}":{"get":{"description":"Retrieves a single category by its unique identifier.","operationId":"CategoryController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The category has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The category was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a category by ID","tags":["Category"]},"patch":{"description":"Updates an existing category record.","operationId":"CategoryController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Category ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryUpdateDto"}}}},"responses":{"200":{"description":"The category has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a category by ID","tags":["Category"]},"delete":{"description":"Deletes a category by its unique identifier.","operationId":"CategoryController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The category has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The category was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a category by ID","tags":["Category"]}},"/v1/categories":{"post":{"description":"Bulk creates multiple categories in a single request. Returns per-item results with success/error status for each item.","operationId":"CategoriesController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateRequestDto"}}}},"responses":{"200":{"description":"Bulk operation completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/CategoryResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid (e.g., malformed body, exceeds max items).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk create categories","tags":["Categories"]},"get":{"description":"Retrieves a list of categories. Supports filtering by fields, sorting, and pagination.","operationId":"CategoriesController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt","name","description"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"searchByName","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByDescription","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchBySource","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"parentId","required":false,"in":"query","description":"Filter by parentId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CategoryResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read categories","tags":["Categories"]},"patch":{"description":"Updates multiple categories in a single request. Each item must include an id and the fields to update. Returns per-item results.","operationId":"CategoriesController_updateMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequestDto"}}}},"responses":{"200":{"description":"Bulk update completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/CategoryResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk update categories","tags":["Categories"]},"delete":{"description":"Deletes multiple categories in a single request. Each item must include an id. Returns per-item results.","operationId":"CategoriesController_deleteMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequestDto"}}}},"responses":{"200":{"description":"Bulk delete completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/BulkItemSuccessResultDto"},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk delete categories","tags":["Categories"]}},"/v1/station":{"post":{"description":"Creates a new station record.","operationId":"StationController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationCreateDto"}}}},"responses":{"201":{"description":"The station has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new station","tags":["Station"]}},"/v1/station/{id}":{"get":{"description":"Retrieves a single station by its unique identifier.","operationId":"StationController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Station ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The station has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The station was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a station by ID","tags":["Station"]},"patch":{"description":"Updates an existing station record.","operationId":"StationController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Station ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationUpdateDto"}}}},"responses":{"200":{"description":"The station has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a station by ID","tags":["Station"]},"delete":{"description":"Deletes a station by its unique identifier.","operationId":"StationController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Station ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The station has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The station was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a station by ID","tags":["Station"]}},"/v1/stations":{"post":{"description":"Bulk creates multiple stations in a single request. Returns per-item results with success/error status for each item.","operationId":"StationsController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateRequestDto"}}}},"responses":{"200":{"description":"Bulk operation completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/StationResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid (e.g., malformed body, exceeds max items).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk create stations","tags":["Stations"]},"get":{"description":"Retrieves a list of stations. Supports filtering by fields, sorting, and pagination.","operationId":"StationsController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt","name","sequenceNumber"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"searchByName","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByDeviceId","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"searchByDeviceName","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"outletId","required":false,"in":"query","description":"Filter by outletId","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status. Allowed values: IN_USE, AVAILABLE","schema":{"enum":["IN_USE","AVAILABLE"],"type":"string"}},{"name":"isVirtual","required":false,"in":"query","description":"Filter by isVirtual","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StationResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read stations","tags":["Stations"]},"patch":{"description":"Updates multiple stations in a single request. Each item must include an id and the fields to update. Returns per-item results.","operationId":"StationsController_updateMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequestDto"}}}},"responses":{"200":{"description":"Bulk update completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/StationResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk update stations","tags":["Stations"]},"delete":{"description":"Deletes multiple stations in a single request. Each item must include an id. Returns per-item results.","operationId":"StationsController_deleteMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequestDto"}}}},"responses":{"200":{"description":"Bulk delete completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/BulkItemSuccessResultDto"},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk delete stations","tags":["Stations"]}},"/v1/variant":{"post":{"description":"Creates a new variant record.","operationId":"VariantController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantCreateDto"}}}},"responses":{"201":{"description":"The variant has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new variant","tags":["Variant"]}},"/v1/variant/{id}":{"get":{"description":"Retrieves a single variant by its unique identifier.","operationId":"VariantController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Variant ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The variant has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The variant was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a variant by ID","tags":["Variant"]},"patch":{"description":"Updates an existing variant record.","operationId":"VariantController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Variant ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantUpdateDto"}}}},"responses":{"200":{"description":"The variant has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a variant by ID","tags":["Variant"]},"delete":{"description":"Deletes a variant by its unique identifier.","operationId":"VariantController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Variant ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The variant has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The variant was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a variant by ID","tags":["Variant"]}},"/v1/variants":{"post":{"description":"Bulk creates multiple variants in a single request. Returns per-item results with success/error status for each item.","operationId":"VariantsController_createMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateRequestDto"}}}},"responses":{"200":{"description":"Bulk operation completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/VariantResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid (e.g., malformed body, exceeds max items).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk create variants","tags":["Variants"]},"get":{"description":"Retrieves a list of variants. Supports filtering by fields, sorting, and pagination.","operationId":"VariantsController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt","barcode","price","salePrice","costPrice"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"searchByBarcode","required":false,"in":"query","description":"Field name to search by (case-insensitive partial match)","schema":{"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"productId","required":false,"in":"query","description":"Filter by productId","schema":{"type":"string"}},{"name":"isOnSale","required":false,"in":"query","description":"Filter by isOnSale","schema":{"type":"boolean"}},{"name":"notSoldInPos","required":false,"in":"query","description":"Filter by notSoldInPos","schema":{"type":"boolean"}},{"name":"notSoldOnline","required":false,"in":"query","description":"Filter by notSoldOnline","schema":{"type":"boolean"}},{"name":"unitId","required":false,"in":"query","description":"Filter by unitId","schema":{"type":"string"}},{"name":"stockVariantId","required":false,"in":"query","description":"Filter by stockVariantId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VariantResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read variants","tags":["Variants"]},"patch":{"description":"Updates multiple variants in a single request. Each item must include an id and the fields to update. Returns per-item results.","operationId":"VariantsController_updateMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRequestDto"}}}},"responses":{"200":{"description":"Bulk update completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number"},"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/VariantResponseDto"},"clientRef":{"type":"string"}}},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk update variants","tags":["Variants"]},"delete":{"description":"Deletes multiple variants in a single request. Each item must include an id. Returns per-item results.","operationId":"VariantsController_deleteMany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequestDto"}}}},"responses":{"200":{"description":"Bulk delete completed. Each item in the results array indicates success or failure.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/BulkSummaryDto"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/BulkItemSuccessResultDto"},{"$ref":"#/components/schemas/BulkItemErrorResultDto"}]}}}}}}},"400":{"description":"Bad request. The bulk request itself is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Bulk delete variants","tags":["Variants"]}},"/v1/order":{"post":{"description":"Creates a new order record.","operationId":"OrderController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreateDto"}}}},"responses":{"201":{"description":"The order has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new order","tags":["Order"]}},"/v1/order/{id}":{"get":{"description":"Retrieves a single order by its unique identifier.","operationId":"OrderController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The order has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The order was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a order by ID","tags":["Order"]},"patch":{"description":"Updates an existing order record.","operationId":"OrderController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Order ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdateDto"}}}},"responses":{"200":{"description":"The order has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a order by ID","tags":["Order"]},"delete":{"description":"Deletes a order by its unique identifier.","operationId":"OrderController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The order has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The order was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a order by ID","tags":["Order"]}},"/v1/orders":{"get":{"description":"Retrieves a list of orders. Supports filtering by fields, sorting, and pagination.","operationId":"OrdersController_findAll","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of records to skip (default: 0)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of records to return (default: 100, max: 1000)","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field name to sort results by","schema":{"enum":["createdAt","updatedAt"],"type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort direction (default: asc)","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"createdAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by createdAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"updatedAt","required":false,"in":"query","style":"deepObject","explode":true,"description":"Filter by updatedAt using range operators","schema":{"type":"object","properties":{"gte":{"type":"string","format":"date-time"},"lte":{"type":"string","format":"date-time"},"gt":{"type":"string","format":"date-time"},"lt":{"type":"string","format":"date-time"}}}},{"name":"paymentState","required":false,"in":"query","description":"Filter by paymentState","schema":{"type":"string"}},{"name":"fulfillmentState","required":false,"in":"query","description":"Filter by fulfillmentState","schema":{"type":"string"}},{"name":"source","required":false,"in":"query","description":"Filter by source","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved list of items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderResponseDto"}},"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}}}}}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource(s) were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Bulk read orders","tags":["Orders"]}},"/v1/transaction":{"post":{"description":"Creates a new transaction record.","operationId":"TransactionController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCreateDto"}}}},"responses":{"201":{"description":"The transaction has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new transaction","tags":["Transaction"]}},"/v1/transaction/{id}":{"get":{"description":"Retrieves a single transaction by its unique identifier.","operationId":"TransactionController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Transaction ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The transaction has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The transaction was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a transaction by ID","tags":["Transaction"]},"patch":{"description":"Updates an existing transaction record.","operationId":"TransactionController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Transaction ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionUpdateDto"}}}},"responses":{"200":{"description":"The transaction has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a transaction by ID","tags":["Transaction"]},"delete":{"description":"Deletes a transaction by its unique identifier.","operationId":"TransactionController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Transaction ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The transaction has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The transaction was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a transaction by ID","tags":["Transaction"]}},"/v1/refund":{"post":{"description":"Creates a new refund record.","operationId":"RefundController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundCreateDto"}}}},"responses":{"201":{"description":"The refund has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new refund","tags":["Refund"]}},"/v1/refund/{id}":{"patch":{"description":"Updates an existing refund record.","operationId":"RefundController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Refund ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundUpdateDto"}}}},"responses":{"200":{"description":"The refund has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a refund by ID","tags":["Refund"]},"delete":{"description":"Deletes a refund by its unique identifier.","operationId":"RefundController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Refund ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The refund has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The refund was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a refund by ID","tags":["Refund"]}},"/v1/webhook":{"post":{"description":"Creates a new webhook record.","operationId":"WebhookController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateDto"}}}},"responses":{"201":{"description":"The webhook has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new webhook","tags":["Webhook"]}},"/v1/webhook/{id}":{"get":{"description":"Retrieves a single webhook by its unique identifier.","operationId":"WebhookController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Webhook ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The webhook has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The webhook was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a webhook by ID","tags":["Webhook"]},"patch":{"description":"Updates an existing webhook record.","operationId":"WebhookController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Webhook ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdateDto"}}}},"responses":{"200":{"description":"The webhook has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a webhook by ID","tags":["Webhook"]},"delete":{"description":"Deletes a webhook by its unique identifier.","operationId":"WebhookController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Webhook ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The webhook has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The webhook was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a webhook by ID","tags":["Webhook"]}},"/v1/tax-table":{"post":{"description":"Inserts a new tax table for the company tied to your API key (`POST /tax-table`).","operationId":"TaxTableController_create","parameters":[],"requestBody":{"required":true,"description":"A **tax table** is a named container used by configuration and checkout; **tax rate** resources reference a table id so rates group correctly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxTableCreateDto"}}}},"responses":{"201":{"description":"The tax table has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxTableResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new tax table","tags":["Tax Table"]}},"/v1/tax-table/{id}":{"get":{"description":"Fetches one tax table by MongoDB `id` (`GET /tax-table/{id}`), scoped to your API key. **200** — tax table document. **404** if not in scope; **400** if `id` is not a valid ObjectId.","operationId":"TaxTableController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Table ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The tax table has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxTableResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The tax table was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get tax table by id","tags":["Tax Table"]},"patch":{"description":"Updates an existing tax table at `PUT /tax-table/:id`, scoped to your API key.","operationId":"TaxTableController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Table ID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Partial (or full, per schema) JSON per the generated **UpdateDto**; use when changing table name, metadata, or related fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxTableUpdateDto"}}}},"responses":{"200":{"description":"The tax table has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxTableResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a tax table by id","tags":["Tax Table"]},"delete":{"description":"Removes the tax table with the given `id` (`DELETE /tax-table/{id}`). **200** — acknowledgement. **404** if not in scope; **400** if `id` is invalid. Confirm no active tax rates should still reference this table id before deleting.","operationId":"TaxTableController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Table ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The tax table has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The tax table was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete tax table","tags":["Tax Table"]}},"/v1/tax-rate":{"post":{"description":"Creates a tax rate for the company tied to your API key (`POST /tax-rate`).","operationId":"TaxRateController_create","parameters":[],"requestBody":{"required":true,"description":"Tax rates define how tax is computed; each rate belongs to a **tax table** via `taxTableId` — create or resolve a table first (`POST /tax-table`, `GET /tax-table/{id}`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateCreateDto"}}}},"responses":{"201":{"description":"The tax rate has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new tax rate","tags":["Tax Rate"]}},"/v1/tax-rate/{id}":{"get":{"description":"Returns one tax rate by MongoDB `id` (`GET /tax-rate/{id}`), scoped to your API key. **200** — **TaxRateResponseDto**. **404** if not in scope; **400** if `id` is not a valid ObjectId.","operationId":"TaxRateController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Rate ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The tax rate has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The tax rate was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get tax rate by id","tags":["Tax Rate"]},"patch":{"description":"Updates an existing tax rate at `PUT /tax-rate/:id`.","operationId":"TaxRateController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Rate ID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Partial (or full, per schema) JSON per **TaxRateUpdateDto** (generated **UpdateDto**). If you change `taxTableId`, ensure the new table exists for the same company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateUpdateDto"}}}},"responses":{"200":{"description":"The tax rate has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a tax rate by id","tags":["Tax Rate"]},"delete":{"description":"Deletes the tax rate identified by `id` (`DELETE /tax-rate/{id}`). **200** — acknowledgement. **404** if not found; **400** if `id` is invalid. Removing a rate may affect tax calculation wherever it was referenced.","operationId":"TaxRateController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Rate ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The tax rate has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The tax rate was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete tax rate","tags":["Tax Rate"]}},"/v1/tax-rate-value":{"post":{"description":"Creates a tax rate value for the current company (`POST /tax-rate-value`).","operationId":"TaxRateValueController_create","parameters":[],"requestBody":{"required":true,"description":"Request JSON follows **TaxRateValueCreateDto** in OpenAPI components; the `201` response body follows **TaxRateValueResponseDto**.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateValueCreateDto"}}}},"responses":{"201":{"description":"The tax rate value has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateValueResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create tax rate value","tags":["Tax Rate Value"]}},"/v1/tax-rate-value/{id}":{"get":{"description":"Returns one tax rate value by MongoDB `id` (`GET /tax-rate-value/{id}`), scoped to your API key. **200** — **TaxRateValueResponseDto**. **404** if not in scope; **400** if `id` is not a valid ObjectId.","operationId":"TaxRateValueController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Rate Value ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The tax rate value has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateValueResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The tax rate value was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get tax rate value by id","tags":["Tax Rate Value"]},"patch":{"description":"Updates an existing tax rate value at `PUT /tax-rate-value/:id`.","operationId":"TaxRateValueController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Rate Value ID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Partial (or full, per schema) JSON per **TaxRateValueUpdateDto** in components; send only fields you intend to change unless the schema says otherwise.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateValueUpdateDto"}}}},"responses":{"200":{"description":"The tax rate value has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRateValueResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update tax rate value by id","tags":["Tax Rate Value"]},"delete":{"description":"Deletes the tax rate value identified by `id` for the current company (`DELETE /tax-rate-value/{id}`). **200** — acknowledgement payload; **404** if not found; **400** if `id` is invalid.","operationId":"TaxRateValueController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Tax Rate Value ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The tax rate value has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The tax rate value was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete tax rate value","tags":["Tax Rate Value"]}},"/v1/workflows/product/by-product/{productId}":{"get":{"description":"Returns a list of variants for a given product ID, scoped to the API key company.","operationId":"ProductVariantController_getVariantsByProduct","parameters":[{"name":"productId","required":true,"in":"path","description":"Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The variants were successfully retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"variants":{"type":"array","items":{"$ref":"#/components/schemas/VariantResponseDto"}}},"required":["variants"]}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The product or variants were not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"List all variants by product","tags":["Product & variant"]},"delete":{"description":"Deletes every variant for the given product ID, soft-deletes all Inventory rows tied to the product, soft-deletes every CatalogVisibility row referencing the product, then deletes the product. Scoped to the API key company.","operationId":"ProductVariantController_deleteProductAndVariants","parameters":[{"name":"productId","required":true,"in":"path","description":"Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Product and variants deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete product and all variants","tags":["Product & variant"]}},"/v1/workflows/product/{variantId}":{"get":{"description":"Returns the variant and its parent product in a single response, scoped to the API key company. Equivalent to composing GET /variant/:id and GET /product/:productId.","operationId":"ProductVariantController_getProductWorkflow","parameters":[{"name":"variantId","required":true,"in":"path","description":"Variant ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The variant and its parent product were successfully retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"variant":{"$ref":"#/components/schemas/VariantResponseDto"},"product":{"$ref":"#/components/schemas/ProductResponseDto"}},"required":["variant","product"]}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The variant, product, or linked product was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get variant with parent product","tags":["Product & variant"]}},"/v1/workflows/product/create-product-and-variants":{"post":{"description":"Creates a new product and one or more variants in a single request, together with each variant’s per-outlet inventory (written as first-class Inventory documents inside the same transaction). The product is visible at every outlet in the company by default — use the `workflows/visibility` endpoints to hide it at specific outlets. Scoped to the API key company.","operationId":"ProductVariantController_createProductAndVariants","parameters":[],"requestBody":{"required":true,"description":"Omit `productId` (and `_id`) on each variant. The new product is created first; the server assigns the real `productId` on every variant. Any `productId` in the request body is not used. Each variant may carry an `inventory[]` of `{ outletId, quantity, manageStock }` rows — written as first-class Inventory documents keyed by (product, variant, outlet) inside the same transaction; omit or leave empty for a variant with no tracked stock. The product is visible at every outlet in the company by default — use the `workflows/visibility` endpoints to hide it at specific outlets.","content":{"application/json":{"schema":{"type":"object","required":["product","variants"],"properties":{"product":{"$ref":"#/components/schemas/ProductCreateDto"},"variants":{"type":"array","minItems":1,"items":{"allOf":[{"$ref":"#/components/schemas/VariantCreateDto"},{"type":"object","properties":{"inventory":{"type":"array","description":"Per-outlet stock for this variant, written as first-class Inventory rows (one per outlet).","items":{"type":"object","required":["outletId","quantity","manageStock"],"properties":{"outletId":{"type":"string","description":"FinalPOS outlet id."},"quantity":{"type":"integer","description":"Stock at this outlet. May be negative (oversold on-hand is a real state, carried verbatim). Treated as infinite (ignored) when manageStock is false."},"manageStock":{"type":"boolean","description":"Whether this outlet tracks stock. false = treated as infinite."}}}}}}]}}}}}}},"responses":{"201":{"description":"Product and variants created.","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/ProductResponseDto"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/VariantResponseDto"}}},"required":["product","variants"]}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."}},"summary":"Create product and variants","tags":["Product & variant"]}},"/v1/workflows/product/update-product-and-variants":{"patch":{"description":"Partially updates an existing product and reconciles its variants in a single request. Only the fields present in the payload are written. A variant with an `id` is updated; a variant without an `id` is created and linked to the product; existing variants omitted from the payload are left untouched (deletion is out of scope for v1). Scoped to the API key company. The update is non-transactional: a failure mid-write can leave earlier writes applied.","operationId":"ProductVariantController_updateProductAndVariants","parameters":[],"requestBody":{"required":true,"description":"Partial update. `product.id` selects the product; every other field is applied only when present. Each variant with an `id` is updated; a variant without an `id` is created and linked to the product. Variants that exist but are omitted from `variants` are left untouched (no deletion in v1).","content":{"application/json":{"schema":{"type":"object","required":["product"],"properties":{"product":{"allOf":[{"$ref":"#/components/schemas/ProductUpdateDto"},{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Id of the product to update."}}}]},"variants":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/VariantUpdateDto"},{"type":"object","properties":{"id":{"type":"string","description":"Id of the variant to update. Omit to create a new variant linked to the product."}}}]}}}}}}},"responses":{"200":{"description":"Product and variants updated.","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/ProductResponseDto"},"variants":{"type":"array","items":{"$ref":"#/components/schemas/VariantResponseDto"}}},"required":["product","variants"]}}}},"400":{"description":"Bad request. Returns validation errors, an invalid id, or a currency that does not match the company currency.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"The product was not found for this company, or a referenced variant does not belong to this product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update product and variants","tags":["Product & variant"]}},"/v1/workflows/category/{categoryId}":{"get":{"description":"Returns the category and its direct child categories in a single response, scoped to the API key company.","operationId":"CategorySubcategoryController_getSubCategoriesByCategory","parameters":[{"name":"categoryId","required":true,"in":"path","description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the parent category and a list of subcategories for the given category, scoped to the API key company.","content":{"application/json":{"schema":{"type":"object","properties":{"parentCategory":{"$ref":"#/components/schemas/CategoryResponseDto"},"subCategories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryResponseDto"}}},"required":["parentCategory","subCategories"]}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The category was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"List subcategories by category","tags":["Category & subcategory"]}},"/v1/workflows/category/by-subCategory/{subCategoryId}/parent":{"get":{"description":"Returns the subCategory and its parentCategory in a single response, scoped to the API key company.","operationId":"CategorySubcategoryController_getSubCategoryWithCategory","parameters":[{"name":"subCategoryId","required":true,"in":"path","description":"Child category ID (subCategory)","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the subcategory and its category in a single response, scoped to the API key company.","content":{"application/json":{"schema":{"type":"object","properties":{"subCategory":{"$ref":"#/components/schemas/CategoryResponseDto"},"parentCategory":{"$ref":"#/components/schemas/CategoryResponseDto"}},"required":["subCategory","parentCategory"]}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The subcategory was not found, it has no parent, or the parent was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get subCategory with parentCategory","tags":["Category & subcategory"]}},"/v1/workflows/category/parent-with-subcategory":{"post":{"description":"Creates a new parent category, then one or more child categories with parentId set to that parent. Scoped to the API key company.","operationId":"CategorySubcategoryController_createParentCategoryWithSubcategories","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["parentCategory","subCategories"],"properties":{"parentCategory":{"$ref":"#/components/schemas/CategoryCreateDto"},"subCategories":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/CategoryCreateDto"}}}}}}},"responses":{"201":{"description":"Creates a parent category and one or more subcategories with parentId set to the new parent, scoped to the API key company.","content":{"application/json":{"schema":{"type":"object","properties":{"parentCategory":{"$ref":"#/components/schemas/CategoryResponseDto"},"subCategories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryResponseDto"}}},"required":["parentCategory","subCategories"]}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."}},"summary":"Create parent category and subcategories","tags":["Category & subcategory"]}},"/v1/workflows/tax/by-tax-rate/{taxRateId}":{"get":{"description":"Resolves the tax table from a tax rate id (embedded `taxRates.taxRate` on the table, or `taxTableId` on the rate when present). Returns that table, tax rate documents referenced on the table plus the anchor rate, and all tax rate values for those rates, scoped to the API key company.","operationId":"TaxEavController_getTaxTableWithTaxRatesAndTaxRateValues","parameters":[{"name":"taxRateId","required":true,"in":"path","description":"Tax rate ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the tax table, tax rates resolved from the table embedded `taxRates` refs, and tax rate values for those rates. Empty arrays when there are no matching rate/value rows.","content":{"application/json":{"schema":{"type":"object","properties":{"taxTable":{"$ref":"#/components/schemas/TaxTableResponseDto"},"taxRates":{"type":"array","items":{"$ref":"#/components/schemas/TaxRateResponseDto"}},"taxRateValues":{"type":"array","items":{"$ref":"#/components/schemas/TaxRateValueResponseDto"}}},"required":["taxTable","taxRates","taxRateValues"]}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The tax table was not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get tax table with rates and values (by tax rate)","tags":["Tax eav"]}},"/v1/workflows/tax/tax-table-with-rates-and-values":{"post":{"description":"Creates a tax table (use taxTable `without taxRates`; any taxRates on the table body is ignored), nested tax rates (taxTableId set server-side), updates embedded taxRates on the table from rates (optional per-rate `compounding`), then tax rate values (taxRateId set server-side). companyId comes from the API key.","operationId":"TaxEavController_createTaxTableWithRatesAndValues","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["taxTable","rates"],"properties":{"taxTable":{"$ref":"#/components/schemas/TaxTableCreateDto"},"rates":{"type":"array","minItems":1,"items":{"type":"object","required":["taxRate"],"properties":{"taxRate":{"$ref":"#/components/schemas/TaxRateCreateDto"},"compounding":{"type":"boolean","description":"When true, this rate is embedded on the tax table with compounding enabled (optional; default false)."},"values":{"type":"array","items":{"type":"object","required":["outletId","value"],"properties":{"outletId":{"type":"string"},"value":{"type":"number","description":"The tax rate value, example: 15% = 0.15"}}}}}}}}}}}},"responses":{"201":{"description":"Creates a tax table, tax rates with taxTableId set, updates embedded taxRates on the table, then tax rate values. Scoped to the API key company.","content":{"application/json":{"schema":{"type":"object","properties":{"taxTable":{"$ref":"#/components/schemas/TaxTableResponseDto"},"taxRates":{"type":"array","items":{"$ref":"#/components/schemas/TaxRateResponseDto"}},"taxRateValues":{"type":"array","items":{"$ref":"#/components/schemas/TaxRateValueResponseDto"}}},"required":["taxTable","taxRates","taxRateValues"]}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."}},"summary":"Create tax table with rates and values","tags":["Tax eav"]}},"/v1/workflows/visibility/product/{productId}/hide":{"post":{"description":"Adds the (productId, outletId) tuple to the sparse hide-list for each outlet provided. Idempotent — re-posting the same outlets returns `affected: 0`. The whole product (and all its variants) becomes hidden at those outlets.","operationId":"CatalogVisibilityWorkflowController_hideProduct","parameters":[{"name":"productId","required":true,"in":"path","description":"Product document id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Outlet ids at which the product or variant should be hidden / unhidden.","content":{"application/json":{"schema":{"type":"object","required":["outletIds"],"properties":{"outletIds":{"type":"array","minItems":1,"items":{"type":"string","example":"507f1f77bcf86cd799439011"}}}}}}},"responses":{"200":{"description":"Number of hide-list rows affected by the operation.","content":{"application/json":{"schema":{"type":"object","required":["affected"],"properties":{"affected":{"type":"number","example":3}}}}}},"400":{"description":"Validation failed (invalid id or empty outletIds).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product, variant, or outlet not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Hide product at outlets","tags":["Catalog visibility"]}},"/v1/workflows/visibility/product/{productId}/unhide":{"post":{"description":"Soft-deletes the matching product-level hide-list rows for the given outlets. The product becomes visible again at those outlets (the default state).","operationId":"CatalogVisibilityWorkflowController_unhideProduct","parameters":[{"name":"productId","required":true,"in":"path","description":"Product document id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Outlet ids at which the product or variant should be hidden / unhidden.","content":{"application/json":{"schema":{"type":"object","required":["outletIds"],"properties":{"outletIds":{"type":"array","minItems":1,"items":{"type":"string","example":"507f1f77bcf86cd799439011"}}}}}}},"responses":{"200":{"description":"Number of hide-list rows affected by the operation.","content":{"application/json":{"schema":{"type":"object","required":["affected"],"properties":{"affected":{"type":"number","example":3}}}}}},"400":{"description":"Validation failed (invalid id or empty outletIds).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product, variant, or outlet not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Unhide product at outlets","tags":["Catalog visibility"]}},"/v1/workflows/visibility/variant/{variantId}/hide":{"post":{"description":"Adds the (productId, variantId, outletId) tuple to the hide-list for each outlet. Only the specified variant is hidden — sibling variants remain visible.","operationId":"CatalogVisibilityWorkflowController_hideVariant","parameters":[{"name":"variantId","required":true,"in":"path","description":"Variant document id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Outlet ids at which the product or variant should be hidden / unhidden.","content":{"application/json":{"schema":{"type":"object","required":["outletIds"],"properties":{"outletIds":{"type":"array","minItems":1,"items":{"type":"string","example":"507f1f77bcf86cd799439011"}}}}}}},"responses":{"200":{"description":"Number of hide-list rows affected by the operation.","content":{"application/json":{"schema":{"type":"object","required":["affected"],"properties":{"affected":{"type":"number","example":3}}}}}},"400":{"description":"Validation failed (invalid id or empty outletIds).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product, variant, or outlet not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Hide variant at outlets","tags":["Catalog visibility"]}},"/v1/workflows/visibility/variant/{variantId}/unhide":{"post":{"description":"Soft-deletes the matching variant-level hide-list rows for the given outlets.","operationId":"CatalogVisibilityWorkflowController_unhideVariant","parameters":[{"name":"variantId","required":true,"in":"path","description":"Variant document id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Outlet ids at which the product or variant should be hidden / unhidden.","content":{"application/json":{"schema":{"type":"object","required":["outletIds"],"properties":{"outletIds":{"type":"array","minItems":1,"items":{"type":"string","example":"507f1f77bcf86cd799439011"}}}}}}},"responses":{"200":{"description":"Number of hide-list rows affected by the operation.","content":{"application/json":{"schema":{"type":"object","required":["affected"],"properties":{"affected":{"type":"number","example":3}}}}}},"400":{"description":"Validation failed (invalid id or empty outletIds).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product, variant, or outlet not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Unhide variant at outlets","tags":["Catalog visibility"]}},"/v1/workflows/visibility/variant/{variantId}/hide-everywhere":{"post":{"description":"Upserts a hide-list row for the variant at every outlet that belongs to the company. Idempotent.","operationId":"CatalogVisibilityWorkflowController_hideVariantEverywhere","parameters":[{"name":"variantId","required":true,"in":"path","description":"Variant document id","schema":{"type":"string"}}],"responses":{"200":{"description":"Number of hide-list rows affected by the operation.","content":{"application/json":{"schema":{"type":"object","required":["affected"],"properties":{"affected":{"type":"number","example":3}}}}}},"400":{"description":"Validation failed (invalid id or empty outletIds).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product, variant, or outlet not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Hide variant at every outlet","tags":["Catalog visibility"]}},"/v1/workflows/visibility/variant/{variantId}/unhide-everywhere":{"post":{"description":"Soft-deletes every hide-list row for this variant across all outlets.","operationId":"CatalogVisibilityWorkflowController_unhideVariantEverywhere","parameters":[{"name":"variantId","required":true,"in":"path","description":"Variant document id","schema":{"type":"string"}}],"responses":{"200":{"description":"Number of hide-list rows affected by the operation.","content":{"application/json":{"schema":{"type":"object","required":["affected"],"properties":{"affected":{"type":"number","example":3}}}}}},"400":{"description":"Validation failed (invalid id or empty outletIds).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product, variant, or outlet not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Unhide variant at every outlet","tags":["Catalog visibility"]}},"/v1/workflows/visibility/product/{productId}":{"get":{"description":"Returns every live CatalogVisibility document that references the product (product-level and variant-level hides).","operationId":"CatalogVisibilityWorkflowController_listForProduct","parameters":[{"name":"productId","required":true,"in":"path","description":"Product document id","schema":{"type":"string"}}],"responses":{"200":{"description":"Live hide-list documents for the given resource.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogVisibilityResponseDto"}}}}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product or variant not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"List hide-list rows for a product","tags":["Catalog visibility"]}},"/v1/workflows/visibility/variant/{variantId}":{"get":{"description":"Returns every live CatalogVisibility document that references the variant.","operationId":"CatalogVisibilityWorkflowController_listForVariant","parameters":[{"name":"variantId","required":true,"in":"path","description":"Variant document id","schema":{"type":"string"}}],"responses":{"200":{"description":"Live hide-list documents for the given resource.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogVisibilityResponseDto"}}}}}}},"401":{"description":"Missing or invalid API key."},"404":{"description":"Product or variant not found for this company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"List hide-list rows for a variant","tags":["Catalog visibility"]}},"/v1/session":{"post":{"description":"Creates a new session record.","operationId":"SessionController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreateDto"}}}},"responses":{"201":{"description":"The session has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new session","tags":["Session"]}},"/v1/session/{id}":{"get":{"description":"Retrieves a single session by its unique identifier.","operationId":"SessionController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Session ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The session has been successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The session was not found.\n\nThe resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Get a session by ID","tags":["Session"]},"patch":{"description":"Updates an existing session record.","operationId":"SessionController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Session ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionUpdateBodyDto"}}}},"responses":{"200":{"description":"The session has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Update a session by ID","tags":["Session"]},"delete":{"description":"Deletes a session by its unique identifier.","operationId":"SessionController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"Session ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The session has been successfully deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseDto"}}}},"400":{"description":"Bad request. Returns validation errors or other request-related errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"The session was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseDto"}}}}},"summary":"Delete a session by ID","tags":["Session"]}},"/v1/public/health":{"get":{"description":"Returns `{ status: \"ok\" }` when the service is up. Publicly accessible — no API key required. Intended for uptime monitors and load-balancer health probes.","operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":"Service is up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponseDto"}}}},"429":{"description":"Rate limit exceeded for the caller IP. Back off and retry after the `retry-after` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[],"summary":"Liveness check","tags":["Public"]}},"/v1/whoami":{"get":{"description":"Returns the company identity and key status resolved from the `x-api-key`. Intended as a login gate for internal tooling: pass a company private API key (`sk_...`) and confirm which company, currency, and key it maps to. Read-only. The key must be a company key — an organization key (`x-org-api-key`) is rejected.","operationId":"WhoamiController_whoami","parameters":[],"responses":{"200":{"description":"The company identity and key status for the authenticated API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoamiResponseDto"}}}},"401":{"description":"Missing, invalid, or expired API key, or a non-company key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"No company exists for the company id embedded in the API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"422":{"description":"The company has no currency configured, so its identity cannot be resolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"429":{"description":"Rate limit exceeded. Back off and retry after the `retry-after` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"X-Api-Key":[]}],"summary":"Resolve the calling company identity","tags":["Whoami"]}},"/v1/public/published-extensions":{"get":{"description":"Returns every extension with `status: \"public\"`, enriched with its owning organization (logo, name, and `organization_alias`). Publicly accessible — no API key required. Results are ordered by organization name, then extension name. All query params are optional; when none are supplied, every public extension is returned (unbounded).","operationId":"listPublishedExtensions","parameters":[{"name":"skip","required":false,"in":"query","description":"Number of items to skip (pagination offset).","schema":{"minimum":0,"example":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items to return. Omit for all public extensions (unbounded).","schema":{"minimum":1,"example":20,"type":"number"}},{"name":"searchByLabel","required":false,"in":"query","description":"Case-insensitive substring filter on the extension `label`.","schema":{"example":"Product Groups","type":"string"}}],"responses":{"200":{"description":"Published extensions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedExtensionListResponseDto"}}}},"429":{"description":"Rate limit exceeded for the caller IP. Back off and retry after the `retryAfter` interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[],"summary":"List published extensions","tags":["Public"]}},"/v1/public/published-extension/{extensionId}":{"get":{"description":"Returns a single extension with `status: \"public\"` by id, including its resolved surfaces and owning organization. Publicly accessible — no API key required. Responds `404` if the extension does not exist or is not public.","operationId":"getPublishedExtension","parameters":[{"name":"extensionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The published extension.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedExtensionDto"}}}},"404":{"description":"No published extension exists with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"429":{"description":"Rate limit exceeded for the caller IP. Back off and retry after the `retryAfter` interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[],"summary":"Get a published extension","tags":["Public"]}},"/v1/webhooks/{provider}":{"post":{"description":"Ingress endpoint for third-party provider webhooks (e.g. Shopify). Captures the raw request body and republishes it, unmodified, to an internal message queue for asynchronous processing. Publicly accessible — no API key required; the provider authenticates via its own signature header, which is verified downstream. Returns `200` only once the message has been accepted for delivery; a transient queue failure returns `503` so the provider retries.","operationId":"receiveWebhook","parameters":[{"name":"provider","required":true,"in":"path","description":"The webhook source. Currently `shopify`.","schema":{"example":"shopify","type":"string"}}],"responses":{"200":{"description":"Webhook accepted for processing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAckDto"}}}},"400":{"description":"Empty request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Missing provider signature header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Unknown / unsupported provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"429":{"description":"Rate limit exceeded for the caller IP. Back off and retry after the `retry-after` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"503":{"description":"Temporarily unable to accept the webhook; the provider should retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[],"summary":"Receive a provider webhook","tags":["Public"]}}},"info":{"title":"Final POS Public API","description":"Public API for Final POS","version":"2.4.0","contact":{},"license":{"name":"UNLICENSED","url":"https://www.api.finalpos.com"}},"tags":[{"name":"Company"},{"name":"Customer"},{"name":"Customers"},{"name":"Inventory"},{"name":"Inventories"},{"name":"StockChange"},{"name":"StockChanges"},{"name":"CatalogVisibility"},{"name":"CatalogVisibilities"},{"name":"Custom Tables: Structure"},{"name":"Custom Tables: Content"},{"name":"Product"},{"name":"Products"},{"name":"Outlet"},{"name":"Outlets"},{"name":"Category"},{"name":"Categories"},{"name":"Station"},{"name":"Stations"},{"name":"Variant"},{"name":"Variants"},{"name":"Order"},{"name":"Orders"},{"name":"Transaction"},{"name":"Refund"},{"name":"Webhook"},{"name":"Tax Table"},{"name":"Tax Rate"},{"name":"Tax Rate Value"},{"name":"Session"},{"name":"Public"},{"name":"Whoami"},{"name":"Product & variant"},{"name":"Category & subcategory"},{"name":"Tax eav"},{"name":"Catalog visibility"}],"servers":[],"components":{"securitySchemes":{"X-Api-Key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API Key for authentication"},"X-Org-Api-Key":{"type":"apiKey","in":"header","name":"x-org-api-key","description":"Organization API key"}},"schemas":{"AddressDto":{"type":"object","properties":{"address1":{"type":"string","description":"Street address line 1"},"city":{"type":"string","description":"City"},"postCode":{"type":"string","description":"Postal/ZIP code"},"country":{"type":"string","description":"Country"},"state":{"type":"string","description":"State/Province"},"address2":{"type":"string","description":"Street address line 2"},"phone":{"type":"string","description":"Phone number"}},"required":["address1","city","postCode","country","state"]},"CreateCompanyDto":{"type":"object","properties":{"name":{"type":"string","description":"Company name"},"address":{"description":"Company address","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"shipping":{"description":"Shipping address","allOf":[{"$ref":"#/components/schemas/AddressDto"}]}},"required":["name","address","shipping"]},"OnboardCompanyDto":{"type":"object","properties":{"planId":{"type":"string"},"outletName":{"type":"string"},"company":{"$ref":"#/components/schemas/CreateCompanyDto"},"currencyCode":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"],"example":"CAD"},"isTaxInclusive":{"type":"boolean"}},"required":["planId","company","currencyCode","isTaxInclusive"]},"ErrorResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP status code","example":400},"message":{"type":"string","description":"Error message describing what went wrong","example":"Validation failed: Field `schemaField` is required."},"error":{"type":"string","description":"Error type/name","example":"Bad Request","enum":["Bad Request","Unauthorized","Forbidden","Not Found","Conflict","Unprocessable Entity","Internal Server Error"]}},"required":["statusCode","message","error"]},"NotFoundResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP status code","example":404},"message":{"type":"string","description":"Error message describing what went wrong","example":"The resource was not found."},"error":{"type":"string","description":"Error type/name","example":"Not Found","enum":["Bad Request","Unauthorized","Forbidden","Not Found","Conflict","Unprocessable Entity","Internal Server Error"]}},"required":["statusCode","message","error"]},"MetadataDto":{"type":"object","properties":{"key":{"type":"string","description":"Key of the metadata entry.","example":"key1"},"value":{"type":"string","description":"Value of the metadata entry.","example":"value1"},"externalId":{"type":"string","description":"External ID associated with the metadata entry.","example":"ext123"}},"required":["key","value"]},"NoteDto":{"type":"object","properties":{"message":{"type":"string","description":"Message of the Note.","example":"Note message"}}},"CustomerCreateDto":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the Customer.","example":"customer@example.com"},"firstName":{"type":"string","description":"First name of the Customer.","example":"John"},"lastName":{"type":"string","description":"Last name of the Customer.","example":"Doe"},"outletId":{"type":"string","description":"Outlet ID associated with the Customer.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"externalId":{"type":"string","description":"External ID associated with the Customer when synced from external source. If present, it will set fromFinal to true.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"source":{"type":"string","description":"Source of the customer.","example":"woo-commerce"},"phone":{"type":"string","description":"Phone number of the Customer.","example":"+1234567890"},"totalSpent":{"type":"number","description":"Total amount spent by the Customer.","example":100050},"lastAction":{"type":"string","description":"Timestamp when the Customer was last actioned.","example":"2025-12-07T19:31:48.436+00:00"},"tags":{"description":"Tags associated with the Customer.","example":["vip","loyal","premium"],"type":"array","items":{"type":"string"}},"billing":{"description":"Billing address associated with the Customer.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"shipping":{"description":"Shipping address associated with the Customer.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"metadata":{"description":"Metadata associated with the Customer.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"notes":{"description":"Notes associated with the Customer.","example":[{"message":"Note 1"}],"type":"array","items":{"$ref":"#/components/schemas/NoteDto"}}}},"CustomerResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Customer.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Customer was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Customer was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Customer.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"email":{"type":"string","description":"Email address of the Customer.","example":"customer@example.com"},"firstName":{"type":"string","description":"First name of the Customer.","example":"John"},"lastName":{"type":"string","description":"Last name of the Customer.","example":"Doe"},"outletId":{"type":"string","description":"Outlet ID associated with the Customer.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"externalId":{"type":"string","description":"External ID associated with the Customer when synced from external source. If present, it will set fromFinal to true.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"source":{"type":"string","description":"Source of the customer.","example":"woo-commerce"},"phone":{"type":"string","description":"Phone number of the Customer.","example":"+1234567890"},"totalSpent":{"type":"number","description":"Total amount spent by the Customer.","example":100050},"lastAction":{"type":"string","description":"Timestamp when the Customer was last actioned.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"tags":{"description":"Tags associated with the Customer.","example":["vip","loyal","premium"],"type":"array","items":{"type":"string"}},"billing":{"description":"Billing address associated with the Customer.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"shipping":{"description":"Shipping address associated with the Customer.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"metadata":{"description":"Metadata associated with the Customer.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"notes":{"description":"Notes associated with the Customer.","example":[{"message":"Note 1"}],"type":"array","items":{"$ref":"#/components/schemas/NoteDto"}}}},"CustomerUpdateDto":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the Customer.","example":"customer@example.com"},"firstName":{"type":"string","description":"First name of the Customer.","example":"John"},"lastName":{"type":"string","description":"Last name of the Customer.","example":"Doe"},"outletId":{"type":"string","description":"Outlet ID associated with the Customer.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"externalId":{"type":"string","description":"External ID associated with the Customer when synced from external source. If present, it will set fromFinal to true.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"source":{"type":"string","description":"Source of the customer.","example":"woo-commerce"},"phone":{"type":"string","description":"Phone number of the Customer.","example":"+1234567890"},"totalSpent":{"type":"number","description":"Total amount spent by the Customer.","example":100050},"lastAction":{"type":"string","description":"Timestamp when the Customer was last actioned.","example":"2025-12-07T19:31:48.436+00:00"},"tags":{"description":"Tags associated with the Customer.","example":["vip","loyal","premium"],"type":"array","items":{"type":"string"}},"billing":{"description":"Billing address associated with the Customer.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"shipping":{"description":"Shipping address associated with the Customer.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"metadata":{"description":"Metadata associated with the Customer.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"notes":{"description":"Notes associated with the Customer.","example":[{"message":"Note 1"}],"type":"array","items":{"$ref":"#/components/schemas/NoteDto"}}}},"DeleteResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP status code","example":200},"message":{"type":"string","description":"Message describing the result of the operation","example":"Resource with Id 123 deleted successfully"}},"required":["statusCode","message"]},"BulkSummaryDto":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items in the bulk operation","example":10},"succeeded":{"type":"number","description":"Number of items that succeeded","example":8},"failed":{"type":"number","description":"Number of items that failed","example":2},"skipped":{"type":"number","description":"Number of items skipped (abort policy only)","example":0}},"required":["total","succeeded","failed"]},"BulkItemSuccessResultDto":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based index of the item in the request array","example":0},"status":{"type":"string","description":"Result status","example":"success","enum":["success"]},"data":{"type":"object","description":"The created/updated resource, or the deleted resource ID"},"id":{"type":"string","description":"The deleted resource ID (for delete operations)"},"clientRef":{"type":"string","description":"Client-provided reference key echoed back"}},"required":["index","status"]},"BulkItemErrorDetail":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP-style status code for this item","example":400},"message":{"type":"string","description":"Error message","example":"Validation failed: name is required"}},"required":["statusCode","message"]},"BulkItemErrorResultDto":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based index of the item in the request array","example":1},"status":{"type":"string","description":"Result status","example":"error","enum":["error"]},"error":{"description":"Error details for this item","allOf":[{"$ref":"#/components/schemas/BulkItemErrorDetail"}]},"clientRef":{"type":"string","description":"Client-provided reference key echoed back"}},"required":["index","status","error"]},"BulkCreateItemDto":{"type":"object","properties":{"data":{"type":"object","description":"The data payload for the item to create"},"clientRef":{"type":"string","description":"Client-provided reference key for correlating request items with response results"}},"required":["data"]},"BulkOptionsDto":{"type":"object","properties":{"onError":{"type":"string","description":"How to handle item-level failures. \"continue\" processes all items and reports per-item status. \"abort\" stops on the first failure.","enum":["continue","abort"],"default":"continue"}}},"BulkCreateRequestDto":{"type":"object","properties":{"items":{"description":"Array of items to create","type":"array","items":{"$ref":"#/components/schemas/BulkCreateItemDto"}},"options":{"description":"Bulk processing options","allOf":[{"$ref":"#/components/schemas/BulkOptionsDto"}]}},"required":["items"]},"BulkUpdateItemDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the item to update"},"data":{"type":"object","description":"The data payload with fields to update"},"clientRef":{"type":"string","description":"Client-provided reference key for correlating request items with response results"}},"required":["id","data"]},"BulkUpdateRequestDto":{"type":"object","properties":{"items":{"description":"Array of items to update","type":"array","items":{"$ref":"#/components/schemas/BulkUpdateItemDto"}},"options":{"description":"Bulk processing options","allOf":[{"$ref":"#/components/schemas/BulkOptionsDto"}]}},"required":["items"]},"BulkDeleteItemDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the item to delete"},"clientRef":{"type":"string","description":"Client-provided reference key for correlating request items with response results"}},"required":["id"]},"BulkDeleteRequestDto":{"type":"object","properties":{"items":{"description":"Array of items to delete","type":"array","items":{"$ref":"#/components/schemas/BulkDeleteItemDto"}},"options":{"description":"Bulk processing options","allOf":[{"$ref":"#/components/schemas/BulkOptionsDto"}]}},"required":["items"]},"InventoryCreateDto":{"type":"object","properties":{"productId":{"type":"string","description":"Product ID of the Stock.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"variantId":{"type":"string","description":"Variant ID of the Stock.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"outletId":{"type":"string","description":"Outlet ID of the Stock.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"manageStock":{"type":"boolean","description":"Whether the tuple manages stock. If false, quantity is treated as infinite.","example":true},"quantity":{"type":"number","description":"Quantity of the Stock.","example":10}},"required":["productId","variantId","outletId","manageStock","quantity"]},"InventoryResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Inventory.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Inventory was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Inventory was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Inventory.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"productId":{"type":"string","description":"Product ID of the Stock.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"variantId":{"type":"string","description":"Variant ID of the Stock.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"outletId":{"type":"string","description":"Outlet ID of the Stock.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"manageStock":{"type":"boolean","description":"Whether the tuple manages stock. If false, quantity is treated as infinite.","example":true},"quantity":{"type":"number","description":"Quantity of the Stock.","example":10}}},"InventoryUpdateDto":{"type":"object","properties":{"manageStock":{"type":"boolean","description":"Whether the tuple manages stock. If false, quantity is treated as infinite.","example":true},"quantity":{"type":"number","description":"Quantity of the Stock.","example":10}}},"InventoryLevelItemDto":{"type":"object","properties":{"productId":{"type":"string","description":"Product ID","example":"6650a1f77bcf86cd79943011"},"variantId":{"type":"string","description":"Variant ID","example":"6650a1f77bcf86cd79943012"},"outletId":{"type":"string","description":"Outlet ID","example":"6650a1f77bcf86cd79943013"},"quantity":{"type":"number","description":"Absolute on-hand quantity to set for this tuple. May be negative — on-hand stock legally goes negative via external oversell (e.g. Shopify available after an oversold order).","example":10},"manageStock":{"type":"boolean","description":"Whether the tuple manages finite stock (false = untracked/infinite)","example":true},"expectedQuantity":{"type":"number","description":"Compare-and-set guard: apply this item iff the tuple currently holds exactly this quantity. A missing inventory row counts as current 0 (so expectedQuantity 0 creates the row). May be negative — on-hand stock legally goes negative via external sales. When any item in the batch carries expectedQuantity or idempotencyKey, the response additionally includes per-item `results`. Requires routed inventory writes; omit for the unconditional legacy behaviour.","example":96},"idempotencyKey":{"type":"string","description":"Caller-supplied key for safe retries, stamped verbatim on the stock-change ledger row this write emits. A replayed key returns per-item status \"duplicate\" without re-applying.","example":"sarnia:baseline:b54c8f9e-4c6a-4f5a-9d2e-7a1b3c9d0e2f"}},"required":["productId","variantId","outletId","quantity","manageStock"]},"SetInventoryLevelsDto":{"type":"object","properties":{"items":{"description":"Inventory levels to set (upsert by productId + variantId + outletId)","type":"array","items":{"$ref":"#/components/schemas/InventoryLevelItemDto"}}},"required":["items"]},"SetInventoryLevelsResultDto":{"type":"object","properties":{"variantId":{"type":"string","description":"Variant ID of the tuple","example":"6650a1f77bcf86cd79943012"},"outletId":{"type":"string","description":"Outlet ID of the tuple","example":"6650a1f77bcf86cd79943013"},"status":{"type":"string","enum":["applied","stale-lost-race","duplicate","failed"],"description":"\"stale-lost-race\" means the expectedQuantity guard did not match the live tuple: nothing was written and no stock-change was emitted. It is a first-class outcome of a compare-and-set, not an error — the batch still returns HTTP 200."},"updatedQuantity":{"type":"number","description":"Post-write on-hand quantity (applied / duplicate only)","example":42},"error":{"type":"string","description":"Failure detail (failed only)","example":"outlet not found in this company"}},"required":["variantId","outletId","status"]},"SetInventoryLevelsResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","description":"HTTP status code","example":200},"message":{"type":"string","description":"Result message","example":"Inventory levels set successfully."},"matched":{"type":"number","description":"Existing tuples matched by (productId, variantId, outletId)","example":8},"upserted":{"type":"number","description":"New inventory rows inserted","example":2},"modified":{"type":"number","description":"Existing rows whose quantity/manageStock changed","example":5},"results":{"description":"Per-item outcomes. Present ONLY when the request used expectedQuantity or idempotencyKey on at least one item; requests without those fields keep the legacy aggregate-only response.","type":"array","items":{"$ref":"#/components/schemas/SetInventoryLevelsResultDto"}}},"required":["statusCode","message","matched","upserted","modified"]},"AdjustInventoryDto":{"type":"object","properties":{"variantId":{"type":"string","description":"Variant ID","example":"6650a1f77bcf86cd79943012"},"outletId":{"type":"string","description":"Outlet ID","example":"6650a1f77bcf86cd79943013"},"delta":{"type":"number","description":"Signed, non-zero stock movement. Negative decrements (booked as an EXTERNAL_SALE), positive increments (booked as an EXTERNAL_RESTOCK). Must be a non-zero integer.","example":-3},"idempotencyKey":{"type":"string","description":"Caller-supplied idempotency key. REQUIRED: this endpoint exists for sync lanes, where a retry without a key would double-apply. The same key applied twice is a safe no-op on hub-api. Keys prefixed `sarnia:` are reserved for the FinalPOS sync lane.","example":"sarnia:square:txn:abc123"}},"required":["variantId","outletId","delta","idempotencyKey"]},"AdjustInventoryResponseDto":{"type":"object","properties":{"variantId":{"type":"string","description":"Variant ID","example":"6650a1f77bcf86cd79943012"},"outletId":{"type":"string","description":"Outlet ID","example":"6650a1f77bcf86cd79943013"},"quantity":{"type":"number","description":"On-hand quantity after the adjustment","example":7}},"required":["variantId","outletId","quantity"]},"StockChangeResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the StockChange.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the StockChange was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the StockChange was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the StockChange.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"userId":{"type":"string","description":"User ID who made the stock change.","example":"507f1f77bcf86cd799439011","x-isMongoObjectId":true},"source":{"type":"string","description":"Source of the Stock Change Event.","example":"public-api"},"productId":{"type":"string","description":"Product ID affected by the stock change.","example":"507f1f77bcf86cd799439012","x-isMongoObjectId":true},"variantId":{"type":"string","description":"Variant ID affected by the stock change.","example":"507f1f77bcf86cd799439013","x-isMongoObjectId":true},"variantName":{"type":"string","description":"How `variantId` read on the day — attribute values or SKU, frozen at write. A rename or a deletion must not rewrite the ledger; the id above stays so the variant is findable historically. Absent on rows written before names were frozen — resolve those by id.","example":"Bottle"},"outletId":{"type":"string","description":"Outlet ID where the stock change occurred.","example":"507f1f77bcf86cd799439014","x-isMongoObjectId":true},"baseAction":{"type":"string","description":"Base action type for the stock change.","example":"ADD","enum":["ADD","REMOVE","RECOUNT","SKIP"]},"specificAction":{"type":"string","description":"Specific action type for the stock change.","example":"INVENTORY_RECOUNT","enum":["STOCK_RECEIVED","INVENTORY_RECOUNT","DAMAGE","THEFT","LOSS","RESTOCK_RETURN","REFUND_RESTOCK_RETURN","REFUND_DAMAGE","SALE","COMPOSED_FOR_SALE","UNIT_FAMILY_CHANGED","TRANSFER","BULK_RECOUNT","APPLIED_FROM_WOO","PO_RECEIVED","EXTERNAL_SALE","EXTERNAL_RESTOCK","CUSTOM"]},"customActionId":{"type":"string","description":"The company action used when `specificAction` is CUSTOM.","example":"507f1f77bcf86cd799439016","x-isMongoObjectId":true},"customActionName":{"type":"string","description":"How the custom action was named on the day — renaming it later does not rewrite history.","example":"Exhibition loan"},"quantity":{"type":"number","description":"How much the shelf moved, in WHOLE BASE UNITS of the family — grams, millilitres, pieces. Not in `unitId`: that names the unit the movement was keyed in, and the two differ by the unit's ratio. `unitQuantity` is the same movement as the person keyed it.","example":400000},"updatedQuantity":{"type":"number","description":"On-hand level after the change, in the SAME base units as `quantity` — again not in `unitId`. It has no keyed counterpart: a reader renders it by dividing with the ratio, so unlike `unitQuantity` this figure does restate if the unit is later re-rated.","example":359000},"unitId":{"type":"string","description":"Unit this movement was keyed in — the one the person saw on screen. Differs from what moved when a variant draws from a sibling pool: three burgers leave a kilogram pool. Absent on entries written before units existed, which are pieces.","example":"GRM"},"unitQuantity":{"type":"number","description":"The amount as keyed, in `unitId` — frozen, never recomputed. `quantity` stays in base units for arithmetic; this is what the movement meant to the person who made it. Dividing the base amount by the unit ratio at read time would rewrite history: receive 5 burgers today, double the burger's weight tomorrow, and yesterday's entry would claim 2.5.","example":-3},"viaVariantId":{"type":"string","description":"The variant the movement was keyed through when it is not `variantId` — the Glass that was sold when a Bottle pool drains. The row lands on the pool owner, whose balance moved; without this the ledger never names what was actually sold. Absent on direct movements.","example":"507f1f77bcf86cd799439015","x-isMongoObjectId":true},"viaVariantName":{"type":"string","description":"How `viaVariantId` read on the day — same freeze as `variantName`.","example":"Glass"},"compositeProductId":{"type":"string","description":"The composite this item was sold (or refunded) in — \"Sold in Combo #1\" (FT-83, D26). Absent on every other movement.","example":"507f1f77bcf86cd799439016","x-isMongoObjectId":true},"compositeName":{"type":"string","description":"How that composite read on the day — same freeze as `variantName`.","example":"Combo #1"},"idempotencyKey":{"type":"string","description":"Caller-supplied key that lets the writer safely retry a stock mutation. The unique index drops duplicates so the same logical change is not applied twice. Keys prefixed `sarnia:` are RESERVED for the FinalPOS sync lane — its outbound subscriber skips those events as its own writes, so external callers must not use that prefix or their movements will not sync to connected platforms.","example":"sarnia:shopify:b54c8f9e-4c6a-4f5a-9d2e-7a1b3c9d0e2f"}}},"CatalogVisibilityCreateDto":{"type":"object","properties":{"productId":{"type":"string","description":"Product ID hidden by this exception.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"variantId":{"type":"string","description":"Variant ID hidden by this exception. Omit to hide all variants of the product at the outlet.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"outletId":{"type":"string","description":"Outlet ID where the product/variant is hidden.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"}},"required":["productId","outletId"]},"CatalogVisibilityResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the CatalogVisibility.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the CatalogVisibility was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the CatalogVisibility was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the CatalogVisibility.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"productId":{"type":"string","description":"Product ID hidden by this exception.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"variantId":{"type":"string","description":"Variant ID hidden by this exception. Omit to hide all variants of the product at the outlet.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"outletId":{"type":"string","description":"Outlet ID where the product/variant is hidden.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true}}},"CatalogVisibilityUpdateDto":{"type":"object","properties":{}},"CreateCustomTableRowDto":{"type":"object","properties":{"tableId":{"type":"object","description":"ID of the custom table this row belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}}},"required":["tableId"]},"CustomTableRowResponseDto":{"type":"object","properties":{"_id":{"type":"object","description":"Unique identifier for the custom table row","example":{"$oid":"507f1f77bcf86cd799439011"}},"companyId":{"type":"object","description":"Company ID associated with the custom table row","example":{"$oid":"507f1f77bcf86cd799439011"}},"tableId":{"type":"object","description":"ID of the custom table this row belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"isDeleted":{"type":"boolean","description":"Status flag to indicate if the custom table row is deleted","example":false},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the custom table row was created","example":"2025-12-07T19:31:48.436+00:00"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the custom table row was last updated","example":"2025-12-07T19:35:48.436+00:00"}},"required":["_id","companyId","tableId"]},"UpdateCustomTableRowDto":{"type":"object","properties":{"tableId":{"type":"object","description":"ID of the custom table this row belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}}}},"CreateCustomTableValueDto":{"type":"object","properties":{"value":{"type":"string","description":"Value for the field","example":"field_value"},"tableId":{"type":"object","description":"ID of the custom table this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"rowId":{"type":"object","description":"ID of the custom table row this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"fieldId":{"type":"object","description":"ID of the custom table field this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}}},"required":["value","tableId","rowId","fieldId"]},"CustomTableValueResponseDto":{"type":"object","properties":{"_id":{"type":"object","description":"Unique identifier for the custom table value","example":{"$oid":"507f1f77bcf86cd799439011"}},"companyId":{"type":"object","description":"Company ID associated with the custom table value","example":{"$oid":"507f1f77bcf86cd799439011"}},"tableId":{"type":"object","description":"ID of the custom table this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"rowId":{"type":"object","description":"ID of the custom table row this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"fieldId":{"type":"object","description":"ID of the custom table field this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"value":{"type":"string","description":"Value for the field","example":"field_value"},"isDeleted":{"type":"boolean","description":"Status flag to indicate if the custom table value is deleted","example":false},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the custom table value was created","example":"2025-12-07T19:31:48.436+00:00"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the custom table value was last updated","example":"2025-12-07T19:35:48.436+00:00"}},"required":["_id","companyId","tableId","rowId","fieldId","value"]},"UpdateCustomTableValueDto":{"type":"object","properties":{"tableId":{"type":"object","description":"ID of the custom table this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"rowId":{"type":"object","description":"ID of the custom table row this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"fieldId":{"type":"object","description":"ID of the custom table field this value belongs to","example":{"$oid":"507f1f77bcf86cd799439011"}},"value":{"type":"string","description":"Value for the field","example":"field_value"}}},"CreateCustomTableDataDto":{"type":"object","properties":{}},"CustomTableDataResponseDto":{"type":"object","properties":{"rowId":{"type":"object","description":"Row ID","example":{"$oid":"507f1f77bcf86cd799439011"}}},"required":["rowId"]},"UpdateCustomTableDataDto":{"type":"object","properties":{}},"ListMetaDto":{"type":"object","properties":{"count":{"type":"number","description":"Total number of items matching the query filters","example":1450},"skip":{"type":"number","description":"Number of items skipped","example":0},"limit":{"type":"number","description":"Maximum number of items returned","example":100}},"required":["count","skip","limit"]},"AttributeEmbeddedDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the attribute.","example":"color"},"values":{"description":"Values of the attribute.","example":["red","blue"],"type":"array","items":{"type":"string"}},"value":{"type":"string","description":"Value of the attribute.","example":"red"}},"required":["name"]},"ProductCreateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the product.","example":"Sweet Tea"},"productType":{"type":"string","description":"Type of the product. (simple or variable)","example":"simple"},"source":{"type":"string","description":"Source of the product.","example":"woo-commerce"},"externalId":{"type":"string","description":"External ID of the product.","example":"1234567890"},"description":{"type":"string","description":"Description of the product.","example":"Sweet Tea is a refreshing drink made with tea and sugar."},"shortDescription":{"type":"string","description":"Short description of the product.","example":"Sweet Tea is a drink with sugar."},"sku":{"type":"string","description":"SKU of the product.","example":"1234567890"},"images":{"description":"Images of the product.","example":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"type":"array","items":{"type":"string"}},"tags":{"description":"Tags of the product.","example":["sweet","tea","refreshing"],"type":"array","items":{"type":"string"}},"status":{"type":"string","description":"Status of the product.","example":"active","enum":["active","inactive","draft"]},"notSoldInPos":{"type":"boolean","description":"Not sold on its own at the POS (till, flows). Missing = sold. Both flags set = Unlisted.","example":false},"notSoldOnline":{"type":"boolean","description":"Not sold online (web shop, public API orders). Missing = sold. Both flags set = Unlisted.","example":false},"minPrice":{"type":"number","description":"Min price of the product in the lowest currency unit.","example":100},"maxPrice":{"type":"number","description":"Max price of the product in the lowest currency unit.","example":200},"supplier":{"type":"string","description":"Supplier of the product.","example":"Supplier 1"},"taxTable":{"type":"string","description":"Tax table of the product.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"bookingRulesId":{"type":"string","description":"Booking rule set of the product (productType \"booking\" only). Reusable, referenced the way taxTable is.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"defaultVariantId":{"type":"string","description":"Default variant of the product. Must be one of its own variants.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"categories":{"description":"Categories of the product.","example":["o1p2q3r4s5t6u7v8w9x0y1z2","o1p2q3r4s5t6u7v8w9x0y1z3"],"type":"array","items":{"type":"string"}},"currency":{"type":"string","description":"Currency of the Product. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"minorUnits":{"type":"number","description":"The Minor Units of the Product to convert the amount from minor units to major units.","example":2},"metadata":{"description":"Metadata associated with the Product.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"attributes":{"description":"Attributes associated with the Product.","example":[{"name":"color","values":["red","blue"]}],"type":"array","items":{"$ref":"#/components/schemas/AttributeEmbeddedDto"}},"barcode":{"type":"string","description":"Barcode of the product.","example":"1234567890"}},"required":["name","productType","source"]},"ProductResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Product.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Product was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Product was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Product.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"name":{"type":"string","description":"Name of the product.","example":"Sweet Tea"},"productType":{"type":"string","description":"Type of the product. (simple or variable)","example":"simple"},"source":{"type":"string","description":"Source of the product.","example":"woo-commerce"},"externalId":{"type":"string","description":"External ID of the product.","example":"1234567890"},"description":{"type":"string","description":"Description of the product.","example":"Sweet Tea is a refreshing drink made with tea and sugar."},"shortDescription":{"type":"string","description":"Short description of the product.","example":"Sweet Tea is a drink with sugar."},"sku":{"type":"string","description":"SKU of the product.","example":"1234567890"},"images":{"description":"Images of the product.","example":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"type":"array","items":{"type":"string"}},"tags":{"description":"Tags of the product.","example":["sweet","tea","refreshing"],"type":"array","items":{"type":"string"}},"status":{"type":"string","description":"Status of the product.","example":"active","enum":["active","inactive","draft"]},"notSoldInPos":{"type":"boolean","description":"Not sold on its own at the POS (till, flows). Missing = sold. Both flags set = Unlisted.","example":false},"notSoldOnline":{"type":"boolean","description":"Not sold online (web shop, public API orders). Missing = sold. Both flags set = Unlisted.","example":false},"minPrice":{"type":"number","description":"Min price of the product in the lowest currency unit.","example":100},"maxPrice":{"type":"number","description":"Max price of the product in the lowest currency unit.","example":200},"supplier":{"type":"string","description":"Supplier of the product.","example":"Supplier 1"},"taxTable":{"type":"string","description":"Tax table of the product.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"bookingRulesId":{"type":"string","description":"Booking rule set of the product (productType \"booking\" only). Reusable, referenced the way taxTable is.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"defaultVariantId":{"type":"string","description":"Default variant of the product. Must be one of its own variants.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"categories":{"description":"Categories of the product.","example":["o1p2q3r4s5t6u7v8w9x0y1z2","o1p2q3r4s5t6u7v8w9x0y1z3"],"type":"array","items":{"type":"string"}},"currency":{"type":"string","description":"Currency of the Product. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"minorUnits":{"type":"number","description":"The Minor Units of the Product to convert the amount from minor units to major units.","example":2},"metadata":{"description":"Metadata associated with the Product.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"attributes":{"description":"Attributes associated with the Product.","example":[{"name":"color","values":["red","blue"]}],"type":"array","items":{"$ref":"#/components/schemas/AttributeEmbeddedDto"}},"barcode":{"type":"string","description":"Barcode of the product.","example":"1234567890"}}},"ProductUpdateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the product.","example":"Sweet Tea"},"productType":{"type":"string","description":"Type of the product. (simple or variable)","example":"simple"},"source":{"type":"string","description":"Source of the product.","example":"woo-commerce"},"externalId":{"type":"string","description":"External ID of the product.","example":"1234567890"},"description":{"type":"string","description":"Description of the product.","example":"Sweet Tea is a refreshing drink made with tea and sugar."},"shortDescription":{"type":"string","description":"Short description of the product.","example":"Sweet Tea is a drink with sugar."},"sku":{"type":"string","description":"SKU of the product.","example":"1234567890"},"images":{"description":"Images of the product.","example":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"type":"array","items":{"type":"string"}},"tags":{"description":"Tags of the product.","example":["sweet","tea","refreshing"],"type":"array","items":{"type":"string"}},"status":{"type":"string","description":"Status of the product.","example":"active","enum":["active","inactive","draft"]},"notSoldInPos":{"type":"boolean","description":"Not sold on its own at the POS (till, flows). Missing = sold. Both flags set = Unlisted.","example":false},"notSoldOnline":{"type":"boolean","description":"Not sold online (web shop, public API orders). Missing = sold. Both flags set = Unlisted.","example":false},"minPrice":{"type":"number","description":"Min price of the product in the lowest currency unit.","example":100},"maxPrice":{"type":"number","description":"Max price of the product in the lowest currency unit.","example":200},"supplier":{"type":"string","description":"Supplier of the product.","example":"Supplier 1"},"taxTable":{"type":"string","description":"Tax table of the product.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"bookingRulesId":{"type":"string","description":"Booking rule set of the product (productType \"booking\" only). Reusable, referenced the way taxTable is.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"defaultVariantId":{"type":"string","description":"Default variant of the product. Must be one of its own variants.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"categories":{"description":"Categories of the product.","example":["o1p2q3r4s5t6u7v8w9x0y1z2","o1p2q3r4s5t6u7v8w9x0y1z3"],"type":"array","items":{"type":"string"}},"metadata":{"description":"Metadata associated with the Product.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"attributes":{"description":"Attributes associated with the Product.","example":[{"name":"color","values":["red","blue"]}],"type":"array","items":{"$ref":"#/components/schemas/AttributeEmbeddedDto"}},"barcode":{"type":"string","description":"Barcode of the product.","example":"1234567890"}}},"OutletCreateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Outlet.","example":"Main Store"},"address":{"type":"string","description":"Primary address of the Outlet.","example":"26 Federal Plaza, New York, NY 10278, USA"},"city":{"type":"string","description":"City where the Outlet is located.","example":"New York"},"state":{"type":"string","description":"State or province where the Outlet is located.","example":"NY"},"country":{"type":"string","description":"Country where the Outlet is located.","example":"US"},"postCode":{"type":"string","description":"Post code or ZIP code of the Outlet.","example":"10278"},"phone":{"type":"string","description":"Phone number of the Outlet.","example":"+12323232323"},"address2":{"type":"string","description":"Secondary address line of the Outlet.","example":"Suite 100"},"timeZone":{"type":"string","description":"IANA timezone of the outlet. Falls back to Company.timeZone when absent.","example":"America/St_Johns"},"stations":{"description":"List of station IDs associated with the Outlet.","example":["o1p2q3r4s5t6u7v8w9x0y1z2"],"type":"array","items":{"type":"string"}},"stripeAccountId":{"type":"string","description":"Stripe Connect account ID associated with the Outlet.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"stripe":{"type":"object","description":"Stripe Terminal configuration for the Outlet.","example":{"locationId":"tml_XXXXXXXXXX"}},"externalId":{"type":"string","description":"External provider id for the Outlet (the source location id). Integration correlation key.","example":"L1234567890"},"source":{"type":"string","description":"Origin of the Outlet — the integration provider that created it, or \"standalone\".","example":"square"},"taxId":{"type":"string","description":"Tax ID associated with the Outlet.","example":"23"}},"required":["name","address","city","state","country","postCode"]},"OutletResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Outlet.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Outlet was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Outlet was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Outlet.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"name":{"type":"string","description":"Name of the Outlet.","example":"Main Store"},"address":{"type":"string","description":"Primary address of the Outlet.","example":"26 Federal Plaza, New York, NY 10278, USA"},"city":{"type":"string","description":"City where the Outlet is located.","example":"New York"},"state":{"type":"string","description":"State or province where the Outlet is located.","example":"NY"},"country":{"type":"string","description":"Country where the Outlet is located.","example":"US"},"postCode":{"type":"string","description":"Post code or ZIP code of the Outlet.","example":"10278"},"phone":{"type":"string","description":"Phone number of the Outlet.","example":"+12323232323"},"address2":{"type":"string","description":"Secondary address line of the Outlet.","example":"Suite 100"},"alias":{"type":"string","description":"Alias or alternate name for the Outlet used for Metorik Extension.","example":"HQ"},"timeZone":{"type":"string","description":"IANA timezone of the outlet. Falls back to Company.timeZone when absent.","example":"America/St_Johns"},"sequenceNumber":{"type":"number","description":"Sequence number for the Outlet (auto-generated).","example":45},"stations":{"description":"List of station IDs associated with the Outlet.","example":["o1p2q3r4s5t6u7v8w9x0y1z2"],"type":"array","items":{"type":"string"}},"stripeAccountId":{"type":"string","description":"Stripe Connect account ID associated with the Outlet.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"stripe":{"type":"object","description":"Stripe Terminal configuration for the Outlet.","example":{"locationId":"tml_XXXXXXXXXX"}},"externalId":{"type":"string","description":"External provider id for the Outlet (the source location id). Integration correlation key.","example":"L1234567890"},"source":{"type":"string","description":"Origin of the Outlet — the integration provider that created it, or \"standalone\".","example":"square"},"taxId":{"type":"string","description":"Tax ID associated with the Outlet.","example":"23"}}},"OutletUpdateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Outlet.","example":"Main Store"},"address":{"type":"string","description":"Primary address of the Outlet.","example":"26 Federal Plaza, New York, NY 10278, USA"},"city":{"type":"string","description":"City where the Outlet is located.","example":"New York"},"state":{"type":"string","description":"State or province where the Outlet is located.","example":"NY"},"postCode":{"type":"string","description":"Post code or ZIP code of the Outlet.","example":"10278"},"phone":{"type":"string","description":"Phone number of the Outlet.","example":"+12323232323"},"address2":{"type":"string","description":"Secondary address line of the Outlet.","example":"Suite 100"},"timeZone":{"type":"string","description":"IANA timezone of the outlet. Falls back to Company.timeZone when absent.","example":"America/St_Johns"},"stations":{"description":"List of station IDs associated with the Outlet.","example":["o1p2q3r4s5t6u7v8w9x0y1z2"],"type":"array","items":{"type":"string"}},"stripeAccountId":{"type":"string","description":"Stripe Connect account ID associated with the Outlet.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"stripe":{"type":"object","description":"Stripe Terminal configuration for the Outlet.","example":{"locationId":"tml_XXXXXXXXXX"}},"externalId":{"type":"string","description":"External provider id for the Outlet (the source location id). Integration correlation key.","example":"L1234567890"},"source":{"type":"string","description":"Origin of the Outlet — the integration provider that created it, or \"standalone\".","example":"square"},"taxId":{"type":"string","description":"Tax ID associated with the Outlet.","example":"23"}}},"CategoryCreateDto":{"type":"object","properties":{"externalId":{"type":"string","description":"External ID of the category.","example":"1234567890"},"name":{"type":"string","description":"Name of the category.","example":"Beverages"},"description":{"type":"string","description":"Description of the category.","example":"Beverages are drinks that are not alcoholic."},"image":{"type":"string","description":"Image of the category.","example":"https://example.com/image.jpg"},"parentId":{"type":"string","description":"Parent ID of the category.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"menuOrder":{"type":"number","description":"Menu order of the category.","example":1},"source":{"type":"string","description":"Source of the category.","example":"manual"}},"required":["name"]},"CategoryResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Category.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Category was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Category was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Category.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"externalId":{"type":"string","description":"External ID of the category.","example":"1234567890"},"name":{"type":"string","description":"Name of the category.","example":"Beverages"},"description":{"type":"string","description":"Description of the category.","example":"Beverages are drinks that are not alcoholic."},"image":{"type":"string","description":"Image of the category.","example":"https://example.com/image.jpg"},"parentId":{"type":"string","description":"Parent ID of the category.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"menuOrder":{"type":"number","description":"Menu order of the category.","example":1},"source":{"type":"string","description":"Source of the category.","example":"manual"}}},"CategoryUpdateDto":{"type":"object","properties":{"externalId":{"type":"string","description":"External ID of the category.","example":"1234567890"},"name":{"type":"string","description":"Name of the category.","example":"Beverages"},"description":{"type":"string","description":"Description of the category.","example":"Beverages are drinks that are not alcoholic."},"image":{"type":"string","description":"Image of the category.","example":"https://example.com/image.jpg"},"parentId":{"type":"string","description":"Parent ID of the category.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"menuOrder":{"type":"number","description":"Menu order of the category.","example":1},"source":{"type":"string","description":"Source of the category.","example":"manual"}}},"StationCreateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the station.","example":"Super Station"},"outletId":{"type":"string","description":"ID of the outlet this station belongs to.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"status":{"type":"string","description":"Status of the station.","example":"AVAILABLE","enum":["IN_USE","AVAILABLE"]},"deviceId":{"type":"string","description":"Device ID of the station.","example":"1234567890"},"deviceName":{"type":"string","description":"Name of the device.","example":"Super Device"},"stripeTerminalId":{"type":"string","description":"Stripe terminal ID of the station.","example":"tml_XXXXXXXXXX"},"serialReaderId":{"type":"string","description":"Serial reader ID of the station.","example":"1234567890"},"sequenceNumber":{"type":"number","description":"Sequence number of the station.","example":1},"isVirtual":{"type":"boolean","description":"Whether the station is virtual.","example":true},"enrolledBy":{"type":"string","description":"User who enrolled the station.","example":"user@example.com"},"flowRuntime":{"type":"object","description":"Flow build this station is running, reported by station-home after an auto-publish rollout applies or arms: the live version, and any newer version it is holding with where it is in that rollout. Observational — absent until the station first reports.","example":{"webAppId":"507f1f77bcf86cd799439011","version":"1.0.3","appliedAt":"2026-09-18T12:04:00.000Z","pendingVersion":"1.0.4","rolloutState":"scheduled"}},"terminals":{"description":"Terminal configurations for the station.","example":[{"id":"term_123","processor":"stripe"}],"type":"array","items":{"type":"object"}},"buildSrcId":{"type":"string","description":"Source build ID of the station.","example":"507f1f77bcf86cd799439011"},"flowSrcId":{"type":"string","description":"Source flow ID of the station.","example":"507f1f77bcf86cd799439011"}},"required":["name","outletId","status"]},"StationResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Station.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Station was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Station was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Station.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"name":{"type":"string","description":"Name of the station.","example":"Super Station"},"outletId":{"type":"string","description":"ID of the outlet this station belongs to.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"status":{"type":"string","description":"Status of the station.","example":"AVAILABLE","enum":["IN_USE","AVAILABLE"]},"deviceId":{"type":"string","description":"Device ID of the station.","example":"1234567890"},"deviceName":{"type":"string","description":"Name of the device.","example":"Super Device"},"stripeTerminalId":{"type":"string","description":"Stripe terminal ID of the station.","example":"tml_XXXXXXXXXX"},"serialReaderId":{"type":"string","description":"Serial reader ID of the station.","example":"1234567890"},"sequenceNumber":{"type":"number","description":"Sequence number of the station.","example":1},"isVirtual":{"type":"boolean","description":"Whether the station is virtual.","example":true},"enrolledBy":{"type":"string","description":"User who enrolled the station.","example":"user@example.com"},"flowRuntime":{"type":"object","description":"Flow build this station is running, reported by station-home after an auto-publish rollout applies or arms: the live version, and any newer version it is holding with where it is in that rollout. Observational — absent until the station first reports.","example":{"webAppId":"507f1f77bcf86cd799439011","version":"1.0.3","appliedAt":"2026-09-18T12:04:00.000Z","pendingVersion":"1.0.4","rolloutState":"scheduled"}},"terminals":{"description":"Terminal configurations for the station.","example":[{"id":"term_123","processor":"stripe"}],"type":"array","items":{"type":"object"}},"buildSrcId":{"type":"string","description":"Source build ID of the station.","example":"507f1f77bcf86cd799439011","x-isMongoObjectId":true},"flowSrcId":{"type":"string","description":"Source flow ID of the station.","example":"507f1f77bcf86cd799439011","x-isMongoObjectId":true}}},"StationUpdateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the station.","example":"Super Station"},"outletId":{"type":"string","description":"ID of the outlet this station belongs to.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"status":{"type":"string","description":"Status of the station.","example":"AVAILABLE","enum":["IN_USE","AVAILABLE"]},"deviceId":{"type":"string","description":"Device ID of the station.","example":"1234567890"},"deviceName":{"type":"string","description":"Name of the device.","example":"Super Device"},"stripeTerminalId":{"type":"string","description":"Stripe terminal ID of the station.","example":"tml_XXXXXXXXXX"},"serialReaderId":{"type":"string","description":"Serial reader ID of the station.","example":"1234567890"},"sequenceNumber":{"type":"number","description":"Sequence number of the station.","example":1},"isVirtual":{"type":"boolean","description":"Whether the station is virtual.","example":true},"enrolledBy":{"type":"string","description":"User who enrolled the station.","example":"user@example.com"},"flowRuntime":{"type":"object","description":"Flow build this station is running, reported by station-home after an auto-publish rollout applies or arms: the live version, and any newer version it is holding with where it is in that rollout. Observational — absent until the station first reports.","example":{"webAppId":"507f1f77bcf86cd799439011","version":"1.0.3","appliedAt":"2026-09-18T12:04:00.000Z","pendingVersion":"1.0.4","rolloutState":"scheduled"}},"terminals":{"description":"Terminal configurations for the station.","example":[{"id":"term_123","processor":"stripe"}],"type":"array","items":{"type":"object"}},"buildSrcId":{"type":"string","description":"Source build ID of the station.","example":"507f1f77bcf86cd799439011"},"flowSrcId":{"type":"string","description":"Source flow ID of the station.","example":"507f1f77bcf86cd799439011"}}},"VariantCreateDto":{"type":"object","properties":{"productId":{"type":"string","description":"Product ID of the variant.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"sku":{"type":"string","description":"SKU of the variant.","example":"1234567890"},"isOnSale":{"type":"boolean","description":"Whether the variant is on sale.","example":true},"barcode":{"type":"string","description":"Barcode of the variant.","example":"1234567890"},"price":{"type":"number","description":"Regular price of the variant in the lowest currency unit.","example":10000},"salePrice":{"type":"number","description":"Sale price of the variant in the lowest currency unit.","example":9000},"externalId":{"type":"string","description":"External ID of the variant.","example":"1234567890"},"allowBackorder":{"type":"boolean","description":"Whether the variant allows backorder.","example":true},"notSoldInPos":{"type":"boolean","description":"This variant is not sold at the POS, on top of its product. Missing = as the product.","example":false},"notSoldOnline":{"type":"boolean","description":"This variant is not sold online, on top of its product. Missing = as the product.","example":false},"costPrice":{"type":"number","description":"Cost price of the variant in the lowest currency unit.","example":8000},"images":{"description":"Images of the variant.","example":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"type":"array","items":{"type":"string"}},"currency":{"type":"string","description":"Currency of the Variant. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"minorUnits":{"type":"number","description":"The Minor Units of the Variant to convert the amount from minor units to major units.","example":2},"metadata":{"description":"Metadata associated with the Variant.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"attributes":{"description":"Attributes associated with the Variant.","example":[{"name":"color","value":"red"}],"type":"array","items":{"$ref":"#/components/schemas/AttributeEmbeddedDto"}},"unitId":{"type":"string","description":"Unit this variant is sold in, and the unit its price is per. Absent means sold by the piece. Seeded units carry their UN/CEFACT Rec 20 code; merchant units are rows in measurement-units and keep their generated id. A code cannot be mistaken for one, so the two never collide.","example":"KGM"},"stockVariantId":{"type":"string","description":"Sibling variant of the SAME product whose stock this one draws from. Absent means this variant holds its own stock. One hop only — the target must not itself borrow.","example":"68d4a2c7b1e35f9a4c67a101"}},"required":["productId","price"]},"VariantResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Variant.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Variant was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Variant was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Variant.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"productId":{"type":"string","description":"Product ID of the variant.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"sku":{"type":"string","description":"SKU of the variant.","example":"1234567890"},"isOnSale":{"type":"boolean","description":"Whether the variant is on sale.","example":true},"barcode":{"type":"string","description":"Barcode of the variant.","example":"1234567890"},"price":{"type":"number","description":"Regular price of the variant in the lowest currency unit.","example":10000},"salePrice":{"type":"number","description":"Sale price of the variant in the lowest currency unit.","example":9000},"externalId":{"type":"string","description":"External ID of the variant.","example":"1234567890"},"allowBackorder":{"type":"boolean","description":"Whether the variant allows backorder.","example":true},"notSoldInPos":{"type":"boolean","description":"This variant is not sold at the POS, on top of its product. Missing = as the product.","example":false},"notSoldOnline":{"type":"boolean","description":"This variant is not sold online, on top of its product. Missing = as the product.","example":false},"costPrice":{"type":"number","description":"Cost price of the variant in the lowest currency unit.","example":8000},"images":{"description":"Images of the variant.","example":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"type":"array","items":{"type":"string"}},"currency":{"type":"string","description":"Currency of the Variant. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"minorUnits":{"type":"number","description":"The Minor Units of the Variant to convert the amount from minor units to major units.","example":2},"metadata":{"description":"Metadata associated with the Variant.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"attributes":{"description":"Attributes associated with the Variant.","example":[{"name":"color","value":"red"}],"type":"array","items":{"$ref":"#/components/schemas/AttributeEmbeddedDto"}},"unitId":{"type":"string","description":"Unit this variant is sold in, and the unit its price is per. Absent means sold by the piece. Seeded units carry their UN/CEFACT Rec 20 code; merchant units are rows in measurement-units and keep their generated id. A code cannot be mistaken for one, so the two never collide.","example":"KGM"},"stockVariantId":{"type":"string","description":"Sibling variant of the SAME product whose stock this one draws from. Absent means this variant holds its own stock. One hop only — the target must not itself borrow.","example":"68d4a2c7b1e35f9a4c67a101","x-isMongoObjectId":true}}},"VariantUpdateDto":{"type":"object","properties":{"productId":{"type":"string","description":"Product ID of the variant.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"sku":{"type":"string","description":"SKU of the variant.","example":"1234567890"},"isOnSale":{"type":"boolean","description":"Whether the variant is on sale.","example":true},"barcode":{"type":"string","description":"Barcode of the variant.","example":"1234567890"},"price":{"type":"number","description":"Regular price of the variant in the lowest currency unit.","example":10000},"salePrice":{"type":"number","description":"Sale price of the variant in the lowest currency unit.","example":9000},"externalId":{"type":"string","description":"External ID of the variant.","example":"1234567890"},"allowBackorder":{"type":"boolean","description":"Whether the variant allows backorder.","example":true},"notSoldInPos":{"type":"boolean","description":"This variant is not sold at the POS, on top of its product. Missing = as the product.","example":false},"notSoldOnline":{"type":"boolean","description":"This variant is not sold online, on top of its product. Missing = as the product.","example":false},"costPrice":{"type":"number","description":"Cost price of the variant in the lowest currency unit.","example":8000},"images":{"description":"Images of the variant.","example":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"type":"array","items":{"type":"string"}},"metadata":{"description":"Metadata associated with the Variant.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"attributes":{"description":"Attributes associated with the Variant.","example":[{"name":"color","value":"red"}],"type":"array","items":{"$ref":"#/components/schemas/AttributeEmbeddedDto"}},"unitId":{"type":"string","description":"Unit this variant is sold in, and the unit its price is per. Absent means sold by the piece. Seeded units carry their UN/CEFACT Rec 20 code; merchant units are rows in measurement-units and keep their generated id. A code cannot be mistaken for one, so the two never collide.","example":"KGM"},"stockVariantId":{"type":"string","description":"Sibling variant of the SAME product whose stock this one draws from. Absent means this variant holds its own stock. One hop only — the target must not itself borrow.","example":"68d4a2c7b1e35f9a4c67a101"}}},"OrderSummaryPaymentsDto":{"type":"object","properties":{"cardTotal":{"type":"number","description":"Sum of paymentMethods[].amount for card-family payment types (Terminal, TapToPay, Moto, Cloud, Bluetooth) in minor currency units.","example":44500},"cashTotal":{"type":"number","description":"Sum of paymentMethods[].amount for cash payment type in minor currency units.","example":14875},"customTotal":{"type":"number","description":"Sum of paymentMethods[].amount for non-integrated custom payment types (excludes liability tenders) in minor currency units.","example":0},"cardProcessingFeesTotal":{"type":"number","description":"Sum of paymentMethods[].processorFee for card-family payments in minor currency units.","example":1126}}},"OrderTaxDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax.","example":"Tax 1"},"taxTableId":{"type":"string","description":"ID of the tax table.","example":"1234567890"},"taxTableName":{"type":"string","description":"Name of the tax table.","example":"Standard Tax"},"id":{"type":"string","description":"ID of the tax.","example":"1234567890"},"percentage":{"type":"number","description":"Tax rate as a FRACTION, not a whole percent: send `0.15` for 15% (`0.09` = 9%). This is the platform-wide convention — the reporting canon applies it as `round(taxableAmount × percentage)`. A value above `1` is a whole-percent figure sent by mistake and is rejected with `400` (`15` would render as \"1500%\"). Must be between `0` and `1` inclusive. Amounts are unaffected — they stay in integer minor units (`6525` = $65.25).","example":0.15},"amount":{"type":"number","description":"Amount of the tax in minor currency units (e.g., cents for USD).","example":100050},"taxableAmount":{"type":"number","description":"Taxable basis this rate was applied to in minor currency units; mode-agnostic. Required to derive per-rate Taxable Sales for tax breakdown reports under inclusive pricing.","example":100050},"compounding":{"type":"boolean","description":"Flag to indicate if the tax is compounding.","example":false},"priority":{"type":"number","description":"Priority of the tax.","example":1},"_id":{"type":"string","description":""}},"required":["name","percentage","amount"]},"OrderTipDto":{"type":"object","properties":{"percentage":{"type":"number","description":"Percentage of the tip.","example":0.15},"amount":{"type":"number","description":"Amount of the tip in minor currency units (e.g., cents for USD).","example":100050},"tipTo":{"type":"string","description":"ID of the tip to.","example":"1234567890"}}},"OrderSummaryDto":{"type":"object","properties":{"subTotal":{"type":"number","description":"Legacy subtotal field. Retained for backward compatibility but not recommended for use in new development.","example":48000},"discountTotal":{"type":"number","description":"Total discount amount of the Order in minor currency units (e.g., cents for USD).","example":100050},"shippingTotal":{"type":"number","description":"Total shipping amount of the Order in minor currency units (e.g., cents for USD).","example":100050},"total":{"type":"number","description":"Total amount of the Order in minor currency units (e.g., cents for USD).","example":100050},"totalTaxes":{"type":"number","description":"Total taxes amount of the Order in minor currency units (e.g., cents for USD).","example":100050},"isTaxInclusive":{"type":"boolean","description":"Flag to indicate if the order is tax inclusive.","example":false},"subtotalAfterFees":{"type":"number","description":"Math intermediate used in total derivation: grossSales + feesTotal (BEFORE discounts and tax). Receipts MUST NOT bind to this — receipts use grossSales for the items-only \"Subtotal\" line. Renamed from legacy `subTotal` for v16 to disambiguate from the receipt-subtotal concept.","example":100050},"nonRevenueTotal":{"type":"number","description":"Total of non-revenue items (e.g. gift card sales) in minor currency units; typically the sum of nonRevenueItems[].amount.","example":500000},"grossSales":{"type":"number","description":"Sum of (lineItems[].price × quantity) + (customSales[].price × quantity) in minor currency units. Mode-agnostic basis (reflects displayed prices: ex-tax in Excl, tax-included in Incl).","example":48000},"modifiersTotal":{"type":"number","description":"Sum of lineItems[].modifiers[].total in minor currency units — modifier value attached to product lines (FT-0010). Tracked separately from grossSales (which is price × quantity only). Custom sales carry no modifiers.","example":500},"lineDiscountTotal":{"type":"number","description":"Sum of lineItems[].discount.itemDiscount.amount in minor currency units. Custom sales contribute zero (no item-level discount on custom sales).","example":600},"cartDiscountTotal":{"type":"number","description":"Order-level cart discount amount in minor currency units (= cartDiscount?.amount). Sums to discountTotal together with lineDiscountTotal.","example":1000},"feesTotal":{"type":"number","description":"Aggregate of all sales-side fees in minor currency units (= lineFeesTotal + cartFeesTotal).","example":3500},"lineFeesTotal":{"type":"number","description":"Sum of lineItems[].fee.itemFee.amount in minor currency units. lineItems[].fee.cartFee is always zero in this codebase and is ignored.","example":2000},"cartFeesTotal":{"type":"number","description":"Sum of order-root cartFees[].amount in minor currency units. customSales[].fee.cartFee is an allocation of these and is not summed separately.","example":1500},"taxableFeesTotal":{"type":"number","description":"Sum of fee amounts that have an associated taxTableId in minor currency units. Splits feesTotal into taxable / non-taxable for report attribution.","example":2000},"nonTaxableFeesTotal":{"type":"number","description":"Sum of fee amounts that have no associated taxTableId in minor currency units.","example":1500},"taxableModifiersTotal":{"type":"number","description":"Sum of lineItems[].modifiers[].total for rows with a non-empty taxes[]. Parity with taxableFeesTotal; a row inherits the product tax table unless it names its own.","example":500},"nonTaxableModifiersTotal":{"type":"number","description":"Sum of lineItems[].modifiers[].total for rows with no taxes[]. taxable + nonTaxable = modifiersTotal.","example":0},"totalTaxableSales":{"type":"number","description":"Sum of (price × qty) for line items + custom sales that have at least one tax bucket (includes zero-rated). Mode-agnostic.","example":48000},"totalNonTaxableSales":{"type":"number","description":"Sum of (price × qty) for line items + custom sales with NO tax bucket at all (exempt). Mode-agnostic.","example":0},"tipTotal":{"type":"number","description":"Sum of paymentMethods[].tip.amount in minor currency units. Per-payment tip remains the source of truth on paymentMethods[]; this is the rolled-up aggregate. Mode-agnostic.","example":800},"cashRounding":{"type":"number","description":"Signed sum of paymentMethods[].cashRounding in minor currency units. Sales rounding typically negative; refund rounding (in RefundSummary) typically positive.","example":-2},"payments":{"description":"Settlement-side aggregates by payment family. Liability tenders (paymentType=redeem) are excluded.","example":{"cardTotal":44500,"cashTotal":14875,"customTotal":0,"cardProcessingFeesTotal":1126},"allOf":[{"$ref":"#/components/schemas/OrderSummaryPaymentsDto"}]},"totalBeforeTip":{"type":"number","description":"Customer-facing receipt TOTAL line, before tip. Excl: grossSales − discountTotal + feesTotal + totalTaxes + nonRevenueTotal. Incl: grossSales − discountTotal + feesTotal + nonRevenueTotal (taxes already embedded in grossSales). Equals `total − tipTotal`.","example":200050},"amountPaid":{"type":"number","description":"Sum of paymentMethods[].amount in minor currency units. Equals `total` when the order is fully paid. Receipt \"Amount paid\" line binds here. Includes liability tenders so the identity holds; pure settlement totals live on `payments.{cardTotal, cashTotal, customTotal}`.","example":200050},"taxes":{"description":"Taxes associated with the Order.","example":[{"name":"Tax 1","percentage":10,"amount":100050,"taxTableName":"Tax Table 1","compounding":true,"priority":1,"taxTableId":"1234567890","id":"1234567890"}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}},"tip":{"description":"Tip associated with the Order.","example":{"percentage":0.15,"amount":100050},"allOf":[{"$ref":"#/components/schemas/OrderTipDto"}]}},"required":["discountTotal","total","totalTaxes","isTaxInclusive","subtotalAfterFees","taxes"]},"OrderCartDiscountDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount of the cart discount in minor currency units (e.g., cents for USD).","example":100050},"percentage":{"type":"number","description":"Percentage of the cart discount.","example":0.15},"label":{"type":"string","description":"Label of the cart discount.","example":"Cart Discount 1"}},"required":["amount","percentage"]},"OrderCartFeeDto":{"type":"object","properties":{"label":{"type":"string","description":"Label of the cart fee.","example":"Cart Fee 1"},"id":{"type":"string","description":"ID of the cart fee.","example":"1234567890"},"percentage":{"type":"number","description":"Percentage of the cart fee.","example":0.15},"amount":{"type":"number","description":"Amount of the cart fee in minor currency units (e.g., cents for USD).","example":100050},"taxName":{"type":"string","description":"Name of the tax.","example":"Tax 1"},"taxTableId":{"type":"string","description":"ID of the tax table.","example":"1234567890"},"tax":{"type":"number","description":"Tax of the cart fee in minor currency units (e.g., cents for USD).","example":100050},"taxes":{"description":"Per-rate tax breakdown (e.g. gst, hst) so order/refund summary can show correct amounts per rate.","example":[{"id":"507f1f77bcf86cd799439011","name":"gst","percentage":0.05,"amount":50,"taxTableId":"507f1f77bcf86cd799439012","taxTableName":"Dev Tax"},{"id":"507f1f77bcf86cd799439013","name":"hst","percentage":0.2,"amount":200,"taxTableId":"507f1f77bcf86cd799439012","taxTableName":"Dev Tax"}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}}},"required":["label","id","percentage","amount"]},"OrderPaymentMethodDto":{"type":"object","properties":{"paymentType":{"type":"string","description":"Type of the payment method.","example":"credit card"},"amount":{"type":"number","description":"Amount of the payment method in minor currency units (e.g., cents for USD).","example":100050},"transactionId":{"type":"string","description":"Transaction ID of the payment method.","example":"507f1f77bcf86cd799439011"},"timestamp":{"type":"string","description":"Date and time of the payment method.","example":"2026-10-17T10:35:58.014Z"},"emv":{"type":"string","description":"EMV of the payment method.","example":"1234567890"},"cashRounding":{"type":"number","description":"Cash rounding of the payment method.","example":0.05},"change":{"type":"number","description":"Change of the payment method in minor currency units (e.g., cents for USD).","example":100050},"processor":{"type":"string","description":"Processor of the payment method.","example":"Stripe"},"provider":{"type":"string","description":"PSP that captured this payment (stripe | adyen). Absent on records written before multi-provider support — readers must treat absence as stripe. Orthogonal to `processor` (the FinalPay brand stamp, identical across PSPs).","example":"stripe","enum":["stripe","adyen","external"]},"processorFee":{"type":"number","description":"Processor fee of the payment method in minor currency units (e.g., cents for USD).","example":100050},"tendered":{"type":"number","description":"What the customer physically presented for this payment leg. Cash legs: amount + change. Non-cash legs: equal to amount. Receipt \"Cash tendered\" line binds here.","example":10000},"tip":{"description":"Tip associated with the Order.","example":{"percentage":0.15,"amount":1050,"tipTo":"1234567890"},"allOf":[{"$ref":"#/components/schemas/OrderTipDto"}]}},"required":["paymentType","amount"]},"OrderPosDataDto":{"type":"object","properties":{"outlet":{"type":"string","description":"Outlet ID of the order.","example":"1234567890"},"station":{"type":"string","description":"Station ID of the order.","example":"1234567890"},"employee":{"type":"string","description":"Employee ID of the order.","example":"1234567890"}}},"OrderNoteDto":{"type":"object","properties":{"author":{"type":"string","description":"Author of the note.","example":"John Doe"},"note":{"type":"string","description":"Note of the order.","example":"This is a note"},"externalId":{"type":"string","description":"External ID of the note.","example":"1234567890"},"addedByUser":{"type":"boolean","description":"Added by user of the note.","example":true},"dateCreated":{"type":"string","description":"Date created of the note.","example":"2025-12-07T19:31:48.436+00:00"},"customerNote":{"type":"boolean","description":"Customer note of the order.","example":true}},"required":["author","note","addedByUser","dateCreated"]},"PriceModifierDetailDto":{"type":"object","properties":{"percentage":{"type":"number","description":"Percentage as a decimal (e.g. 0.05 = 5%). Use 0.05 not 5 to avoid 500%.","example":0.1},"amount":{"type":"number","description":"Amount of the adjustment in minor currency units (e.g., cents for USD).","example":500},"label":{"type":"string","description":"Label for the adjustment.","example":"Holiday Discount"},"tax":{"type":"number","description":"Tax amount for the adjustment in minor currency units (e.g., cents for USD).","example":50},"taxTableId":{"type":"string","description":"Tax table ID for the adjustment.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"taxRateId":{"type":"string","description":"Tax rate ID for the adjustment. Identifies the specific rate within the tax table.","example":"a1b2c3d4e5f6g7h8i9j0k1l2"}},"required":["percentage","amount"]},"OrderLineItemDiscountDto":{"type":"object","properties":{"itemDiscounts":{"description":"Item-level discounts. Each entry is applied independently per-unit (fixed amounts multiply by line quantity; percentages apply to price × quantity, non-compounding).","example":[{"percentage":10,"amount":500,"label":"Item Sale"}],"type":"array","items":{"$ref":"#/components/schemas/PriceModifierDetailDto"}},"cartDiscount":{"description":"Cart-level discount.","example":{"percentage":5,"amount":250},"allOf":[{"$ref":"#/components/schemas/PriceModifierDetailDto"}]}}},"OrderLineItemFeeDto":{"type":"object","properties":{"cartFee":{"description":"Cart-level fee. Percentage as decimal (e.g. 0.03 = 3%).","example":{"percentage":0.03,"amount":150,"label":"Service Fee","tax":10,"taxTableId":"abc123"},"allOf":[{"$ref":"#/components/schemas/PriceModifierDetailDto"}]},"itemFees":{"description":"Item-level fees. Each entry is applied independently per-unit (fixed amounts multiply by line quantity; percentages apply to post-discount line base, non-compounding). Each fee can carry its own tax behavior.","example":[{"percentage":0.02,"amount":100,"label":"Handling","tax":5,"taxTableId":"def456"}],"type":"array","items":{"$ref":"#/components/schemas/PriceModifierDetailDto"}}}},"OrderLineItemModifierDto":{"type":"object","properties":{"modifierId":{"type":"string","description":"The modifier (the question, e.g. \"Toppings\") this selection answers.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"modifierName":{"type":"string","description":"Modifier name snapshot at sale time (renames never rewrite order history).","example":"Toppings"},"choiceId":{"type":"string","description":"The chosen choice (embedded choice _id inside the modifier document).","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"choiceName":{"type":"string","description":"Choice name snapshot at sale time — this is what prints on the receipt and kitchen ticket.","example":"Avocado"},"unitPrice":{"type":"number","description":"Per-unit surcharge in minor currency units (e.g. cents for USD): the price of ONE unit of this choice on ONE unit of the line item. 0 is valid and recorded — a free choice such as \"No pickles\" still prints.","example":150},"quantity":{"type":"number","description":"Units of this choice per single line-item unit. 1 for single/multiple-selection modifiers; the stepper count for quantity-type modifiers (e.g. Extra shot ×2).","example":2},"total":{"type":"number","description":"Extended amount for the WHOLE line in minor currency units: unitPrice × quantity × lineItem.quantity. Included in the line item's total (see the money invariant on this schema).","example":900},"totalTax":{"type":"number","description":"Tax computed on `total` in minor currency units — Σ taxes[].amount. Included in the line item's totalTax.","example":117},"taxes":{"description":"Per-rate breakdown of totalTax, one bucket per rate that taxed this modifier row — a row can carry several tax groups. The amounts are already inside the parent line item's taxes[] buckets; never add them on top a second time.","example":[{"name":"HST","percentage":0.15,"amount":117,"taxTableName":"HST","compounding":false,"priority":1,"taxTableId":"1234567890","id":"1234567890"}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}},"componentIndex":{"type":"number","description":"On a composite line: index into the line's `components` this modifier applies to (B28) — always set there, a composite has no modifiers of its own (B43). Absent on every other line.","example":0}},"required":["modifierId","modifierName","choiceId","choiceName","unitPrice","quantity","total"]},"OrderLineItemComponentDto":{"type":"object","properties":{"productId":{"type":"string","description":"Product picked for this component.","example":"68d4a2c7b1e35f9a4c67a101"},"variantId":{"type":"string","description":"Variant picked for this component.","example":"68d4a2c7b1e35f9a4c67a102"},"name":{"type":"string","description":"Product name on the day of sale.","example":"Fries"},"attributes":{"type":"string","description":"Variant attributes as they read on the day of sale.","example":"Size: Large"},"sku":{"type":"string","description":"SKU of the component, as on the day of sale.","example":"1234567890"},"productExternalId":{"type":"string","description":"External ID of the product.","example":"1234567890"},"variantExternalId":{"type":"string","description":"External ID of the variant.","example":"1234567890"},"partName":{"type":"string","description":"Part it was picked in (\"Side\"); absent when the part is untitled.","example":"Side"},"quantity":{"type":"number","description":"Units of this component in ONE composite.","example":1},"price":{"type":"number","description":"This component's share of ONE composite's price, minor units, covering all of its quantity (not per unit).","example":400},"unitId":{"type":"string","description":"Unit the component was sold in, frozen at sale.","example":"KGM"},"unitAbbreviation":{"type":"string","description":"Abbreviation of that unit on the day of sale.","example":"kg"},"unitRatioToBase":{"type":"number","description":"What one `unitId` was worth in base units on the day of sale.","example":1000},"stockQuantity":{"type":"number","description":"Whole base units this component takes from its pool in ONE composite (B36d) — `toBase(quantity, unit)`, written by the till at sale; stock moves it × the line quantity. Absent on a by-the-piece component.","example":250},"stockVariantId":{"type":"string","description":"Variant whose pool the component drew from; absent when its own.","example":"68d4a2c7b1e35f9a4c67a103"},"taxTableId":{"type":"string","description":"Table that taxed this component with each item's own tax (B30); absent under the composite's tax group.","example":"68d4a2c7b1e35f9a4c67a104"},"totalTax":{"type":"number","description":"Tax on this component for the WHOLE line (all of its quantity, unlike price), minor units — Σ taxes[].amount (B30). Included in the line item's totalTax.","example":52},"taxes":{"description":"Per-rate breakdown of totalTax for the WHOLE line (all of its quantity), one bucket per rate that taxed this component (B30). The amounts are already inside the parent line item's taxes[] buckets; never add them on top a second time.","example":[{"name":"HST","percentage":0.13,"amount":52,"taxTableName":"HST","compounding":false,"priority":1,"taxTableId":"1234567890","id":"1234567890"}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}}},"required":["productId","variantId","name","quantity","price"]},"OrderLineItemDto":{"type":"object","properties":{"productId":{"type":"string","description":"ID of the product.","example":"1234567890"},"variantId":{"type":"string","description":"ID of the variant.","example":"1234567890"},"name":{"type":"string","description":"Name of the line item.","example":"Sweet Tea"},"quantity":{"type":"number","description":"Quantity of the line item in this order.","example":1},"manageStock":{"type":"boolean","description":"Whether the line item manages stock.","example":true},"price":{"type":"number","description":"Price of the line item in minor currency units (e.g., cents for USD).","example":10000},"description":{"type":"string","description":"Description of the line item.","example":"Sweet Tea is a refreshing drink made with tea and sugar."},"sku":{"type":"string","description":"SKU of the line item.","example":"1234567890"},"totalTax":{"type":"number","description":"Total tax of the line item in minor currency units (e.g., cents for USD).","example":10000},"total":{"type":"number","description":"Total of the line item in minor currency units (e.g., cents for USD).","example":10000},"productExternalId":{"type":"string","description":"External ID of the product.","example":"1234567890"},"variantExternalId":{"type":"string","description":"External ID of the variant.","example":"1234567890"},"lineItemExternalId":{"type":"string","description":"External ID of the line item.","example":"1234567890"},"internalId":{"type":"string","description":"Internal ID of the line item.","example":"1234567890"},"note":{"type":"string","description":"Note of the line item.","example":"This is a note"},"image":{"type":"string","description":"Image of the line item.","example":"https://example.com/image.jpg"},"attributes":{"type":"string","description":"Attributes of the line item.","example":"red, small"},"taxes":{"description":"Taxes associated with the Order.","example":[{"name":"Tax 1","percentage":10,"amount":100050,"taxTableName":"Tax Table 1","compounding":true,"priority":1,"taxTableId":"1234567890","id":"1234567890"}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}},"discount":{"description":"Discount associated with the Line Item.","example":{"itemDiscounts":[{"percentage":10,"amount":500}],"cartDiscount":{"percentage":5,"amount":250}},"allOf":[{"$ref":"#/components/schemas/OrderLineItemDiscountDto"}]},"fee":{"description":"Fee associated with the Line Item. Percentage as decimal (e.g. 0.03 = 3%).","example":{"cartFee":{"percentage":0.03,"amount":150},"itemFees":[{"percentage":0.02,"amount":100}]},"allOf":[{"$ref":"#/components/schemas/OrderLineItemFeeDto"}]},"modifiers":{"description":"Selected product-modifier choices on this line (one entry per chosen choice). NOT fees: kept out of `fee.itemFees` so fee consumers never see modifier money. The amounts are already included in the line item total/totalTax — see OrderLineItemModifier for the money invariant.","example":[{"modifierId":"o1p2q3r4s5t6u7v8w9x0y1z2","modifierName":"Toppings","choiceId":"a1b2c3d4e5f6g7h8i9j0k1l2","choiceName":"Avocado","unitPrice":150,"quantity":1,"total":450}],"type":"array","items":{"$ref":"#/components/schemas/OrderLineItemModifierDto"}},"components":{"description":"A composite line's components (FT-83), per ONE composite; each price is the component's whole share, Σ price = the line's price. Absent on every other line.","example":[{"productId":"68d4a2c7b1e35f9a4c67a101","variantId":"68d4a2c7b1e35f9a4c67a102","name":"Fries","partName":"Side","quantity":1,"price":400}],"type":"array","items":{"$ref":"#/components/schemas/OrderLineItemComponentDto"}},"lineNetWithFees":{"type":"number","description":"Customer-facing per-line total: (price × quantity) − sum(itemDiscounts) + sum(itemFees). Excludes cart-level discount and tax.","example":5000},"metadata":{"description":"Metadata associated with the Line Item.","example":[{"key":"key1","value":"value1","externalId":"ext123"},{"key":"key2","value":"value2","externalId":"ext123"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"stock":{"type":"number","description":"Stock of the line item before this order, value is 0 when manageStock is false","example":10},"subTotal":{"type":"number","description":"Subtotal of the line item in minor currency units (e.g., cents for USD).","example":10000},"unitId":{"type":"string","description":"Unit this line was sold in, frozen at the moment of sale.","example":"KGM"},"unitAbbreviation":{"type":"string","description":"Abbreviation of that unit as it read on the day, for receipts and refunds.","example":"kg"},"stockQuantity":{"type":"number","description":"Whole base units taken from the pool for this line. 1.589 kg sold is 1589 here when the family base is the gram.","example":1589},"unitRatioToBase":{"type":"number","description":"What one `unitId` was worth in base units on the day of sale. Frozen rather than read back from the unit, which the merchant may re-rate; without it a reader can only recover the relation by dividing `quantity` into `stockQuantity`.","example":1000},"stockVariantId":{"type":"string","description":"Variant whose pool was actually decremented. Null when this line served its own stock.","example":"68d4a2c7b1e35f9a4c67a101"}}},"OrderReservationDto":{"type":"object","properties":{"productId":{"type":"string","description":"The bookable product sold by this reservation.","example":"a1b2c3d4e5f6a7b8c9d0e1f2"},"internalId":{"type":"string","description":"Client-generated id of this reservation within the order.","example":"f7c1…"},"bookingId":{"type":"string","description":"The hold this reservation was sold from.","example":"a1b2c3d4e5f6a7b8c9d0e1f2"},"name":{"type":"string","description":"Name of the service as it was sold.","example":"Haircut"},"resourceName":{"type":"string","description":"Name of the resource as it was at sale time.","example":"Marco"},"price":{"type":"number","description":"Unit price in minor units.","example":5000},"quantity":{"type":"number","description":"How many periods this row covers.","example":1},"fulfilledQuantity":{"type":"number","description":"How many of the sold periods have been performed.","example":1},"returnedQuantity":{"type":"number","description":"How many of the sold periods have been refunded.","example":0},"totalTax":{"type":"number","description":"Tax charged on this reservation, minor units.","example":750},"taxes":{"description":"Applied taxes, one entry per rate.","example":[{"id":"gst","name":"GST","percentage":5,"amount":250}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}},"discount":{"description":"Discounts on this reservation, plus its share of any cart discount.","example":{"itemDiscounts":[{"percentage":10,"amount":500}],"cartDiscount":{"percentage":5,"amount":250}},"allOf":[{"$ref":"#/components/schemas/OrderLineItemDiscountDto"}]},"fee":{"description":"Fees on this reservation, plus its share of any cart fee.","example":{"cartFee":{"percentage":0.03,"amount":150},"itemFees":[{"percentage":0.02,"amount":100}]},"allOf":[{"$ref":"#/components/schemas/OrderLineItemFeeDto"}]},"total":{"type":"number","description":"Per-line total: (price × quantity) − item discounts + item fees. Excludes cart discount and tax.","example":5000},"taxTableId":{"type":"string","description":"Tax table applied at sale time.","example":"tax_standard"},"resourceId":{"type":"string","description":"The resource whose capacity this reservation occupies.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"variantId":{"type":"string","description":"The variant sold for this reservation (\"Haircut with Marco\").","example":"o1p2q3r4s5t6u7v8w9x0y1z6"},"startAt":{"type":"string","description":"Start of the booked window (UTC).","example":"2026-09-05T13:00:00.000Z"},"endAt":{"type":"string","description":"End of the booked window (UTC).","example":"2026-09-05T15:00:00.000Z"},"bufferEndAt":{"type":"string","description":"End of the turnaround buffer (UTC). Equals endAt when the rules have none.","example":"2026-09-05T15:30:00.000Z"},"lineItemInternalId":{"type":"string","description":"internalId of the line item that paid for this window: the composite line whose component booked it (FT-83, B41). Absent on a service sold on its own.","example":"li_01"},"componentIndex":{"type":"number","description":"Which of that composite line's `components` this booking belongs to (B41). Such a booking carries no money — price and total are 0, the component's share holds them.","example":0},"override":{"type":"boolean","description":"Staff force-booked past a full slot.","example":false},"overriddenBy":{"type":"string","description":"The staff member who forced the booking.","example":"o1p2q3r4s5t6u7v8w9x0y1z9"}},"required":["productId","internalId","name","price","total","resourceId","startAt","endAt","bufferEndAt"]},"OrderCustomSaleDiscountDto":{"type":"object","properties":{"cartDiscount":{"description":"Cart discount of the custom sale.","example":{"label":"Cart Discount 1","amount":100050,"percentage":0.15},"allOf":[{"$ref":"#/components/schemas/OrderCartDiscountDto"}]}},"required":["cartDiscount"]},"OrderCustomSaleFeeDto":{"type":"object","properties":{"cartFee":{"description":"Cart fee of the custom sale.","example":{"label":"Cart Fee 1","amount":100050,"percentage":0.15,"taxName":"Tax 1","taxTableId":"1234567890"},"allOf":[{"$ref":"#/components/schemas/PriceModifierDetailDto"}]}},"required":["cartFee"]},"ChargeDto":{"type":"object","properties":{"chargeId":{"type":"string","description":"Identifier of the charge.","example":"1234567890"},"paymentType":{"type":"string","description":"Type of the payment method used for this charge.","example":"credit card"},"amount":{"type":"number","description":"Amount in minor units. On the order = amount paid via this method; in a refund entry = amount refunded from this charge.","example":100050},"transactionId":{"type":"string","description":"Transaction ID associated with the charge.","example":"507f1f77bcf86cd799439011"},"processor":{"type":"string","description":"Processor of the charge.","example":"Stripe"},"timestamp":{"type":"string","description":"Date and time of the charge.","example":"2026-10-17T10:35:58.123Z"}},"required":["chargeId","paymentType","amount"]},"OrderCustomSaleDto":{"type":"object","properties":{"customSaleId":{"type":"string","description":"ID of the custom sale.","example":"1234567890"},"applyTaxes":{"type":"boolean","description":"Flag to indicate if the custom sale is applied.","example":false},"quantity":{"type":"number","description":"Quantity of the custom sale.","example":1},"name":{"type":"string","description":"Name of the custom sale.","example":"Custom Sale 1"},"price":{"type":"number","description":"Price of the custom sale in minor currency units (e.g., cents for USD).","example":100050},"totalTax":{"type":"number","description":"Total tax of the custom sale in minor currency units (e.g., cents for USD).","example":100050},"total":{"type":"number","description":"Total of the custom sale in minor currency units (e.g., cents for USD).","example":100050},"taxes":{"description":"Taxes of the custom sale.","example":[{"name":"Tax 1","percentage":10,"amount":100050,"taxTableName":"Tax Table 1","compounding":true,"priority":1,"taxTableId":"1234567890","id":"1234567890"}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}},"discount":{"description":"Discount of the custom sale.","example":{"cartDiscount":{"label":"Cart Discount 1","amount":100050,"percentage":0.15}},"allOf":[{"$ref":"#/components/schemas/OrderCustomSaleDiscountDto"}]},"fee":{"description":"Fee of the custom sale.","example":{"cartFee":{"label":"Cart Fee 1","amount":100050,"percentage":0.15,"taxName":"Tax 1","taxTableId":"1234567890"}},"allOf":[{"$ref":"#/components/schemas/OrderCustomSaleFeeDto"}]},"charges":{"description":"Payment charges for the custom sale (one per payment method). In a refund, holds the amount refunded per charge.","type":"array","items":{"$ref":"#/components/schemas/ChargeDto"}}},"required":["customSaleId","applyTaxes","quantity","name","price","totalTax","total"]},"NonRevenueItemDto":{"type":"object","properties":{"externalId":{"type":"string","description":"Unique cart line external id (may differ from extension refId, which is stored in metadata.refId) coming from custom table.","example":"nr-line-abc123"},"amount":{"type":"number","description":"Amount in minor units (e.g. cents), same convention as cart totals; may be a number or string.","example":500},"label":{"type":"string","description":"Display label of the non-revenue item.","example":"$50 Gift Card"},"metadata":{"description":"Metadata associated with the Product.","example":[{"key":"key1","value":"value1"},{"key":"key2","value":"value2"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"applyTaxes":{"type":"boolean","description":"When true, tax is calculated for this line (requires taxTableId). Default false — e.g. gift card load is typically non-taxable.","example":false},"taxTableId":{"type":"string","description":"Tax table id when applyTaxes is true.","example":"507f1f77bcf86cd799439011"},"type":{"type":"string","description":"Type of the non-revenue item.","example":"gift-card","enum":["gift-card"]},"_id":{"type":"string","description":""}},"required":["externalId","amount"]},"OrderRefundSummaryDto":{"type":"object","properties":{"total":{"type":"number","description":"Total amount of the refund (e.g. from external systems like WooCommerce).","example":-3358}}},"OrderRefundDto":{"type":"object","properties":{"externalId":{"type":"string","description":"External ID of the refund (e.g. from WooCommerce).","example":"23696"},"reason":{"type":"string","description":"Reason for the refund.","example":"Customer request"},"summary":{"description":"Summary of the refund (e.g. total amount).","example":{"total":-3358},"allOf":[{"$ref":"#/components/schemas/OrderRefundSummaryDto"}]}}},"OrderCreateDto":{"type":"object","properties":{"receiptId":{"type":"string","description":"Receipt ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"paymentState":{"type":"string","description":"Order payment state. Closed vocabulary: unpaid, payment_pending, partially_paid, paid, partially_refunded, refunded, voided.","example":"paid"},"fulfillmentState":{"type":"string","description":"Order fulfillment state. Closed vocabulary: draft, pending, on_hold, in_progress, fulfilled, partially_fulfilled, returned, partially_returned, cancelled.","example":"fulfilled"},"completedAt":{"type":"string","description":"Timestamp the order reached its terminal paid + fulfilled state. Receipt \"datetime\" binds here. Distinct from createdAt (cart created) and updatedAt (any mutation).","example":"2026-05-08T10:15:00.000Z"},"sourceUpdatedAt":{"type":"string","description":"The external source's last-modified timestamp for this order (e.g. Woo date_modified / Shopify updated_at). Used to suppress out-of-order webhook redelivery on ingestion.","example":"2026-07-01T18:22:10.000Z"},"sourceCreatedAt":{"type":"string","description":"The external source's creation timestamp for this order (e.g. Lightspeed createTime / Woo date_created). Historical anchor; distinct from the record's own createdAt (import time).","example":"2026-07-01T18:20:00.000Z"},"customerId":{"type":"string","description":"Customer ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"source":{"type":"string","description":"Source of the Order. Closed vocabulary: in-store, public-api","example":"in-store"},"sessionId":{"type":"string","description":"Session ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"balance":{"type":"number","description":"Balance amount of the Order in minor currency units (e.g., cents for USD).","example":100050},"externalId":{"type":"string","description":"External ID associated with the Order when synced from external source. If present, it will set fromFinal to true.","example":"1234567890"},"customerNote":{"type":"string","description":"Customer note of the Order.","example":"Customer note"},"parkReduceStock":{"type":"string","description":"When the order is parked, the stock will be reduced by this amount. If 0, the stock will not be reduced.","example":"0"},"parkExpiryDate":{"type":"string","description":"Expiry date of the parked order.","example":"never"},"signature":{"type":"string","description":"Signature of the Order in Base64 format.","example":"SGVsbG8gV29ybGQ="},"summary":{"description":"Summary of the Order.","example":{"discountTotal":100050,"shippingTotal":100050,"total":100050,"totalTaxes":100050,"isTaxInclusive":false,"subtotalAfterFees":100050,"nonRevenueTotal":0,"taxes":[{"name":"Tax 1","percentage":10,"amount":100050,"taxTableName":"Tax Table 1","compounding":true,"priority":1,"taxTableId":"1234567890","id":"1234567890"}],"tip":{"percentage":0.15,"amount":100050}},"allOf":[{"$ref":"#/components/schemas/OrderSummaryDto"}]},"cartDiscount":{"description":"Cart discount of the Order.","example":{"label":"Cart Discount 1","amount":100050,"percentage":0.15},"allOf":[{"$ref":"#/components/schemas/OrderCartDiscountDto"}]},"cartFees":{"description":"Cart fees of the Order.","example":[{"id":"1234567890","label":"Cart Fee 1","amount":100050,"percentage":0.15,"taxName":"Tax 1","taxTableId":"1234567890","tax":110}],"type":"array","items":{"$ref":"#/components/schemas/OrderCartFeeDto"}},"paymentMethods":{"description":"Payment methods of the Order.","example":[{"paymentType":"card","amount":100050,"transactionId":"1234567890","timestamp":"2025-12-07T19:31:48.436+00:00","emv":"1234567890","cashRounding":0.05,"change":100050,"processor":"Cloud","processorFee":100050,"tip":{"percentage":0.15,"amount":1050,"tipTo":"1234567890"}}],"type":"array","items":{"$ref":"#/components/schemas/OrderPaymentMethodDto"}},"posData":{"description":"POS data of the order.","example":{"outlet":"1234567890","station":"1234567890","employee":"1234567890"},"allOf":[{"$ref":"#/components/schemas/OrderPosDataDto"}]},"metadata":{"description":"Metadata associated with the Customer.","example":[{"key":"key1","value":"value1","externalId":"ext123"},{"key":"key2","value":"value2","externalId":"ext123"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"notes":{"description":"Notes associated with the Order.","example":[{"author":"John Doe","note":"This is a note","addedByUser":true,"dateCreated":"2025-12-07T19:31:48.436+00:00","externalId":"ext123","customerNote":true}],"type":"array","items":{"$ref":"#/components/schemas/OrderNoteDto"}},"billing":{"description":"Billing address associated with the Order.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"shipping":{"description":"Shipping address associated with the Order.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"lineItems":{"description":"Line items associated with the Order.","example":[{"productId":"507f1f77bcf86cd799439011","variantId":"507f1f77bcf86cd799439012","name":"Sweet Tea","quantity":1,"manageStock":true,"price":10000,"description":"Refreshing sweet tea","sku":"SKU-001","totalTax":1000,"total":11000,"subTotal":10000,"stock":10,"productExternalId":"ext-prod-001","variantExternalId":"ext-var-001","lineItemExternalId":"ext-li-001","internalId":"int-001","note":"No ice please","image":"https://example.com/sweet-tea.jpg","attributes":"Large, Unsweetened","taxes":[{"name":"Sales Tax","percentage":10,"amount":1000,"taxTableName":"Default Tax","compounding":false,"priority":1,"taxTableId":"507f1f77bcf86cd799439013","id":"507f1f77bcf86cd799439014"}],"discount":{"itemDiscount":{"percentage":10,"amount":500},"cartDiscount":{"percentage":5,"amount":250}},"fee":{"cartFee":{"percentage":0.03,"amount":150},"itemFee":{"percentage":0.02,"amount":100}},"metadata":[{"key":"color","value":"green","externalId":"ext123"}]}],"type":"array","items":{"$ref":"#/components/schemas/OrderLineItemDto"}},"reservations":{"description":"Booking reservations of this order — a booking sale in full: the time it takes and what was charged for it. Its status lives on the booking hold; cancelling never deletes the order.","example":[{"productId":"a1b2c3d4e5f6a7b8c9d0e1f2","internalId":"res_01","name":"Haircut","price":5000,"total":5000,"resourceId":"507f1f77bcf86cd799439011","startAt":"2026-09-05T13:00:00.000Z","endAt":"2026-09-05T15:00:00.000Z","bufferEndAt":"2026-09-05T15:30:00.000Z","override":false}],"type":"array","items":{"$ref":"#/components/schemas/OrderReservationDto"}},"customSales":{"description":"Custom sales associated with the Order.","example":[{"customSaleId":"507f1f77bcf86cd799439011","name":"Custom Sale 1","applyTaxes":true,"quantity":1,"price":100050,"totalTax":10005,"total":110055,"discount":{"cartDiscount":{"percentage":5,"amount":5000}}}],"type":"array","items":{"$ref":"#/components/schemas/OrderCustomSaleDto"}},"nonRevenueItems":{"description":"Non-revenue items collected with the order (e.g., gift card sales are liabilities, not revenue).","example":[{"type":"gift-card","amount":500,"label":"$50 Gift Card","externalId":"custom-extension-sale-1"}],"type":"array","items":{"$ref":"#/components/schemas/NonRevenueItemDto"}},"refund":{"description":"List of refunds associated with the external order (e.g. from WooCommerce).","type":"array","items":{"$ref":"#/components/schemas/OrderRefundDto"}}},"required":["receiptId","balance","summary","paymentMethods"]},"OrderStateHistoryEntryDto":{"type":"object","properties":{"payment":{"type":"string","description":"Payment state at this point in history.","example":"unpaid"},"fulfillment":{"type":"string","description":"Fulfillment state at this point in history.","example":"draft"},"posTimestamp":{"type":"string","description":"POS-reported timestamp for this state snapshot."}},"required":["payment","fulfillment","posTimestamp"]},"OrderResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Order was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Order was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"currency":{"type":"string","description":"Currency of the Order. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"receiptId":{"type":"string","description":"Receipt ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"paymentState":{"type":"string","description":"Order payment state. Closed vocabulary: unpaid, payment_pending, partially_paid, paid, partially_refunded, refunded, voided.","example":"paid"},"fulfillmentState":{"type":"string","description":"Order fulfillment state. Closed vocabulary: draft, pending, on_hold, in_progress, fulfilled, partially_fulfilled, returned, partially_returned, cancelled.","example":"fulfilled"},"stateHistory":{"description":"Chronological snapshots of payment and fulfillment states with POS-reported timestamps.","example":[{"payment":"unpaid","fulfillment":"draft","posTimestamp":"2025-12-07T19:31:48.436Z"}],"type":"array","items":{"$ref":"#/components/schemas/OrderStateHistoryEntryDto"}},"completedAt":{"type":"string","description":"Timestamp the order reached its terminal paid + fulfilled state. Receipt \"datetime\" binds here. Distinct from createdAt (cart created) and updatedAt (any mutation).","example":"2026-05-08T10:15:00.000Z","format":"date-time"},"sourceUpdatedAt":{"type":"string","description":"The external source's last-modified timestamp for this order (e.g. Woo date_modified / Shopify updated_at). Used to suppress out-of-order webhook redelivery on ingestion.","example":"2026-07-01T18:22:10.000Z","format":"date-time"},"sourceCreatedAt":{"type":"string","description":"The external source's creation timestamp for this order (e.g. Lightspeed createTime / Woo date_created). Historical anchor; distinct from the record's own createdAt (import time).","example":"2026-07-01T18:20:00.000Z","format":"date-time"},"customerId":{"type":"string","description":"Customer ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"source":{"type":"string","description":"Source of the Order. Closed vocabulary: in-store, public-api","example":"in-store"},"sessionId":{"type":"string","description":"Session ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"balance":{"type":"number","description":"Balance amount of the Order in minor currency units (e.g., cents for USD).","example":100050},"externalId":{"type":"string","description":"External ID associated with the Order when synced from external source. If present, it will set fromFinal to true.","example":"1234567890"},"customerNote":{"type":"string","description":"Customer note of the Order.","example":"Customer note"},"parkReduceStock":{"type":"string","description":"When the order is parked, the stock will be reduced by this amount. If 0, the stock will not be reduced.","example":"0"},"parkExpiryDate":{"type":"string","description":"Expiry date of the parked order.","example":"never"},"signature":{"type":"string","description":"Signature of the Order in Base64 format.","example":"SGVsbG8gV29ybGQ="},"summary":{"description":"Summary of the Order.","example":{"discountTotal":100050,"shippingTotal":100050,"total":100050,"totalTaxes":100050,"isTaxInclusive":false,"subtotalAfterFees":100050,"nonRevenueTotal":0,"taxes":[{"name":"Tax 1","percentage":10,"amount":100050,"taxTableName":"Tax Table 1","compounding":true,"priority":1,"taxTableId":"1234567890","id":"1234567890"}],"tip":{"percentage":0.15,"amount":100050}},"allOf":[{"$ref":"#/components/schemas/OrderSummaryDto"}]},"cartDiscount":{"description":"Cart discount of the Order.","example":{"label":"Cart Discount 1","amount":100050,"percentage":0.15},"allOf":[{"$ref":"#/components/schemas/OrderCartDiscountDto"}]},"cartFees":{"description":"Cart fees of the Order.","example":[{"id":"1234567890","label":"Cart Fee 1","amount":100050,"percentage":0.15,"taxName":"Tax 1","taxTableId":"1234567890","tax":110}],"type":"array","items":{"$ref":"#/components/schemas/OrderCartFeeDto"}},"paymentMethods":{"description":"Payment methods of the Order.","example":[{"paymentType":"card","amount":100050,"transactionId":"1234567890","timestamp":"2025-12-07T19:31:48.436+00:00","emv":"1234567890","cashRounding":0.05,"change":100050,"processor":"Cloud","processorFee":100050,"tip":{"percentage":0.15,"amount":1050,"tipTo":"1234567890"}}],"type":"array","items":{"$ref":"#/components/schemas/OrderPaymentMethodDto"}},"posData":{"description":"POS data of the order.","example":{"outlet":"1234567890","station":"1234567890","employee":"1234567890"},"allOf":[{"$ref":"#/components/schemas/OrderPosDataDto"}]},"metadata":{"description":"Metadata associated with the Customer.","example":[{"key":"key1","value":"value1","externalId":"ext123"},{"key":"key2","value":"value2","externalId":"ext123"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"notes":{"description":"Notes associated with the Order.","example":[{"author":"John Doe","note":"This is a note","addedByUser":true,"dateCreated":"2025-12-07T19:31:48.436+00:00","externalId":"ext123","customerNote":true}],"type":"array","items":{"$ref":"#/components/schemas/OrderNoteDto"}},"billing":{"description":"Billing address associated with the Order.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"shipping":{"description":"Shipping address associated with the Order.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"lineItems":{"description":"Line items associated with the Order.","example":[{"productId":"507f1f77bcf86cd799439011","variantId":"507f1f77bcf86cd799439012","name":"Sweet Tea","quantity":1,"manageStock":true,"price":10000,"description":"Refreshing sweet tea","sku":"SKU-001","totalTax":1000,"total":11000,"subTotal":10000,"stock":10,"productExternalId":"ext-prod-001","variantExternalId":"ext-var-001","lineItemExternalId":"ext-li-001","internalId":"int-001","note":"No ice please","image":"https://example.com/sweet-tea.jpg","attributes":"Large, Unsweetened","taxes":[{"name":"Sales Tax","percentage":10,"amount":1000,"taxTableName":"Default Tax","compounding":false,"priority":1,"taxTableId":"507f1f77bcf86cd799439013","id":"507f1f77bcf86cd799439014"}],"discount":{"itemDiscount":{"percentage":10,"amount":500},"cartDiscount":{"percentage":5,"amount":250}},"fee":{"cartFee":{"percentage":0.03,"amount":150},"itemFee":{"percentage":0.02,"amount":100}},"metadata":[{"key":"color","value":"green","externalId":"ext123"}]}],"type":"array","items":{"$ref":"#/components/schemas/OrderLineItemDto"}},"reservations":{"description":"Booking reservations of this order — a booking sale in full: the time it takes and what was charged for it. Its status lives on the booking hold; cancelling never deletes the order.","example":[{"productId":"a1b2c3d4e5f6a7b8c9d0e1f2","internalId":"res_01","name":"Haircut","price":5000,"total":5000,"resourceId":"507f1f77bcf86cd799439011","startAt":"2026-09-05T13:00:00.000Z","endAt":"2026-09-05T15:00:00.000Z","bufferEndAt":"2026-09-05T15:30:00.000Z","override":false}],"type":"array","items":{"$ref":"#/components/schemas/OrderReservationDto"}},"customSales":{"description":"Custom sales associated with the Order.","example":[{"customSaleId":"507f1f77bcf86cd799439011","name":"Custom Sale 1","applyTaxes":true,"quantity":1,"price":100050,"totalTax":10005,"total":110055,"discount":{"cartDiscount":{"percentage":5,"amount":5000}}}],"type":"array","items":{"$ref":"#/components/schemas/OrderCustomSaleDto"}},"nonRevenueItems":{"description":"Non-revenue items collected with the order (e.g., gift card sales are liabilities, not revenue).","example":[{"type":"gift-card","amount":500,"label":"$50 Gift Card","externalId":"custom-extension-sale-1"}],"type":"array","items":{"$ref":"#/components/schemas/NonRevenueItemDto"}},"refund":{"description":"List of refunds associated with the external order (e.g. from WooCommerce).","type":"array","items":{"$ref":"#/components/schemas/OrderRefundDto"}},"minorUnits":{"type":"number","description":"The Minor Units of the Order to convert the amount from minor units to major units.","example":0}}},"OrderUpdateDto":{"type":"object","properties":{"receiptId":{"type":"string","description":"Receipt ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"paymentState":{"type":"string","description":"Order payment state. Closed vocabulary: unpaid, payment_pending, partially_paid, paid, partially_refunded, refunded, voided.","example":"paid"},"fulfillmentState":{"type":"string","description":"Order fulfillment state. Closed vocabulary: draft, pending, on_hold, in_progress, fulfilled, partially_fulfilled, returned, partially_returned, cancelled.","example":"fulfilled"},"completedAt":{"type":"string","description":"Timestamp the order reached its terminal paid + fulfilled state. Receipt \"datetime\" binds here. Distinct from createdAt (cart created) and updatedAt (any mutation).","example":"2026-05-08T10:15:00.000Z"},"sourceUpdatedAt":{"type":"string","description":"The external source's last-modified timestamp for this order (e.g. Woo date_modified / Shopify updated_at). Used to suppress out-of-order webhook redelivery on ingestion.","example":"2026-07-01T18:22:10.000Z"},"sourceCreatedAt":{"type":"string","description":"The external source's creation timestamp for this order (e.g. Lightspeed createTime / Woo date_created). Historical anchor; distinct from the record's own createdAt (import time).","example":"2026-07-01T18:20:00.000Z"},"customerId":{"type":"string","description":"Customer ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"source":{"type":"string","description":"Source of the Order. Closed vocabulary: in-store, public-api","example":"in-store"},"sessionId":{"type":"string","description":"Session ID of the Order.","example":"o1p2q3r4s5t6u7v8w9x0y1z2"},"balance":{"type":"number","description":"Balance amount of the Order in minor currency units (e.g., cents for USD).","example":100050},"externalId":{"type":"string","description":"External ID associated with the Order when synced from external source. If present, it will set fromFinal to true.","example":"1234567890"},"customerNote":{"type":"string","description":"Customer note of the Order.","example":"Customer note"},"parkReduceStock":{"type":"string","description":"When the order is parked, the stock will be reduced by this amount. If 0, the stock will not be reduced.","example":"0"},"parkExpiryDate":{"type":"string","description":"Expiry date of the parked order.","example":"never"},"signature":{"type":"string","description":"Signature of the Order in Base64 format.","example":"SGVsbG8gV29ybGQ="},"summary":{"description":"Summary of the Order.","example":{"discountTotal":100050,"shippingTotal":100050,"total":100050,"totalTaxes":100050,"isTaxInclusive":false,"subtotalAfterFees":100050,"nonRevenueTotal":0,"taxes":[{"name":"Tax 1","percentage":10,"amount":100050,"taxTableName":"Tax Table 1","compounding":true,"priority":1,"taxTableId":"1234567890","id":"1234567890"}],"tip":{"percentage":0.15,"amount":100050}},"allOf":[{"$ref":"#/components/schemas/OrderSummaryDto"}]},"cartDiscount":{"description":"Cart discount of the Order.","example":{"label":"Cart Discount 1","amount":100050,"percentage":0.15},"allOf":[{"$ref":"#/components/schemas/OrderCartDiscountDto"}]},"cartFees":{"description":"Cart fees of the Order.","example":[{"id":"1234567890","label":"Cart Fee 1","amount":100050,"percentage":0.15,"taxName":"Tax 1","taxTableId":"1234567890","tax":110}],"type":"array","items":{"$ref":"#/components/schemas/OrderCartFeeDto"}},"paymentMethods":{"description":"Payment methods of the Order.","example":[{"paymentType":"card","amount":100050,"transactionId":"1234567890","timestamp":"2025-12-07T19:31:48.436+00:00","emv":"1234567890","cashRounding":0.05,"change":100050,"processor":"Cloud","processorFee":100050,"tip":{"percentage":0.15,"amount":1050,"tipTo":"1234567890"}}],"type":"array","items":{"$ref":"#/components/schemas/OrderPaymentMethodDto"}},"posData":{"description":"POS data of the order.","example":{"outlet":"1234567890","station":"1234567890","employee":"1234567890"},"allOf":[{"$ref":"#/components/schemas/OrderPosDataDto"}]},"metadata":{"description":"Metadata associated with the Customer.","example":[{"key":"key1","value":"value1","externalId":"ext123"},{"key":"key2","value":"value2","externalId":"ext123"}],"type":"array","items":{"$ref":"#/components/schemas/MetadataDto"}},"notes":{"description":"Notes associated with the Order.","example":[{"author":"John Doe","note":"This is a note","addedByUser":true,"dateCreated":"2025-12-07T19:31:48.436+00:00","externalId":"ext123","customerNote":true}],"type":"array","items":{"$ref":"#/components/schemas/OrderNoteDto"}},"billing":{"description":"Billing address associated with the Order.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"shipping":{"description":"Shipping address associated with the Order.","example":{"firstName":"John","lastName":"Doe","address1":"123 Main St","address2":"Suite 100","city":"New York","state":"NY","country":"USA","postCode":"10001"},"allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"lineItems":{"description":"Line items associated with the Order.","example":[{"productId":"507f1f77bcf86cd799439011","variantId":"507f1f77bcf86cd799439012","name":"Sweet Tea","quantity":1,"manageStock":true,"price":10000,"description":"Refreshing sweet tea","sku":"SKU-001","totalTax":1000,"total":11000,"subTotal":10000,"stock":10,"productExternalId":"ext-prod-001","variantExternalId":"ext-var-001","lineItemExternalId":"ext-li-001","internalId":"int-001","note":"No ice please","image":"https://example.com/sweet-tea.jpg","attributes":"Large, Unsweetened","taxes":[{"name":"Sales Tax","percentage":10,"amount":1000,"taxTableName":"Default Tax","compounding":false,"priority":1,"taxTableId":"507f1f77bcf86cd799439013","id":"507f1f77bcf86cd799439014"}],"discount":{"itemDiscount":{"percentage":10,"amount":500},"cartDiscount":{"percentage":5,"amount":250}},"fee":{"cartFee":{"percentage":0.03,"amount":150},"itemFee":{"percentage":0.02,"amount":100}},"metadata":[{"key":"color","value":"green","externalId":"ext123"}]}],"type":"array","items":{"$ref":"#/components/schemas/OrderLineItemDto"}},"reservations":{"description":"Booking reservations of this order — a booking sale in full: the time it takes and what was charged for it. Its status lives on the booking hold; cancelling never deletes the order.","example":[{"productId":"a1b2c3d4e5f6a7b8c9d0e1f2","internalId":"res_01","name":"Haircut","price":5000,"total":5000,"resourceId":"507f1f77bcf86cd799439011","startAt":"2026-09-05T13:00:00.000Z","endAt":"2026-09-05T15:00:00.000Z","bufferEndAt":"2026-09-05T15:30:00.000Z","override":false}],"type":"array","items":{"$ref":"#/components/schemas/OrderReservationDto"}},"customSales":{"description":"Custom sales associated with the Order.","example":[{"customSaleId":"507f1f77bcf86cd799439011","name":"Custom Sale 1","applyTaxes":true,"quantity":1,"price":100050,"totalTax":10005,"total":110055,"discount":{"cartDiscount":{"percentage":5,"amount":5000}}}],"type":"array","items":{"$ref":"#/components/schemas/OrderCustomSaleDto"}},"nonRevenueItems":{"description":"Non-revenue items collected with the order (e.g., gift card sales are liabilities, not revenue).","example":[{"type":"gift-card","amount":500,"label":"$50 Gift Card","externalId":"custom-extension-sale-1"}],"type":"array","items":{"$ref":"#/components/schemas/NonRevenueItemDto"}},"refund":{"description":"List of refunds associated with the external order (e.g. from WooCommerce).","type":"array","items":{"$ref":"#/components/schemas/OrderRefundDto"}}}},"TransactionPaymentDataDto":{"type":"object","properties":{"processor":{"type":"string","description":"Payment processor name.","example":"stripe"},"processorTransactionId":{"type":"string","description":"Transaction ID from the processor.","example":"pi_123456789"},"device":{"type":"string","description":"Device used for the transaction.","example":"terminal_001"},"processorData":{"type":"string","description":"Additional processor data.","example":"{}"},"processorFee":{"type":"number","description":"Fee charged by the processor.","example":30},"paymentMethodType":{"type":"string","description":"Stripe payment_method.type. E.g. card_present (terminal), interac_present (Canada), card (MOTO). Used for refund routing.","example":"card_present"},"chargeId":{"type":"string","description":"Charge ID from the processor.","example":"ch_123456789"},"provider":{"type":"string","description":"PSP that captured this payment (stripe | adyen). Absent on records written before multi-provider support — readers must treat absence as stripe. Orthogonal to `processor` (the FinalPay brand stamp, identical across PSPs). Refund routing keys on this field.","example":"stripe","enum":["stripe","adyen","external"]}}},"TransactionCreateDto":{"type":"object","properties":{"externalId":{"type":"string","description":"External ID of the transaction.","example":"ext_txn_123"},"paymentMethod":{"type":"string","description":"Payment method used for the transaction.","example":"credit_card"},"amount":{"type":"number","description":"Amount of the transaction.","example":10000},"type":{"type":"string","description":"Type of the transaction.","example":"sale"},"notes":{"type":"string","description":"Notes for the transaction.","example":"Customer paid in full"},"employee":{"type":"string","description":"Employee ID who processed the transaction.","example":"507f1f77bcf86cd799439011"},"balance":{"type":"number","description":"Balance after the transaction.","example":10000},"sessionId":{"type":"string","description":"Session ID associated with the transaction. Absent when there is no till session to record against: an online-store order, or a sale on a virtual station, which has no session and no end-of-session reconciliation.","example":"507f1f77bcf86cd799439012"},"stationId":{"type":"string","description":"Station ID where the transaction occurred.","example":"507f1f77bcf86cd799439016"},"paymentData":{"description":"Payment processor data for the transaction.","example":{"processor":"stripe","processorTransactionId":"pi_123","device":"terminal_001"},"allOf":[{"$ref":"#/components/schemas/TransactionPaymentDataDto"}]},"orderId":{"type":"string","description":"Order ID associated with the transaction.","example":"507f1f77bcf86cd799439013"},"refundId":{"type":"string","description":"Refund ID associated with the transaction.","example":"507f1f77bcf86cd799439014"},"outletId":{"type":"string","description":"Outlet ID where the transaction occurred.","example":"507f1f77bcf86cd799439015"},"receiptId":{"type":"string","description":"Receipt ID for the transaction.","example":"RCP-2025-001"}},"required":["paymentMethod","amount","type","balance"]},"TransactionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Transaction.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Transaction was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Transaction was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Transaction.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"externalId":{"type":"string","description":"External ID of the transaction.","example":"ext_txn_123"},"paymentMethod":{"type":"string","description":"Payment method used for the transaction.","example":"credit_card"},"amount":{"type":"number","description":"Amount of the transaction.","example":10000},"currency":{"type":"string","description":"Currency of the Transaction. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"type":{"type":"string","description":"Type of the transaction.","example":"sale"},"notes":{"type":"string","description":"Notes for the transaction.","example":"Customer paid in full"},"employee":{"type":"string","description":"Employee ID who processed the transaction.","example":"507f1f77bcf86cd799439011","x-isMongoObjectId":true},"balance":{"type":"number","description":"Balance after the transaction.","example":10000},"sessionId":{"type":"string","description":"Session ID associated with the transaction. Absent when there is no till session to record against: an online-store order, or a sale on a virtual station, which has no session and no end-of-session reconciliation.","example":"507f1f77bcf86cd799439012","x-isMongoObjectId":true},"stationId":{"type":"string","description":"Station ID where the transaction occurred.","example":"507f1f77bcf86cd799439016","x-isMongoObjectId":true},"paymentData":{"description":"Payment processor data for the transaction.","example":{"processor":"stripe","processorTransactionId":"pi_123","device":"terminal_001"},"allOf":[{"$ref":"#/components/schemas/TransactionPaymentDataDto"}]},"orderId":{"type":"string","description":"Order ID associated with the transaction.","example":"507f1f77bcf86cd799439013","x-isMongoObjectId":true},"refundId":{"type":"string","description":"Refund ID associated with the transaction.","example":"507f1f77bcf86cd799439014","x-isMongoObjectId":true},"outletId":{"type":"string","description":"Outlet ID where the transaction occurred.","example":"507f1f77bcf86cd799439015","x-isMongoObjectId":true},"receiptId":{"type":"string","description":"Receipt ID for the transaction.","example":"RCP-2025-001"},"minorUnits":{"type":"number","description":"The Minor Units of the Transaction to convert the amount from minor units to major units.","example":0}}},"TransactionUpdateDto":{"type":"object","properties":{"externalId":{"type":"string","description":"External ID of the transaction.","example":"ext_txn_123"},"paymentMethod":{"type":"string","description":"Payment method used for the transaction.","example":"credit_card"},"amount":{"type":"number","description":"Amount of the transaction.","example":10000},"type":{"type":"string","description":"Type of the transaction.","example":"sale"},"notes":{"type":"string","description":"Notes for the transaction.","example":"Customer paid in full"},"employee":{"type":"string","description":"Employee ID who processed the transaction.","example":"507f1f77bcf86cd799439011"},"balance":{"type":"number","description":"Balance after the transaction.","example":10000},"sessionId":{"type":"string","description":"Session ID associated with the transaction. Absent when there is no till session to record against: an online-store order, or a sale on a virtual station, which has no session and no end-of-session reconciliation.","example":"507f1f77bcf86cd799439012"},"stationId":{"type":"string","description":"Station ID where the transaction occurred.","example":"507f1f77bcf86cd799439016"},"paymentData":{"description":"Payment processor data for the transaction.","example":{"processor":"stripe","processorTransactionId":"pi_123","device":"terminal_001"},"allOf":[{"$ref":"#/components/schemas/TransactionPaymentDataDto"}]},"orderId":{"type":"string","description":"Order ID associated with the transaction.","example":"507f1f77bcf86cd799439013"},"refundId":{"type":"string","description":"Refund ID associated with the transaction.","example":"507f1f77bcf86cd799439014"},"outletId":{"type":"string","description":"Outlet ID where the transaction occurred.","example":"507f1f77bcf86cd799439015"},"receiptId":{"type":"string","description":"Receipt ID for the transaction.","example":"RCP-2025-001"}}},"RefundCartDiscountDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount of the cart discount.","example":500},"percentage":{"type":"number","description":"Percentage of the cart discount.","example":5}}},"RefundItemDiscountDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount of the item discount.","example":250},"percentage":{"type":"number","description":"Percentage of the item discount.","example":2.5},"label":{"type":"string","description":"Label for the item discount.","example":"Item Discount"}}},"RefundDiscountDto":{"type":"object","properties":{"cartDiscount":{"description":"Cart discount applied to the refund.","example":{"amount":500,"percentage":5},"allOf":[{"$ref":"#/components/schemas/RefundCartDiscountDto"}]},"itemDiscounts":{"description":"Item discounts applied to the refund. Mirrors the order line item shape — one entry per item-level discount on the original line.","example":[{"amount":250,"percentage":2.5}],"type":"array","items":{"$ref":"#/components/schemas/RefundItemDiscountDto"}}}},"RefundLineItemDto":{"type":"object","properties":{"taxes":{"description":"Taxes applied to the line item.","example":[{"name":"Sales Tax","percentage":10,"amount":1000,"id":"507f1f77bcf86cd799439011","taxTableId":"507f1f77bcf86cd799439012","taxTableName":"Dev Tax"}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}},"discount":{"description":"Discount applied to the line item.","example":{"cartDiscount":{"amount":500,"percentage":5},"itemDiscounts":[{"amount":250,"percentage":2.5}]},"allOf":[{"$ref":"#/components/schemas/RefundDiscountDto"}]},"fee":{"description":"Fee applied to the line item. Percentage is stored as a decimal (e.g. 0.05 = 5%)","example":{"itemFees":[{"label":"Service Fee","percentage":0.05,"amount":25,"tax":2.5,"taxTableId":"507f1f77bcf86cd799439011"}],"cartFee":{"label":"Cart Fee","percentage":0.02,"amount":10,"tax":1,"taxTableId":"507f1f77bcf86cd799439012"}},"allOf":[{"$ref":"#/components/schemas/OrderLineItemFeeDto"}]},"modifiers":{"description":"Refunded modifier rows for this line — the original line's modifiers[] re-extended to the refunded units (total = unitPrice × quantity × refunded quantity, exact; totalTax and taxes[].amount prorated by refunded ÷ original quantity; unitPrice and per-unit quantity unchanged). NOT fees. The amounts are already included in this refund line's total/totalTax and taxes[] buckets — stored for receipts and reporting, never re-added.","example":[{"modifierId":"o1p2q3r4s5t6u7v8w9x0y1z2","modifierName":"Toppings","choiceId":"a1b2c3d4e5f6g7h8i9j0k1l2","choiceName":"Avocado","unitPrice":150,"quantity":1,"total":150}],"type":"array","items":{"$ref":"#/components/schemas/OrderLineItemModifierDto"}},"components":{"description":"Components of a refunded composite line, as sold, without the component tax fields (taxTableId, totalTax, taxes) — the refund's tax is on the line (B30). A composite is refunded as a whole line.","example":[{"productId":"68d4a2c7b1e35f9a4c67a101","variantId":"68d4a2c7b1e35f9a4c67a102","name":"Fries","partName":"Side","quantity":1,"price":400}],"type":"array","items":{"$ref":"#/components/schemas/OrderLineItemComponentDto"}},"lineNetWithFees":{"type":"number","description":"Customer-facing per-line total at refund time: (price × quantity) − sum(itemDiscounts) + sum(itemFees). Excludes cart-level discount and tax.","example":5000},"quantity":{"type":"number","description":"Quantity of the line item.","example":2},"stockQuantity":{"type":"number","description":"How much left the pool for this refund, in the family's base unit — whole, frozen. `quantity` above is in the selling unit and may be fractional; the already-refunded ledger subtracts this one, so partial refunds of a weighed line never accumulate float dust.","example":1000},"unitId":{"type":"string","description":"Unit the line was sold in — snapshot, so a refunds catalogue reads without the order.","example":"KGM"},"unitAbbreviation":{"type":"string","description":"Abbreviation as it read on the day of sale.","example":"kg"},"unitRatioToBase":{"type":"number","description":"What one `unitId` was worth in base units then.","example":1000},"stockVariantId":{"type":"string","description":"Variant whose pool the sale drew from, frozen with the rest. The restock has to put the goods back where they came from: resolving the pool from the variant as it stands today credits the wrong shelf the moment a merchant re-points it, which is what the snapshot exists to prevent.","example":"507f1f77bcf86cd799439011"},"total":{"type":"number","description":"Total amount of the line item.","example":5000},"price":{"type":"number","description":"Price per unit of the line item.","example":2500},"name":{"type":"string","description":"Name of the line item.","example":"Sweet Tea"},"subTotal":{"type":"number","description":"Subtotal of the line item before taxes.","example":4500},"sku":{"type":"string","description":"SKU of the line item.","example":"SKU-001"},"image":{"type":"string","description":"Image URL of the line item.","example":"https://example.com/image.jpg"},"productId":{"type":"string","description":"Product ID of the line item.","example":"507f1f77bcf86cd799439011"},"productExternalId":{"type":"string","description":"External product ID.","example":"ext_prod_123"},"variantExternalId":{"type":"string","description":"External variant ID.","example":"ext_var_123"},"lineItemExternalId":{"type":"string","description":"External line item ID.","example":"1234567890"},"internalId":{"type":"string","description":"Internal ID of the line item.","example":"int_line_123"},"action":{"type":"string","description":"Inventory action type for the line item.","example":"STOCK_RECEIVED","enum":["CUSTOM","EXTERNAL_RESTOCK","EXTERNAL_SALE","PO_RECEIVED","APPLIED_FROM_WOO","BULK_RECOUNT","TRANSFER","UNIT_FAMILY_CHANGED","COMPOSED_FOR_SALE","SALE","REFUND_DAMAGE","REFUND_RESTOCK_RETURN","RESTOCK_RETURN","LOSS","THEFT","DAMAGE","INVENTORY_RECOUNT","STOCK_RECEIVED"]},"variantId":{"type":"string","description":"Variant ID of the line item.","example":"507f1f77bcf86cd799439012"},"totalTax":{"type":"number","description":"Total tax amount for the line item.","example":500},"note":{"type":"string","description":"Note for the line item.","example":"No ice please"},"description":{"type":"string","description":"Description of the line item.","example":"Refreshing sweet tea beverage"}},"required":["productId","variantId"]},"RefundTipDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount of the tip.","example":500},"percentage":{"type":"number","description":"Percentage of the tip.","example":15},"transactionId":{"type":"string","description":"Transaction ID of the payment method.","example":"1234567890"},"tipTo":{"type":"string","description":"ID of the tip to.","example":"1234567890"},"_id":{"type":"string","description":""}}},"RefundSummaryDto":{"type":"object","properties":{"subTotal":{"type":"number","description":"Legacy subtotal field. Retained for backward compatibility but not recommended for use in new development.","example":10000},"discountTotal":{"type":"number","description":"Total discount amount.","example":1000},"shippingTotal":{"type":"number","description":"Total shipping amount.","example":500},"total":{"type":"number","description":"Total amount of the refund.","example":10000},"totalTaxes":{"type":"number","description":"Total taxes amount.","example":1000},"isTaxInclusive":{"type":"boolean","description":"Flag to indicate if the refund is tax inclusive (mirrors source order).","example":false},"subtotalAfterFees":{"type":"number","description":"Math intermediate: grossSales + feesTotal (BEFORE discounts and tax). Magnitude. Receipts MUST NOT bind to this; refund receipts use grossSales for the items-only \"Subtotal\" line. Renamed from legacy `subTotal` for v16.","example":10000},"taxes":{"description":"List of taxes applied to the refund.","example":[{"name":"Sales Tax","percentage":10,"amount":1000,"id":"507f1f77bcf86cd799439011","taxTableId":"507f1f77bcf86cd799439012","taxTableName":"Dev Tax"}],"type":"array","items":{"$ref":"#/components/schemas/OrderTaxDto"}},"tip":{"description":"Tip included in the refund.","example":{"_id":"507f1f77bcf86cd799439014","amount":500,"percentage":15,"transactionId":"1234567890","tipTo":"1234567890"},"allOf":[{"$ref":"#/components/schemas/RefundTipDto"}]},"grossSales":{"type":"number","description":"Sum of refund lineItems[].price × quantity (+ customSales) in minor currency units. Stored positive (refund-side magnitude); the Sales Summary layer flips sign for display.","example":10842},"modifiersTotal":{"type":"number","description":"Sum of refund lineItems[].modifiers[].total in minor currency units (magnitude) — refunded modifier value (FT-0010). Tracked separately from grossSales (which is price × quantity only).","example":0},"lineDiscountTotal":{"type":"number","description":"Sum of refund lineItems[].discount.itemDiscount.amount (magnitude). The \"discounts reversed\" reports use this directly; Sales Summary nets it against orders.","example":0},"cartDiscountTotal":{"type":"number","description":"Refund cart discount amount magnitude.","example":0},"feesTotal":{"type":"number","description":"Aggregate of all refund-side fees (= lineFeesTotal + cartFeesTotal) in minor currency units, magnitude.","example":0},"lineFeesTotal":{"type":"number","description":"Sum of refund lineItems[].fee.itemFee.amount (magnitude).","example":0},"cartFeesTotal":{"type":"number","description":"Sum of refund cartFees[].amount (magnitude). customSales[].fee.cartFee is an allocation and not summed separately.","example":0},"taxableFeesTotal":{"type":"number","description":"Sum of refund fees with an associated taxTableId.","example":0},"nonTaxableFeesTotal":{"type":"number","description":"Sum of refund fees with no taxTableId.","example":0},"taxableModifiersTotal":{"type":"number","description":"Sum of lineItems[].modifiers[].total for rows with a non-empty taxes[] (magnitude). Parity with taxableFeesTotal.","example":0},"nonTaxableModifiersTotal":{"type":"number","description":"Sum of lineItems[].modifiers[].total for rows with no taxes[] (magnitude). taxable + nonTaxable = modifiersTotal.","example":0},"totalTaxableSales":{"type":"number","description":"Sum of refund (price × qty) for lines with at least one tax bucket (magnitude).","example":0},"totalNonTaxableSales":{"type":"number","description":"Sum of refund (price × qty) for lines with no tax bucket (magnitude).","example":0},"tipTotal":{"type":"number","description":"Sum of refund tips[].amount in minor currency units (magnitude).","example":0},"cashRounding":{"type":"number","description":"Signed sum of refund payment[].cashRounding in minor currency units.","example":2},"payments":{"description":"Refund-side settlement aggregates by payment family. Same shape as OrderSummary.payments.","example":{"cardTotal":9200,"cashTotal":840,"customTotal":0,"cardProcessingFeesTotal":0},"allOf":[{"$ref":"#/components/schemas/OrderSummaryPaymentsDto"}]},"totalBeforeTip":{"type":"number","description":"Refund \"TOTAL\" magnitude on the receipt. Excl: grossSales − discountTotal + feesTotal + totalTaxes. Incl: grossSales − discountTotal + feesTotal. Equals `total − tipTotal` (magnitude).","example":10000},"amountRefunded":{"type":"number","description":"Sum of refund payment[].amount in minor currency units (magnitude). Receipt \"Amount paid\" line on a refund renders this with a flipped sign.","example":10000}},"required":["isTaxInclusive","subtotalAfterFees"]},"RefundPaymentDto":{"type":"object","properties":{"transactionId":{"type":"string","description":"Transaction ID of the payment.","example":"txn_123456789"},"paymentType":{"type":"string","description":"Type of payment method.","example":"credit_card"},"amount":{"type":"number","description":"Amount of the payment.","example":10000},"timestamp":{"type":"string","description":"Timestamp of the payment.","example":"2025-01-29T12:00:00.000Z"},"processor":{"type":"string","description":"Payment processor used.","example":"stripe"},"saleId":{"type":"string","description":"Sale ID associated with the payment.","example":"sale_123456789"},"tendered":{"type":"number","description":"What the customer physically presented for this payment leg. Cash legs: amount + change. Non-cash legs: equal to amount. Receipt \"Cash tendered\" line binds here.","example":10000},"provider":{"type":"string","description":"PSP this refund leg was executed against (stripe | adyen). Follows the ORIGINAL sale payment's provider, not the station's current configuration. Absent on legs written before multi-provider support — readers must treat absence as stripe.","example":"stripe","enum":["stripe","adyen","external"]},"tip":{"description":"Part of this leg that is refunded tip — same shape as OrderPaymentMethod.tip, so reports can split refunded tips by tender. Unlike the order side, `amount` still INCLUDES it (the full money the leg moved): never add the two. Null when the leg returned no tip, and on legs written before this field.","example":{"percentage":0.15,"amount":1050,"tipTo":"1234567890"},"allOf":[{"$ref":"#/components/schemas/OrderTipDto"}]}}},"RefundCreateDto":{"type":"object","properties":{"orderId":{"type":"string","description":"Order ID associated with the refund.","example":"507f1f77bcf86cd799439011"},"outletId":{"type":"string","description":"Outlet ID associated with the refund.","example":"507f1f77bcf86cd799439010"},"sessionId":{"type":"string","description":"Session ID associated with the refund.","example":"507f1f77bcf86cd799439012"},"externalId":{"type":"string","description":"External ID of the refund.","example":"1234567890"},"currency":{"type":"string","description":"Currency of the Refund. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"source":{"type":"string","description":"Source of the Refund. Closed vocabulary: in-store, public-api.","example":"in-store"},"lineItems":{"description":"Line items included in the refund.","example":[{"name":"Sweet Tea","quantity":1,"price":5000,"total":5000,"productId":"507f1f77bcf86cd799439011","variantId":"507f1f77bcf86cd799439012"}],"type":"array","items":{"$ref":"#/components/schemas/RefundLineItemDto"}},"customSales":{"description":"Custom sales included in the refund.","type":"array","items":{"$ref":"#/components/schemas/OrderCustomSaleDto"}},"reservations":{"description":"Services included in the refund.","type":"array","items":{"$ref":"#/components/schemas/OrderReservationDto"}},"reason":{"type":"string","description":"Reason for the refund.","example":"Customer requested refund"},"receiptId":{"type":"string","description":"Receipt ID of the refund.","example":"RCP-2025-001"},"refundedBy":{"type":"string","description":"User ID of who processed the refund.","example":"507f1f77bcf86cd799439013"},"refundedByExternalId":{"type":"string","description":"External ID of the user who processed the refund.","example":"ext_user_123"},"summary":{"description":"Summary of the refund amounts.","example":{"total":10000,"subtotalAfterFees":9000,"totalTaxes":1000,"isTaxInclusive":false},"allOf":[{"$ref":"#/components/schemas/RefundSummaryDto"}]},"cartFees":{"description":"Cart fees included in the refund (same shape as order cartFees, with optional per-rate taxes).","example":[{"id":"507f1f77bcf86cd799439011","label":"Custom fee","amount":1000,"percentage":0.1,"tax":250,"taxName":"Dev Tax","taxes":[]}],"type":"array","items":{"$ref":"#/components/schemas/OrderCartFeeDto"}},"payment":{"description":"Payment details for the refund.","example":[{"paymentType":"credit_card","amount":10000,"transactionId":"txn_123"}],"type":"array","items":{"$ref":"#/components/schemas/RefundPaymentDto"}},"balance":{"type":"number","description":"Balance remaining after the refund.","example":10000},"tips":{"description":"Tips included in the refund.","example":[{"_id":"507f1f77bcf86cd799439014","amount":500,"percentage":15,"transactionId":"1234567890","tipTo":"1234567890"}],"type":"array","items":{"$ref":"#/components/schemas/RefundTipDto"}}},"required":["orderId","lineItems","summary"]},"RefundResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Refund.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Refund was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Refund was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Refund.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"orderId":{"type":"string","description":"Order ID associated with the refund.","example":"507f1f77bcf86cd799439011","x-isMongoObjectId":true},"outletId":{"type":"string","description":"Outlet ID associated with the refund.","example":"507f1f77bcf86cd799439010","x-isMongoObjectId":true},"sessionId":{"type":"string","description":"Session ID associated with the refund.","example":"507f1f77bcf86cd799439012","x-isMongoObjectId":true},"externalId":{"type":"string","description":"External ID of the refund.","example":"1234567890"},"currency":{"type":"string","description":"Currency of the Refund. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"source":{"type":"string","description":"Source of the Refund. Closed vocabulary: in-store, public-api.","example":"in-store"},"lineItems":{"description":"Line items included in the refund.","example":[{"name":"Sweet Tea","quantity":1,"price":5000,"total":5000,"productId":"507f1f77bcf86cd799439011","variantId":"507f1f77bcf86cd799439012"}],"type":"array","items":{"$ref":"#/components/schemas/RefundLineItemDto"}},"customSales":{"description":"Custom sales included in the refund.","type":"array","items":{"$ref":"#/components/schemas/OrderCustomSaleDto"}},"reservations":{"description":"Services included in the refund.","type":"array","items":{"$ref":"#/components/schemas/OrderReservationDto"}},"reason":{"type":"string","description":"Reason for the refund.","example":"Customer requested refund"},"receiptId":{"type":"string","description":"Receipt ID of the refund.","example":"RCP-2025-001"},"refundedBy":{"type":"string","description":"User ID of who processed the refund.","example":"507f1f77bcf86cd799439013","x-isMongoObjectId":true},"refundedByExternalId":{"type":"string","description":"External ID of the user who processed the refund.","example":"ext_user_123"},"summary":{"description":"Summary of the refund amounts.","example":{"total":10000,"subtotalAfterFees":9000,"totalTaxes":1000,"isTaxInclusive":false},"allOf":[{"$ref":"#/components/schemas/RefundSummaryDto"}]},"cartFees":{"description":"Cart fees included in the refund (same shape as order cartFees, with optional per-rate taxes).","example":[{"id":"507f1f77bcf86cd799439011","label":"Custom fee","amount":1000,"percentage":0.1,"tax":250,"taxName":"Dev Tax","taxes":[]}],"type":"array","items":{"$ref":"#/components/schemas/OrderCartFeeDto"}},"payment":{"description":"Payment details for the refund.","example":[{"paymentType":"credit_card","amount":10000,"transactionId":"txn_123"}],"type":"array","items":{"$ref":"#/components/schemas/RefundPaymentDto"}},"balance":{"type":"number","description":"Balance remaining after the refund.","example":10000},"tips":{"description":"Tips included in the refund.","example":[{"_id":"507f1f77bcf86cd799439014","amount":500,"percentage":15,"transactionId":"1234567890","tipTo":"1234567890"}],"type":"array","items":{"$ref":"#/components/schemas/RefundTipDto"}},"minorUnits":{"type":"number","description":"The Minor Units of the Refund to convert the amount from minor units to major units.","example":0}}},"RefundUpdateDto":{"type":"object","properties":{"orderId":{"type":"string","description":"Order ID associated with the refund.","example":"507f1f77bcf86cd799439011"},"outletId":{"type":"string","description":"Outlet ID associated with the refund.","example":"507f1f77bcf86cd799439010"},"sessionId":{"type":"string","description":"Session ID associated with the refund.","example":"507f1f77bcf86cd799439012"},"externalId":{"type":"string","description":"External ID of the refund.","example":"1234567890"},"currency":{"type":"string","description":"Currency of the Refund. ISO 4217 currency code.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"source":{"type":"string","description":"Source of the Refund. Closed vocabulary: in-store, public-api.","example":"in-store"},"lineItems":{"description":"Line items included in the refund.","example":[{"name":"Sweet Tea","quantity":1,"price":5000,"total":5000,"productId":"507f1f77bcf86cd799439011","variantId":"507f1f77bcf86cd799439012"}],"type":"array","items":{"$ref":"#/components/schemas/RefundLineItemDto"}},"customSales":{"description":"Custom sales included in the refund.","type":"array","items":{"$ref":"#/components/schemas/OrderCustomSaleDto"}},"reservations":{"description":"Services included in the refund.","type":"array","items":{"$ref":"#/components/schemas/OrderReservationDto"}},"reason":{"type":"string","description":"Reason for the refund.","example":"Customer requested refund"},"receiptId":{"type":"string","description":"Receipt ID of the refund.","example":"RCP-2025-001"},"refundedBy":{"type":"string","description":"User ID of who processed the refund.","example":"507f1f77bcf86cd799439013"},"refundedByExternalId":{"type":"string","description":"External ID of the user who processed the refund.","example":"ext_user_123"},"summary":{"description":"Summary of the refund amounts.","example":{"total":10000,"subtotalAfterFees":9000,"totalTaxes":1000,"isTaxInclusive":false},"allOf":[{"$ref":"#/components/schemas/RefundSummaryDto"}]},"cartFees":{"description":"Cart fees included in the refund (same shape as order cartFees, with optional per-rate taxes).","example":[{"id":"507f1f77bcf86cd799439011","label":"Custom fee","amount":1000,"percentage":0.1,"tax":250,"taxName":"Dev Tax","taxes":[]}],"type":"array","items":{"$ref":"#/components/schemas/OrderCartFeeDto"}},"payment":{"description":"Payment details for the refund.","example":[{"paymentType":"credit_card","amount":10000,"transactionId":"txn_123"}],"type":"array","items":{"$ref":"#/components/schemas/RefundPaymentDto"}},"balance":{"type":"number","description":"Balance remaining after the refund.","example":10000},"tips":{"description":"Tips included in the refund.","example":[{"_id":"507f1f77bcf86cd799439014","amount":500,"percentage":15,"transactionId":"1234567890","tipTo":"1234567890"}],"type":"array","items":{"$ref":"#/components/schemas/RefundTipDto"}}}},"WebhookCreateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the webhook.","example":"Super Webhook"},"description":{"type":"string","description":"Description of the webhook.","example":"This is a webhook for the Super Webhook"},"enabled":{"type":"boolean","description":"Whether the webhook is enabled.","example":true},"url":{"type":"string","description":"URL of the webhook.","example":"https://webhook.site/1234567890"},"events":{"type":"array","description":"Events of the webhook.","example":["orders.insert","products.insert"],"items":{"type":"string","enum":["products.insert","products.update","variants.insert","variants.update","variants.delete","outlets.insert","outlets.update","outlets.delete","stations.insert","stations.delete","transactions.insert","transactions.update","orders.insert","orders.update","refunds.insert","customers.insert","customers.update","sessions.insert","sessions.update","sessions.replace","stock-changes.insert"]}}},"required":["name","enabled","url"]},"WebhookResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Webhook.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Webhook was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Webhook was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"name":{"type":"string","description":"Name of the webhook.","example":"Super Webhook"},"description":{"type":"string","description":"Description of the webhook.","example":"This is a webhook for the Super Webhook"},"companyId":{"type":"string","description":"Company ID associated with the Webhook.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"organizationId":{"type":"string","description":"Organization ID associated with the Webhook.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"enabled":{"type":"boolean","description":"Whether the webhook is enabled.","example":true},"url":{"type":"string","description":"URL of the webhook.","example":"https://webhook.site/1234567890"},"secret":{"type":"string","description":"Secret for signing the webhook payload. Generated by the system & shared with the client once on creation.","example":"1234567890"},"events":{"type":"array","description":"Events of the webhook.","example":["orders.insert","products.insert"],"items":{"type":"string","enum":["products.insert","products.update","variants.insert","variants.update","variants.delete","outlets.insert","outlets.update","outlets.delete","stations.insert","stations.delete","transactions.insert","transactions.update","orders.insert","orders.update","refunds.insert","customers.insert","customers.update","sessions.insert","sessions.update","sessions.replace","stock-changes.insert"]}}}},"WebhookUpdateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the webhook.","example":"Super Webhook"},"description":{"type":"string","description":"Description of the webhook.","example":"This is a webhook for the Super Webhook"},"enabled":{"type":"boolean","description":"Whether the webhook is enabled.","example":true},"url":{"type":"string","description":"URL of the webhook.","example":"https://webhook.site/1234567890"},"events":{"type":"array","description":"Events of the webhook.","example":["orders.insert","products.insert"],"items":{"type":"string","enum":["products.insert","products.update","variants.insert","variants.update","variants.delete","outlets.insert","outlets.update","outlets.delete","stations.insert","stations.delete","transactions.insert","transactions.update","orders.insert","orders.update","refunds.insert","customers.insert","customers.update","sessions.insert","sessions.update","sessions.replace","stock-changes.insert"]}}}},"TaxTableCreateDto":{"type":"object","properties":{"source":{"type":"string","description":"Source of the tax table.","example":"woo-commerce"},"externalId":{"type":"string","description":"External provider id for the tax table (e.g. the QuickBooks TaxCode Id). Integration correlation key.","example":"5"},"name":{"type":"string","description":"Name of the tax table.","example":"Default Tax Table"},"slug":{"type":"string","description":"Slug identifier for the tax table.","example":"default-tax-table"},"taxRates":{"description":"Tax rates applied to the tax table.","example":[{"compounding":false,"taxRate":"507f1f77bcf86cd799439011"}],"type":"array","items":{"type":"object"}},"isStandard":{"type":"boolean","description":"Whether this is the standard tax table.","example":true}},"required":["name"]},"TaxTableResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the TaxTable.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the TaxTable was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the TaxTable was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the TaxTable.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"source":{"type":"string","description":"Source of the tax table.","example":"woo-commerce"},"externalId":{"type":"string","description":"External provider id for the tax table (e.g. the QuickBooks TaxCode Id). Integration correlation key.","example":"5"},"name":{"type":"string","description":"Name of the tax table.","example":"Default Tax Table"},"slug":{"type":"string","description":"Slug identifier for the tax table.","example":"default-tax-table"},"taxRates":{"description":"Tax rates applied to the tax table.","example":[{"compounding":false,"taxRate":"507f1f77bcf86cd799439011"}],"type":"array","items":{"type":"object"}},"isStandard":{"type":"boolean","description":"Whether this is the standard tax table.","example":true}}},"TaxTableUpdateDto":{"type":"object","properties":{"source":{"type":"string","description":"Source of the tax table.","example":"woo-commerce"},"externalId":{"type":"string","description":"External provider id for the tax table (e.g. the QuickBooks TaxCode Id). Integration correlation key.","example":"5"},"name":{"type":"string","description":"Name of the tax table.","example":"Default Tax Table"},"slug":{"type":"string","description":"Slug identifier for the tax table.","example":"default-tax-table"},"taxRates":{"description":"Tax rates applied to the tax table.","example":[{"compounding":false,"taxRate":"507f1f77bcf86cd799439011"}],"type":"array","items":{"type":"object"}},"isStandard":{"type":"boolean","description":"Whether this is the standard tax table.","example":true}}},"TaxRateCreateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax rate.","example":"Standard Rate"},"externalId":{"type":"string","description":"External provider id for the tax rate (e.g. the QuickBooks TaxRate Id). Integration correlation key.","example":"12"},"source":{"type":"string","description":"Origin of the tax rate — the integration provider that created it.","example":"quickbooks"}},"required":["name"]},"TaxRateResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the TaxRate.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the TaxRate was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the TaxRate was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the TaxRate.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"name":{"type":"string","description":"Name of the tax rate.","example":"Standard Rate"},"externalId":{"type":"string","description":"External provider id for the tax rate (e.g. the QuickBooks TaxRate Id). Integration correlation key.","example":"12"},"source":{"type":"string","description":"Origin of the tax rate — the integration provider that created it.","example":"quickbooks"}}},"TaxRateUpdateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the tax rate.","example":"Standard Rate"},"externalId":{"type":"string","description":"External provider id for the tax rate (e.g. the QuickBooks TaxRate Id). Integration correlation key.","example":"12"},"source":{"type":"string","description":"Origin of the tax rate — the integration provider that created it.","example":"quickbooks"}}},"TaxRateValueCreateDto":{"type":"object","properties":{"taxRateId":{"type":"string","description":"Tax rate ID this value belongs to.","example":"507f1f77bcf86cd799439011"},"outletId":{"type":"string","description":"Outlet ID this tax rate value applies to.","example":"507f1f77bcf86cd799439012"},"value":{"type":"number","description":"Tax rate value (percentage).","example":8.875}},"required":["taxRateId","outletId","value"]},"TaxRateValueResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the TaxRateValue.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the TaxRateValue was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the TaxRateValue was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the TaxRateValue.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"taxRateId":{"type":"string","description":"Tax rate ID this value belongs to.","example":"507f1f77bcf86cd799439011","x-isMongoObjectId":true},"outletId":{"type":"string","description":"Outlet ID this tax rate value applies to.","example":"507f1f77bcf86cd799439012","x-isMongoObjectId":true},"value":{"type":"number","description":"Tax rate value (percentage).","example":8.875}}},"TaxRateValueUpdateDto":{"type":"object","properties":{"taxRateId":{"type":"string","description":"Tax rate ID this value belongs to.","example":"507f1f77bcf86cd799439011"},"outletId":{"type":"string","description":"Outlet ID this tax rate value applies to.","example":"507f1f77bcf86cd799439012"},"value":{"type":"number","description":"Tax rate value (percentage).","example":8.875}}},"SessionClosingAmountsDto":{"type":"object","properties":{"cash":{"type":"number","description":"Cash closing amount.","example":50000},"card":{"type":"number","description":"Card closing amount.","example":150000},"finalPay":{"type":"number","description":"Final Pay closing amount.","example":20000}}},"SessionCreateDto":{"type":"object","properties":{"stationId":{"type":"string","description":"Station ID where the session was opened.","example":"507f1f77bcf86cd799439011"},"sessionNumber":{"type":"string","description":"Session number identifier.","example":"S-2025-001"},"openedBy":{"type":"string","description":"Name of the user who opened the session.","example":"John Doe"},"closedBy":{"type":"string","description":"Name of the user who closed the session.","example":"Jane Smith"},"openTime":{"type":"string","description":"Time when the session was opened.","example":"2025-01-29T09:00:00.000Z"},"closeTime":{"type":"string","description":"Time when the session was closed.","example":"2025-01-29T17:00:00.000Z"},"openingAmount":{"type":"number","description":"Opening cash amount.","example":20000},"closingReportData":{"type":"string","description":"Closing report data in JSON format.","example":"{}"},"notes":{"description":"Notes for the session.","example":["Opened on time","Register balanced"],"type":"array","items":{"type":"string"}},"closingAmounts":{"description":"Closing amounts by payment method.","example":{"cash":50000,"card":150000,"finalPay":20000},"allOf":[{"$ref":"#/components/schemas/SessionClosingAmountsDto"}]},"closingNote":{"type":"string","description":"Note when closing the session.","example":"All transactions verified"},"openingNote":{"type":"string","description":"Note when opening the session.","example":"Starting new shift"},"currency":{"type":"string","description":"Currency of the session.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"minorUnits":{"type":"number","description":"The Minor Units of the Order to convert the amount from minor units to major units.","example":0},"closingAmount":{"type":"number","description":"Closing cash amount.","example":25000}},"required":["stationId","openedBy","openTime","openingAmount"]},"SessionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the Session.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"createdAt":{"type":"string","description":"Timestamp when the Session was created.","example":"2025-12-07T19:31:48.436+00:00","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp when the Session was last updated.","example":"2025-12-07T19:35:48.436+00:00","format":"date-time"},"companyId":{"type":"string","description":"Company ID associated with the Session.","example":"o1p2q3r4s5t6u7v8w9x0y1z2","x-isMongoObjectId":true},"stationId":{"type":"string","description":"Station ID where the session was opened.","example":"507f1f77bcf86cd799439011","x-isMongoObjectId":true},"sessionNumber":{"type":"string","description":"Session number identifier.","example":"S-2025-001"},"openedBy":{"type":"string","description":"Name of the user who opened the session.","example":"John Doe"},"closedBy":{"type":"string","description":"Name of the user who closed the session.","example":"Jane Smith"},"openTime":{"type":"string","description":"Time when the session was opened.","example":"2025-01-29T09:00:00.000Z","format":"date-time"},"closeTime":{"type":"string","description":"Time when the session was closed.","example":"2025-01-29T17:00:00.000Z","format":"date-time"},"openingAmount":{"type":"number","description":"Opening cash amount.","example":20000},"closingReportData":{"type":"string","description":"Closing report data in JSON format.","example":"{}"},"notes":{"description":"Notes for the session.","example":["Opened on time","Register balanced"],"type":"array","items":{"type":"string"}},"closingAmounts":{"description":"Closing amounts by payment method.","example":{"cash":50000,"card":150000,"finalPay":20000},"allOf":[{"$ref":"#/components/schemas/SessionClosingAmountsDto"}]},"closingNote":{"type":"string","description":"Note when closing the session.","example":"All transactions verified"},"openingNote":{"type":"string","description":"Note when opening the session.","example":"Starting new shift"},"currency":{"type":"string","description":"Currency of the session.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"minorUnits":{"type":"number","description":"The Minor Units of the Order to convert the amount from minor units to major units.","example":0},"closingAmount":{"type":"number","description":"Closing cash amount.","example":25000}}},"SessionUpdateBodyDto":{"type":"object","properties":{"stationId":{"type":"string","description":"Station ID where the session was opened.","example":"507f1f77bcf86cd799439011"},"sessionNumber":{"type":"string","description":"Session number identifier.","example":"S-2025-001"},"openedBy":{"type":"string","description":"Name of the user who opened the session.","example":"John Doe"},"closedBy":{"type":"string","description":"Name of the user who closed the session.","example":"Jane Smith"},"openTime":{"type":"string","description":"Time when the session was opened.","example":"2025-01-29T09:00:00.000Z"},"closeTime":{"type":"string","description":"Time when the session was closed.","example":"2025-01-29T17:00:00.000Z"},"openingAmount":{"type":"number","description":"Opening cash amount.","example":20000},"closingReportData":{"type":"string","description":"Closing report data in JSON format.","example":"{}"},"notes":{"description":"Notes for the session.","example":["Opened on time","Register balanced"],"type":"array","items":{"type":"string"}},"closingAmounts":{"description":"Closing amounts by payment method.","example":{"cash":50000,"card":150000,"finalPay":20000},"allOf":[{"$ref":"#/components/schemas/SessionClosingAmountsDto"}]},"closingNote":{"type":"string","description":"Note when closing the session.","example":"All transactions verified"},"openingNote":{"type":"string","description":"Note when opening the session.","example":"Starting new shift"},"currency":{"type":"string","description":"Currency of the session.","example":"USD","enum":["USD","EUR","GBP","CAD","AUD","NZD","CHF","CNY","INR","MXN","BRL","ZAR","SGD","HKD","SEK","NOK","DKK","PLN","THB","MYR","PHP","IDR","AED","SAR","ILS","TRY","RUB","HTG","BND","CRC","BDT","UAH","NGN","AFN","ALL","AMD","ANG","AOA","ARS","AWG","AZN","BAM","BBD","BGN","BMD","BOB","BSD","BTN","BWP","BYN","BZD","COP","CZK","DOP","DZD","EGP","ETB","FJD","GEL","GHS","GTQ","GYD","HNL","IRR","JMD","KES","KGS","KHR","KYD","KZT","LAK","LBP","LKR","MAD","MDL","MKD","MMK","MNT","MOP","MUR","MVR","MZN","NAD","NIO","NPR","PAB","PEN","PGK","PKR","QAR","RON","RSD","SBD","SRD","SYP","TJS","TMT","TOP","TTD","TZS","UYU","UZS","VES","WST","XCD","YER","ZMW","CDF","CUP","ERN","FKP","GIP","GMD","KPW","LRD","LSL","MGA","MWK","SCR","SDG","SHP","SLE","SOS","SSP","STN","SZL","VED","XCG","JPY","KRW","VND","CLP","ISK","HUF","TWD","GNF","BIF","DJF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","KWD","BHD","OMR","JOD","TND","LYD","IQD"]},"minorUnits":{"type":"number","description":"The Minor Units of the Order to convert the amount from minor units to major units.","example":0}}},"HealthResponseDto":{"type":"object","properties":{"status":{"type":"string","description":"Service liveness status. Always `ok` when the response is returned.","enum":["ok"],"example":"ok"}},"required":["status"]},"ApiKeyPermissionsDto":{"type":"object","properties":{"create":{"type":"boolean","description":"Whether the key may create resources.","example":true},"read":{"type":"boolean","description":"Whether the key may read resources.","example":true},"update":{"type":"boolean","description":"Whether the key may update resources.","example":true},"delete":{"type":"boolean","description":"Whether the key may delete resources.","example":false}},"required":["create","read","update","delete"]},"WhoamiKeyDto":{"type":"object","properties":{"permissions":{"description":"General (all-entity) CRUD permissions. For a granular key these are the actions granted on every entity; per-entity additions are listed in `granularPermissions`.","allOf":[{"$ref":"#/components/schemas/ApiKeyPermissionsDto"}]},"granularPermissions":{"type":"object","description":"Per-entity permission additions for granular keys, keyed by entity name (e.g. `product`). Each value lists the extra CRUD actions granted on that entity beyond `permissions`. Absent for general keys.","example":{"product":{"read":true},"order":{"create":true}},"additionalProperties":{"type":"object"}},"name":{"type":"string","description":"Human-readable name of the API key, if one was set when the key was issued.","example":"Production Key"},"expiresAt":{"type":"string","description":"Key expiry. The literal `never_expires` when the key has no expiration, otherwise an ISO 8601 date-time string.","example":"never_expires"}},"required":["permissions","expiresAt"]},"WhoamiResponseDto":{"type":"object","properties":{"companyId":{"type":"string","description":"The company the API key belongs to (MongoDB ObjectId).","example":"507f1f77bcf86cd799439011"},"companyName":{"type":"string","description":"Display name of the company.","example":"Acme Corp"},"currency":{"type":"string","description":"The company’s configured ISO 4217 currency code. Always present on a 200 response.","example":"USD"},"country":{"type":"string","description":"The company’s country (ISO 3166-1 alpha-2) from its address, when set.","example":"CA"},"key":{"description":"Identity and status of the authenticating API key.","allOf":[{"$ref":"#/components/schemas/WhoamiKeyDto"}]}},"required":["companyId","companyName","currency","key"]},"OrganizationSummaryDto":{"type":"object","properties":{"_id":{"type":"string","description":"Organization (Company) id.","example":"691df9c2047bfc55994d703c"},"name":{"type":"string","description":"Organization name.","example":"TestStaging","nullable":true},"logo":{"type":"string","description":"Organization logo URL, if set.","example":null,"nullable":true},"organization_alias":{"type":"string","description":"Organization's public alias, from the `organization_alias` company-settings attribute.","example":"oz-12","nullable":true}},"required":["_id","name","logo","organization_alias"]},"PublishedExtensionListItemDto":{"type":"object","properties":{"_id":{"type":"string","description":"Extension id.","example":"6a148346ffb97bbf5a57700e"},"label":{"type":"string","description":"Extension display name.","example":"Product Groups"},"status":{"type":"string","description":"Publication status. Always `public` for these endpoints.","example":"public"},"category":{"type":"string","description":"Extension category.","example":"hub"},"short_description":{"type":"string","description":"Short marketing description.","example":"Group products into named collections for quick POS filtering."},"long_description":{"type":"string","description":"Long marketing description.","example":"Product Groups lets admins create named groups of products from the dashboard..."},"url":{"type":"string","description":"Hosted iframe URL of the extension, if deployed.","example":"https://product-groups-163feb.host.staging.code.finalpos.com"},"description":{"type":"string","description":"General/legacy description."},"price":{"type":"string","description":"Price label.","example":"free"},"website":{"type":"string","description":"Marketing website URL."},"main_image":{"type":"string","description":"Main listing image URL."},"backgroundUrl":{"type":"string","description":"Background image URL."},"gallery":{"description":"Gallery image URLs.","example":[],"type":"array","items":{"type":"string"}},"theme":{"type":"string","description":"Theme identifier."},"redirectUrl":{"type":"string","description":"Post-install redirect URL."},"organizationId":{"type":"string","description":"Owning organization id (reference to `companies`).","example":"691df9c2047bfc55994d703c"},"organization":{"description":"Owning-organization summary (logo, name, alias). `null` when the extension has no organization.","nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/OrganizationSummaryDto"}]},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601).","example":"2026-05-25T17:13:42.066Z"},"updatedAt":{"type":"string","description":"Last-update timestamp (ISO 8601).","example":"2026-05-25T17:13:42.066Z"}},"required":["_id","label","status","category","short_description","long_description","organization","createdAt","updatedAt"]},"PublishedExtensionListResponseDto":{"type":"object","properties":{"data":{"description":"Published extensions.","type":"array","items":{"$ref":"#/components/schemas/PublishedExtensionListItemDto"}},"meta":{"description":"Pagination metadata.","allOf":[{"$ref":"#/components/schemas/ListMetaDto"}]}},"required":["data","meta"]},"SurfaceDto":{"type":"object","properties":{"_id":{"type":"string","description":"Surface id.","example":"6a15d8cb5853f27495abdb74"},"organizationId":{"type":"string","description":"Owning organization id.","example":"68a72892bc0a1b7cff31531a"},"name":{"type":"string","description":"Human-readable surface name.","example":"Age gate"},"surfaceId":{"type":"string","description":"Developer-facing handle used in code: openSurface({ id }).","example":"age-gate-unique"},"platform":{"type":"string","description":"Hosting platform. Each surface type belongs to exactly one platform.","enum":["builder","hub","render"],"example":"hub"},"type":{"type":"string","description":"Surface type discriminator.","enum":["builder-component","pop-up-overlay","full-screen-overlay","extendable-div","merchant-hub-widget","merchant-hub-page","station-home-widget","station-settings-page"],"example":"merchant-hub-widget"},"url":{"type":"string","description":"Iframe URL that loads when the surface is triggered.","example":"https://www.parkautomotorsports.ca/"},"icon":{"type":"string","description":"Icon for Builder Component surfaces.","example":"grid-icon"},"hasManualButton":{"type":"boolean","description":"Whether a Button Grid trigger exists alongside the hook (overlay surfaces only).","example":false},"buttonLabel":{"type":"string","description":"Label shown on the Button Grid trigger.","example":"Verify Age"},"hubResource":{"type":"string","description":"Hub resource the surface attaches to (Merchant Hub Widget / Page only).","enum":["products","orders","customers","users"],"example":"products"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601).","example":"2026-05-26T17:30:51.420Z"},"updatedAt":{"type":"string","description":"Last-update timestamp (ISO 8601).","example":"2026-05-26T17:30:51.420Z"}},"required":["_id","organizationId","name","surfaceId","platform","type","url","createdAt","updatedAt"]},"PublishedExtensionDto":{"type":"object","properties":{"_id":{"type":"string","description":"Extension id.","example":"6a148346ffb97bbf5a57700e"},"label":{"type":"string","description":"Extension display name.","example":"Product Groups"},"status":{"type":"string","description":"Publication status. Always `public` for these endpoints.","example":"public"},"category":{"type":"string","description":"Extension category.","example":"hub"},"short_description":{"type":"string","description":"Short marketing description.","example":"Group products into named collections for quick POS filtering."},"long_description":{"type":"string","description":"Long marketing description.","example":"Product Groups lets admins create named groups of products from the dashboard..."},"url":{"type":"string","description":"Hosted iframe URL of the extension, if deployed.","example":"https://product-groups-163feb.host.staging.code.finalpos.com"},"description":{"type":"string","description":"General/legacy description."},"price":{"type":"string","description":"Price label.","example":"free"},"website":{"type":"string","description":"Marketing website URL."},"main_image":{"type":"string","description":"Main listing image URL."},"backgroundUrl":{"type":"string","description":"Background image URL."},"gallery":{"description":"Gallery image URLs.","example":[],"type":"array","items":{"type":"string"}},"theme":{"type":"string","description":"Theme identifier."},"redirectUrl":{"type":"string","description":"Post-install redirect URL."},"organizationId":{"type":"string","description":"Owning organization id (reference to `companies`).","example":"691df9c2047bfc55994d703c"},"organization":{"description":"Owning-organization summary (logo, name, alias). `null` when the extension has no organization.","nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/OrganizationSummaryDto"}]},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601).","example":"2026-05-25T17:13:42.066Z"},"updatedAt":{"type":"string","description":"Last-update timestamp (ISO 8601).","example":"2026-05-25T17:13:42.066Z"},"surfaces":{"description":"Surfaces (injection points) attached to this extension. Empty when none are linked.","type":"array","items":{"$ref":"#/components/schemas/SurfaceDto"}}},"required":["_id","label","status","category","short_description","long_description","organization","createdAt","updatedAt","surfaces"]},"WebhookAckDto":{"type":"object","properties":{"status":{"type":"string","description":"Acknowledgement that the raw webhook was captured and published for downstream processing. Always `accepted` when a 200 is returned.","enum":["accepted"],"example":"accepted"}},"required":["status"]}}},"security":[{"X-Api-Key":[]}]}