API reference
Search
K
Links

Search

A comprehensive list of the search query keys and operators for the cart resource
To perform a search query on the cart resource send a POST request to the /carts/search endpoint specifying in the payload the query keys and filter parameters like in the generic example below:
{
"search": {
"limit": ...,
"sort": "...",
"sort_by": "...",
"interval": "...",
"fields": [ "...", "...", ... ],
"cursor": "..."
},
"filter": { ... }
}
Please find more information on how search queries work here.

Query keys

These are the keys you need to set when performing a search query:
Key
Type
Required
Description
Values
limit
Integer
The maximum number of records shown in the response.
Default is 50, max is 100.
sort
String
The way you want the results of the query to be sorted.
One of asc or desc (default is desc).
sort_by
String
The date field you want the results of the query sorted by.
Here the full list of valid values for this key. Default is cart.current_date.
fields
Array
The list of fields you want to be returned for each record in the response.
Here the full list of valid values for this key. Cannot be empty. Use the .* syntax to request all the attribute for a specific field.
cursor
String
The cursor pointing to a specific page in the paginated search results.
Every time you perform a search query you get the cursor to the next page in the pagination object.

sort_by values

These are the valid values you can specify for the sort_by key of the search query:
  • cart.created_at
  • cart.current_date
  • cart.updated_at

field values

These are the valid values you can specify for the field key of the search query:
  • billing_address.*
  • billing_address.business
  • billing_address.city
  • billing_address.country_code
  • billing_address.geocoded
  • billing_address.localized
  • billing_address.state_code
  • billing_address.zip_code
  • customer.*
  • customer.email
  • customer.group_name
  • customer.id
  • line_items.*
  • line_items.code
  • line_items.discount
  • line_items.id
  • line_items.item_id
  • line_items.item_type
  • line_items.name
  • line_items.options.*
  • line_items.options.id
  • line_items.options.name
  • line_items.options.quantity
  • line_items.options.total_amount
  • line_items.options.unit_amount
  • line_items.options_amount
  • line_items.quantity
  • line_items.tax_amount
  • line_items.tax_rate
  • line_items.total_amount
  • line_items.unit_amount
  • line_items.updated_at
  • market.*
  • market.id
  • market.name
  • market.number
  • order.*
  • order.adjustment_amount
  • order.adjustment_tax_amount
  • order.adjustment_taxable_amount
  • order.country_code
  • order.coupon
  • order.coupon_code
  • order.created_at
  • order.currency_code
  • order.current_date
  • order.discount_amount
  • order.discounted
  • order.duty_amount
  • order.freight_taxable
  • order.fulfillment_status
  • order.gift_card
  • order.gift_card_amount
  • order.gift_card_code
  • order.guest
  • order.id
  • order.language_code
  • order.line_item_options_count
  • order.number
  • order.options
  • order.payment_method_amount
  • order.payment_method_tax_amount
  • order.payment_method_taxable_amount
  • order.payment_status
  • order.reference
  • order.reference_origin
  • order.shipments_count
  • order.shipping_amount
  • order.shipping_taxable_amount
  • order.skus_count
  • order.status
  • order.subtotal_amount
  • order.subtotal_tax_amount
  • order.subtotal_taxable_amount
  • order.tax_included
  • order.total_amount
  • order.total_amount_with_taxes
  • order.total_tax_amount
  • order.total_taxable_amount
  • order.updated_at
  • payment_method.*
  • payment_method.id
  • payment_method.moto
  • payment_method.name
  • payment_method.source_type
  • shipping_address.*
  • shipping_address.business
  • shipping_address.city
  • shipping_address.country_code
  • shipping_address.geocoded
  • shipping_address.localized
  • shipping_address.state_code
  • shipping_address.zip_code
  • tags.*
  • tags.id
  • tags.name
Last modified 6mo ago