Reports

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.

get/shop/reports/partner-orders/queue

Query parameters

partner_idstring required
Example:ota

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.

site_idstring

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.

customer_idstring uuid

Filter the export to a single customer.

statusstring
Example:submitted,settled

Filter the export by basket status. Accepts a single value or a comma-separated list. Defaults to new, submitted and settled.

querystring

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.

submitted_at_fromstring date-time

The earliest submitted_at date and time to include in the export (inclusive).

submitted_at_tostring date-time

The latest submitted_at date and time to include in the export (inclusive).

item_date_fromstring date

Include orders that contain at least one item dated on or after this date.

item_date_tostring date

Include orders that contain at least one item dated on or before this date.

revenue_date_fromstring date

The earliest revenue_date to include in the export (inclusive).

revenue_date_tostring date

The latest revenue_date to include in the export (inclusive).

labelsstring

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.

external_idstring

Filter by an external ID in the form key:value (for example, pms:RES-12345).

emailboolean

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.