Search all orders for one or more locations.
POST
/v2/orders/search
Search all orders for one or more locations.
Orders include all sales, returns, and exchanges regardless of how or when they entered the Square ecosystem (such as Point of Sale, Invoices, and Connect APIs).
SearchOrders
requests need to specify which locations to search and define a SearchOrdersQuery object that controls how to sort or filter the results. Your SearchOrdersQuery
can:
Set filter criteria. Set the sort order. Determine whether to return results as complete Order
objects or as OrderEntry objects.
Note that details for orders processed with Square Point of Sale while in offline mode might not be transmitted to Square for up to 72 hours. Offline orders have a created_at
value that reflects the time the order was created, not the time it was subsequently transmitted to Square.
Guide
The location IDs for the orders to query. All locations must belong to the same merchant.
Max: 10 location IDs.
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 conditions used to filter or sort the results. Note that when retrieving additional pages using a cursor, you must use the original query.
The maximum number of results to be returned in a single page.
Default: 500
Max: 1000
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
.
A list of OrderEntries that fit the query conditions. The list is populated only if return_entries
is set to true
in the request.
A list of Order objects that match the query conditions. The list is populated only if return_entries
is set to false
in the request.
The pagination cursor to be used in a subsequent request. If unset, this is the final response. For more information, see Pagination.
Errors encountered during the search.