# Orders

Order object

## Get orders

> This operation returns a list of orders.\
> \
> \*\*Note:\*\* This operation needs \[Authentication]\(../guidelines/authentication.md) and supports the following JSON:API features:\
> \
> \- \[Relationships]\(../guidelines/relationships.md) - \`invoice\`, \`customer\`, \`booking\`, \`tables\`, \`promoCode\`, \`outlet\`, \`revenueCenter\`, \`payments\` using \`include\` query parameter.\
> \- \[Sparse fieldsets]\(../guidelines/sparse-fieldsets.md) - supports all fields of \`order\` and related resources with \`fields\` query parameter.<br>

```json
{"openapi":"3.1.0","info":{"title":"POS API","version":"1.0.0"},"tags":[{"name":"Orders","description":"Order object"}],"servers":[{"url":"https://api.mews.com/pos","description":"Production"},{"url":"https://api.mews-demo.com/pos","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"auth-scheme","description":"Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>"}},"parameters":{"page_size":{"in":"query","name":"page[size]","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000},"description":"The number of resources to return in a single response.","required":false},"page_before":{"in":"query","name":"page[before]","schema":{"type":"string","title":"Resource identifier","description":"Unique identifier.","pattern":"^[a-zA-Z0-9-]+$","minLength":1,"maxLength":36},"description":"The cursor for the previous page of resources.","required":false},"page_after":{"in":"query","name":"page[after]","schema":{"type":"string","title":"Resource identifier","description":"Unique identifier.","pattern":"^[a-zA-Z0-9-]+$","minLength":1,"maxLength":36},"description":"The cursor for the next page of resources.","required":false},"filter_created_at_gt":{"in":"query","name":"filter[createdAtGt]","description":"Filters the objects that were created after a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_created_at_gteq":{"in":"query","name":"filter[createdAtGteq]","description":"Filters the objects that were created after or on a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_updated_at_gt":{"in":"query","name":"filter[updatedAtGt]","description":"Filters the objects that were updated after a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"filter_updated_at_gteq":{"in":"query","name":"filter[updatedAtGteq]","description":"Filters the objects that were updated after or on a specified datetime.","required":false,"schema":{"anyOf":[{"type":"string","description":"Timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},{"type":"string","description":"Date in RFC 3339 format.","maxLength":10,"format":"date"}]}},"fields_orders":{"in":"query","name":"fields[orders]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["covers","tableStatus","status","state","notes","depositAmount","createdAt","updatedAt","promoCode","invoice","customer","booking","tables","outlet","revenueCenter","taxes"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_invoices":{"in":"query","name":"fields[invoices]","schema":{"type":"array","maxItems":19,"items":{"type":"string","enum":["cancelled","cancelReason","description","discount","discountAmount","itemDiscountAmount","subtotal","tax","tipAmount","total","createdAt","updatedAt","user","originalInvoice","promoCode","revenueCenter","register","order","invoiceItems"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_customers":{"in":"query","name":"fields[customers]","schema":{"type":"array","maxItems":17,"items":{"type":"string","enum":["fullName","companyName","email","taxNumber","notes","phone","mobile","dateOfBirth","createdAt","updatedAt","countrySpecificCode","address1","address2","city","state","postalCode","country"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_bookings":{"in":"query","name":"fields[bookings]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["status","promotions","bookingReference","roomNumber","notes","depositAmount","duration","partySize","bookingDatetime","createdAt","updatedAt","isWalkIn","customer","orders","tables"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_tables":{"in":"query","name":"fields[tables]","schema":{"type":"array","maxItems":5,"items":{"type":"string","enum":["name","numberOfSeats","createdAt","updatedAt","area"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_promo_codes":{"in":"query","name":"fields[promoCodes]","schema":{"type":"array","maxItems":11,"items":{"type":"string","enum":["code","active","description","maxUsages","startsAt","endsAt","createdAt","updatedAt","amount","discountType","channel"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_outlets":{"in":"query","name":"fields[outlets]","schema":{"type":"array","maxItems":9,"items":{"type":"string","enum":["name","address1","address2","city","state","index","postalCode","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_revenue_centers":{"in":"query","name":"fields[revenueCenters]","schema":{"type":"array","maxItems":4,"items":{"type":"string","enum":["name","isActive","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_taxes":{"in":"query","name":"fields[taxes]","schema":{"type":"array","maxItems":8,"items":{"type":"string","enum":["name","rate","taxType","isActive","createdAt","updatedAt","ratePercent","label"]}},"description":"Fields query parameter to allow the client to customize which tax fields should be returned.","explode":false,"required":false},"fields_payments":{"in":"query","name":"fields[payments]","schema":{"type":"array","maxItems":6,"items":{"type":"string","enum":["amount","notes","roomNumber","tipAmount","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"filter_table_id_eq":{"in":"query","name":"filter[tableIdEq]","description":"Filters the objects by the id of related table(s) resource","required":false,"schema":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID UUID4.","minLength":36,"maxLength":36}},"filter_revenue_center_id_eq":{"in":"query","name":"filter[revenueCenterIdEq]","description":"Filters the objects by the id of related revenue center(s) resource","required":false,"schema":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID UUID4.","minLength":36,"maxLength":36}}},"headers":{"x_rate_limit_limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_reset":{"description":"The time at which the rate limit resets, in UTC epoch seconds.","schema":{"type":"integer","format":"int64","minimum":1633036800,"maximum":2147483647}},"access_control_allow_origin":{"description":"Specifies which origins are allowed to access the resource.","schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[A-Za-z /*]+$"}},"retry_after":{"description":"The time the client should wait before making a new request.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":3600}}},"schemas":{"orders":{"orders_response":{"type":"object","properties":{"data":{"type":"array","description":"The document's \"primary data\".","maxItems":1000,"items":{"$ref":"#/components/schemas/orders/order"}},"included":{"type":["array","null"],"maxItems":100,"description":"Details of the objects to which the order is associated.","items":{"anyOf":[{"$ref":"#/components/schemas/invoices/invoice"},{"$ref":"#/components/schemas/tables/table"},{"$ref":"#/components/schemas/bookings/booking"},{"$ref":"#/components/schemas/customers/customer"},{"$ref":"#/components/schemas/promo_codes/promo_code"},{"$ref":"#/components/schemas/outlets/outlet"},{"$ref":"#/components/schemas/revenue_centers/revenue_center"},{"$ref":"#/components/schemas/taxes/tax"},{"$ref":"#/components/schemas/order_items/order_item"},{"$ref":"#/components/schemas/order_bundles/order_bundle"},{"$ref":"#/components/schemas/order_bundle_items/order_bundle_item"},{"$ref":"#/components/schemas/payments/payment"}]}},"links":{"$ref":"#/components/schemas/links"}},"required":["data","links"]},"order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"notes":{"type":["string","null"],"description":"Notes about the order.","minLength":1,"maxLength":500,"pattern":"^[^<>&]+$"},"covers":{"oneOf":[{"type":"integer","format":"int32","minimum":0,"maximum":1000},{"type":"null"}],"description":"How many people are seated at the table."},"depositAmount":{"type":["string","null"],"description":"The amount of discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tableStatus":{"type":["string","null"],"description":"Status of the table. Possible values are \"no_table\", \"seated\", \"cleaning\", and \"free\".","enum":[null,"no_table","seated","cleaning","free"]},"surcharge":{"type":["string","null"],"description":"The surcharge amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"surchargeType":{"type":["string","null"],"description":"The type of surcharge applied to the order.","enum":["fixed","percentage"]},"surchargeDescription":{"type":["string","null"],"description":"Description of the surcharge applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"discount":{"type":["string","null"],"description":"The discount amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":["string","null"],"description":"The type of discount applied to the order.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"status":{"type":["string","null"],"description":"Fulfillment status of the order lifecycle.","enum":[null,"auto","received","confirmed","rejected","preparing","ready_for_delivery","dispatched","in_transit","delivered"]},"state":{"type":["string"],"description":"Order state.","enum":["draft","sent","paid","discarded","cart","pending_payment","open","open_web"]},"createdAt":{"type":"string","description":"Order created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Order updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["covers","tableStatus","createdAt","updatedAt"]},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"invoice":{"type":"object","description":"Details of the invoice associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"invoices","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"customers","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"booking":{"type":"object","description":"Details of the booking associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"bookings","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"tables":{"type":"object","description":"Details of the tables associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"description":"An array of table objects.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"tables","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}},"required":["data"]},"promoCode":{"type":"object","description":"Details of the promo codes associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"promoCodes","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"outlet":{"type":"object","description":"Details of the outlet associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"outlets","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"taxes":{"type":"object","description":"Details of the taxes associated with the product.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"taxes"}},"required":["id","type"]}}},"required":["data"]},"orderItems":{"type":"object","description":"Details of the items associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"items":{"oneOf":[{"$ref":"#/components/schemas/order_items/order_item_identifier"},{"$ref":"#/components/schemas/order_bundle_items/order_bundle_item_identifier"}]}}},"required":["data"]},"payments":{"type":"object","description":"Details of the payments associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"payments","description":"The type member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type","attributes","links"]}},"order_items":{"order_item_identifier":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orderItems"}},"required":["id","type"]},"order_item":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"orderItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The number of units of the product being ordered."},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"subtotal":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the product before taxes and discounts are applied."},"tax":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The tax amount applicable to the specific item."},"total":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the item after taxes and discounts have been applied."},"discount":{"type":["string","null"],"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The percentage or amount of discount applied specifically to this item."},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to this specific item.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"isComp":{"type":"boolean","description":"Indicates whether the item was provided for free (comped) or not."},"isVoid":{"type":"boolean","description":"Indicates whether the item has been voided from the order."},"notes":{"type":["string","null"],"description":"Internal notes for the order item.","maxLength":2048,"pattern":"^[^<>&]+$"},"compVoidReason":{"type":["string","null"],"description":"The reason provided for voiding the item, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"compVoidNotes":{"type":["string","null"],"description":"Additional notes regarding the comping or voiding of the item.","maxLength":2048,"pattern":"^[^<>&]+$"},"status":{"type":"string","description":"The current status of the order item.","enum":["received","confirmed","delivered","rejected"]},"discountType":{"type":"string","description":"The type of discount applied to the order item.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order item.","maxLength":255,"pattern":"^[^<>&]+$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["quantity","unitPriceInclTax","subtotal","tax","total","discount","discountAmount","isComp","isVoid","notes","compVoidReason","compVoidNotes","status","discountType","discountDescription","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"product":{"$ref":"#/components/schemas/products/relationship_product"},"productVariant":{"$ref":"#/components/schemas/product_variants/relationship_product_variant"},"modifiers":{"$ref":"#/components/schemas/modifiers/relationship_modifiers"},"revenueCenter":{"$ref":"#/components/schemas/revenue_centers/relationship_revenue_center"}}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"resource_identifier":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"order_bundle_items":{"order_bundle_item_identifier":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundleItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]},"order_bundle_item":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundleItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The number of units of the product being ordered."},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the item after taxes and discounts have been applied."},"notes":{"type":["string","null"],"description":"Internal notes for the order bundle item.","maxLength":1000,"pattern":"^[^<>&]+$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["quantity","unitPriceInclTax","total","notes","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"product":{"$ref":"#/components/schemas/products/relationship_product"},"productVariant":{"$ref":"#/components/schemas/product_variants/relationship_product_variant"},"modifiers":{"$ref":"#/components/schemas/modifiers/relationship_modifiers"},"revenueCenter":{"$ref":"#/components/schemas/revenue_centers/relationship_revenue_center"},"orderBundle":{"$ref":"#/components/schemas/order_bundles/relationship_order_bundle"}}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"invoices":{"invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"invoices","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discount":{"type":["string","null"],"description":"The amount of discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tax":{"type":"string","description":"The total tax amount applicable to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","description":"The final amount due on the invoice after all discounts and taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"subtotal":{"type":"string","description":"The total amount of the invoice before taxes and additional charges.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tipAmount":{"type":["string","null"],"description":"The amount of gratuity or tip added to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"cancelled":{"type":"boolean","description":"Indicates whether the invoice has been cancelled (true) or not (false)."},"cancelReason":{"type":["string","null"],"description":"The reason provided for cancelling the invoice, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"description":{"type":["string","null"],"description":"A brief description of the invoice, including details about the transaction.","maxLength":255,"pattern":"^[^<>&]+$"},"itemDiscountAmount":{"type":["string","null"],"description":"The total discount amount applied to individual items within the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"}},"required":["discount","tax","total","subtotal","tipAmount","createdAt","updatedAt","cancelled","cancelReason","discountAmount","description","itemDiscountAmount"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"user":{"type":"object","description":"Details of the user associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"users"}},"required":["id","type"]}},"required":["data"]},"order":{"type":"object","description":"Details of the order associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}},"required":["data"]},"registers":{"type":"object","description":"Details of the register associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"register"}},"links":{"self":{"type":"string","format":"uri","maxLength":255}},"required":["id","type"]}},"required":["data"]},"originalInvoice":{"type":"object","description":"Details of the original invoice associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"invoices"}},"required":["id","type"]}},"required":["data"]},"items":{"type":"object","description":"Details of the items associated with the invoice.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"invoiceItems"},"links":{"self":{"type":"string","format":"uri","maxLength":255}}},"required":["id","type"]}}},"required":["data"]},"promoCode":{"type":"object","description":"Details of the promo codes associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"promoCodes","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}}}}},"required":["id","type","attributes"]}},"tables":{"table":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"The name of the table.","minLength":0,"maxLength":255,"pattern":"^[A-Za-z0-9,-_. ]+$"},"numberOfSeats":{"type":"integer","description":"Number of people that can be seated at this table.","format":"int32","minimum":1,"maximum":99},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","numberOfSeats","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"area":{"type":"object","nullable":true,"description":"Details of the table area.","properties":{"data":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"areas"}},"required":["id","type"]},{"type":"null"}]}}}}}},"required":["id","type","attributes"]}},"bookings":{"booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":"boolean","description":"Indicates if the booking is a walk-in."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["status","partySize","bookingDatetime"]}]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"tables":{"type":"object","description":"Details of the tables associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"}},"required":["id","type"]}}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the booking.","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"customers"}}},{"type":"null"}]}}},"orders":{"type":"object","description":"Details of the orders associated with the booking.","properties":{"data":{"type":"array","description":"A list of related order objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type"]},"booking_attributes":{"type":"object","properties":{"status":{"type":["string","null"],"enum":["confirmed","seated","completed","cancelled","no_show"],"description":"The initial status of the booking. Possible values are \"confirmed\", \"seated\", \"completed\", \"cancelled\", and \"no_show\"."},"partySize":{"type":"integer","description":"Represents the number of people included in the booking.","format":"int32","minimum":1,"maximum":1000},"bookingDatetime":{"type":"string","maxLength":25,"format":"date-time","description":"The booking's date."},"duration":{"type":["integer","null"],"description":"Represents the length of the booking in minutes.","format":"int32","minimum":1,"maximum":10000},"notes":{"type":["string","null"],"maxLength":10000,"pattern":"^[^<>&]+$","description":"Additional notes for the booking."},"roomNumber":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The room number of the booking's customer."},"promotions":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The promotions of the booking."},"bookingReference":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"A reference code or identifier associated with the booking."},"depositAmount":{"type":["string","null"],"description":"The amount of the deposit.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"}}}},"customers":{"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"customers","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"$ref":"#/components/schemas/customers/customer_attributes","createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"anyOf":[{"required":["fullName"]},{"required":["companyNumber"]}],"required":["createdAt","updatedAt"]}},"required":["id","type","attributes"]},"customer_attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"fullName":{"type":["string","null"],"minLength":1,"maxLength":255,"pattern":"^[^<>&]+$","description":"The full name of the customer. This can be either a personal name or a company name."},"companyName":{"type":["string","null"],"maxLength":255,"pattern":"^[-\\w\\s.,!;;'&]+$","description":"The name of the company associated with the customer."},"taxNumber":{"type":["string","null"],"maxLength":40,"pattern":"^[A-Za-z0-9]{1,24}$","description":"The customer's tax identification number."},"email":{"type":["string","null"],"maxLength":320,"pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","description":"The customer's email address."},"address1":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"The first line of the customer's address."},"address2":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"The second line of the customer's address."},"city":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The city of the customer's address."},"state":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The state or province of the customer's address."},"postalCode":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The postal or ZIP code of the customer's address."},"country":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The country of the customer's address."},"notes":{"type":["string","null"],"maxLength":500,"pattern":"^[\\s\\S]*$","description":"Additional notes about the customer."},"phone":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The customer's phone number."},"mobile":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The customer's mobile phone number."},"countrySpecificCode":{"type":["string","null"],"maxLength":50,"pattern":"^[^<>&]+$","description":"A unique country specific code assigned to the customer. Lottery code, for example, in Italy."},"dateOfBirth":{"type":["string","null"],"maxLength":10,"format":"date","description":"The customer's date of birth in YYYY-MM-DD format."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}}}},"promo_codes":{"promo_code":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"promoCodes"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discountType":{"type":"string","description":"Specifies whether the discount is a fixed amount, a percentage, or free shipping.","enum":["absolute","percent","free_shipping"]},"amount":{"type":["string","null"],"description":"The value of the discount. Required for absolute and percent discount types.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":19},"channel":{"type":"string","description":"The sales channel where the discount is applicable.","enum":["all_channels","ecommerce","pos"]},"code":{"type":"string","description":"The unique identifier code for the promo code.","pattern":"^.+$","minLength":1,"maxLength":255},"active":{"type":"boolean","description":"A boolean indicating if the promo code is currently active."},"description":{"type":["string","null"],"description":"A description of the promo code.","pattern":"^.*$","maxLength":1000},"maxUsages":{"type":["integer","null"],"description":"Maximum number of times this promo code can be used.","format":"int32","minimum":1,"maximum":1000000},"startsAt":{"type":["string","null"],"description":"Date and time when the promo code becomes valid in RFC 3339 format.","maxLength":25,"format":"date-time"},"endsAt":{"type":["string","null"],"description":"Date and time when the promo code expires in RFC 3339 format.","maxLength":25,"format":"date-time"},"createdAt":{"type":"string","description":"Promo code created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Promo code updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["discountType","amount","channel","code","active","description","maxUsages","startsAt","endsAt","createdAt","updatedAt"]}},"required":["id","type","attributes"]}},"outlets":{"outlet":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"outlets","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"The name of the outlet, representing the business or location.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"address1":{"type":["string","null"],"description":"The first line of the outlet's street address, typically including the street number and name.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"address2":{"type":["string","null"],"description":"The second line of outlet's address.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"city":{"type":["string","null"],"description":"The city where the outlet is located.","minLength":1,"maxLength":86,"pattern":"^[^<>&]+$"},"state":{"type":["string","null"],"description":"The state or region where the outlet is located.","minLength":1,"maxLength":54,"pattern":"^[^<>&]+$"},"postalCode":{"type":["string","null"],"description":"The postal or ZIP code for outlet's location.","minLength":1,"maxLength":10,"pattern":"^[^<>&]+$"},"index":{"type":"integer","description":"A unique sequential number representing the outlet number within the establishment.","format":"int32","minimum":1,"maximum":10},"createdAt":{"type":"string","description":"Outlet created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Outlet updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","address1","address2","city","state","postalCode","index","createdAt","updatedAt"]}},"required":["id","type","attributes"]}},"revenue_centers":{"revenue_center":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"revenueCenters"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","maxLength":255,"pattern":"^[^<>&]+$","description":"Name of the revenue center."},"isActive":{"type":"boolean","description":"Indicates whether the revenue center is active."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","isActive","createdAt","updatedAt"]}},"required":["id","type","attributes"]},"relationship_revenue_center":{"type":"object","description":"Details of the revenue center associated with the selected item.","properties":{"data":{"type":["object","null"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]}},"taxes":{"tax":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"taxes"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"Name of the tax.","minLength":1,"maxLength":255,"pattern":"^.*\\S.*$"},"rate":{"type":"string","description":"Tax rate as a decimal.","minLength":3,"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,6}$"},"taxType":{"type":"string","description":"Type of the tax.","enum":["vat","other","fixed","consumption","sales","state","city","liquor","food","entertainment"]},"isActive":{"type":"boolean","description":"Whether the tax is active."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"label":{"type":["string","null"],"description":"Label of the tax.","maxLength":255,"pattern":"^.*\\S.*$"},"ratePercent":{"type":"string","description":"Tax rate as a percentage.","minLength":1,"maxLength":7,"pattern":"^[0-9]+(\\.[0-9]{1,2})?$"}},"required":["name","rate","taxType","isActive","createdAt","updatedAt","ratePercent","label"]}},"required":["id","type","attributes"]}},"products":{"relationship_product":{"type":"object","description":"Details of the product associated with the selected item.","properties":{"data":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"products"}},"required":["id","type"]}},"required":["data"]}},"product_variants":{"relationship_product_variant":{"type":"object","description":"Details of the product variant associated with the selected item.","properties":{"data":{"type":["object","null"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"productVariants"}},"required":["id","type"]}},"required":["data"]}},"modifiers":{"relationship_modifiers":{"type":"object","description":"Details of the modifiers associated with the selected item.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"modifiers"}},"required":["id","type"]}}},"required":["data"]}},"order_bundles":{"order_bundle":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundles","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discount":{"type":["string","null"],"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The percentage or amount of discount applied specifically to this item."},"discountType":{"type":"string","description":"The type of discount applied to the order item.","enum":["fixed","percentage"]},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["discount","discountType","createdAt","updatedAt"]},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]},"relationship_order_bundle":{"type":"object","description":"Details of the order bundle associated with the selected item.","properties":{"data":{"type":["object"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orderBundles"}},"required":["id","type"]}},"required":["data"]}},"payments":{"payment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification)\nmember is used to describe resource objects that share common attributes and relationships.\n","const":"payments"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the payment resource's data.","properties":{"amount":{"type":"string","description":"Payment amount represented as a decimal string with 2 decimal places.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"notes":{"type":["string","null"],"description":"Notes about the payment.","minLength":1,"maxLength":500,"pattern":"^[^<>&]+$"},"roomNumber":{"type":["string","null"],"description":"The room number associated with the payment.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"tipAmount":{"type":["string","null"],"description":"Tip amount represented as a decimal string with 2 decimal places.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"createdAt":{"type":"string","description":"Payment created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Payment updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["amount","notes","tipAmount","roomNumber","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the payment and other JSON:API resources.","properties":{"order":{"type":"object","description":"Details of the order associated with the payment.","properties":{"data":{"type":["object"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"orders","description":"The type member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"paymentMethod":{"type":"object","description":"Details of the payment method used for the payment.","properties":{"data":{"type":["object"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"paymentMethods","description":"The type member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"register":{"type":"object","description":"Details of the register associated with the payment.","properties":{"data":{"type":["object"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"registers","description":"The type member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]}},"required":["order","paymentMethod","register"]}},"required":["id","type","attributes"]}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/profiles/ethanresnick/cursor-pagination/#auto-id-links) describing cursor pagination links.","properties":{"prev":{"type":["string","null"],"format":"uri","maxLength":1024,"description":"The link to the previous page of results."},"next":{"type":["string","null"],"format":"uri","maxLength":1024,"description":"The link to the next page of results."}},"required":["next","prev"]},"error":{"type":"object","description":"A JSON:API error object.\n\nAdditional properties specific to the problem type may be present.    \n","properties":{"errors":{"type":"array","description":"An array of error details to accompany a problem details response.","maxItems":1000,"items":{"type":"object","description":"An object to provide explicit details on a problem towards an API consumer.","properties":{"id":{"type":"string","maxLength":16,"description":"A unique identifier for this particular occurrence of the problem.","pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","maxLength":3,"description":"The HTTP status code applicable to this problem, expressed as a string value.","pattern":"^[1-5][0-9]{2}$"},"code":{"type":"string","maxLength":50,"description":"An application-specific error code, expressed as a string value.","pattern":"^[A-Za-z0-9_-]+$"},"title":{"type":"string","description":"A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.","maxLength":256,"pattern":"^.{1,255}$"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized.","maxLength":1024,"pattern":"^.{1,1023}$"},"source":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer to a specific request body property that is the source of error.","maxLength":1024,"pattern":"^$|^/([A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+$"},"parameter":{"type":"string","description":"A string indicating which URI query parameter caused the error.","maxLength":1024,"pattern":"^[A-Za-z0-9_]+$"},"header":{"type":"string","description":"The name of the header that is the source of error.","maxLength":1024,"pattern":"^[A-Za-z-]+$"}}},"meta":{"type":"object","description":"Additional information about the error.","additionalProperties":true}},"required":["title"]}}},"required":["errors"]}},"responses":{"bad_request":{"description":"Bad request.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unauthorized":{"description":"Unauthorized.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"too_many_requests":{"description":"Too many requests.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Retry-After":{"$ref":"#/components/headers/retry_after"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"internal_server_error":{"description":"Internal Server Error.","content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"service_unavailable":{"description":"Service is unavailable.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}}}},"paths":{"/v1/orders":{"get":{"operationId":"getOrders","summary":"Get orders","description":"This operation returns a list of orders.\n\n**Note:** This operation needs [Authentication](../guidelines/authentication.md) and supports the following JSON:API features:\n\n- [Relationships](../guidelines/relationships.md) - `invoice`, `customer`, `booking`, `tables`, `promoCode`, `outlet`, `revenueCenter`, `payments` using `include` query parameter.\n- [Sparse fieldsets](../guidelines/sparse-fieldsets.md) - supports all fields of `order` and related resources with `fields` query parameter.\n","parameters":[{"$ref":"#/components/parameters/page_size"},{"$ref":"#/components/parameters/page_before"},{"$ref":"#/components/parameters/page_after"},{"$ref":"#/components/parameters/filter_created_at_gt"},{"$ref":"#/components/parameters/filter_created_at_gteq"},{"$ref":"#/components/parameters/filter_updated_at_gt"},{"$ref":"#/components/parameters/filter_updated_at_gteq"},{"$ref":"#/components/parameters/fields_orders"},{"$ref":"#/components/parameters/fields_invoices"},{"$ref":"#/components/parameters/fields_customers"},{"$ref":"#/components/parameters/fields_bookings"},{"$ref":"#/components/parameters/fields_tables"},{"$ref":"#/components/parameters/fields_promo_codes"},{"$ref":"#/components/parameters/fields_outlets"},{"$ref":"#/components/parameters/fields_revenue_centers"},{"$ref":"#/components/parameters/fields_taxes"},{"$ref":"#/components/parameters/fields_payments"},{"$ref":"#/components/parameters/filter_table_id_eq"},{"$ref":"#/components/parameters/filter_revenue_center_id_eq"},{"in":"query","name":"filter[stateIn]","description":"Filters the objects by their state.","required":false,"schema":{"type":"array","maxItems":8,"items":{"type":"string","format":"enum","enum":["draft","sent","paid","discarded","cart","pending_payment","open","open_web"]}}},{"in":"query","name":"include","schema":{"type":"array","maxItems":10,"items":{"type":"string","enum":["invoice","customer","booking","tables","promoCode","outlet","revenueCenter","taxes","orderItems","payments"]}},"description":"include query parameter to allow the client to customize which related resource should be returned.","required":false}],"tags":["Orders"],"responses":{"200":{"description":"Successful response with orders data in JSON:API format.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/orders/orders_response"}}}},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/unauthorized"},"429":{"$ref":"#/components/responses/too_many_requests"},"500":{"$ref":"#/components/responses/internal_server_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}}}}}
```

## Create order

> This operation creates an order.\
> \
> \*\*Note:\*\* This operation needs \[Authentication]\(../essential-guide/authentication.md) and supports the following JSON:API features:\
> \
> \- \[Relationships]\(../guidelines/relationships.md) - \`invoice\`, \`customer\`, \`booking\`, \`tables\`, \`promoCode\`, \`outlet\`, \`revenueCenter\`, \`taxes\`, \`orderItems\`, \`payments\` using \`include\` query parameter.\
> \- \[Sparse fieldsets]\(../guidelines/sparse-fieldsets.md) - supports all fields of \`order\` and related resources with \`fields\` query parameter.<br>

```json
{"openapi":"3.1.0","info":{"title":"POS API","version":"1.0.0"},"tags":[{"name":"Orders","description":"Order object"}],"servers":[{"url":"https://api.mews.com/pos","description":"Production"},{"url":"https://api.mews-demo.com/pos","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"auth-scheme","description":"Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>"}},"parameters":{"fields_orders":{"in":"query","name":"fields[orders]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["covers","tableStatus","status","state","notes","depositAmount","createdAt","updatedAt","promoCode","invoice","customer","booking","tables","outlet","revenueCenter","taxes"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_invoices":{"in":"query","name":"fields[invoices]","schema":{"type":"array","maxItems":19,"items":{"type":"string","enum":["cancelled","cancelReason","description","discount","discountAmount","itemDiscountAmount","subtotal","tax","tipAmount","total","createdAt","updatedAt","user","originalInvoice","promoCode","revenueCenter","register","order","invoiceItems"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_customers":{"in":"query","name":"fields[customers]","schema":{"type":"array","maxItems":17,"items":{"type":"string","enum":["fullName","companyName","email","taxNumber","notes","phone","mobile","dateOfBirth","createdAt","updatedAt","countrySpecificCode","address1","address2","city","state","postalCode","country"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_bookings":{"in":"query","name":"fields[bookings]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["status","promotions","bookingReference","roomNumber","notes","depositAmount","duration","partySize","bookingDatetime","createdAt","updatedAt","isWalkIn","customer","orders","tables"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_tables":{"in":"query","name":"fields[tables]","schema":{"type":"array","maxItems":5,"items":{"type":"string","enum":["name","numberOfSeats","createdAt","updatedAt","area"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_promo_codes":{"in":"query","name":"fields[promoCodes]","schema":{"type":"array","maxItems":11,"items":{"type":"string","enum":["code","active","description","maxUsages","startsAt","endsAt","createdAt","updatedAt","amount","discountType","channel"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_outlets":{"in":"query","name":"fields[outlets]","schema":{"type":"array","maxItems":9,"items":{"type":"string","enum":["name","address1","address2","city","state","index","postalCode","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_revenue_centers":{"in":"query","name":"fields[revenueCenters]","schema":{"type":"array","maxItems":4,"items":{"type":"string","enum":["name","isActive","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_taxes":{"in":"query","name":"fields[taxes]","schema":{"type":"array","maxItems":8,"items":{"type":"string","enum":["name","rate","taxType","isActive","createdAt","updatedAt","ratePercent","label"]}},"description":"Fields query parameter to allow the client to customize which tax fields should be returned.","explode":false,"required":false},"fields_payments":{"in":"query","name":"fields[payments]","schema":{"type":"array","maxItems":6,"items":{"type":"string","enum":["amount","notes","roomNumber","tipAmount","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false}},"schemas":{"orders":{"order_create_request":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/orders/order_create","description":"The document's \"primary data\"."}},"required":["data"]},"order_create":{"type":"object","properties":{"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"notes":{"type":"string","description":"Notes about the order.","minLength":1,"maxLength":500,"pattern":"^[^<>&]+$"},"covers":{"type":"integer","format":"int32","description":"How many people are seated at the table.","minimum":0,"maximum":1000},"surcharge":{"type":["string","null"],"description":"The surcharge amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"surchargeType":{"type":["string","null"],"description":"The type of surcharge applied to the order.","enum":["fixed","percentage"]},"surchargeDescription":{"type":["string","null"],"description":"Description of the surcharge applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"discount":{"type":["string","null"],"description":"The discount amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":["string","null"],"description":"The type of discount applied to the order.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"}}},"relationships":{"type":"object","description":"An [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) representing associations with other resources.","properties":{"customer":{"type":"object","description":"Represents the customer associated with the order.","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"customers"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}},"tables":{"type":"object","description":"Represents the table associated with the order.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":1000,"items":{"type":"object","properties":{"type":{"type":"string","const":"tables"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}}},"outlet":{"type":"object","description":"Represents the outlet associated with the order.","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"outlets"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}},"revenueCenter":{"type":"object","description":"Represents the revenue center associated with the order.","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"revenue_centers"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}},"promoCode":{"type":"object","description":"Represents the promo code associated with the order.","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"promo_codes"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}}}}},"items":{"type":"object","description":"Represents the items associated with the order.","properties":{"data":{"type":"array","description":"A list of related item objects.","maxItems":1000,"items":{"type":"object","properties":{"type":{"type":"string","enum":["orderItems","orderBundleItems"]},"tempId":{"type":"string","description":"Temporary ID of the item.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"}},"required":["type","tempId"]}}},"required":["data"]},"payments":{"type":"object","description":"Represents the payments associated with the order.","properties":{"data":{"type":"array","description":"A list of related payment objects.","maxItems":100,"items":{"type":"object","properties":{"type":{"type":"string","const":"payments"},"tempId":{"type":"string","description":"Temporary ID of the payment.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"}},"required":["type","tempId"]}}},"required":["data"]}},"required":["outlet"]},"included":{"type":"object","description":"An object containing included resource objects that are related to the primary data and/or each other.","properties":{"items":{"type":"array","description":"An array of resource objects that are related to the primary data and/or each other.","maxItems":1000,"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"orderItems"},"tempId":{"type":"string","description":"Temporary ID of the order item.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"attributes":{"type":"object","properties":{"quantity":{"type":"string","description":"Quantity of the item.","pattern":"^[0-9]+(\\.[0-9]{1,2})?$","maxLength":10},"total":{"type":"string","description":"Total price of the item including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"unitPriceInclTax":{"type":"string","description":"Unit price including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"tax":{"type":"string","description":"Tax amount for the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"subtotal":{"type":"string","description":"Subtotal price of the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discount":{"type":"string","description":"Discount amount for the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":"string","enum":["percentage","fixed"],"description":"Type of discount applied."},"discountDescription":{"type":"string","description":"Description of the discount.","maxLength":255,"pattern":"^[^<>&]+$"},"isComp":{"type":"boolean","description":"Indicates whether the item was provided for free (comped) or not."},"isVoid":{"type":"boolean","description":"Indicates whether the item has been voided from the order."},"notes":{"type":["string","null"],"description":"Internal notes for the order item.","maxLength":2048,"pattern":"^[^<>&]+$"},"compVoidReason":{"type":"string","description":"The reason provided for voiding the item, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"compVoidNotes":{"type":"string","description":"Additional notes regarding the comping or voiding of the item.","maxLength":2048,"pattern":"^[^<>&]+$"}}},"relationships":{"type":"object","properties":{"product":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"products"},"id":{"type":"string","format":"uuid","description":"UUID of the product.","minLength":36,"maxLength":36}}}}},"productVariant":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"productVariants"},"id":{"type":"string","format":"uuid","description":"UUID of the product variant.","minLength":36,"maxLength":36}}}}},"modifiers":{"type":"object","properties":{"data":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"type":{"type":"string","const":"modifiers"},"id":{"type":"string","format":"uuid","description":"UUID of the modifier.","minLength":36,"maxLength":36}}}}}}}}},"required":["type","tempId"]},{"type":"object","properties":{"type":{"type":"string","const":"orderBundleItems"},"tempId":{"type":"string","description":"Temporary ID of the order bundle item.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"attributes":{"$ref":"#/components/schemas/orders/order_bundle_item_create_attributes"},"relationships":{"$ref":"#/components/schemas/orders/order_bundle_item_create_relationships"}},"required":["type","tempId"]}]}},"orderBundles":{"type":"array","description":"An array of resource objects that are related to the primary data and/or each other.","maxItems":1000,"items":{"type":"object","properties":{"type":{"type":"string","const":"orderBundles"},"tempId":{"type":"string","description":"Temporary ID of the order bundle.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"attributes":{"$ref":"#/components/schemas/orders/order_bundle_create_attributes"},"relationships":{"$ref":"#/components/schemas/orders/order_bundle_create_relationships"}},"required":["type","tempId","attributes","relationships"]}},"payments":{"type":"array","description":"An array of payment resource objects that are related to the primary data and/or each other.","maxItems":100,"items":{"type":"object","properties":{"type":{"type":"string","const":"payments"},"tempId":{"type":"string","description":"Temporary ID of the payment.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"attributes":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount represented as a decimal string with 2 decimal places.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"notes":{"type":["string","null"],"description":"Notes about the payment.","pattern":"^[^<>&]+$","minLength":1,"maxLength":500},"roomNumber":{"type":["string","null"],"description":"The room number associated with the payment (only present for room charges).","pattern":"^[^<>&]+$","minLength":1,"maxLength":255},"tipAmount":{"type":["string","null"],"description":"Tip amount represented as a decimal string with 2 decimal places.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10}},"required":["amount"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the payment and other JSON:API resources.","properties":{"paymentMethod":{"type":"object","description":"Details of the payment method used for the payment.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"paymentMethods"}},"required":["id","type"]}},"required":["data"]}},"required":["paymentMethod"]}},"required":["type","tempId","attributes","relationships"]}}}}},"required":["type","attributes"]},"order_bundle_item_create_attributes":{"type":"object","properties":{"total":{"type":"string","description":"Total price of the item including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"unitPriceInclTax":{"type":"string","description":"Unit price including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"notes":{"type":"string","description":"Internal notes for the bundle item.","maxLength":500,"pattern":"^[^<>&]+$"}},"required":["total","unitPriceInclTax"]},"order_bundle_item_create_relationships":{"type":"object","properties":{"productBundleItem":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"productBundleItems"},"id":{"type":"string","format":"uuid","description":"UUID of the product bundle item.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"orderBundle":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"orderBundles"},"id":{"type":"string","format":"uuid","description":"UUID of the product.","minLength":36,"maxLength":36},"tempId":{"type":"string","description":"Temporary ID of the order bundle.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"}},"required":["type"],"oneOf":[{"required":["id"]},{"required":["tempId"]}]}},"required":["data"]},"product":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"products"},"id":{"type":"string","format":"uuid","description":"UUID of the product.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"productVariant":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"productVariants"},"id":{"type":"string","format":"uuid","description":"UUID of the product variant.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"modifiers":{"type":"object","properties":{"data":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"type":{"type":"string","const":"modifiers"},"id":{"type":"string","format":"uuid","description":"UUID of the modifier.","minLength":36,"maxLength":36}},"required":["type","id"]}}},"required":["data"]}},"required":["product","orderBundle","productBundleItem"]},"order_bundle_create_attributes":{"type":"object","properties":{"quantity":{"type":"string","description":"Quantity of the bundle item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discount":{"type":"string","description":"Discount amount for the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":"string","enum":["percentage","fixed"],"description":"Type of discount applied."}},"required":["quantity"]},"order_bundle_create_relationships":{"type":"object","properties":{"productBundle":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"productBundles"},"id":{"type":"string","format":"uuid","description":"UUID of the product bundle.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]}},"required":["productBundle"]},"order_response":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/orders/order","description":"The document's \"primary data\"."},"included":{"type":["array","null"],"maxItems":100,"description":"Details of the objects to which the order is associated.","items":{"anyOf":[{"$ref":"#/components/schemas/invoices/invoice"},{"$ref":"#/components/schemas/tables/table"},{"$ref":"#/components/schemas/bookings/booking"},{"$ref":"#/components/schemas/customers/customer"},{"$ref":"#/components/schemas/promo_codes/promo_code"},{"$ref":"#/components/schemas/outlets/outlet"},{"$ref":"#/components/schemas/revenue_centers/revenue_center"},{"$ref":"#/components/schemas/taxes/tax"},{"$ref":"#/components/schemas/order_items/order_item"},{"$ref":"#/components/schemas/order_bundle_items/order_bundle_item"},{"$ref":"#/components/schemas/order_bundles/order_bundle"}]}}},"required":["data"]},"order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"notes":{"type":["string","null"],"description":"Notes about the order.","minLength":1,"maxLength":500,"pattern":"^[^<>&]+$"},"covers":{"oneOf":[{"type":"integer","format":"int32","minimum":0,"maximum":1000},{"type":"null"}],"description":"How many people are seated at the table."},"depositAmount":{"type":["string","null"],"description":"The amount of discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tableStatus":{"type":["string","null"],"description":"Status of the table. Possible values are \"no_table\", \"seated\", \"cleaning\", and \"free\".","enum":[null,"no_table","seated","cleaning","free"]},"surcharge":{"type":["string","null"],"description":"The surcharge amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"surchargeType":{"type":["string","null"],"description":"The type of surcharge applied to the order.","enum":["fixed","percentage"]},"surchargeDescription":{"type":["string","null"],"description":"Description of the surcharge applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"discount":{"type":["string","null"],"description":"The discount amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":["string","null"],"description":"The type of discount applied to the order.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"status":{"type":["string","null"],"description":"Fulfillment status of the order lifecycle.","enum":[null,"auto","received","confirmed","rejected","preparing","ready_for_delivery","dispatched","in_transit","delivered"]},"state":{"type":["string"],"description":"Order state.","enum":["draft","sent","paid","discarded","cart","pending_payment","open","open_web"]},"createdAt":{"type":"string","description":"Order created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Order updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["covers","tableStatus","createdAt","updatedAt"]},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"invoice":{"type":"object","description":"Details of the invoice associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"invoices","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"customers","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"booking":{"type":"object","description":"Details of the booking associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"bookings","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"tables":{"type":"object","description":"Details of the tables associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"description":"An array of table objects.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"tables","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}},"required":["data"]},"promoCode":{"type":"object","description":"Details of the promo codes associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"promoCodes","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"outlet":{"type":"object","description":"Details of the outlet associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"outlets","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"taxes":{"type":"object","description":"Details of the taxes associated with the product.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"taxes"}},"required":["id","type"]}}},"required":["data"]},"orderItems":{"type":"object","description":"Details of the items associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"items":{"oneOf":[{"$ref":"#/components/schemas/order_items/order_item_identifier"},{"$ref":"#/components/schemas/order_bundle_items/order_bundle_item_identifier"}]}}},"required":["data"]},"payments":{"type":"object","description":"Details of the payments associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"payments","description":"The type member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type","attributes","links"]}},"order_items":{"order_item_identifier":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orderItems"}},"required":["id","type"]},"order_item":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"orderItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The number of units of the product being ordered."},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"subtotal":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the product before taxes and discounts are applied."},"tax":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The tax amount applicable to the specific item."},"total":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the item after taxes and discounts have been applied."},"discount":{"type":["string","null"],"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The percentage or amount of discount applied specifically to this item."},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to this specific item.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"isComp":{"type":"boolean","description":"Indicates whether the item was provided for free (comped) or not."},"isVoid":{"type":"boolean","description":"Indicates whether the item has been voided from the order."},"notes":{"type":["string","null"],"description":"Internal notes for the order item.","maxLength":2048,"pattern":"^[^<>&]+$"},"compVoidReason":{"type":["string","null"],"description":"The reason provided for voiding the item, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"compVoidNotes":{"type":["string","null"],"description":"Additional notes regarding the comping or voiding of the item.","maxLength":2048,"pattern":"^[^<>&]+$"},"status":{"type":"string","description":"The current status of the order item.","enum":["received","confirmed","delivered","rejected"]},"discountType":{"type":"string","description":"The type of discount applied to the order item.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order item.","maxLength":255,"pattern":"^[^<>&]+$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["quantity","unitPriceInclTax","subtotal","tax","total","discount","discountAmount","isComp","isVoid","notes","compVoidReason","compVoidNotes","status","discountType","discountDescription","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"product":{"$ref":"#/components/schemas/products/relationship_product"},"productVariant":{"$ref":"#/components/schemas/product_variants/relationship_product_variant"},"modifiers":{"$ref":"#/components/schemas/modifiers/relationship_modifiers"},"revenueCenter":{"$ref":"#/components/schemas/revenue_centers/relationship_revenue_center"}}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"resource_identifier":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"order_bundle_items":{"order_bundle_item_identifier":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundleItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]},"order_bundle_item":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundleItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The number of units of the product being ordered."},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the item after taxes and discounts have been applied."},"notes":{"type":["string","null"],"description":"Internal notes for the order bundle item.","maxLength":1000,"pattern":"^[^<>&]+$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["quantity","unitPriceInclTax","total","notes","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"product":{"$ref":"#/components/schemas/products/relationship_product"},"productVariant":{"$ref":"#/components/schemas/product_variants/relationship_product_variant"},"modifiers":{"$ref":"#/components/schemas/modifiers/relationship_modifiers"},"revenueCenter":{"$ref":"#/components/schemas/revenue_centers/relationship_revenue_center"},"orderBundle":{"$ref":"#/components/schemas/order_bundles/relationship_order_bundle"}}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"invoices":{"invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"invoices","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discount":{"type":["string","null"],"description":"The amount of discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tax":{"type":"string","description":"The total tax amount applicable to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","description":"The final amount due on the invoice after all discounts and taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"subtotal":{"type":"string","description":"The total amount of the invoice before taxes and additional charges.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tipAmount":{"type":["string","null"],"description":"The amount of gratuity or tip added to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"cancelled":{"type":"boolean","description":"Indicates whether the invoice has been cancelled (true) or not (false)."},"cancelReason":{"type":["string","null"],"description":"The reason provided for cancelling the invoice, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"description":{"type":["string","null"],"description":"A brief description of the invoice, including details about the transaction.","maxLength":255,"pattern":"^[^<>&]+$"},"itemDiscountAmount":{"type":["string","null"],"description":"The total discount amount applied to individual items within the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"}},"required":["discount","tax","total","subtotal","tipAmount","createdAt","updatedAt","cancelled","cancelReason","discountAmount","description","itemDiscountAmount"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"user":{"type":"object","description":"Details of the user associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"users"}},"required":["id","type"]}},"required":["data"]},"order":{"type":"object","description":"Details of the order associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}},"required":["data"]},"registers":{"type":"object","description":"Details of the register associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"register"}},"links":{"self":{"type":"string","format":"uri","maxLength":255}},"required":["id","type"]}},"required":["data"]},"originalInvoice":{"type":"object","description":"Details of the original invoice associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"invoices"}},"required":["id","type"]}},"required":["data"]},"items":{"type":"object","description":"Details of the items associated with the invoice.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"invoiceItems"},"links":{"self":{"type":"string","format":"uri","maxLength":255}}},"required":["id","type"]}}},"required":["data"]},"promoCode":{"type":"object","description":"Details of the promo codes associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"promoCodes","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}}}}},"required":["id","type","attributes"]}},"tables":{"table":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"The name of the table.","minLength":0,"maxLength":255,"pattern":"^[A-Za-z0-9,-_. ]+$"},"numberOfSeats":{"type":"integer","description":"Number of people that can be seated at this table.","format":"int32","minimum":1,"maximum":99},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","numberOfSeats","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"area":{"type":"object","nullable":true,"description":"Details of the table area.","properties":{"data":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"areas"}},"required":["id","type"]},{"type":"null"}]}}}}}},"required":["id","type","attributes"]}},"bookings":{"booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":"boolean","description":"Indicates if the booking is a walk-in."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["status","partySize","bookingDatetime"]}]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"tables":{"type":"object","description":"Details of the tables associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"}},"required":["id","type"]}}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the booking.","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"customers"}}},{"type":"null"}]}}},"orders":{"type":"object","description":"Details of the orders associated with the booking.","properties":{"data":{"type":"array","description":"A list of related order objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type"]},"booking_attributes":{"type":"object","properties":{"status":{"type":["string","null"],"enum":["confirmed","seated","completed","cancelled","no_show"],"description":"The initial status of the booking. Possible values are \"confirmed\", \"seated\", \"completed\", \"cancelled\", and \"no_show\"."},"partySize":{"type":"integer","description":"Represents the number of people included in the booking.","format":"int32","minimum":1,"maximum":1000},"bookingDatetime":{"type":"string","maxLength":25,"format":"date-time","description":"The booking's date."},"duration":{"type":["integer","null"],"description":"Represents the length of the booking in minutes.","format":"int32","minimum":1,"maximum":10000},"notes":{"type":["string","null"],"maxLength":10000,"pattern":"^[^<>&]+$","description":"Additional notes for the booking."},"roomNumber":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The room number of the booking's customer."},"promotions":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The promotions of the booking."},"bookingReference":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"A reference code or identifier associated with the booking."},"depositAmount":{"type":["string","null"],"description":"The amount of the deposit.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"}}}},"customers":{"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"customers","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"$ref":"#/components/schemas/customers/customer_attributes","createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"anyOf":[{"required":["fullName"]},{"required":["companyNumber"]}],"required":["createdAt","updatedAt"]}},"required":["id","type","attributes"]},"customer_attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"fullName":{"type":["string","null"],"minLength":1,"maxLength":255,"pattern":"^[^<>&]+$","description":"The full name of the customer. This can be either a personal name or a company name."},"companyName":{"type":["string","null"],"maxLength":255,"pattern":"^[-\\w\\s.,!;;'&]+$","description":"The name of the company associated with the customer."},"taxNumber":{"type":["string","null"],"maxLength":40,"pattern":"^[A-Za-z0-9]{1,24}$","description":"The customer's tax identification number."},"email":{"type":["string","null"],"maxLength":320,"pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","description":"The customer's email address."},"address1":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"The first line of the customer's address."},"address2":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"The second line of the customer's address."},"city":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The city of the customer's address."},"state":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The state or province of the customer's address."},"postalCode":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The postal or ZIP code of the customer's address."},"country":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The country of the customer's address."},"notes":{"type":["string","null"],"maxLength":500,"pattern":"^[\\s\\S]*$","description":"Additional notes about the customer."},"phone":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The customer's phone number."},"mobile":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The customer's mobile phone number."},"countrySpecificCode":{"type":["string","null"],"maxLength":50,"pattern":"^[^<>&]+$","description":"A unique country specific code assigned to the customer. Lottery code, for example, in Italy."},"dateOfBirth":{"type":["string","null"],"maxLength":10,"format":"date","description":"The customer's date of birth in YYYY-MM-DD format."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}}}},"promo_codes":{"promo_code":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"promoCodes"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discountType":{"type":"string","description":"Specifies whether the discount is a fixed amount, a percentage, or free shipping.","enum":["absolute","percent","free_shipping"]},"amount":{"type":["string","null"],"description":"The value of the discount. Required for absolute and percent discount types.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":19},"channel":{"type":"string","description":"The sales channel where the discount is applicable.","enum":["all_channels","ecommerce","pos"]},"code":{"type":"string","description":"The unique identifier code for the promo code.","pattern":"^.+$","minLength":1,"maxLength":255},"active":{"type":"boolean","description":"A boolean indicating if the promo code is currently active."},"description":{"type":["string","null"],"description":"A description of the promo code.","pattern":"^.*$","maxLength":1000},"maxUsages":{"type":["integer","null"],"description":"Maximum number of times this promo code can be used.","format":"int32","minimum":1,"maximum":1000000},"startsAt":{"type":["string","null"],"description":"Date and time when the promo code becomes valid in RFC 3339 format.","maxLength":25,"format":"date-time"},"endsAt":{"type":["string","null"],"description":"Date and time when the promo code expires in RFC 3339 format.","maxLength":25,"format":"date-time"},"createdAt":{"type":"string","description":"Promo code created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Promo code updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["discountType","amount","channel","code","active","description","maxUsages","startsAt","endsAt","createdAt","updatedAt"]}},"required":["id","type","attributes"]}},"outlets":{"outlet":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"outlets","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"The name of the outlet, representing the business or location.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"address1":{"type":["string","null"],"description":"The first line of the outlet's street address, typically including the street number and name.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"address2":{"type":["string","null"],"description":"The second line of outlet's address.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"city":{"type":["string","null"],"description":"The city where the outlet is located.","minLength":1,"maxLength":86,"pattern":"^[^<>&]+$"},"state":{"type":["string","null"],"description":"The state or region where the outlet is located.","minLength":1,"maxLength":54,"pattern":"^[^<>&]+$"},"postalCode":{"type":["string","null"],"description":"The postal or ZIP code for outlet's location.","minLength":1,"maxLength":10,"pattern":"^[^<>&]+$"},"index":{"type":"integer","description":"A unique sequential number representing the outlet number within the establishment.","format":"int32","minimum":1,"maximum":10},"createdAt":{"type":"string","description":"Outlet created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Outlet updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","address1","address2","city","state","postalCode","index","createdAt","updatedAt"]}},"required":["id","type","attributes"]}},"revenue_centers":{"revenue_center":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"revenueCenters"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","maxLength":255,"pattern":"^[^<>&]+$","description":"Name of the revenue center."},"isActive":{"type":"boolean","description":"Indicates whether the revenue center is active."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","isActive","createdAt","updatedAt"]}},"required":["id","type","attributes"]},"relationship_revenue_center":{"type":"object","description":"Details of the revenue center associated with the selected item.","properties":{"data":{"type":["object","null"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]}},"taxes":{"tax":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"taxes"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"Name of the tax.","minLength":1,"maxLength":255,"pattern":"^.*\\S.*$"},"rate":{"type":"string","description":"Tax rate as a decimal.","minLength":3,"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,6}$"},"taxType":{"type":"string","description":"Type of the tax.","enum":["vat","other","fixed","consumption","sales","state","city","liquor","food","entertainment"]},"isActive":{"type":"boolean","description":"Whether the tax is active."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"label":{"type":["string","null"],"description":"Label of the tax.","maxLength":255,"pattern":"^.*\\S.*$"},"ratePercent":{"type":"string","description":"Tax rate as a percentage.","minLength":1,"maxLength":7,"pattern":"^[0-9]+(\\.[0-9]{1,2})?$"}},"required":["name","rate","taxType","isActive","createdAt","updatedAt","ratePercent","label"]}},"required":["id","type","attributes"]}},"products":{"relationship_product":{"type":"object","description":"Details of the product associated with the selected item.","properties":{"data":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"products"}},"required":["id","type"]}},"required":["data"]}},"product_variants":{"relationship_product_variant":{"type":"object","description":"Details of the product variant associated with the selected item.","properties":{"data":{"type":["object","null"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"productVariants"}},"required":["id","type"]}},"required":["data"]}},"modifiers":{"relationship_modifiers":{"type":"object","description":"Details of the modifiers associated with the selected item.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"modifiers"}},"required":["id","type"]}}},"required":["data"]}},"order_bundles":{"relationship_order_bundle":{"type":"object","description":"Details of the order bundle associated with the selected item.","properties":{"data":{"type":["object"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orderBundles"}},"required":["id","type"]}},"required":["data"]},"order_bundle":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundles","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discount":{"type":["string","null"],"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The percentage or amount of discount applied specifically to this item."},"discountType":{"type":"string","description":"The type of discount applied to the order item.","enum":["fixed","percentage"]},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["discount","discountType","createdAt","updatedAt"]},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"error":{"type":"object","description":"A JSON:API error object.\n\nAdditional properties specific to the problem type may be present.    \n","properties":{"errors":{"type":"array","description":"An array of error details to accompany a problem details response.","maxItems":1000,"items":{"type":"object","description":"An object to provide explicit details on a problem towards an API consumer.","properties":{"id":{"type":"string","maxLength":16,"description":"A unique identifier for this particular occurrence of the problem.","pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","maxLength":3,"description":"The HTTP status code applicable to this problem, expressed as a string value.","pattern":"^[1-5][0-9]{2}$"},"code":{"type":"string","maxLength":50,"description":"An application-specific error code, expressed as a string value.","pattern":"^[A-Za-z0-9_-]+$"},"title":{"type":"string","description":"A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.","maxLength":256,"pattern":"^.{1,255}$"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized.","maxLength":1024,"pattern":"^.{1,1023}$"},"source":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer to a specific request body property that is the source of error.","maxLength":1024,"pattern":"^$|^/([A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+$"},"parameter":{"type":"string","description":"A string indicating which URI query parameter caused the error.","maxLength":1024,"pattern":"^[A-Za-z0-9_]+$"},"header":{"type":"string","description":"The name of the header that is the source of error.","maxLength":1024,"pattern":"^[A-Za-z-]+$"}}},"meta":{"type":"object","description":"Additional information about the error.","additionalProperties":true}},"required":["title"]}}},"required":["errors"]}},"headers":{"x_rate_limit_limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_reset":{"description":"The time at which the rate limit resets, in UTC epoch seconds.","schema":{"type":"integer","format":"int64","minimum":1633036800,"maximum":2147483647}},"access_control_allow_origin":{"description":"Specifies which origins are allowed to access the resource.","schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[A-Za-z /*]+$"}},"retry_after":{"description":"The time the client should wait before making a new request.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":3600}}},"responses":{"bad_request":{"description":"Bad request.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unauthorized":{"description":"Unauthorized.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unprocessable_entity":{"description":"Unprocessable entity.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"too_many_requests":{"description":"Too many requests.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Retry-After":{"$ref":"#/components/headers/retry_after"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"internal_server_error":{"description":"Internal Server Error.","content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"service_unavailable":{"description":"Service is unavailable.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}}}},"paths":{"/v1/orders":{"post":{"operationId":"createOrder","summary":"Create order","description":"This operation creates an order.\n\n**Note:** This operation needs [Authentication](../essential-guide/authentication.md) and supports the following JSON:API features:\n\n- [Relationships](../guidelines/relationships.md) - `invoice`, `customer`, `booking`, `tables`, `promoCode`, `outlet`, `revenueCenter`, `taxes`, `orderItems`, `payments` using `include` query parameter.\n- [Sparse fieldsets](../guidelines/sparse-fieldsets.md) - supports all fields of `order` and related resources with `fields` query parameter.\n","parameters":[{"$ref":"#/components/parameters/fields_orders"},{"$ref":"#/components/parameters/fields_invoices"},{"$ref":"#/components/parameters/fields_customers"},{"$ref":"#/components/parameters/fields_bookings"},{"$ref":"#/components/parameters/fields_tables"},{"$ref":"#/components/parameters/fields_promo_codes"},{"$ref":"#/components/parameters/fields_outlets"},{"$ref":"#/components/parameters/fields_revenue_centers"},{"$ref":"#/components/parameters/fields_taxes"},{"$ref":"#/components/parameters/fields_payments"},{"in":"query","name":"include","schema":{"type":"array","maxItems":10,"items":{"type":"string","enum":["invoice","customer","booking","tables","promoCode","outlet","revenueCenter","taxes","orderItems","payments"]}},"description":"include query parameter to allow the client to customize which related resource should be returned.","required":false}],"requestBody":{"required":true,"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/orders/order_create_request"}}}},"tags":["Orders"],"responses":{"201":{"description":"The order was successfully created.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/orders/order_response"}}}},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/unauthorized"},"422":{"$ref":"#/components/responses/unprocessable_entity"},"429":{"$ref":"#/components/responses/too_many_requests"},"500":{"$ref":"#/components/responses/internal_server_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}}}}}
```

## Get order

> An order represents a single set of items that was ordered by a customer. Each order is uniquely identified and can be associated with an invoice item.\
> \
> \*\*Note:\*\* This operation needs \[Authentication]\(../guidelines/authentication.md) and supports the following JSON:API features:\
> \
> \- \[Relationships]\(../guidelines/relationships.md) - \`invoice\`, \`customer\`, \`booking\`, \`tables\`, \`promoCode\`, \`outlet\`, \`revenueCenter\` using \`include\` query parameter.\
> \- \[Sparse fieldsets]\(../guidelines/sparse-fieldsets.md) - supports all fields of \`order\` and related resources with \`fields\` query parameter.<br>

```json
{"openapi":"3.1.0","info":{"title":"POS API","version":"1.0.0"},"tags":[{"name":"Orders","description":"Order object"}],"servers":[{"url":"https://api.mews.com/pos","description":"Production"},{"url":"https://api.mews-demo.com/pos","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"auth-scheme","description":"Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>"}},"parameters":{"fields_orders":{"in":"query","name":"fields[orders]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["covers","tableStatus","status","state","notes","depositAmount","createdAt","updatedAt","promoCode","invoice","customer","booking","tables","outlet","revenueCenter","taxes"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_invoices":{"in":"query","name":"fields[invoices]","schema":{"type":"array","maxItems":19,"items":{"type":"string","enum":["cancelled","cancelReason","description","discount","discountAmount","itemDiscountAmount","subtotal","tax","tipAmount","total","createdAt","updatedAt","user","originalInvoice","promoCode","revenueCenter","register","order","invoiceItems"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_customers":{"in":"query","name":"fields[customers]","schema":{"type":"array","maxItems":17,"items":{"type":"string","enum":["fullName","companyName","email","taxNumber","notes","phone","mobile","dateOfBirth","createdAt","updatedAt","countrySpecificCode","address1","address2","city","state","postalCode","country"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_bookings":{"in":"query","name":"fields[bookings]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["status","promotions","bookingReference","roomNumber","notes","depositAmount","duration","partySize","bookingDatetime","createdAt","updatedAt","isWalkIn","customer","orders","tables"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_tables":{"in":"query","name":"fields[tables]","schema":{"type":"array","maxItems":5,"items":{"type":"string","enum":["name","numberOfSeats","createdAt","updatedAt","area"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_promo_codes":{"in":"query","name":"fields[promoCodes]","schema":{"type":"array","maxItems":11,"items":{"type":"string","enum":["code","active","description","maxUsages","startsAt","endsAt","createdAt","updatedAt","amount","discountType","channel"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_outlets":{"in":"query","name":"fields[outlets]","schema":{"type":"array","maxItems":9,"items":{"type":"string","enum":["name","address1","address2","city","state","index","postalCode","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_revenue_centers":{"in":"query","name":"fields[revenueCenters]","schema":{"type":"array","maxItems":4,"items":{"type":"string","enum":["name","isActive","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_taxes":{"in":"query","name":"fields[taxes]","schema":{"type":"array","maxItems":8,"items":{"type":"string","enum":["name","rate","taxType","isActive","createdAt","updatedAt","ratePercent","label"]}},"description":"Fields query parameter to allow the client to customize which tax fields should be returned.","explode":false,"required":false}},"headers":{"x_rate_limit_limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_reset":{"description":"The time at which the rate limit resets, in UTC epoch seconds.","schema":{"type":"integer","format":"int64","minimum":1633036800,"maximum":2147483647}},"access_control_allow_origin":{"description":"Specifies which origins are allowed to access the resource.","schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[A-Za-z /*]+$"}},"retry_after":{"description":"The time the client should wait before making a new request.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":3600}}},"schemas":{"orders":{"order_response":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/orders/order","description":"The document's \"primary data\"."},"included":{"type":["array","null"],"maxItems":100,"description":"Details of the objects to which the order is associated.","items":{"anyOf":[{"$ref":"#/components/schemas/invoices/invoice"},{"$ref":"#/components/schemas/tables/table"},{"$ref":"#/components/schemas/bookings/booking"},{"$ref":"#/components/schemas/customers/customer"},{"$ref":"#/components/schemas/promo_codes/promo_code"},{"$ref":"#/components/schemas/outlets/outlet"},{"$ref":"#/components/schemas/revenue_centers/revenue_center"},{"$ref":"#/components/schemas/taxes/tax"},{"$ref":"#/components/schemas/order_items/order_item"},{"$ref":"#/components/schemas/order_bundle_items/order_bundle_item"},{"$ref":"#/components/schemas/order_bundles/order_bundle"}]}}},"required":["data"]},"order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"notes":{"type":["string","null"],"description":"Notes about the order.","minLength":1,"maxLength":500,"pattern":"^[^<>&]+$"},"covers":{"oneOf":[{"type":"integer","format":"int32","minimum":0,"maximum":1000},{"type":"null"}],"description":"How many people are seated at the table."},"depositAmount":{"type":["string","null"],"description":"The amount of discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tableStatus":{"type":["string","null"],"description":"Status of the table. Possible values are \"no_table\", \"seated\", \"cleaning\", and \"free\".","enum":[null,"no_table","seated","cleaning","free"]},"surcharge":{"type":["string","null"],"description":"The surcharge amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"surchargeType":{"type":["string","null"],"description":"The type of surcharge applied to the order.","enum":["fixed","percentage"]},"surchargeDescription":{"type":["string","null"],"description":"Description of the surcharge applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"discount":{"type":["string","null"],"description":"The discount amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":["string","null"],"description":"The type of discount applied to the order.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"status":{"type":["string","null"],"description":"Fulfillment status of the order lifecycle.","enum":[null,"auto","received","confirmed","rejected","preparing","ready_for_delivery","dispatched","in_transit","delivered"]},"state":{"type":["string"],"description":"Order state.","enum":["draft","sent","paid","discarded","cart","pending_payment","open","open_web"]},"createdAt":{"type":"string","description":"Order created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Order updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["covers","tableStatus","createdAt","updatedAt"]},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"invoice":{"type":"object","description":"Details of the invoice associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"invoices","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"customers","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"booking":{"type":"object","description":"Details of the booking associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"bookings","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"tables":{"type":"object","description":"Details of the tables associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"description":"An array of table objects.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"tables","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}},"required":["data"]},"promoCode":{"type":"object","description":"Details of the promo codes associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"promoCodes","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"outlet":{"type":"object","description":"Details of the outlet associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"outlets","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"taxes":{"type":"object","description":"Details of the taxes associated with the product.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"taxes"}},"required":["id","type"]}}},"required":["data"]},"orderItems":{"type":"object","description":"Details of the items associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"items":{"oneOf":[{"$ref":"#/components/schemas/order_items/order_item_identifier"},{"$ref":"#/components/schemas/order_bundle_items/order_bundle_item_identifier"}]}}},"required":["data"]},"payments":{"type":"object","description":"Details of the payments associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"payments","description":"The type member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type","attributes","links"]}},"order_items":{"order_item_identifier":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orderItems"}},"required":["id","type"]},"order_item":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"orderItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The number of units of the product being ordered."},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"subtotal":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the product before taxes and discounts are applied."},"tax":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The tax amount applicable to the specific item."},"total":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the item after taxes and discounts have been applied."},"discount":{"type":["string","null"],"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The percentage or amount of discount applied specifically to this item."},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to this specific item.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"isComp":{"type":"boolean","description":"Indicates whether the item was provided for free (comped) or not."},"isVoid":{"type":"boolean","description":"Indicates whether the item has been voided from the order."},"notes":{"type":["string","null"],"description":"Internal notes for the order item.","maxLength":2048,"pattern":"^[^<>&]+$"},"compVoidReason":{"type":["string","null"],"description":"The reason provided for voiding the item, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"compVoidNotes":{"type":["string","null"],"description":"Additional notes regarding the comping or voiding of the item.","maxLength":2048,"pattern":"^[^<>&]+$"},"status":{"type":"string","description":"The current status of the order item.","enum":["received","confirmed","delivered","rejected"]},"discountType":{"type":"string","description":"The type of discount applied to the order item.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order item.","maxLength":255,"pattern":"^[^<>&]+$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["quantity","unitPriceInclTax","subtotal","tax","total","discount","discountAmount","isComp","isVoid","notes","compVoidReason","compVoidNotes","status","discountType","discountDescription","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"product":{"$ref":"#/components/schemas/products/relationship_product"},"productVariant":{"$ref":"#/components/schemas/product_variants/relationship_product_variant"},"modifiers":{"$ref":"#/components/schemas/modifiers/relationship_modifiers"},"revenueCenter":{"$ref":"#/components/schemas/revenue_centers/relationship_revenue_center"}}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"resource_identifier":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"order_bundle_items":{"order_bundle_item_identifier":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundleItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]},"order_bundle_item":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundleItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The number of units of the product being ordered."},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the item after taxes and discounts have been applied."},"notes":{"type":["string","null"],"description":"Internal notes for the order bundle item.","maxLength":1000,"pattern":"^[^<>&]+$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["quantity","unitPriceInclTax","total","notes","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"product":{"$ref":"#/components/schemas/products/relationship_product"},"productVariant":{"$ref":"#/components/schemas/product_variants/relationship_product_variant"},"modifiers":{"$ref":"#/components/schemas/modifiers/relationship_modifiers"},"revenueCenter":{"$ref":"#/components/schemas/revenue_centers/relationship_revenue_center"},"orderBundle":{"$ref":"#/components/schemas/order_bundles/relationship_order_bundle"}}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"invoices":{"invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"invoices","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discount":{"type":["string","null"],"description":"The amount of discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tax":{"type":"string","description":"The total tax amount applicable to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","description":"The final amount due on the invoice after all discounts and taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"subtotal":{"type":"string","description":"The total amount of the invoice before taxes and additional charges.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tipAmount":{"type":["string","null"],"description":"The amount of gratuity or tip added to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"cancelled":{"type":"boolean","description":"Indicates whether the invoice has been cancelled (true) or not (false)."},"cancelReason":{"type":["string","null"],"description":"The reason provided for cancelling the invoice, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"description":{"type":["string","null"],"description":"A brief description of the invoice, including details about the transaction.","maxLength":255,"pattern":"^[^<>&]+$"},"itemDiscountAmount":{"type":["string","null"],"description":"The total discount amount applied to individual items within the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"}},"required":["discount","tax","total","subtotal","tipAmount","createdAt","updatedAt","cancelled","cancelReason","discountAmount","description","itemDiscountAmount"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"user":{"type":"object","description":"Details of the user associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"users"}},"required":["id","type"]}},"required":["data"]},"order":{"type":"object","description":"Details of the order associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}},"required":["data"]},"registers":{"type":"object","description":"Details of the register associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"register"}},"links":{"self":{"type":"string","format":"uri","maxLength":255}},"required":["id","type"]}},"required":["data"]},"originalInvoice":{"type":"object","description":"Details of the original invoice associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"invoices"}},"required":["id","type"]}},"required":["data"]},"items":{"type":"object","description":"Details of the items associated with the invoice.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"invoiceItems"},"links":{"self":{"type":"string","format":"uri","maxLength":255}}},"required":["id","type"]}}},"required":["data"]},"promoCode":{"type":"object","description":"Details of the promo codes associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"promoCodes","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}}}}},"required":["id","type","attributes"]}},"tables":{"table":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"The name of the table.","minLength":0,"maxLength":255,"pattern":"^[A-Za-z0-9,-_. ]+$"},"numberOfSeats":{"type":"integer","description":"Number of people that can be seated at this table.","format":"int32","minimum":1,"maximum":99},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","numberOfSeats","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"area":{"type":"object","nullable":true,"description":"Details of the table area.","properties":{"data":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"areas"}},"required":["id","type"]},{"type":"null"}]}}}}}},"required":["id","type","attributes"]}},"bookings":{"booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":"boolean","description":"Indicates if the booking is a walk-in."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["status","partySize","bookingDatetime"]}]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"tables":{"type":"object","description":"Details of the tables associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"}},"required":["id","type"]}}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the booking.","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"customers"}}},{"type":"null"}]}}},"orders":{"type":"object","description":"Details of the orders associated with the booking.","properties":{"data":{"type":"array","description":"A list of related order objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type"]},"booking_attributes":{"type":"object","properties":{"status":{"type":["string","null"],"enum":["confirmed","seated","completed","cancelled","no_show"],"description":"The initial status of the booking. Possible values are \"confirmed\", \"seated\", \"completed\", \"cancelled\", and \"no_show\"."},"partySize":{"type":"integer","description":"Represents the number of people included in the booking.","format":"int32","minimum":1,"maximum":1000},"bookingDatetime":{"type":"string","maxLength":25,"format":"date-time","description":"The booking's date."},"duration":{"type":["integer","null"],"description":"Represents the length of the booking in minutes.","format":"int32","minimum":1,"maximum":10000},"notes":{"type":["string","null"],"maxLength":10000,"pattern":"^[^<>&]+$","description":"Additional notes for the booking."},"roomNumber":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The room number of the booking's customer."},"promotions":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The promotions of the booking."},"bookingReference":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"A reference code or identifier associated with the booking."},"depositAmount":{"type":["string","null"],"description":"The amount of the deposit.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"}}}},"customers":{"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"customers","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"$ref":"#/components/schemas/customers/customer_attributes","createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"anyOf":[{"required":["fullName"]},{"required":["companyNumber"]}],"required":["createdAt","updatedAt"]}},"required":["id","type","attributes"]},"customer_attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"fullName":{"type":["string","null"],"minLength":1,"maxLength":255,"pattern":"^[^<>&]+$","description":"The full name of the customer. This can be either a personal name or a company name."},"companyName":{"type":["string","null"],"maxLength":255,"pattern":"^[-\\w\\s.,!;;'&]+$","description":"The name of the company associated with the customer."},"taxNumber":{"type":["string","null"],"maxLength":40,"pattern":"^[A-Za-z0-9]{1,24}$","description":"The customer's tax identification number."},"email":{"type":["string","null"],"maxLength":320,"pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","description":"The customer's email address."},"address1":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"The first line of the customer's address."},"address2":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"The second line of the customer's address."},"city":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The city of the customer's address."},"state":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The state or province of the customer's address."},"postalCode":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The postal or ZIP code of the customer's address."},"country":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The country of the customer's address."},"notes":{"type":["string","null"],"maxLength":500,"pattern":"^[\\s\\S]*$","description":"Additional notes about the customer."},"phone":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The customer's phone number."},"mobile":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The customer's mobile phone number."},"countrySpecificCode":{"type":["string","null"],"maxLength":50,"pattern":"^[^<>&]+$","description":"A unique country specific code assigned to the customer. Lottery code, for example, in Italy."},"dateOfBirth":{"type":["string","null"],"maxLength":10,"format":"date","description":"The customer's date of birth in YYYY-MM-DD format."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}}}},"promo_codes":{"promo_code":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"promoCodes"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discountType":{"type":"string","description":"Specifies whether the discount is a fixed amount, a percentage, or free shipping.","enum":["absolute","percent","free_shipping"]},"amount":{"type":["string","null"],"description":"The value of the discount. Required for absolute and percent discount types.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":19},"channel":{"type":"string","description":"The sales channel where the discount is applicable.","enum":["all_channels","ecommerce","pos"]},"code":{"type":"string","description":"The unique identifier code for the promo code.","pattern":"^.+$","minLength":1,"maxLength":255},"active":{"type":"boolean","description":"A boolean indicating if the promo code is currently active."},"description":{"type":["string","null"],"description":"A description of the promo code.","pattern":"^.*$","maxLength":1000},"maxUsages":{"type":["integer","null"],"description":"Maximum number of times this promo code can be used.","format":"int32","minimum":1,"maximum":1000000},"startsAt":{"type":["string","null"],"description":"Date and time when the promo code becomes valid in RFC 3339 format.","maxLength":25,"format":"date-time"},"endsAt":{"type":["string","null"],"description":"Date and time when the promo code expires in RFC 3339 format.","maxLength":25,"format":"date-time"},"createdAt":{"type":"string","description":"Promo code created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Promo code updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["discountType","amount","channel","code","active","description","maxUsages","startsAt","endsAt","createdAt","updatedAt"]}},"required":["id","type","attributes"]}},"outlets":{"outlet":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"outlets","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"The name of the outlet, representing the business or location.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"address1":{"type":["string","null"],"description":"The first line of the outlet's street address, typically including the street number and name.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"address2":{"type":["string","null"],"description":"The second line of outlet's address.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"city":{"type":["string","null"],"description":"The city where the outlet is located.","minLength":1,"maxLength":86,"pattern":"^[^<>&]+$"},"state":{"type":["string","null"],"description":"The state or region where the outlet is located.","minLength":1,"maxLength":54,"pattern":"^[^<>&]+$"},"postalCode":{"type":["string","null"],"description":"The postal or ZIP code for outlet's location.","minLength":1,"maxLength":10,"pattern":"^[^<>&]+$"},"index":{"type":"integer","description":"A unique sequential number representing the outlet number within the establishment.","format":"int32","minimum":1,"maximum":10},"createdAt":{"type":"string","description":"Outlet created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Outlet updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","address1","address2","city","state","postalCode","index","createdAt","updatedAt"]}},"required":["id","type","attributes"]}},"revenue_centers":{"revenue_center":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"revenueCenters"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","maxLength":255,"pattern":"^[^<>&]+$","description":"Name of the revenue center."},"isActive":{"type":"boolean","description":"Indicates whether the revenue center is active."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","isActive","createdAt","updatedAt"]}},"required":["id","type","attributes"]},"relationship_revenue_center":{"type":"object","description":"Details of the revenue center associated with the selected item.","properties":{"data":{"type":["object","null"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]}},"taxes":{"tax":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"taxes"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"Name of the tax.","minLength":1,"maxLength":255,"pattern":"^.*\\S.*$"},"rate":{"type":"string","description":"Tax rate as a decimal.","minLength":3,"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,6}$"},"taxType":{"type":"string","description":"Type of the tax.","enum":["vat","other","fixed","consumption","sales","state","city","liquor","food","entertainment"]},"isActive":{"type":"boolean","description":"Whether the tax is active."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"label":{"type":["string","null"],"description":"Label of the tax.","maxLength":255,"pattern":"^.*\\S.*$"},"ratePercent":{"type":"string","description":"Tax rate as a percentage.","minLength":1,"maxLength":7,"pattern":"^[0-9]+(\\.[0-9]{1,2})?$"}},"required":["name","rate","taxType","isActive","createdAt","updatedAt","ratePercent","label"]}},"required":["id","type","attributes"]}},"products":{"relationship_product":{"type":"object","description":"Details of the product associated with the selected item.","properties":{"data":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"products"}},"required":["id","type"]}},"required":["data"]}},"product_variants":{"relationship_product_variant":{"type":"object","description":"Details of the product variant associated with the selected item.","properties":{"data":{"type":["object","null"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"productVariants"}},"required":["id","type"]}},"required":["data"]}},"modifiers":{"relationship_modifiers":{"type":"object","description":"Details of the modifiers associated with the selected item.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"modifiers"}},"required":["id","type"]}}},"required":["data"]}},"order_bundles":{"relationship_order_bundle":{"type":"object","description":"Details of the order bundle associated with the selected item.","properties":{"data":{"type":["object"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orderBundles"}},"required":["id","type"]}},"required":["data"]},"order_bundle":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundles","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discount":{"type":["string","null"],"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The percentage or amount of discount applied specifically to this item."},"discountType":{"type":"string","description":"The type of discount applied to the order item.","enum":["fixed","percentage"]},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["discount","discountType","createdAt","updatedAt"]},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"error":{"type":"object","description":"A JSON:API error object.\n\nAdditional properties specific to the problem type may be present.    \n","properties":{"errors":{"type":"array","description":"An array of error details to accompany a problem details response.","maxItems":1000,"items":{"type":"object","description":"An object to provide explicit details on a problem towards an API consumer.","properties":{"id":{"type":"string","maxLength":16,"description":"A unique identifier for this particular occurrence of the problem.","pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","maxLength":3,"description":"The HTTP status code applicable to this problem, expressed as a string value.","pattern":"^[1-5][0-9]{2}$"},"code":{"type":"string","maxLength":50,"description":"An application-specific error code, expressed as a string value.","pattern":"^[A-Za-z0-9_-]+$"},"title":{"type":"string","description":"A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.","maxLength":256,"pattern":"^.{1,255}$"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized.","maxLength":1024,"pattern":"^.{1,1023}$"},"source":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer to a specific request body property that is the source of error.","maxLength":1024,"pattern":"^$|^/([A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+$"},"parameter":{"type":"string","description":"A string indicating which URI query parameter caused the error.","maxLength":1024,"pattern":"^[A-Za-z0-9_]+$"},"header":{"type":"string","description":"The name of the header that is the source of error.","maxLength":1024,"pattern":"^[A-Za-z-]+$"}}},"meta":{"type":"object","description":"Additional information about the error.","additionalProperties":true}},"required":["title"]}}},"required":["errors"]}},"responses":{"bad_request":{"description":"Bad request.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unauthorized":{"description":"Unauthorized.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"too_many_requests":{"description":"Too many requests.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Retry-After":{"$ref":"#/components/headers/retry_after"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"internal_server_error":{"description":"Internal Server Error.","content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"service_unavailable":{"description":"Service is unavailable.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}}}},"paths":{"/v1/orders/{id}":{"get":{"operationId":"getOrder","summary":"Get order","description":"An order represents a single set of items that was ordered by a customer. Each order is uniquely identified and can be associated with an invoice item.\n\n**Note:** This operation needs [Authentication](../guidelines/authentication.md) and supports the following JSON:API features:\n\n- [Relationships](../guidelines/relationships.md) - `invoice`, `customer`, `booking`, `tables`, `promoCode`, `outlet`, `revenueCenter` using `include` query parameter.\n- [Sparse fieldsets](../guidelines/sparse-fieldsets.md) - supports all fields of `order` and related resources with `fields` query parameter.\n","parameters":[{"$ref":"#/components/parameters/fields_orders"},{"$ref":"#/components/parameters/fields_invoices"},{"$ref":"#/components/parameters/fields_customers"},{"$ref":"#/components/parameters/fields_bookings"},{"$ref":"#/components/parameters/fields_tables"},{"$ref":"#/components/parameters/fields_promo_codes"},{"$ref":"#/components/parameters/fields_outlets"},{"$ref":"#/components/parameters/fields_revenue_centers"},{"$ref":"#/components/parameters/fields_taxes"},{"in":"path","name":"id","description":"The id of the resource.","required":true,"schema":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID UUID4.","minLength":36,"maxLength":36}},{"in":"query","name":"include","schema":{"type":"array","maxItems":9,"items":{"type":"string","enum":["invoice","customer","booking","tables","promoCode","outlet","revenueCenter","taxes","orderItems"]}},"description":"include query parameter to allow the client to customize which related resource should be returned.","required":false}],"tags":["Orders"],"responses":{"200":{"description":"Successful response with orders data in JSON:API format.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/orders/order_response"}}}},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/unauthorized"},"429":{"$ref":"#/components/responses/too_many_requests"},"500":{"$ref":"#/components/responses/internal_server_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}}}}}
```

## Update order

> This operation updates an existing order. You can update order attributes (covers, notes) and relationships (customer, tables, outlet, revenue center, promo code). You can also add new items to the order or update existing ones.\
> \
> \*\*Item Identifiers:\*\*\
> \- Use \`tempId\` for new items being added to the order (items that don't exist in the database yet).\
> \- Use \`id\` (UUID) for existing items that are being updated or kept in the order.\
> \
> \*\*Note:\*\* This operation needs \[Authentication]\(../guidelines/authentication.md) and supports the following JSON:API features:\
> \
> \- \[Relationships]\(../guidelines/relationships.md) - \`customer\`, \`tables\`, \`outlet\`, \`revenueCenter\`, \`promoCode\` using relationships in the request body.\
> \- \[Sparse fieldsets]\(../guidelines/sparse-fieldsets.md) - supports all fields of \`order\` and related resources with \`fields\` query parameter.<br>

```json
{"openapi":"3.1.0","info":{"title":"POS API","version":"1.0.0"},"tags":[{"name":"Orders","description":"Order object"}],"servers":[{"url":"https://api.mews.com/pos","description":"Production"},{"url":"https://api.mews-demo.com/pos","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"auth-scheme","description":"Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>"}},"parameters":{"fields_orders":{"in":"query","name":"fields[orders]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["covers","tableStatus","status","state","notes","depositAmount","createdAt","updatedAt","promoCode","invoice","customer","booking","tables","outlet","revenueCenter","taxes"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_invoices":{"in":"query","name":"fields[invoices]","schema":{"type":"array","maxItems":19,"items":{"type":"string","enum":["cancelled","cancelReason","description","discount","discountAmount","itemDiscountAmount","subtotal","tax","tipAmount","total","createdAt","updatedAt","user","originalInvoice","promoCode","revenueCenter","register","order","invoiceItems"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_customers":{"in":"query","name":"fields[customers]","schema":{"type":"array","maxItems":17,"items":{"type":"string","enum":["fullName","companyName","email","taxNumber","notes","phone","mobile","dateOfBirth","createdAt","updatedAt","countrySpecificCode","address1","address2","city","state","postalCode","country"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_bookings":{"in":"query","name":"fields[bookings]","schema":{"type":"array","maxItems":15,"items":{"type":"string","enum":["status","promotions","bookingReference","roomNumber","notes","depositAmount","duration","partySize","bookingDatetime","createdAt","updatedAt","isWalkIn","customer","orders","tables"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_tables":{"in":"query","name":"fields[tables]","schema":{"type":"array","maxItems":5,"items":{"type":"string","enum":["name","numberOfSeats","createdAt","updatedAt","area"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_promo_codes":{"in":"query","name":"fields[promoCodes]","schema":{"type":"array","maxItems":11,"items":{"type":"string","enum":["code","active","description","maxUsages","startsAt","endsAt","createdAt","updatedAt","amount","discountType","channel"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_outlets":{"in":"query","name":"fields[outlets]","schema":{"type":"array","maxItems":9,"items":{"type":"string","enum":["name","address1","address2","city","state","index","postalCode","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_revenue_centers":{"in":"query","name":"fields[revenueCenters]","schema":{"type":"array","maxItems":4,"items":{"type":"string","enum":["name","isActive","createdAt","updatedAt"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_taxes":{"in":"query","name":"fields[taxes]","schema":{"type":"array","maxItems":8,"items":{"type":"string","enum":["name","rate","taxType","isActive","createdAt","updatedAt","ratePercent","label"]}},"description":"Fields query parameter to allow the client to customize which tax fields should be returned.","explode":false,"required":false}},"schemas":{"orders":{"order_update_request":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/orders/order_update","description":"The document's \"primary data\"."}},"required":["data"]},"order_update":{"type":"object","properties":{"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the order.","minLength":36,"maxLength":36},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"notes":{"type":["string","null"],"description":"Notes about the order.","minLength":1,"maxLength":500,"pattern":"^[^<>&]+$"},"covers":{"oneOf":[{"type":"integer","format":"int32","minimum":0,"maximum":1000},{"type":"null"}],"description":"How many people are seated at the table."},"surcharge":{"type":["string","null"],"description":"The surcharge amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"surchargeType":{"type":["string","null"],"description":"The type of surcharge applied to the order.","enum":["fixed","percentage"]},"surchargeDescription":{"type":["string","null"],"description":"Description of the surcharge applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"discount":{"type":["string","null"],"description":"The discount amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":["string","null"],"description":"The type of discount applied to the order.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"}}},"relationships":{"type":"object","description":"An [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) representing associations with other resources.","properties":{"customer":{"type":"object","description":"Represents the customer associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"type":{"type":"string","const":"customers"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"tables":{"type":"object","description":"Represents the tables associated with the order.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":1000,"items":{"type":"object","properties":{"type":{"type":"string","const":"tables"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}},"required":["type","id"]}}},"required":["data"]},"outlet":{"type":"object","description":"Represents the outlet associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"type":{"type":"string","const":"outlets"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Represents the revenue center associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"type":{"type":"string","const":"revenue_centers"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"promoCode":{"type":"object","description":"Represents the promo code associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"type":{"type":"string","const":"promo_codes"},"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"items":{"type":"object","description":"Represents the items in the order (both new and existing).","properties":{"data":{"type":"array","description":"A list of related item objects. Use tempId for new items, id for existing items.","maxItems":1000,"items":{"oneOf":[{"title":"New item reference (with tempId)","type":"object","description":"Reference to a new item being added to the order","properties":{"type":{"type":"string","enum":["orderItems","orderBundleItems"]},"tempId":{"type":"string","description":"Temporary ID of the new item (must match tempId in included section).","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"}},"required":["type","tempId"],"additionalProperties":false},{"title":"Existing item reference (with id)","type":"object","description":"Reference to an existing item being updated or kept in the order","properties":{"type":{"type":"string","enum":["orderItems","orderBundleItems"]},"id":{"type":"string","format":"uuid","description":"UUID of the existing item (must match id in included section if updating).","minLength":36,"maxLength":36}},"required":["type","id"],"additionalProperties":false}]}}},"required":["data"]}}},"included":{"type":"object","description":"An object containing included resource objects that are related to the primary data and/or each other.","properties":{"items":{"type":"array","description":"An array of resource objects that are related to the primary data and/or each other.","maxItems":1000,"items":{"oneOf":[{"title":"orderItems (new)","type":"object","properties":{"type":{"type":"string","const":"orderItems"},"tempId":{"type":"string","description":"Temporary ID of the order item.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"attributes":{"$ref":"#/components/schemas/orders/order_item_update_attributes"},"relationships":{"$ref":"#/components/schemas/orders/order_item_update_relationships"}},"required":["type","tempId"],"additionalProperties":false},{"title":"orderItems (existing)","type":"object","properties":{"type":{"type":"string","const":"orderItems"},"id":{"type":"string","format":"uuid","description":"UUID of the existing order item to update.","minLength":36,"maxLength":36},"attributes":{"$ref":"#/components/schemas/orders/order_item_update_attributes"},"relationships":{"$ref":"#/components/schemas/orders/order_item_update_relationships"}},"required":["type","id"],"additionalProperties":false},{"title":"orderBundleItems (new)","type":"object","properties":{"type":{"type":"string","const":"orderBundleItems"},"tempId":{"type":"string","description":"Temporary ID of the order bundle item.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"attributes":{"$ref":"#/components/schemas/orders/order_bundle_item_create_attributes"},"relationships":{"$ref":"#/components/schemas/orders/order_bundle_item_create_relationships"}},"required":["type","tempId"],"additionalProperties":false},{"title":"orderBundleItems (existing)","type":"object","properties":{"type":{"type":"string","const":"orderBundleItems"},"id":{"type":"string","format":"uuid","description":"UUID of the existing order bundle item to update.","minLength":36,"maxLength":36},"attributes":{"$ref":"#/components/schemas/orders/order_bundle_item_update_attributes"},"relationships":{"$ref":"#/components/schemas/orders/order_bundle_item_update_relationships"}},"required":["type","id"],"additionalProperties":false}]}},"orderBundles":{"type":"array","description":"An array of resource objects that are related to the primary data and/or each other.","maxItems":1000,"items":{"oneOf":[{"title":"orderBundles (new)","type":"object","properties":{"type":{"type":"string","const":"orderBundles"},"tempId":{"type":"string","description":"Temporary ID of the order bundle.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"attributes":{"$ref":"#/components/schemas/orders/order_bundle_create_attributes"},"relationships":{"$ref":"#/components/schemas/orders/order_bundle_create_relationships"}},"required":["type","tempId"],"additionalProperties":false},{"title":"orderBundles (existing)","type":"object","properties":{"type":{"type":"string","const":"orderBundles"},"id":{"type":"string","format":"uuid","description":"UUID of the existing order bundle to update.","minLength":36,"maxLength":36},"attributes":{"$ref":"#/components/schemas/orders/order_bundle_update_attributes"}},"required":["type","id"],"additionalProperties":false}]}}}}},"required":["type","id","attributes"]},"order_item_update_attributes":{"type":"object","properties":{"quantity":{"type":"string","description":"Quantity of the item.","pattern":"^[0-9]+(\\.[0-9]{1,2})?$","maxLength":10},"total":{"type":"string","description":"Total price of the item including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"unitPriceInclTax":{"type":"string","description":"Unit price including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"tax":{"type":"string","description":"Tax amount for the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"subtotal":{"type":"string","description":"Subtotal price of the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discount":{"type":"string","description":"Discount amount for the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":"string","enum":["percentage","fixed"],"description":"Type of discount applied."},"discountDescription":{"type":"string","description":"Description of the discount.","maxLength":255,"pattern":"^[^<>&]+$"},"isComp":{"type":"boolean","description":"Indicates whether the item was provided for free (comped) or not."},"isVoid":{"type":"boolean","description":"Indicates whether the item has been voided from the order."},"notes":{"type":["string","null"],"description":"Internal notes for the order item.","maxLength":2048,"pattern":"^[^<>&]+$"},"compVoidReason":{"type":"string","description":"The reason provided for voiding the item, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"compVoidNotes":{"type":"string","description":"Additional notes regarding the comping or voiding of the item.","maxLength":2048,"pattern":"^[^<>&]+$"}}},"order_item_update_relationships":{"type":"object","properties":{"product":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"products"},"id":{"type":"string","format":"uuid","description":"UUID of the product.","minLength":36,"maxLength":36}}}}},"productVariant":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"productVariants"},"id":{"type":"string","format":"uuid","description":"UUID of the product variant.","minLength":36,"maxLength":36}}}}},"modifiers":{"type":"object","properties":{"data":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"type":{"type":"string","const":"modifiers"},"id":{"type":"string","format":"uuid","description":"UUID of the modifier.","minLength":36,"maxLength":36}}}}}}}},"order_bundle_item_create_attributes":{"type":"object","properties":{"total":{"type":"string","description":"Total price of the item including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"unitPriceInclTax":{"type":"string","description":"Unit price including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"notes":{"type":"string","description":"Internal notes for the bundle item.","maxLength":500,"pattern":"^[^<>&]+$"}},"required":["total","unitPriceInclTax"]},"order_bundle_item_create_relationships":{"type":"object","properties":{"productBundleItem":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"productBundleItems"},"id":{"type":"string","format":"uuid","description":"UUID of the product bundle item.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"orderBundle":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"orderBundles"},"id":{"type":"string","format":"uuid","description":"UUID of the product.","minLength":36,"maxLength":36},"tempId":{"type":"string","description":"Temporary ID of the order bundle.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"}},"required":["type"],"oneOf":[{"required":["id"]},{"required":["tempId"]}]}},"required":["data"]},"product":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"products"},"id":{"type":"string","format":"uuid","description":"UUID of the product.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"productVariant":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"productVariants"},"id":{"type":"string","format":"uuid","description":"UUID of the product variant.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"modifiers":{"type":"object","properties":{"data":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"type":{"type":"string","const":"modifiers"},"id":{"type":"string","format":"uuid","description":"UUID of the modifier.","minLength":36,"maxLength":36}},"required":["type","id"]}}},"required":["data"]}},"required":["product","orderBundle","productBundleItem"]},"order_bundle_item_update_attributes":{"type":"object","properties":{"total":{"type":"string","description":"Total price of the item including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"unitPriceInclTax":{"type":"string","description":"Unit price including tax.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"notes":{"type":"string","description":"Internal notes for the bundle item.","maxLength":500,"pattern":"^[^<>&]+$"}}},"order_bundle_item_update_relationships":{"type":"object","properties":{"orderBundle":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"orderBundles"},"id":{"type":"string","format":"uuid","description":"UUID of the order bundle.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]},"modifiers":{"type":"object","properties":{"data":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"type":{"type":"string","const":"modifiers"},"id":{"type":"string","format":"uuid","description":"UUID of the modifier.","minLength":36,"maxLength":36}},"required":["type","id"]}}},"required":["data"]}}},"order_bundle_create_attributes":{"type":"object","properties":{"quantity":{"type":"string","description":"Quantity of the bundle item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discount":{"type":"string","description":"Discount amount for the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":"string","enum":["percentage","fixed"],"description":"Type of discount applied."}},"required":["quantity"]},"order_bundle_create_relationships":{"type":"object","properties":{"productBundle":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"productBundles"},"id":{"type":"string","format":"uuid","description":"UUID of the product bundle.","minLength":36,"maxLength":36}},"required":["type","id"]}},"required":["data"]}},"required":["productBundle"]},"order_bundle_update_attributes":{"type":"object","properties":{"quantity":{"type":"string","description":"Quantity of the bundle item.","pattern":"^[0-9]+(\\.[0-9]{1,2})?$","maxLength":10},"discount":{"type":"string","description":"Discount amount for the item.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":"string","enum":["percentage","fixed"],"description":"Type of discount applied."}}},"order_response":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/orders/order","description":"The document's \"primary data\"."},"included":{"type":["array","null"],"maxItems":100,"description":"Details of the objects to which the order is associated.","items":{"anyOf":[{"$ref":"#/components/schemas/invoices/invoice"},{"$ref":"#/components/schemas/tables/table"},{"$ref":"#/components/schemas/bookings/booking"},{"$ref":"#/components/schemas/customers/customer"},{"$ref":"#/components/schemas/promo_codes/promo_code"},{"$ref":"#/components/schemas/outlets/outlet"},{"$ref":"#/components/schemas/revenue_centers/revenue_center"},{"$ref":"#/components/schemas/taxes/tax"},{"$ref":"#/components/schemas/order_items/order_item"},{"$ref":"#/components/schemas/order_bundle_items/order_bundle_item"},{"$ref":"#/components/schemas/order_bundles/order_bundle"}]}}},"required":["data"]},"order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"notes":{"type":["string","null"],"description":"Notes about the order.","minLength":1,"maxLength":500,"pattern":"^[^<>&]+$"},"covers":{"oneOf":[{"type":"integer","format":"int32","minimum":0,"maximum":1000},{"type":"null"}],"description":"How many people are seated at the table."},"depositAmount":{"type":["string","null"],"description":"The amount of discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tableStatus":{"type":["string","null"],"description":"Status of the table. Possible values are \"no_table\", \"seated\", \"cleaning\", and \"free\".","enum":[null,"no_table","seated","cleaning","free"]},"surcharge":{"type":["string","null"],"description":"The surcharge amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"surchargeType":{"type":["string","null"],"description":"The type of surcharge applied to the order.","enum":["fixed","percentage"]},"surchargeDescription":{"type":["string","null"],"description":"Description of the surcharge applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"discount":{"type":["string","null"],"description":"The discount amount applied to the order.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":10},"discountType":{"type":["string","null"],"description":"The type of discount applied to the order.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order.","maxLength":255,"pattern":"^[^<>&]+$"},"status":{"type":["string","null"],"description":"Fulfillment status of the order lifecycle.","enum":[null,"auto","received","confirmed","rejected","preparing","ready_for_delivery","dispatched","in_transit","delivered"]},"state":{"type":["string"],"description":"Order state.","enum":["draft","sent","paid","discarded","cart","pending_payment","open","open_web"]},"createdAt":{"type":"string","description":"Order created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Order updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["covers","tableStatus","createdAt","updatedAt"]},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"invoice":{"type":"object","description":"Details of the invoice associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"invoices","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"customers","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"booking":{"type":"object","description":"Details of the booking associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"bookings","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"tables":{"type":"object","description":"Details of the tables associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"description":"An array of table objects.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"tables","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}},"required":["data"]},"promoCode":{"type":"object","description":"Details of the promo codes associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"promoCodes","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"outlet":{"type":"object","description":"Details of the outlet associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"outlets","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the order.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"taxes":{"type":"object","description":"Details of the taxes associated with the product.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"taxes"}},"required":["id","type"]}}},"required":["data"]},"orderItems":{"type":"object","description":"Details of the items associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"items":{"oneOf":[{"$ref":"#/components/schemas/order_items/order_item_identifier"},{"$ref":"#/components/schemas/order_bundle_items/order_bundle_item_identifier"}]}}},"required":["data"]},"payments":{"type":"object","description":"Details of the payments associated with the order.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"payments","description":"The type member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type","attributes","links"]}},"order_items":{"order_item_identifier":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orderItems"}},"required":["id","type"]},"order_item":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"orderItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The number of units of the product being ordered."},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"subtotal":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the product before taxes and discounts are applied."},"tax":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The tax amount applicable to the specific item."},"total":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the item after taxes and discounts have been applied."},"discount":{"type":["string","null"],"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The percentage or amount of discount applied specifically to this item."},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to this specific item.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"isComp":{"type":"boolean","description":"Indicates whether the item was provided for free (comped) or not."},"isVoid":{"type":"boolean","description":"Indicates whether the item has been voided from the order."},"notes":{"type":["string","null"],"description":"Internal notes for the order item.","maxLength":2048,"pattern":"^[^<>&]+$"},"compVoidReason":{"type":["string","null"],"description":"The reason provided for voiding the item, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"compVoidNotes":{"type":["string","null"],"description":"Additional notes regarding the comping or voiding of the item.","maxLength":2048,"pattern":"^[^<>&]+$"},"status":{"type":"string","description":"The current status of the order item.","enum":["received","confirmed","delivered","rejected"]},"discountType":{"type":"string","description":"The type of discount applied to the order item.","enum":["fixed","percentage"]},"discountDescription":{"type":["string","null"],"description":"Description of the discount applied to the order item.","maxLength":255,"pattern":"^[^<>&]+$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["quantity","unitPriceInclTax","subtotal","tax","total","discount","discountAmount","isComp","isVoid","notes","compVoidReason","compVoidNotes","status","discountType","discountDescription","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"product":{"$ref":"#/components/schemas/products/relationship_product"},"productVariant":{"$ref":"#/components/schemas/product_variants/relationship_product_variant"},"modifiers":{"$ref":"#/components/schemas/modifiers/relationship_modifiers"},"revenueCenter":{"$ref":"#/components/schemas/revenue_centers/relationship_revenue_center"}}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"resource_identifier":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"order_bundle_items":{"order_bundle_item_identifier":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundleItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]},"order_bundle_item":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundleItems","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The number of units of the product being ordered."},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$","description":"The total price of the item after taxes and discounts have been applied."},"notes":{"type":["string","null"],"description":"Internal notes for the order bundle item.","maxLength":1000,"pattern":"^[^<>&]+$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["quantity","unitPriceInclTax","total","notes","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"product":{"$ref":"#/components/schemas/products/relationship_product"},"productVariant":{"$ref":"#/components/schemas/product_variants/relationship_product_variant"},"modifiers":{"$ref":"#/components/schemas/modifiers/relationship_modifiers"},"revenueCenter":{"$ref":"#/components/schemas/revenue_centers/relationship_revenue_center"},"orderBundle":{"$ref":"#/components/schemas/order_bundles/relationship_order_bundle"}}},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"invoices":{"invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"invoices","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discount":{"type":["string","null"],"description":"The amount of discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tax":{"type":"string","description":"The total tax amount applicable to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","description":"The final amount due on the invoice after all discounts and taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"subtotal":{"type":"string","description":"The total amount of the invoice before taxes and additional charges.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"tipAmount":{"type":["string","null"],"description":"The amount of gratuity or tip added to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"cancelled":{"type":"boolean","description":"Indicates whether the invoice has been cancelled (true) or not (false)."},"cancelReason":{"type":["string","null"],"description":"The reason provided for cancelling the invoice, if applicable.","maxLength":255,"pattern":"^[^<>&]+$"},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"description":{"type":["string","null"],"description":"A brief description of the invoice, including details about the transaction.","maxLength":255,"pattern":"^[^<>&]+$"},"itemDiscountAmount":{"type":["string","null"],"description":"The total discount amount applied to individual items within the invoice.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"}},"required":["discount","tax","total","subtotal","tipAmount","createdAt","updatedAt","cancelled","cancelReason","discountAmount","description","itemDiscountAmount"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"user":{"type":"object","description":"Details of the user associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"users"}},"required":["id","type"]}},"required":["data"]},"order":{"type":"object","description":"Details of the order associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}},"required":["data"]},"registers":{"type":"object","description":"Details of the register associated with the invoice.","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"register"}},"links":{"self":{"type":"string","format":"uri","maxLength":255}},"required":["id","type"]}},"required":["data"]},"originalInvoice":{"type":"object","description":"Details of the original invoice associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"invoices"}},"required":["id","type"]}},"required":["data"]},"items":{"type":"object","description":"Details of the items associated with the invoice.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"invoiceItems"},"links":{"self":{"type":"string","format":"uri","maxLength":255}}},"required":["id","type"]}}},"required":["data"]},"promoCode":{"type":"object","description":"Details of the promo codes associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"promoCodes","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the invoice.","properties":{"data":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}}}}}},"required":["id","type","attributes"]}},"tables":{"table":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"The name of the table.","minLength":0,"maxLength":255,"pattern":"^[A-Za-z0-9,-_. ]+$"},"numberOfSeats":{"type":"integer","description":"Number of people that can be seated at this table.","format":"int32","minimum":1,"maximum":99},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","numberOfSeats","createdAt","updatedAt"]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"area":{"type":"object","nullable":true,"description":"Details of the table area.","properties":{"data":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"areas"}},"required":["id","type"]},{"type":"null"}]}}}}}},"required":["id","type","attributes"]}},"bookings":{"booking":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"bookings"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","allOf":[{"$ref":"#/components/schemas/bookings/booking_attributes"},{"type":"object","properties":{"isWalkIn":{"type":"boolean","description":"Indicates if the booking is a walk-in."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["status","partySize","bookingDatetime"]}]},"relationships":{"type":"object","description":"A [relationships object](https://jsonapi.org/format/#document-resource-object-relationships) describing relationships between the resource and other JSON:API resources.","properties":{"tables":{"type":"object","description":"Details of the tables associated with the booking.","properties":{"data":{"type":"array","description":"A list of related table objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"tables"}},"required":["id","type"]}}},"required":["data"]},"customer":{"type":"object","description":"Details of the customer associated with the booking.","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"customers"}}},{"type":"null"}]}}},"orders":{"type":"object","description":"Details of the orders associated with the booking.","properties":{"data":{"type":"array","description":"A list of related order objects.","maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orders"}},"required":["id","type"]}}},"required":["data"]}}}},"required":["id","type"]},"booking_attributes":{"type":"object","properties":{"status":{"type":["string","null"],"enum":["confirmed","seated","completed","cancelled","no_show"],"description":"The initial status of the booking. Possible values are \"confirmed\", \"seated\", \"completed\", \"cancelled\", and \"no_show\"."},"partySize":{"type":"integer","description":"Represents the number of people included in the booking.","format":"int32","minimum":1,"maximum":1000},"bookingDatetime":{"type":"string","maxLength":25,"format":"date-time","description":"The booking's date."},"duration":{"type":["integer","null"],"description":"Represents the length of the booking in minutes.","format":"int32","minimum":1,"maximum":10000},"notes":{"type":["string","null"],"maxLength":10000,"pattern":"^[^<>&]+$","description":"Additional notes for the booking."},"roomNumber":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The room number of the booking's customer."},"promotions":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The promotions of the booking."},"bookingReference":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"A reference code or identifier associated with the booking."},"depositAmount":{"type":["string","null"],"description":"The amount of the deposit.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"}}}},"customers":{"customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"customers","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"$ref":"#/components/schemas/customers/customer_attributes","createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"anyOf":[{"required":["fullName"]},{"required":["companyNumber"]}],"required":["createdAt","updatedAt"]}},"required":["id","type","attributes"]},"customer_attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"fullName":{"type":["string","null"],"minLength":1,"maxLength":255,"pattern":"^[^<>&]+$","description":"The full name of the customer. This can be either a personal name or a company name."},"companyName":{"type":["string","null"],"maxLength":255,"pattern":"^[-\\w\\s.,!;;'&]+$","description":"The name of the company associated with the customer."},"taxNumber":{"type":["string","null"],"maxLength":40,"pattern":"^[A-Za-z0-9]{1,24}$","description":"The customer's tax identification number."},"email":{"type":["string","null"],"maxLength":320,"pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","description":"The customer's email address."},"address1":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"The first line of the customer's address."},"address2":{"type":["string","null"],"maxLength":255,"pattern":"^[^<>&]+$","description":"The second line of the customer's address."},"city":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The city of the customer's address."},"state":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The state or province of the customer's address."},"postalCode":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The postal or ZIP code of the customer's address."},"country":{"type":["string","null"],"maxLength":100,"pattern":"^[^<>&]+$","description":"The country of the customer's address."},"notes":{"type":["string","null"],"maxLength":500,"pattern":"^[\\s\\S]*$","description":"Additional notes about the customer."},"phone":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The customer's phone number."},"mobile":{"type":["string","null"],"maxLength":20,"pattern":"^\\+?[0-9]{1,15}$","description":"The customer's mobile phone number."},"countrySpecificCode":{"type":["string","null"],"maxLength":50,"pattern":"^[^<>&]+$","description":"A unique country specific code assigned to the customer. Lottery code, for example, in Italy."},"dateOfBirth":{"type":["string","null"],"maxLength":10,"format":"date","description":"The customer's date of birth in YYYY-MM-DD format."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}}}},"promo_codes":{"promo_code":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"promoCodes"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discountType":{"type":"string","description":"Specifies whether the discount is a fixed amount, a percentage, or free shipping.","enum":["absolute","percent","free_shipping"]},"amount":{"type":["string","null"],"description":"The value of the discount. Required for absolute and percent discount types.","pattern":"^[0-9]+\\.[0-9]{2}$","maxLength":19},"channel":{"type":"string","description":"The sales channel where the discount is applicable.","enum":["all_channels","ecommerce","pos"]},"code":{"type":"string","description":"The unique identifier code for the promo code.","pattern":"^.+$","minLength":1,"maxLength":255},"active":{"type":"boolean","description":"A boolean indicating if the promo code is currently active."},"description":{"type":["string","null"],"description":"A description of the promo code.","pattern":"^.*$","maxLength":1000},"maxUsages":{"type":["integer","null"],"description":"Maximum number of times this promo code can be used.","format":"int32","minimum":1,"maximum":1000000},"startsAt":{"type":["string","null"],"description":"Date and time when the promo code becomes valid in RFC 3339 format.","maxLength":25,"format":"date-time"},"endsAt":{"type":["string","null"],"description":"Date and time when the promo code expires in RFC 3339 format.","maxLength":25,"format":"date-time"},"createdAt":{"type":"string","description":"Promo code created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Promo code updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["discountType","amount","channel","code","active","description","maxUsages","startsAt","endsAt","createdAt","updatedAt"]}},"required":["id","type","attributes"]}},"outlets":{"outlet":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","const":"outlets","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"The name of the outlet, representing the business or location.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"address1":{"type":["string","null"],"description":"The first line of the outlet's street address, typically including the street number and name.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"address2":{"type":["string","null"],"description":"The second line of outlet's address.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"city":{"type":["string","null"],"description":"The city where the outlet is located.","minLength":1,"maxLength":86,"pattern":"^[^<>&]+$"},"state":{"type":["string","null"],"description":"The state or region where the outlet is located.","minLength":1,"maxLength":54,"pattern":"^[^<>&]+$"},"postalCode":{"type":["string","null"],"description":"The postal or ZIP code for outlet's location.","minLength":1,"maxLength":10,"pattern":"^[^<>&]+$"},"index":{"type":"integer","description":"A unique sequential number representing the outlet number within the establishment.","format":"int32","minimum":1,"maximum":10},"createdAt":{"type":"string","description":"Outlet created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Outlet updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","address1","address2","city","state","postalCode","index","createdAt","updatedAt"]}},"required":["id","type","attributes"]}},"revenue_centers":{"revenue_center":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"revenueCenters"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","maxLength":255,"pattern":"^[^<>&]+$","description":"Name of the revenue center."},"isActive":{"type":"boolean","description":"Indicates whether the revenue center is active."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","isActive","createdAt","updatedAt"]}},"required":["id","type","attributes"]},"relationship_revenue_center":{"type":"object","description":"Details of the revenue center associated with the selected item.","properties":{"data":{"type":["object","null"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"revenueCenters","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."}},"required":["id","type"]}},"required":["data"]}},"taxes":{"tax":{"type":"object","properties":{"id":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID (UUID) that identifies the related object.","minLength":36,"maxLength":36},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"taxes"},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"name":{"type":"string","description":"Name of the tax.","minLength":1,"maxLength":255,"pattern":"^.*\\S.*$"},"rate":{"type":"string","description":"Tax rate as a decimal.","minLength":3,"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,6}$"},"taxType":{"type":"string","description":"Type of the tax.","enum":["vat","other","fixed","consumption","sales","state","city","liquor","food","entertainment"]},"isActive":{"type":"boolean","description":"Whether the tax is active."},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"label":{"type":["string","null"],"description":"Label of the tax.","maxLength":255,"pattern":"^.*\\S.*$"},"ratePercent":{"type":"string","description":"Tax rate as a percentage.","minLength":1,"maxLength":7,"pattern":"^[0-9]+(\\.[0-9]{1,2})?$"}},"required":["name","rate","taxType","isActive","createdAt","updatedAt","ratePercent","label"]}},"required":["id","type","attributes"]}},"products":{"relationship_product":{"type":"object","description":"Details of the product associated with the selected item.","properties":{"data":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"products"}},"required":["id","type"]}},"required":["data"]}},"product_variants":{"relationship_product_variant":{"type":"object","description":"Details of the product variant associated with the selected item.","properties":{"data":{"type":["object","null"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"productVariants"}},"required":["id","type"]}},"required":["data"]}},"modifiers":{"relationship_modifiers":{"type":"object","description":"Details of the modifiers associated with the selected item.","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"modifiers"}},"required":["id","type"]}}},"required":["data"]}},"order_bundles":{"relationship_order_bundle":{"type":"object","description":"Details of the order bundle associated with the selected item.","properties":{"data":{"type":["object"],"properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships.","const":"orderBundles"}},"required":["id","type"]}},"required":["data"]},"order_bundle":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/resource_identifier"},"type":{"type":"string","const":"orderBundles","title":"Resource type name","description":"The [type](https://jsonapi.org/format/#document-resource-object-identification) member is used to describe resource objects that share common attributes and relationships."},"attributes":{"type":"object","description":"An [attributes object](https://jsonapi.org/format/#document-resource-object-attributes) representing some of the resource's data.","properties":{"discount":{"type":["string","null"],"maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The percentage or amount of discount applied specifically to this item."},"discountType":{"type":"string","description":"The type of discount applied to the order item.","enum":["fixed","percentage"]},"createdAt":{"type":"string","description":"Created at timestamp in RFC 3339 format.","format":"date-time","maxLength":25},"updatedAt":{"type":"string","description":"Updated at timestamp in RFC 3339 format.","format":"date-time","maxLength":25}},"required":["discount","discountType","createdAt","updatedAt"]},"links":{"type":"object","description":"A [links object](https://jsonapi.org/format/#document-resource-object-links) containing links related to the resource.","properties":{"self":{"type":"string","format":"uri","description":"A link to the resource itself.","minLength":1,"maxLength":255}},"required":["self"]}},"required":["id","type","attributes","links"]}},"error":{"type":"object","description":"A JSON:API error object.\n\nAdditional properties specific to the problem type may be present.    \n","properties":{"errors":{"type":"array","description":"An array of error details to accompany a problem details response.","maxItems":1000,"items":{"type":"object","description":"An object to provide explicit details on a problem towards an API consumer.","properties":{"id":{"type":"string","maxLength":16,"description":"A unique identifier for this particular occurrence of the problem.","pattern":"^[A-Za-z0-9_-]+$"},"status":{"type":"string","maxLength":3,"description":"The HTTP status code applicable to this problem, expressed as a string value.","pattern":"^[1-5][0-9]{2}$"},"code":{"type":"string","maxLength":50,"description":"An application-specific error code, expressed as a string value.","pattern":"^[A-Za-z0-9_-]+$"},"title":{"type":"string","description":"A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.","maxLength":256,"pattern":"^.{1,255}$"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized.","maxLength":1024,"pattern":"^.{1,1023}$"},"source":{"type":"object","properties":{"pointer":{"type":"string","description":"A JSON Pointer to a specific request body property that is the source of error.","maxLength":1024,"pattern":"^$|^/([A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+$"},"parameter":{"type":"string","description":"A string indicating which URI query parameter caused the error.","maxLength":1024,"pattern":"^[A-Za-z0-9_]+$"},"header":{"type":"string","description":"The name of the header that is the source of error.","maxLength":1024,"pattern":"^[A-Za-z-]+$"}}},"meta":{"type":"object","description":"Additional information about the error.","additionalProperties":true}},"required":["title"]}}},"required":["errors"]}},"headers":{"x_rate_limit_limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":1000}},"x_rate_limit_reset":{"description":"The time at which the rate limit resets, in UTC epoch seconds.","schema":{"type":"integer","format":"int64","minimum":1633036800,"maximum":2147483647}},"access_control_allow_origin":{"description":"Specifies which origins are allowed to access the resource.","schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[A-Za-z /*]+$"}},"retry_after":{"description":"The time the client should wait before making a new request.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":3600}}},"responses":{"bad_request":{"description":"Bad request.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unauthorized":{"description":"Unauthorized.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"unprocessable_entity":{"description":"Unprocessable entity.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"too_many_requests":{"description":"Too many requests.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Retry-After":{"$ref":"#/components/headers/retry_after"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"internal_server_error":{"description":"Internal Server Error.","content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}},"service_unavailable":{"description":"Service is unavailable.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"type":"object","$ref":"#/components/schemas/error"}}}}}},"paths":{"/v1/orders/{id}":{"patch":{"operationId":"updateOrder","summary":"Update order","description":"This operation updates an existing order. You can update order attributes (covers, notes) and relationships (customer, tables, outlet, revenue center, promo code). You can also add new items to the order or update existing ones.\n\n**Item Identifiers:**\n- Use `tempId` for new items being added to the order (items that don't exist in the database yet).\n- Use `id` (UUID) for existing items that are being updated or kept in the order.\n\n**Note:** This operation needs [Authentication](../guidelines/authentication.md) and supports the following JSON:API features:\n\n- [Relationships](../guidelines/relationships.md) - `customer`, `tables`, `outlet`, `revenueCenter`, `promoCode` using relationships in the request body.\n- [Sparse fieldsets](../guidelines/sparse-fieldsets.md) - supports all fields of `order` and related resources with `fields` query parameter.\n","parameters":[{"$ref":"#/components/parameters/fields_orders"},{"$ref":"#/components/parameters/fields_invoices"},{"$ref":"#/components/parameters/fields_customers"},{"$ref":"#/components/parameters/fields_bookings"},{"$ref":"#/components/parameters/fields_tables"},{"$ref":"#/components/parameters/fields_promo_codes"},{"$ref":"#/components/parameters/fields_outlets"},{"$ref":"#/components/parameters/fields_revenue_centers"},{"$ref":"#/components/parameters/fields_taxes"},{"in":"path","name":"id","description":"The id of the resource.","required":true,"schema":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID UUID4.","minLength":36,"maxLength":36}},{"in":"query","name":"include","schema":{"type":"array","maxItems":9,"items":{"type":"string","enum":["invoice","customer","booking","tables","promoCode","outlet","revenueCenter","taxes","orderItems"]}},"description":"include query parameter to allow the client to customize which related resource should be returned.","required":false}],"requestBody":{"required":true,"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/orders/order_update_request"}}}},"tags":["Orders"],"responses":{"200":{"description":"The order was successfully updated.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/orders/order_response"}}}},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/unauthorized"},"404":{"description":"Order not found.","headers":{"X-Rate-Limit-Limit":{"$ref":"#/components/headers/x_rate_limit_limit"},"X-Rate-Limit-Remaining":{"$ref":"#/components/headers/x_rate_limit_remaining"},"X-Rate-Limit-Reset":{"$ref":"#/components/headers/x_rate_limit_reset"},"Access-Control-Allow-Origin":{"$ref":"#/components/headers/access_control_allow_origin"}},"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/error"}}}},"422":{"$ref":"#/components/responses/unprocessable_entity"},"429":{"$ref":"#/components/responses/too_many_requests"},"500":{"$ref":"#/components/responses/internal_server_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mews.com/pos-api/operations/orders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
