Skip to content

Orders (Legacy)

POST {{BASE_HABITAT_URL}}/api/v3/exports

Required scope: reports:read

> ## ⚠️ Legacy — always use the async export flow instead > > For exporting orders from Dispatch (filtered order table → CSV/JSON/XLSX), do not use this endpoint. > > Always use: > 1. Create Order Export — POST /v3/orders/export > 2. Get Order Export — poll until status is ready (optional; you can also wait for the completion email) > 3. Download Order Export — GET /v3/orders/export/:exportId/download > > The async flow supports large datasets, progress tracking, email notification, and time-limited download links. This legacy endpoint is retained for backward compatibility only.


Export order data and summaries for billing your merchants, and paying your drivers (if you have a fleet). We currently have three types of exports - available using the type field. This endpoint is similar to the GET /v3/orders endpoint, but is focused on billing and payments for completed orders, and has no limit.

Depending on the size of the query, you may be emailed the response as a CSV.

Per order summary with relevant fields for billing merchants, if you aren’t using our Stripe integration

Per order summary with relevant fields for paying your runners, if you aren’t using our Stripe integration

Per day summary with relevant fields for paying your runners, if you aren’t using our Stripe integration

Field Optional (default) Description
type One of runner merchant or runner_daily_summary
start Export start, based on when order was created (ISO 8601 Date)
end Export end, based on when order was created (ISO 8601 Date)
format Yes - json One of csv json xlsx
{
"start": "2023-03-01T15:01:40.877Z",
"end": "2023-04-02T15:01:40.877Z",
"type": "merchant",
"format": "json"
}
Terminal window
curl --request POST '${BASE_HABITAT_URL}/api/v3/exports' \
--data '{
"start": "2023-03-01T15:01:40.877Z",
"end": "2023-04-02T15:01:40.877Z",
"type": "merchant",
"format": "json"
}'
{
"type": "success",
"data": [
{
"time_requested": "2023-03-14T23:07:59.147Z",
"order_number": 1792,
"external_id": "12345",
"external_delivery_id": null,
"external_delivery_provider": null,
"restaurant_name": "mikes test",
"delivery_address": "2166 E Norris St., Philadelphia PA, 19125",
"partner": null,
"driver name": " ",
"method": "Delivery",
"territory": "Philly",
"distance_straight_line": 0.35,
"distance_routed": 0.67,
"status": "pending_dispatch",
"order_total": 9,
"tip": 2,
"billable_merchant_fee": null,
"commission": 5,
"merchant_delivery_fee": null,
"diner_delivery_fee": null
}
]
}