Search
A comprehensive list of the search query keys and allowed fields values for the order resource
To perform a search query on the order resource send a POST request to the /orders/search endpoint specifying in the payload the query keys and filter parameters like in the generic example below:
{
"search": {
"limit": ...,
"sort": "...",
"sort_by": "...",
"fields": [ "...", "...", ... ],
"cursor": "..."
},
"filter": { ... }
}Query keys
These are the keys you need to set when performing a search query:
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 order.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
sort_by valuesThese are the valid values you can specify for the sort_by key of the search query:
order.approved_atorder.archived_atorder.cancelled_atorder.created_atorder.current_dateorder.fulfillment_updated_atorder.payment_updated_atorder.placed_atorder.updated_at
field values
field valuesThese are the valid values you can specify for the field key of the search query:
billing_address.*billing_address.businessbilling_address.citybilling_address.companybilling_address.country_codebilling_address.first_namebilling_address.geocodedbilling_address.last_namebilling_address.localizedbilling_address.state_codebilling_address.zip_codecustomer.*customer.emailcustomer.group_namecustomer.idline_items.*line_items.codeline_items.discountline_items.idline_items.item_idline_items.item_typeline_items.nameline_items.options.*line_items.options.idline_items.options.nameline_items.options.quantityline_items.options.total_amountline_items.options.unit_amountline_items.options_amountline_items.quantityline_items.tax_amountline_items.tax_rateline_items.total_amountline_items.unit_amountline_items.updated_atmarket.*market.idmarket.namemarket.numberorder.*order.adjustment_amountorder.adjustment_tax_amountorder.adjustment_taxable_amountorder.affiliate_codeorder.aggregated_detailsorder.approved_atorder.archivedorder.archived_atorder.cancelled_atorder.country_codeorder.couponorder.coupon_codeorder.created_atorder.currency_codeorder.current_dateorder.discount_amountorder.discountedorder.duty_amountorder.freight_taxableorder.fulfillment_statusorder.fulfillment_updated_atorder.gift_cardorder.gift_card_amountorder.gift_card_codeorder.guestorder.idorder.language_codeorder.line_item_options_countorder.link_idorder.numberorder.optionsorder.payment_method_amountorder.payment_method_tax_amountorder.payment_method_taxable_amountorder.payment_statusorder.payment_updated_atorder.placed_atorder.placed_day_of_weekorder.referenceorder.reference_originorder.refundedorder.refunds_total_amount_with_taxesorder.returnedorder.seconds_in_approvedorder.seconds_in_draftorder.seconds_in_placedorder.shipments_countorder.shipping_amountorder.shipping_taxable_amountorder.skus_countorder.statusorder.store_idorder.subtotal_amountorder.subtotal_tax_amountorder.subtotal_taxable_amountorder.tax_includedorder.total_amountorder.total_amount_with_taxesorder.total_amount_with_taxes_net_of_refundsorder.total_tax_amountorder.total_taxable_amountorder.updated_atorder.user_idpayment_method.*payment_method.card_typepayment_method.idpayment_method.issuerpayment_method.issuer_typepayment_method.motopayment_method.namepayment_method.source_typerefunds.*refunds.amountrefunds.idrefunds.numberresource_errors.*resource_errors.coderesource_errors.created_atresource_errors.idresource_errors.messageresource_errors.nameresource_errors.updated_atshipments.*shipments.cancelled_atshipments.created_atshipments.idshipments.numbershipments.on_hold_atshipments.packing_atshipments.picking_atshipments.ready_to_ship_atshipments.referenceshipments.reference_originshipments.seconds_in_pickingshipments.seconds_in_ready_to_shipshipments.shipped_atshipments.shipping_category.*shipments.shipping_category.idshipments.shipping_category.nameshipments.shipping_category.referenceshipments.shipping_category.reference_originshipments.shipping_method.*shipments.shipping_method.currency_codeshipments.shipping_method.idshipments.shipping_method.nameshipments.shipping_method.referenceshipments.shipping_method.reference_originshipments.statusshipments.stock_location.*shipments.stock_location.idshipments.stock_location.nameshipments.stock_location.referenceshipments.stock_location.reference_originshipments.tags.*shipments.tags.idshipments.tags.nameshipments.updated_atshipping_address.*shipping_address.businessshipping_address.cityshipping_address.country_codeshipping_address.geocodedshipping_address.localizedshipping_address.state_codeshipping_address.zip_codetags.*tags.idtags.name
Last updated

