Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 2.38 KB

search-orders-filter.md

File metadata and controls

32 lines (23 loc) · 2.38 KB

Search Orders Filter

Filtering criteria to use for a SearchOrders request. Multiple filters are ANDed together.

Structure

SearchOrdersFilter

Fields

Name Type Tags Description
stateFilter SearchOrdersStateFilter | undefined Optional Filter by the current order state.
dateTimeFilter SearchOrdersDateTimeFilter | undefined Optional 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 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 set the sort_field in SearchOrdersSort to
CLOSED_AT. Otherwise, SearchOrders throws an error.
Learn more about filtering orders by time range.
fulfillmentFilter SearchOrdersFulfillmentFilter | undefined Optional Filter based on order fulfillment information.
sourceFilter SearchOrdersSourceFilter | undefined Optional A filter based on order source information.
customerFilter SearchOrdersCustomerFilter | undefined Optional A filter based on the order customer_id and any tender customer_id
associated with the order. It does not filter based on the
FulfillmentRecipient customer_id.

Example (as JSON)

{
  "state_filter": null,
  "date_time_filter": null,
  "fulfillment_filter": null,
  "source_filter": null,
  "customer_filter": null
}