List all orders
Retrieve a collection of orders with optional filtering and pagination.
/ordersSecurity
This operation accepts the following authorization requirements.
Request
Query parameters
filterstringFilters the collection items using space-separated field:value pairs.
Format: field1:value1 field2:value2
Supported operators:
field:value- Exact matchfield:value1,value2- Match any of the comma-separated values (OR)- Time ranges: Use
30d(30 days),7d(7 days),1h(1 hour), etc.
Examples:
status:placed- Filter by single status.status:placed,completed- Filter by multiple statuses.createdAt:30d- Filter orders created in the last 30 days.orderId:ord_01h1s5z6vf2mm1mz3hevnn9va7- Filter by specific order ID.status:placed createdAt:7d- Combine multiple filters.
sortstringTo sort by id in descending order use -id.
To sort by id in ascending order use id.
limitintegerUse to return a number of results per page.
If there is more data, use in combination with after to page through the data.
afterstringUse the endCursor as a value for the after parameter to get the next page.
beforestringUse the startCursor as a value for the before parameter to get the next page.
searchstringPerforms a case-insensitive text search across relevant fields in the collection.
Fields searched depend on the endpoint:
- Menu items:
name,photoTextDescription - Orders:
customerName,id
Returns items where any of the searchable fields contain the search term as a substring.
Response
Successful operation.
objectstringrequiredAllowed values:"list"
Entity name.
pageobjectrequiredProperties (6)
endCursorstringrequiredUse with the after query parameter to load the next page of data.
When null, there is no data.
The cursor is opaque and internal structure is subject to change.
startCursorstringrequiredUse with the before query parameter to load the previous page of data.
When null, there is no data.
The cursor is opaque and internal structure is subject to change.
hasNextPagebooleanrequiredIndicates if there is a next page with items.
hasPrevPagebooleanrequiredIndicates if there is a previous page with items.
limitintegerrequiredValue showing how many items are in the page limit.
totalintegerrequiredCount of items across all pages.
itemsobject[]requiredItem properties (8)
idstring:ulidOrder ID. Unique identifier prefixed with ord_.
objectstringAllowed values:"order"
Entity name.
customerNamestringrequiredName of the customer who placed the order. Must start and end with a letter, and can contain letters, spaces, hyphens, and apostrophes (e.g., “John Doe”, “Mary-Jane”, “O’Brien”).
statusstringtotalPriceintegerTotal order price in cents.
createdAtstring:date-timeCreated date.
updatedAtstring:date-timeUpdated date.
orderItemsobject[]requiredList of items to include in the order.
Item properties (4)
menuItemIdstringrequiredID of the menu item to add to the order.
quantityintegerrequiredQuantity of the menu item.
discountintegerDiscount amount in cents (absolute value).
commentstringOptional comment for the order item (e.g., “No sugar”).
Bad request - invalid input parameters.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Unauthorized - authorization required.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Forbidden - insufficient permissions.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.
Internal server error.
typestring:uri-referencerequiredURI reference that identifies the problem type.
titlestringrequiredShort summary of the problem type.
statusinteger:int32requiredHTTP status code generated by the origin server for this occurrence of the problem.
instancestring:uri-referenceURI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
detailsobjectAdditional error details.