Skip to content

List all orders

Request

Retrieve a collection of orders with optional filtering and pagination.

Security
OAuth2(Required scopes: orders:read)
Query
filterstring

Filters the collection items using space-separated field:value pairs.

Filterable fields: customerName, status, totalPrice, createdAt, id

Format: field1:value1 field2:value2

Supported operators:

  • field:value - Exact match
  • field:value1,value2 - Match any of the comma-separated values (OR)
  • Time ranges (on createdAt): Use 30d (30 days), 7d (7 days), 1h (1 hour), etc.

Examples:

  • status:placed - Filter by a single status.
  • status:placed,completed - Filter by multiple statuses.
  • createdAt:30d - Orders created in the last 30 days.
  • id:ord_01h1s5z6vf2mm1mz3hevnn9va7 - Filter by a specific order ID.
  • status:placed createdAt:7d - Combine multiple filters.
Example:filter=status:placed
sortstring

Sorts the collection by a single field. Prefix with - for descending order (for example, -createdAt); omit the prefix for ascending order (createdAt).

Sortable fields: customerName, status, totalPrice, createdAt, updatedAt, id

Example:sort=-createdAt
limitinteger, [ 1 .. 100 ]

Specify the number of results per page. If there is more data, use in combination with after to page through all results.

Default:10
Example:limit=10
afterstring

Use the endCursor as a value for the after parameter to get the next page.

beforestring

Use the startCursor as a value for the before parameter to get the previous page.

searchstring

Performs a case-insensitive text search across the searchable fields, returning items where any of them contain the search term as a substring.

Searchable fields: customerName, id

Example:search=John
curl -i -X GET \
  'https://cafe.redocly.com/_mock/openapi/cafe/orders?filter=string&sort=string&limit=10&after=string&before=string&search=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation.

Bodyapplication/json
objectstringrequired

Entity name.

Value:"list"
pageobject(Page)required
itemsArray of objects(Order)required
Response
{ "object": "list", "page": { "endCursor": "string", "startCursor": "string", "hasNextPage": true, "hasPrevPage": true, "limit": 10, "total": 0 }, "items": [ {} ] }