Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Filter and Sort

Query Language

Endpoints that allow querying follow these format guidelines.

Fields That Allow Filtering

FieldOperatorsSorting Allowed
dateCreated$eq,$ne,$hasSome,$lt,$lte,$gt,$gteAllowed
lastUpdated$eq,$ne,$hasSome,$lt,$lte,$gt,$gteAllowed
paymentStatus$eq,$ne,$hasSome
archived$eq,$ne
number$eq,$ne,$hasSome,$lt,$lte,$gt,$gteAllowed
fulfillmentStatus$eq,$ne,$hasSome
id$eq,$ne,$hasSome
lineItems.productId$eq,$ne,$hasSome,$hasAll
lineItems.name$eq,$ne,$hasSome,$hasAll
billingInfo.address.fullName$eq,$ne,$hasSome,$contains,$startsWith
buyerInfo.id$eq,$ne,$hasSome
channelInfo.type$eq,$ne,$hasSome
enteredBy.id$eq,$ne,$hasSome
channelInfo.externalOrderId$eq,$ne,$hasSome

** Note that "HasSome" is same as the operator "IN" in SQL

Examples

Get all paid orders

curl 'https://www.wixapis.com/stores/v2/orders/query' --data-binary '{"query":{"filter":"{\"paymentStatus\": \"PAID\"}"}}' -H 'Content-Type: application/json' -H 'Authorization: XXX'
Copy Code

Get all orders, sorted by creation time

curl 'https://www.wixapis.com/stores/v2/orders/query' --data-binary '{"query":{"sort":"[{\"dateCreated\": \"asc\"}]"}}' -H 'Content-Type: application/json' -H 'Authorization: XXX'
Copy Code

Get orders updated within a specific timeframe

curl 'https://www.wixapis.com/stores/v2/orders/query' --data-binary '{"query": {"filter": "{\"$and\": [{\"lastUpdated\":{\"$lte\":1588110826000}}, {\"lastUpdated\":{\"$gte\":1585518845000}}]}", "sort": "[{\"number\":\"asc\"}]" }}' -H 'Content-Type: application/json' -H 'Authorization: XXX'
Copy Code

Get orders by IDs

curl 'https://www.wixapis.com/stores/v2/orders/query' --data-binary '{"query":{"filter":"{\"id\": {\"$hasSome\": [\"ORDER_ID_1\",\"ORDER_ID_2\"]}}"}}' -H 'Content-Type: application/json' -H 'Authorization: xxx'
Copy Code

Was this helpful?