Skip to content

Export file

To collect the order as a file — the same file the Export menu in Mercura, a FILE webhook and the SFTP outbox produce — name the format:

GET /orders/{order_id}/file?format=order-csv

format is order-csv, csv, excel, or custom:<id> for one of your organisation's custom exporters. The response is the file itself; Content-Type and the Content-Disposition filename follow the format. A format this order cannot be rendered in is a 422; a passing rendering failure is a 503 (retry). Typical pull loop: read the completion feed, then fetch each order's file.