Export
A comprehensive list of the export query keys and allowed fields values for the order resource
To export orders as CSV send a POST request to the /orders/export endpoint specifying in the payload the query keys and filter parameters like in the generic example below:
{
"search": {
"sort": "...",
"sort_by": "...",
"fields": [ "...", "...", ... ]
},
"filter": { ... }
}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
These are the valid values you can specify for the sort_by key of the export query:
order.approved_atorder.archived_atorder.cancelled_atorder.created_atorder.current_dateorder.fulfillment_updated_atorder.payment_updated_atorder.placed_atorder.updated_at
field values
These are the valid values you can specify for the fields key of the export query:
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.emailcustomer.group_namecustomer.idcustomer.referencecustomer.reference_originmarket.idmarket.namemarket.numberorder.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.customer_typeorder.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.modeorder.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_idorganization.idorganization.nameorganization.slugpayment_method.card_typepayment_method.idpayment_method.issuerpayment_method.issuer_typepayment_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
Last updated