Object Index / Definition

You are viewing an old version of the API
Search​Orders​Date​Time​Filter

Filter for Order objects based on whether their CREATED_AT, CLOSED_AT or UPDATED_AT timestamps fall within a specified time range

You can specify the time range and which timestamp to filter for. You can filter for only one time range at a time.

For each time range, the start time and end time are inclusive. If the end time is absent, it defaults to the time of the first request for the cursor.

Important: If you use the DateTimeFilter in a SearchOrders query, you must also set the sort_field in OrdersSort to the same field you filter for. For example, if you set the CLOSED_AT field in DateTimeFilter, you must also set the sort_field in SearchOrdersSort to CLOSED_AT. Otherwise, SearchOrders will throw an error. Learn more about filtering orders by time range.

Properties

Name Description
closed_at
Time​Range

Time range for filtering on the closed_at timestamp. If you use this value, you must also set the sort_field in the OrdersSearchSort object to CLOSED_AT.

created_at
Time​Range

Time range for filtering on the created_at timestamp. If you use this value, you must also set the sort_field in the OrdersSearchSort object to CREATED_AT.

updated_at
Time​Range

Time range for filtering on the updated_at timestamp. If you use this value, you must also set the sort_field in the OrdersSearchSort object to UPDATED_AT.

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?