# Order

Resource 'Order' operations.

## List all orders

> Returns a list of orders. The orders are returned in descending order by creation date.

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Order","description":"Resource 'Order' operations."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Order-order.read":{"type":"object","description":"An order is a purchase made by a customer, a purchase is made up of one or more lines and each line represents a gift card, product, or membership purchased by a customer.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"customerFirstName":{"default":"","type":["string","null"]},"customerLastName":{"default":"","type":["string","null"]},"customerName":{"default":"","type":["string","null"]},"currencyCode":{"type":"string"},"dispatchStatus":{"type":"string","enum":["Outstanding","Packed","Dispatched","Cancelled","Scheduled","Failed"]},"subtotal":{"type":"integer"},"total":{"type":"integer"},"deliveryAmount":{"type":"integer"},"deliveryMethodName":{"type":["string","null"]},"channel":{"type":"string"},"discountAmount":{"type":"integer"},"deliveryName":{"default":"","type":"string"},"deliveryAddressLine1":{"default":"","type":"string"},"deliveryAddressLine2":{"default":"","type":"string"},"deliveryAddressCity":{"default":"","type":"string"},"deliveryAddressCounty":{"default":"","type":"string"},"deliveryAddressPostcode":{"default":"","type":"string"},"deliveryAddressCountry":{"default":"","type":"string"},"billingAddressLine1":{"default":"","type":"string"},"billingAddressLine2":{"default":"","type":"string"},"billingAddressCity":{"default":"","type":"string"},"billingAddressCounty":{"default":"","type":"string"},"billingAddressPostcode":{"default":"","type":"string"},"billingAddressCountry":{"default":"","type":"string"},"phoneNumber":{"default":"","type":"string"},"billingContact":{"type":["string","null"],"format":"iri-reference"},"customerEmailAddress":{"default":"","type":"string"},"paymentStatus":{"type":"string","enum":["Pending","Completed","Refunded","Chargeback","Cancelled","Partially Refunded"]},"deliveryContact":{"type":["string","null"],"format":"iri-reference"},"billingContactAddress":{"anyOf":[{"$ref":"#/components/schemas/ContactAddress-order.read"},{"type":"null"}]},"deliveryContactAddress":{"anyOf":[{"$ref":"#/components/schemas/ContactAddress-order.read"},{"type":"null"}]},"uuid":{"type":"string","format":"uuid"},"emailToRecipient":{"type":"boolean"},"recipientEmailAddress":{"type":"string"},"scheduledDeliveryAt":{"type":["string","null"],"format":"date-time"},"discountCodes":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscountCode-order.read"}},"user":{"anyOf":[{"$ref":"#/components/schemas/User-order.read"},{"type":"null"}]},"paymentMethod":{"type":"string","enum":["Gateway","Offline","Complimentary","Free","Setup future payment"]},"offlinePaymentMethod":{"default":"","type":["string","null"]},"complimentaryReason":{"default":"","type":["string","null"]},"recipientFirstName":{"default":"","type":"string"},"recipientLastName":{"default":"","type":"string"},"gateway":{"type":"string"},"transaction":{"type":"integer"},"type":{"type":"string","enum":["Gift Card","Subscription"]},"deliveryMethodType":{"type":"string"},"processingFee":{"default":0,"type":"integer"},"userAgent":{"type":["string","null"]},"browserInfo":{"type":["string","null"]},"ipAddress":{"type":["string","null"]},"latestReceiptEmailDeliveryStatus":{"type":["string","null"],"enum":["Processed","Dropped","Delivered","Deferred","Bounced","Blocked","Opened","Clicked","Reported as spam","Unsubscribed","Group unsubscribed","Group resubscribed",null]}}},"ContactAddress-order.read":{"type":"object"},"OrderDiscountCode-order.read":{"type":"object"},"User-order.read":{"type":"object"},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/orders":{"get":{"operationId":"api_orders_get_collection","tags":["Order"],"responses":{"200":{"description":"Order collection","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Order-order.read"}}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"List all orders","description":"Returns a list of orders. The orders are returned in descending order by creation date.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"schema":{"type":"integer","default":1},"style":"form","explode":true},{"name":"createdAt[before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"createdAt[strictly_before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"createdAt[after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"createdAt[strictly_after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"updatedAt[before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"updatedAt[strictly_before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"updatedAt[after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"updatedAt[strictly_after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"scheduledDeliveryAt[before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"scheduledDeliveryAt[strictly_before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"scheduledDeliveryAt[after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"scheduledDeliveryAt[strictly_after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false}]}}}}
```

## Retrieve an order

> An order is made up of one or more lines and each represent a gift card, product, or membership purchased by a customer.

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Order","description":"Resource 'Order' operations."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Order-order.read":{"type":"object","description":"An order is a purchase made by a customer, a purchase is made up of one or more lines and each line represents a gift card, product, or membership purchased by a customer.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"customerFirstName":{"default":"","type":["string","null"]},"customerLastName":{"default":"","type":["string","null"]},"customerName":{"default":"","type":["string","null"]},"currencyCode":{"type":"string"},"dispatchStatus":{"type":"string","enum":["Outstanding","Packed","Dispatched","Cancelled","Scheduled","Failed"]},"subtotal":{"type":"integer"},"total":{"type":"integer"},"deliveryAmount":{"type":"integer"},"deliveryMethodName":{"type":["string","null"]},"channel":{"type":"string"},"discountAmount":{"type":"integer"},"deliveryName":{"default":"","type":"string"},"deliveryAddressLine1":{"default":"","type":"string"},"deliveryAddressLine2":{"default":"","type":"string"},"deliveryAddressCity":{"default":"","type":"string"},"deliveryAddressCounty":{"default":"","type":"string"},"deliveryAddressPostcode":{"default":"","type":"string"},"deliveryAddressCountry":{"default":"","type":"string"},"billingAddressLine1":{"default":"","type":"string"},"billingAddressLine2":{"default":"","type":"string"},"billingAddressCity":{"default":"","type":"string"},"billingAddressCounty":{"default":"","type":"string"},"billingAddressPostcode":{"default":"","type":"string"},"billingAddressCountry":{"default":"","type":"string"},"phoneNumber":{"default":"","type":"string"},"billingContact":{"type":["string","null"],"format":"iri-reference"},"customerEmailAddress":{"default":"","type":"string"},"paymentStatus":{"type":"string","enum":["Pending","Completed","Refunded","Chargeback","Cancelled","Partially Refunded"]},"deliveryContact":{"type":["string","null"],"format":"iri-reference"},"billingContactAddress":{"anyOf":[{"$ref":"#/components/schemas/ContactAddress-order.read"},{"type":"null"}]},"deliveryContactAddress":{"anyOf":[{"$ref":"#/components/schemas/ContactAddress-order.read"},{"type":"null"}]},"uuid":{"type":"string","format":"uuid"},"emailToRecipient":{"type":"boolean"},"recipientEmailAddress":{"type":"string"},"scheduledDeliveryAt":{"type":["string","null"],"format":"date-time"},"discountCodes":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscountCode-order.read"}},"user":{"anyOf":[{"$ref":"#/components/schemas/User-order.read"},{"type":"null"}]},"paymentMethod":{"type":"string","enum":["Gateway","Offline","Complimentary","Free","Setup future payment"]},"offlinePaymentMethod":{"default":"","type":["string","null"]},"complimentaryReason":{"default":"","type":["string","null"]},"recipientFirstName":{"default":"","type":"string"},"recipientLastName":{"default":"","type":"string"},"gateway":{"type":"string"},"transaction":{"type":"integer"},"type":{"type":"string","enum":["Gift Card","Subscription"]},"deliveryMethodType":{"type":"string"},"processingFee":{"default":0,"type":"integer"},"userAgent":{"type":["string","null"]},"browserInfo":{"type":["string","null"]},"ipAddress":{"type":["string","null"]},"latestReceiptEmailDeliveryStatus":{"type":["string","null"],"enum":["Processed","Dropped","Delivered","Deferred","Bounced","Blocked","Opened","Clicked","Reported as spam","Unsubscribed","Group unsubscribed","Group resubscribed",null]}}},"ContactAddress-order.read":{"type":"object"},"OrderDiscountCode-order.read":{"type":"object"},"User-order.read":{"type":"object"},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/orders/{id}":{"get":{"operationId":"api_orders_id_get","tags":["Order"],"responses":{"200":{"description":"Order resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order-order.read"}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"404":{"description":"Not found","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"Retrieve an order","description":"An order is made up of one or more lines and each represent a gift card, product, or membership purchased by a customer.","parameters":[{"name":"id","in":"path","description":"Order identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}]}}}}
```

## Retrieve the lines of an order

> An order is made up of one or more lines and each represent a gift card, product, or membership purchased.

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Order","description":"Resource 'Order' operations."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"OrderLine-line.read":{"type":"object","properties":{"id":{"readOnly":true,"type":"integer"},"attachedOrder":{"type":"integer"},"variant":{"type":["string","null"],"format":"iri-reference"},"name":{"type":"string"},"type":{"type":"string"},"total":{"type":"integer"},"orderLineTypeVoucher":{"anyOf":[{"$ref":"#/components/schemas/OrderLineTypeVoucher-line.read"},{"type":"null"}]},"discount_amount":{"type":"integer"},"subtotal":{"type":"integer"},"taxTotal":{"default":0,"type":"integer"},"taxRate":{"type":["string","null"]},"refunded":{"default":false,"type":"boolean"},"description":{"default":"","type":"string"},"personalMessage":{"default":"","type":["string","null"]},"selectedOptions":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineSelectedOption-line.read"}},"discountCodes":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscountCode-line.read"}},"recurringProduct":{"anyOf":[{"$ref":"#/components/schemas/OrderLineTypeRecurringProduct-line.read"},{"type":"null"}]},"deliveryMethodZoneRate":{"anyOf":[{"$ref":"#/components/schemas/DeliveryMethodZoneRate-line.read"},{"type":"null"}]}}},"OrderLineTypeVoucher-line.read":{"type":"object"},"OrderLineSelectedOption-line.read":{"type":"object"},"OrderDiscountCode-line.read":{"type":"object"},"OrderLineTypeRecurringProduct-line.read":{"type":"object"},"DeliveryMethodZoneRate-line.read":{"type":"object"},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["number","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/orders/{orderId}/lines":{"get":{"operationId":"api_orders_orderIdlines_get_collection","tags":["Order"],"responses":{"200":{"description":"OrderLine collection","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderLine-line.read"}}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"Retrieve the lines of an order","description":"An order is made up of one or more lines and each represent a gift card, product, or membership purchased.","parameters":[{"name":"orderId","in":"path","description":"Order identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false},{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"schema":{"type":"integer","default":1},"style":"form","explode":true}]}}}}
```


---

# 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://glu.gitbook.io/docs/api-reference/organisation-api/order.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.
