> For the complete documentation index, see [llms.txt](https://docs.cekat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cekat.ai/api-documentation/orders/list-orders.md).

# List orders

Lists orders with filters, search and sorting.

```json
{"openapi":"3.0.3","info":{"title":"Cekat Open API","version":"1.0.0"},"tags":[{"name":"Orders","description":"Create and manage orders and their invoices. Each order belongs to a contact; Cekat creates the contact if it doesn't exist yet.\n\n| Payment method | Invoice |\n| --- | --- |\n| `manual` | A PDF invoice with your bank account details. Requires `bank_account_number` of a payment bank account set up in Cekat. |\n| `xendit` | A Xendit payment link and PDF invoice. Requires Xendit to be connected. |\n| `custom` | Your own invoice, given as `custom_invoice_url`. |\n\nOrder statuses are `pending`, `processing`, `shipping`, `cancelled` and `completed`. Payment statuses are `PENDING`, `PAID`, `EXPIRED` and `SETTLED`.\n"}],"servers":[{"url":"https://api.cekat.ai","description":"Production"}],"security":[{"CekatApiKey":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"CekatApiKey":{"type":"apiKey","in":"header","name":"api_key","description":"Your business's Cekat API key, from **Settings → Developers & API** in the Cekat dashboard (https://chat.cekat.ai/developers?section=apikeys). Available on the Business and Enterprise plans."},"BearerAuth":{"type":"http","scheme":"bearer","description":"The same Cekat API key, sent as `Authorization: Bearer YOUR_API_KEY`. Accepted only by endpoints under `/api/...`."}},"parameters":{"StartDate":{"name":"start_date","in":"query","required":false,"description":"Only include items created on or after this date (`YYYY-MM-DD`). Cannot be combined with `start_datetime`.","schema":{"type":"string","format":"date"}},"EndDate":{"name":"end_date","in":"query","required":false,"description":"Only include items created on or before the end of this date (`YYYY-MM-DD`). Cannot be combined with `end_datetime`.","schema":{"type":"string","format":"date"}},"StartDatetime":{"name":"start_datetime","in":"query","required":false,"description":"Only include items created at or after this time (`YYYY-MM-DDTHH:mm:ss`, optional offset such as `+07:00` or `Z`). Cannot be combined with `start_date`.","schema":{"type":"string"}},"EndDatetime":{"name":"end_datetime","in":"query","required":false,"description":"Only include items created at or before this time (`YYYY-MM-DDTHH:mm:ss`, optional offset). Cannot be combined with `end_date`.","schema":{"type":"string"}},"UserTimezone":{"name":"X-User-Timezone","in":"header","required":false,"description":"IANA time zone used to read date filters that have no offset. Defaults to `Asia/Jakarta`.","schema":{"type":"string"}}},"schemas":{"Order":{"type":"object","description":"An order with its contact, products and invoices. Additional fields may be present.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"order_number":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"order_status":{"type":"string","enum":["pending","processing","shipping","cancelled","completed"]},"payment_method":{"type":"string","enum":["manual","xendit","custom"]},"subtotal":{"type":"number"},"discount":{"type":"number"},"shipping_fee":{"type":"number"},"vat":{"type":"number"},"grand_total":{"type":"number"},"currency":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"contact_id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid","nullable":true},"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"display_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}}},"cekat_orders_products":{"type":"array","items":{"$ref":"#/components/schemas/OrderProduct"}},"invoices":{"type":"array","description":"The order's invoices, newest first.","items":{"$ref":"#/components/schemas/Invoice"}}}},"OrderProduct":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"product_id":{"type":"string","format":"uuid","nullable":true},"product_name":{"type":"string"},"quantity":{"type":"integer"},"price":{"type":"number"}}},"Invoice":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","PAID","EXPIRED","SETTLED"]},"amount":{"type":"number"},"payment_link":{"type":"string","nullable":true,"description":"Xendit payment link, for `xendit` orders."},"pdf_link":{"type":"string","nullable":true,"description":"Invoice PDF, or your own invoice URL for `custom` orders."},"is_sent":{"type":"boolean","nullable":true},"expiry_date":{"type":"string","nullable":true},"paid_at":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"}}},"ApiError":{"type":"object","description":"Error body returned by the `/api/...` endpoints.","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"statusCode":{"type":"integer"},"error":{"type":"object","properties":{"message":{"type":"string"}}},"correlationId":{"type":"string","description":"Request ID. Include it when contacting Cekat support."}}},"RateLimitError":{"type":"object","properties":{"message":{"type":"string"}}}},"responses":{"ApiUnauthorized":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"TooManyRequests":{"description":"Rate limit exceeded. Wait and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}},"paths":{"/api/orders":{"get":{"tags":["Orders"],"operationId":"ListOrders","summary":"List orders","description":"Lists orders with filters, search and sorting.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}},{"name":"order_status","in":"query","required":false,"schema":{"type":"string","enum":["pending","processing","shipping","cancelled","completed"]}},{"name":"payment_status","in":"query","required":false,"schema":{"type":"string","enum":["PENDING","PAID","EXPIRED","SETTLED"]}},{"name":"inbox_id","in":"query","required":false,"description":"Only orders from conversations in this inbox.","schema":{"type":"string","format":"uuid"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort_field","in":"query","required":false,"schema":{"type":"string","enum":["created_at","order_number","subtotal"],"default":"created_at"}},{"name":"sort_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"$ref":"#/components/parameters/StartDate"},{"$ref":"#/components/parameters/EndDate"},{"$ref":"#/components/parameters/StartDatetime"},{"$ref":"#/components/parameters/EndDatetime"},{"$ref":"#/components/parameters/UserTimezone"}],"responses":{"200":{"description":"A page of orders.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total_items":{"type":"integer"},"total_pages":{"type":"integer"}}},"filters":{"type":"object","additionalProperties":true,"description":"The filters that were applied."}}}}}}}},"400":{"description":"A filter value is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"$ref":"#/components/responses/ApiUnauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}}}
```
