Export
A comprehensive list of the export query keys and allowed fields values for the return resource
To export returns as CSV send a POST request to the /returns/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 return.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 ["return.id", "return.created_at", "return.status"].
sort_by values
These are the valid values you can specify for the sort_by key of the export query:
return.approved_atreturn.archived_atreturn.cancelled_atreturn.created_atreturn.current_datereturn.received_atreturn.rejected_atreturn.shipped_atreturn.updated_at
field values
These are the valid values you can specify for the fields key of the export query:
customer.emailcustomer.group_namecustomer.iddestination_address.businessdestination_address.citydestination_address.country_codedestination_address.geocodeddestination_address.localizeddestination_address.state_codedestination_address.zip_codemarket.idmarket.namemarket.numberorganization.idorganization.nameorganization.slugorigin_address.businessorigin_address.cityorigin_address.country_codeorigin_address.geocodedorigin_address.localizedorigin_address.state_codeorigin_address.zip_codereturn.aggregated_detailsreturn.approved_atreturn.archivedreturn.archived_atreturn.cancelled_atreturn.created_atreturn.currency_codereturn.current_datereturn.idreturn.modereturn.numberreturn.order_idreturn.received_atreturn.referencereturn.reference_originreturn.rejected_atreturn.shipped_atreturn.skus_countreturn.statusreturn.updated_atstock_location.idstock_location.namestock_location.referencestock_location.reference_origintags.idtags.name
Last updated