Creating an Orders export
Send aPOST request to /data-export/orders. The export runs asynchronously; the response returns an id you poll for the result (see Fetching your export results).
Required fields:
bucket_name— the GCS or S3 bucket to export to. For an S3 destination, also provideaws_roleandregion; omit them for GCS. See Destinations.start_date/end_date— the export window (ISO 8601 date-times).start_dateis inclusive,end_dateis exclusive.
Columns
If you omitcolumns, the export uses its default set of order columns, which includes the customer type. To customize the file, pass columns as a list of column ids — you then get exactly the columns you list, in that order. A few notes:
customer_type(first-time vs. returning) is part of the default set. It is included when you omitcolumns; if you send an explicitcolumnslist, include"customer_type"in it to keep it.productsis a single column of the order’s product SKUs, comma-separated, falling back to the product id when a SKU is not set.order_tags,source_name, andtax_value(the order’s tax amount) are also available as columns. They are not part of the default set, so list them incolumnsto include them.
columns field in the API Reference.
Example request
id:
GET /data-export/result/{export_id} with that id until status is SUCCESS — see Fetching your export results.
For the full request/response schema, see the API Reference.