Reports

Queue an export of the commission report

Queues a CSV export of the commission report to be generated asynchronously.

get/shop/reports/commission/queue

Query parameters

site_idstring uuid required

Restrict the report to commission earned at the given site.

date_fromstring date required
Example:2026-06-01

Restrict to commission earned on or after this date.

date_tostring date required
Example:2026-06-30

Restrict to commission earned on or before this date.

earner_idstring

Restrict the report to a single earner (a Practitioner or User, per earner_type).

earner_type'practitioner' | 'user'

Restrict the report to earners of this type. Combine with earner_id to disambiguate an id that could otherwise refer to either a Practitioner or a User.

emailboolean

If true, email the completed CSV to the authenticated user when the background job finishes. Defaults to false, in which case the queued job's output URL must be polled via the queued-jobs endpoint.

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