# Invoices

Invoices object

## Get invoices

> This operation returns a list of invoices.\
> \
> \*\*Note:\*\* This operation needs \[Authentication]\(../guidelines/authentication.md) and supports the following JSON:API features:\
> \
> \- \[Relationships]\(../guidelines/relationships.md) - \`invoiceItems\`, \`user\`, \`register\`, \`originalInvoice\`, \`order\`, \`promoCode\`, \`revenueCenter\` using \`include\` query parameter.\
> \- \[Filters]\(../guidelines/filtering.md) - \`createdAtGt\`, \`createdAtGteq\`, \`createdAtLt\`, \`createdAtLteq\`, \`registerIdEq\`\
> \- \[Sparse fieldsets]\(../guidelines/sparse-fieldsets.md) - supports all fields of \`invoices\` and related resources with \`fields\` query parameter.

```json
{"openapi":"3.1.0","info":{"title":"POS API","version":"1.0.0"},"tags":[{"name":"Invoices","description":"Invoices 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_created_at_lt":{"in":"query","name":"filter[createdAtLt]","description":"Filters the objects that were created before 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_lteq":{"in":"query","name":"filter[createdAtLteq]","description":"Filters the objects that were created before 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_register_id_eq":{"in":"query","name":"filter[registerIdEq]","description":"Filters the objects by the id of related register resource","required":false,"schema":{"type":"string","format":"uuid","title":"Resource identifier","description":"Universally unique ID UUID4.","minLength":36,"maxLength":36}},"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_invoice_items":{"in":"query","name":"fields[invoiceItems]","schema":{"type":"array","maxItems":18,"items":{"type":"string","enum":["productName","quantity","comp","void","compVoidReason","compVoidNotes","createdAt","updatedAt","unitPriceInclTax","subtotal","tax","total","discount","discountAmount","product","productVariant","revenueCenter","invoiceItemModifiers"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_registers":{"in":"query","name":"fields[registers]","schema":{"type":"array","maxItems":7,"items":{"type":"string","enum":["name","invoicesCount","index","virtual","createdAt","updatedAt","outlet"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","explode":false,"required":false},"fields_users":{"in":"query","name":"fields[users]","schema":{"type":"array","maxItems":1,"items":{"type":"string","enum":["name"]}},"description":"Fields query parameter to allow the client to customize which fields should be returned.","required":false},"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_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_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}},"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":{"invoices":{"invoices_response":{"type":"object","properties":{"data":{"type":"array","description":"The document's \"primary data\".","maxItems":1000,"items":{"$ref":"#/components/schemas/invoices/invoice"}},"included":{"type":["array","null"],"maxItems":1000,"description":"Details of the objects to which the invoice is related.","items":{"anyOf":[{"$ref":"#/components/schemas/invoice_items/invoice_item"},{"$ref":"#/components/schemas/users/user"},{"$ref":"#/components/schemas/registers/register"},{"$ref":"#/components/schemas/orders/order"},{"$ref":"#/components/schemas/invoices/invoice"},{"$ref":"#/components/schemas/promo_codes/promo_code"},{"$ref":"#/components/schemas/revenue_centers/revenue_center"}]}},"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"]}},"required":["data","links"]},"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"]}},"invoice_items":{"invoice_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":"invoiceItems","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":{"productName":{"type":"string","description":"The name of the product or item being invoiced.","maxLength":255,"pattern":"^[^<>&]+$"},"unitPriceInclTax":{"type":"string","description":"The price of the product per unit, including applicable taxes.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{2}$"},"quantity":{"type":"string","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$","description":"The number of units of the product being purchased."},"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."},"comp":{"type":"boolean","description":"Indicates whether the item was provided for free (comped) or not.","deprecated":true},"void":{"type":"boolean","description":"Indicates whether the item has been voided from the invoice.","deprecated":true},"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 invoice."},"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":"^[^<>&]+$"},"discountAmount":{"type":["string","null"],"description":"The total monetary value of the discount applied to this specific item.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"},"subtotalInclDiscount":{"type":"string","description":"The subtotal of the item after applying any discounts.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"},"taxInclDiscount":{"type":"string","description":"The tax amount applicable to the item after applying any discounts.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"},"totalInclDiscount":{"type":"string","description":"The tax amount applicable to the item after applying any discounts.","maxLength":255,"pattern":"^[0-9]+\\.[0-9]{1,2}$"},"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":["productName","unitPriceInclTax","quantity","subtotal","tax","total","discount","comp","void","isComp","isVoid","compVoidReason","compVoidNotes","discountAmount","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":{"type":"object","description":"Details of the product associated with the invoiceItem.","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":"products"}},"required":["id","type"]}},"required":["data"]},"productVariant":{"type":"object","description":"Details of the productVariant associated with the invoiceItem.","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":"productVariants"}},"required":["id","type"]}},"required":["data"]},"invoiceItemModifiers":{"type":"object","description":"Details of the items associated with the invoiceItem.","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":"invoiceItemModifiers"}},"required":["id","type"]}}},"required":["data"]},"revenueCenter":{"type":"object","description":"Details of the revenue center associated with the invoiceItem.","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"]}},"users":{"user":{"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":"users"},"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":"Full name of the user.","maxLength":255,"pattern":"^[^<>&]+$"}},"required":["name"]}},"required":["id","type","attributes"]}},"registers":{"register":{"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":"registers"},"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 register.","minLength":1,"maxLength":255,"pattern":"^[^<>&]+$"},"invoicesCount":{"type":"integer","description":"Total number of invoices issued from this register.","format":"int32","minimum":0,"maximum":100000},"index":{"type":"integer","description":"The index of a register within an outlet.","format":"int32","minimum":1,"maximum":100},"virtual":{"type":"boolean","description":"A boolean indicating whether the register is virtual `true` or physical `false`."},"createdAt":{"type":"string","description":"Register created at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"},"updatedAt":{"type":"string","description":"Register updated at timestamp in RFC 3339 format.","maxLength":25,"format":"date-time"}},"required":["name","invoicesCount","index","virtual","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":{"outlet":{"type":"object","description":"Details of the outlet to which the register is associated.","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":"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"]}}}},"required":["id","type","attributes","links"]}},"orders":{"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"]}},"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"]}},"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"]}},"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"]}},"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/invoices":{"get":{"summary":"Get invoices","description":"This operation returns a list of invoices.\n\n**Note:** This operation needs [Authentication](../guidelines/authentication.md) and supports the following JSON:API features:\n\n- [Relationships](../guidelines/relationships.md) - `invoiceItems`, `user`, `register`, `originalInvoice`, `order`, `promoCode`, `revenueCenter` using `include` query parameter.\n- [Filters](../guidelines/filtering.md) - `createdAtGt`, `createdAtGteq`, `createdAtLt`, `createdAtLteq`, `registerIdEq`\n- [Sparse fieldsets](../guidelines/sparse-fieldsets.md) - supports all fields of `invoices` and related resources with `fields` query parameter.","operationId":"invoices","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_created_at_lt"},{"$ref":"#/components/parameters/filter_created_at_lteq"},{"$ref":"#/components/parameters/filter_register_id_eq"},{"$ref":"#/components/parameters/fields_invoices"},{"$ref":"#/components/parameters/fields_invoice_items"},{"$ref":"#/components/parameters/fields_registers"},{"$ref":"#/components/parameters/fields_users"},{"$ref":"#/components/parameters/fields_orders"},{"$ref":"#/components/parameters/fields_promo_codes"},{"$ref":"#/components/parameters/fields_revenue_centers"},{"in":"query","name":"include","schema":{"type":"array","maxItems":7,"items":{"type":"string","enum":["user","originalInvoice","register","invoiceItems","order","promoCode","revenueCenter"]}},"description":"Include query parameter to allow the client to customize which related resource should be returned.","required":false}],"tags":["Invoices"],"responses":{"200":{"description":"Successful response with invoices 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/invoices/invoices_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"}}}}}}
```


---

# 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/invoices.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.
