Queue an export of the partner orders report
Use this endpoint to queue a background job that renders the partner orders report as a CSV. The job runs asynchronously and the resulting file is attached to the returned QueuedJob once it has finished. Pass email=true to additionally have the file emailed to the user who queued the job.
This is the recommended variant for partners with large order volumes, where the synchronous export endpoint may time out.
Requires the admin.sites.manage permission.
Query parameters
Scope the export to the named partner. Accepts a partner key from the platform partner catalogue (or ota for the generic OTA bucket). Only baskets attributed to this partner are included — direct bookings are excluded. Required because the report is partner-attribution-driven and would otherwise return an empty file.
Filter the export to one or more Site IDs. Accepts a single ID or a comma-separated list. When omitted, orders across every site the authenticated user has access to are included.
Filter the export to a single customer.
Filter the export by basket status. Accepts a single value or a comma-separated list. Defaults to new, submitted and settled.
A free-text search across the order reference, external reference, customer name and email, and the names of items in the order. When set, results are ordered by relevance.
The earliest submitted_at date and time to include in the export (inclusive).
The latest submitted_at date and time to include in the export (inclusive).
Include orders that contain at least one item dated on or after this date.
Include orders that contain at least one item dated on or before this date.
The earliest revenue_date to include in the export (inclusive).
The latest revenue_date to include in the export (inclusive).
Filter by basket labels. Accepts a comma-separated list of label IDs; prefix an ID with - to exclude orders with that label, or pass none to match only orders with no labels at all.
Filter by an external ID in the form key:value (for example, pms:RES-12345).
When true, the rendered CSV will be emailed to the user who queued the job once it has finished generating. When false (the default) the file is only made available for download from the queued job.
Response
The job was successfully queued
Example response
{
"data": {
"created_at": "2023-11-07T00:00:00+00:00",
"updated_at": "2023-11-07T01:00:00+00:00"
}
}Changes
No recorded changes to this endpoint across all 1 revision of this API.