Export
A comprehensive list of the export query keys and allowed fields values for the cart resource
To export carts as CSV send a POST request to the /carts/export endpoint specifying in the payload the query keys and filter parameters like in the generic example below:
{
"search": {
"sort": "...",
"sort_by": "...",
"fields": [ "...", "...", ... ]
},
"filter": { ... }
}The response is a CSV file (text/csv) returned inline (maximum size allowed is 100K records). Please find more information on how export queries work here.
Query keys
These are the keys you need to set when performing an export query:
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 exported for each record.
Here the full list of valid values for this key. Default is ["order.id", "order.placed_at", "order.total_amount_with_taxes"].
sort_by values
sort_by valuesThese are the valid values you can specify for the sort_by key of the search query:
order.created_atorder.current_dateorder.updated_at
field values
field valuesThese are the valid values you can specify for the fields key of the export query:
billing_address.businessbilling_address.citybilling_address.country_codebilling_address.geocodedbilling_address.localizedbilling_address.state_codebilling_address.zip_codecustomer.emailcustomer.group_namecustomer.idcustomer.referencecustomer.reference_originmarket.idmarket.namemarket.numberorder.adjustment_amountorder.adjustment_tax_amountorder.adjustment_taxable_amountorder.affiliate_codeorder.aggregated_detailsorder.country_codeorder.couponorder.coupon_codeorder.created_atorder.currency_codeorder.current_dateorder.customer_typeorder.discount_amountorder.discountedorder.duty_amountorder.freight_taxableorder.fulfillment_statusorder.gift_cardorder.gift_card_amountorder.gift_card_codeorder.guestorder.idorder.language_codeorder.line_item_options_countorder.link_idorder.modeorder.numberorder.optionsorder.payment_method_amountorder.payment_method_tax_amountorder.payment_method_taxable_amountorder.payment_statusorder.referenceorder.reference_originorder.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_tax_amountorder.total_taxable_amountorder.updated_atorder.user_idorganization.idorganization.nameorganization.slugpayment_method.idpayment_method.motopayment_method.namepayment_method.source_typeshipping_address.businessshipping_address.cityshipping_address.country_codeshipping_address.geocodedshipping_address.localizedshipping_address.state_codeshipping_address.zip_codetags.idtags.name
Only order and single-level references are allowed (no line items). tags.name and tags.id generate space-separated values.
Last updated