The request does not have any required fields. When given no query criteria,
SearchOrders
returns all results for all of the seller's locations. When retrieving additional
pages using a cursor
, the query
must be equal to the query
used to retrieve the first page of
results.
Search Orders Request
Name | Type | Tags | Description |
---|---|---|---|
location_ids |
List of string |
Optional | The location IDs for the orders to query. All locations must belong to the same merchant. Min: 1 location ID. Max: 10 location IDs. |
cursor |
string |
Optional | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see Pagination. |
query |
Search Orders Query |
Optional | Contains query criteria for the search. |
limit |
int |
Optional | The maximum number of results to be returned in a single page. It is possible to receive fewer results than the specified limit on a given page. Default: 500 Constraints: >= 1 |
return_entries |
bool |
Optional | A Boolean that controls the format of the search results. If true ,SearchOrders returns OrderEntry objects. If false , SearchOrders returns complete order objects. Default: false . |
{
"limit": 3,
"location_ids": [
"057P5VYJ4A5X1",
"18YC4JDH91E1H"
],
"query": {
"filter": {
"date_time_filter": {
"closed_at": {
"end_at": "2019-03-04T21:54:45+00:00",
"start_at": "2018-03-03T20:00:00+00:00"
}
},
"state_filter": {
"states": [
"COMPLETED"
]
}
},
"sort": {
"sort_field": "CLOSED_AT",
"sort_order": "DESC"
}
},
"return_entries": true
}