> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/orders/list-orders-detailed.md).

# List orders (detailed)

Returns a paginated list of orders with full nested detail: order items, transactions, addresses, discount items, loyalty transactions, gift card transactions, and related objects.

Supports the same filters and ordering as `GET /orders/`.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Orders","description":"Administrative endpoints for **orders** — the purchase records created when a customer completes the checkout flow. These endpoints are used by Omnitron to push order status updates to Commerce and to query order details.\n\n## Core Capabilities\n\n**1. Order Listing & Filtering**\n* Retrieve a paginated list of orders, newest first.\n* Filter by status, order number, user email, creation date range, payability, and easy return code.\n* Order results with the `sort` parameter; `created_date` is supported.\n\n**2. Order Retrieval**\n* Retrieve a single order by its identifier.\n* Retrieve the legal agreements (contracts) associated with an order via the `/orders/{id}/order_agreements/` endpoint.\n\n**3. Order Update**\n* Fully or partially update an order — primarily used to advance the order `status`.\n* When an order is moved from `waiting` (`200`) to `approved` (`400`) or `payment_waiting` (`300`), all waiting order items are updated to the same status and their sold quantities are recalculated.\n\n**4. Async Order Completion**\n* Trigger asynchronous completion of an order created through a deferred checkout flow via `POST /orders/complete_async/`.\n\n## Order Statuses\n\nThe `status` field controls the lifecycle of an order. Values are numeric strings.\n\n| Value | Name | Description |\n|-------|------|-------------|\n| `50` | `cancellation_waiting` | Cancellation has been requested and is pending. |\n| `100` | `cancelled` | The order has been cancelled. |\n| `200` | `waiting` | The order has been created but payment has not yet been confirmed. |\n| `300` | `payment_waiting` | Payment has been initiated and is waiting for confirmation. |\n| `350` | `confirmation_waiting` | The order is awaiting manual confirmation. |\n| `400` | `approved` | Payment confirmed; the order is approved for fulfilment. |\n| `430` | `waiting_for_substitute` | Waiting for a substitute product. |\n| `450` | `preparing` | The order is being prepared / packed. |\n| `500` | `shipped` | The order has been dispatched to the carrier. |\n| `510` | `shipped_and_informed` | The order has been shipped and the customer has been notified. |\n| `520` | `ready_for_pickup` | The order is ready for in-store collection. |\n| `540` | `attempted_delivery` | A delivery attempt was made but the recipient was unavailable. |\n| `544` | `review_started` | A trade-in review has been started. |\n| `545` | `review_waiting` | A trade-in review is waiting. |\n| `546` | `waiting_for_payment` | Waiting for trade-in payment. |\n| `547` | `paid` | Trade-in payment received. |\n| `550` | `delivered` | The order has been delivered to the customer. |\n| `600` | `refunded` | The order has been refunded. |\n| `700` | `merged` | An add-on order that has been merged into the main order. |\n\n## Dynamic Settings & Environment Variables\n\n`PUT /orders/{id}/` and `PATCH /orders/{id}/` save the order and then execute a set of post-update actions (notifications, emails, SMS) whose behaviour is controlled by the following dynamic settings. The settings below do not affect `GET` responses or the `order_agreements` / `complete_async` actions.\n\n| Key | Type | Default | Effect on `PUT`/`PATCH` |\n|-----|------|---------|-------------------------|\n| `SEND_SHIPPING_NOTIFICATIONS_PARTIALLY` | boolean | `false` | When `true`, a shipping notification is sent per order item as each item is shipped, instead of once when the whole order reaches `shipped` status. |\n| `SEND_SHIPPING_DELIVERED_NOTIFICATIONS_PARTIALLY` | boolean | `false` | When `true`, a delivery notification is sent per order item as each item is delivered. |\n| `SEND_ORDER_CANCELLED_NOTIFICATIONS_PARTIALLY` | boolean | `false` | When `true`, a cancellation notification is sent per order item as each item is cancelled, instead of once when the whole order is cancelled. |\n| `SEND_REFUND_RESULT_NOTIFICATIONS` | boolean | `false` | When `true`, a notification is sent to the customer when the refund result is processed. |\n| `SEND_INVOICE_AVAILABLE_NOTIFICATIONS` | boolean | `true` | When `true`, a notification is sent to the customer when `e_archive_url` is set on an order item. |\n| `NOTIFICATION_GATEWAY` | string | `\"\"` | The name of the active push notification gateway. When empty, push notifications triggered by status changes are silently skipped. Must match a key in `NOTIFICATION_GATEWAYS`. |\n| `NOTIFICATION_GATEWAYS` | object | `{\"console\": {\"conf\": {}}}` | Configuration map for available push notification gateways. Keys are gateway names; values are gateway-specific config objects. |\n| `SMS_GATEWAY` | string | `\"console\"` | The name of the active SMS gateway. `\"console\"` logs to stdout without sending. Must match a key in `SMS_GATEWAYS`. |\n| `SMS_GATEWAYS` | object | `{\"console\": {\"conf\": {\"verify_message\": \"Verification code: {}\"}}}` | Configuration map for available SMS gateways. Keys are gateway names; values are gateway-specific config objects. |\n| `EMAIL_BCC_AND_CC` | object | all email templates mapped to `{\"bcc\": [], \"cc\": []}` | Per-template BCC and CC addresses for outgoing emails. Keys are email template names (e.g. `orders_completed`); values are `{\"bcc\": [...], \"cc\": [...]}`. |\n\n**Environment variables:** No environment variables are read directly by these endpoints."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"parameters":{"page":{"name":"page","in":"query","required":false,"description":"The page number to return.","schema":{"type":"integer","default":1}},"limit":{"name":"limit","in":"query","required":false,"description":"The number of items to return per page.","schema":{"type":"integer","default":10}},"sort":{"name":"sort","in":"query","required":false,"description":"Orders the results by one or more fields. Separate multiple fields with commas. Prefix a field with a hyphen (`-`) for descending order.","schema":{"type":"string"}}},"schemas":{"OrderStatus":{"type":"string","description":"The lifecycle status of an order. Values are numeric strings that increase as the order progresses through its lifecycle.\n\n| Value | Name | Description |\n|-------|------|-------------|\n| `50` | `cancellation_waiting` | Cancellation requested, pending. |\n| `100` | `cancelled` | Order cancelled. |\n| `200` | `waiting` | Order created; payment not yet confirmed. |\n| `300` | `payment_waiting` | Payment initiated, awaiting confirmation. |\n| `350` | `confirmation_waiting` | Awaiting manual confirmation. |\n| `400` | `approved` | Payment confirmed; order approved for fulfilment. |\n| `430` | `waiting_for_substitute` | Waiting for a substitute product. |\n| `450` | `preparing` | Order being prepared / packed. |\n| `500` | `shipped` | Order dispatched to carrier. |\n| `510` | `shipped_and_informed` | Order shipped and customer notified. |\n| `520` | `ready_for_pickup` | Ready for in-store collection. |\n| `540` | `attempted_delivery` | Delivery attempted; recipient unavailable. |\n| `544` | `review_started` | Trade-in review started. |\n| `545` | `review_waiting` | Trade-in review waiting. |\n| `546` | `waiting_for_payment` | Waiting for trade-in payment. |\n| `547` | `paid` | Trade-in payment received. |\n| `550` | `delivered` | Order delivered to customer. |\n| `600` | `refunded` | Order refunded. |\n| `700` | `merged` | Add-on order merged into main order. |","enum":["50","100","200","300","350","400","430","450","500","510","520","540","544","545","546","547","550","600","700"]},"PaginatedOrderDetailedList":{"type":"object","description":"A paginated list of detailed orders.","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/OrderDetailed"}}}},"OrderDetailed":{"type":"object","description":"Full order representation with all nested related objects. Returned by `GET /orders/{id}/detailed/` and `GET /orders/detailed/`.","properties":{"pk":{"type":"integer"},"number":{"type":"string"},"status":{"$ref":"#/components/schemas/OrderStatus"},"currency":{"$ref":"#/components/schemas/OrderCurrency"},"user":{"type":["object","null"],"description":"The customer who placed the order."},"user_email":{"type":"string","format":"email"},"amount":{"type":"string","format":"decimal"},"discount_amount":{"type":"string","format":"decimal"},"shipping_amount":{"type":"string","format":"decimal"},"shipping_tax_rate":{"type":["string","null"],"format":"decimal"},"orderitem_set":{"type":"array","items":{"type":"object"},"description":"Line items belonging to the order."},"transaction_set":{"type":"array","items":{"type":"object"},"description":"Payment transactions."},"shipping_option":{"type":["object","null"],"description":"The selected shipping option (nested)."},"shipping_option_slug":{"type":"string"},"shipping_address":{"type":["object","null"]},"billing_address":{"type":["object","null"]},"payment_option":{"type":["integer","null"]},"payment_option_slug":{"type":"string"},"bin_number":{"type":["string","null"]},"installment":{"type":["integer","null"]},"installment_count":{"type":"integer"},"installment_interest_amount":{"type":"string","format":"decimal"},"card":{"type":["object","null"]},"invoice_number":{"type":["string","null"]},"invoice_date":{"type":["string","null"],"format":"date-time"},"e_archive_url":{"type":["string","null"],"format":"uri"},"tracking_number":{"type":["string","null"]},"defined_tracking_url":{"type":["string","null"],"format":"uri"},"shipping_tracking_url":{"type":["string","null"],"format":"uri"},"shipping_company":{"oneOf":[{"$ref":"#/components/schemas/OrderShippingCompany"},{"type":"null"}]},"remote_addr":{"type":["string","null"]},"has_gift_box":{"type":["boolean","null"]},"gift_box_note":{"type":["string","null"]},"language_code":{"type":["string","null"]},"notes":{"type":["string","null"]},"delivery_range":{"type":["object","null"],"properties":{"lower":{"type":["string","null"],"format":"date-time"},"upper":{"type":["string","null"],"format":"date-time"}}},"extra_field":{"type":["object","null"]},"is_payable":{"type":"boolean"},"discountitem_set":{"type":"array","items":{"type":"object"}},"loyaltytransaction_set":{"type":"array","items":{"type":"object"}},"giftcardtransaction_set":{"type":"array","items":{"type":"object"}},"ordertransaction_set":{"type":"array","items":{"type":"object"}},"bextransaction_set":{"type":"array","items":{"type":"object"}},"cashregistertransaction_set":{"type":"array","items":{"type":"object"}},"payondeliverytransaction":{"type":["object","null"]},"fundstransfertransaction":{"type":["object","null"]},"b2btransaction_set":{"type":"array","items":{"type":"object"}},"client_type":{"$ref":"#/components/schemas/OrderClientType"},"segment":{"type":["object","null"]},"checkout_provider":{"type":["object","null"]},"created_date":{"type":"string","format":"date-time"}}},"OrderCurrency":{"type":"string","description":"ISO 4217 currency code used for the order.","enum":["try","eur","usd","egp","gbp","mad","pln","sar","ron","uah","czk","huf","rub","bgn","iqd","kwd","bhd","omr","qar"]},"OrderShippingCompany":{"type":"string","description":"Carrier company used to ship the order.","enum":["acs","apiship","aramex","aramex_express","aras","arvato","asil","ay_cargo","b2c_direct","birgunde","bolt","boomex","bovo","boxaty","bpost_24_7","bpost_athome","bpost_international","bpost_pickup","bringo","bringo_express","cainiao","cargus","carriyo","carrtell","cathedis","cdek","ceva_cargo","chrono","city_express","clickpost","deliverigo","dhlexpress","dincer","dpd","droplight","evdemo_lojistik","extension","falcon_flex","fancourier","fareye","fast_cargo","fero_ai","gelal","giz","gkn","gls","hbexpress","hjetxl","hoopkapida","horoz","iMile","in_post","ismail","jetizz","jetizz_v7","jetlogi","k_gelsin","k_sende","kargo_ist","loomis","mng","monist","murat_lgc","mylerz","mylerzsdd","netkargo","novaposhta","octovan_express","other","packupp","pakettaxi","pinkpost","pony_express","porter_express","pts_express","ptt","r2s","rupost","sameday","scotty","sendeo","shipx","sky_express","speedy","speeta","surat","svuum","tmmexpress","tnt_cargo","tyexpress","ups","ups_intl","yurtici"]},"OrderClientType":{"type":"string","description":"The type of client (channel) through which the order was placed.","enum":["default","android","ios","instore","b2b"]},"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true}},"responses":{"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidPage":{"description":"The requested `page` does not exist — it is past the last page or not a valid page number. Paginated list endpoints answer with `404` rather than an empty page. The literal value `last` is accepted and returns the final page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/orders/detailed/":{"get":{"tags":["Orders"],"operationId":"listOrdersDetailed","summary":"List orders (detailed)","description":"Returns a paginated list of orders with full nested detail: order items, transactions, addresses, discount items, loyalty transactions, gift card transactions, and related objects.\n\nSupports the same filters and ordering as `GET /orders/`.","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/sort"},{"name":"id","in":"query","required":false,"description":"Filter by exact order identifier.","schema":{"type":"integer"}},{"name":"status","in":"query","required":false,"description":"Filter by order status value (e.g. `400` for approved).","schema":{"$ref":"#/components/schemas/OrderStatus"}},{"name":"number","in":"query","required":false,"description":"Filter by exact order number.","schema":{"type":"string"}},{"name":"user_email","in":"query","required":false,"description":"Filter by the email address of the customer who placed the order.","schema":{"type":"string","format":"email"}},{"name":"created_date","in":"query","required":false,"description":"Filter by exact creation date-time. The lookups `created_date__gt`, `created_date__gte`, `created_date__lt`, `created_date__lte`, `created_date__date__gt`, `created_date__date__gte`, `created_date__date__lt`, and `created_date__date__lte` are also available for range filtering.","schema":{"type":"string","format":"date-time"}},{"name":"is_payable","in":"query","required":false,"description":"When `true`, returns only orders currently eligible for payment (pay-later payment option with all trade-in items in a payment-waiting status). When `false`, returns only non-payable orders.","schema":{"type":"boolean"}},{"name":"easy_return_code","in":"query","required":false,"description":"Filter by easy-return shipment code. Returns orders that have a cancellation request with an easy-return entry matching this code.","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of detailed orders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrderDetailedList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/InvalidPage"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/orders/list-orders-detailed.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
