---
title: "Commission report"
method: GET
path: "/shop/reports/commission"
tags: ["Reports"]
---

# Commission report

`GET /shop/reports/commission`

Returns the commission earned by each practitioner at the requested site for the given
period, broken down by commission package. Money fields are decimal strings in the
site's currency (rather than minor-unit integers) to preserve the precision of the
underlying commission calculation.

For background CSV delivery use
[`/shop/reports/commission/queue`](/endpoints/Reports#queueCommissionExport).

## Query parameters

- `site_id` string, uuid, required
- `date_from` string, date, required
- `date_to` string, date, required
- `earner_id` string
- `earner_type` 'practitioner' | 'user'

## Response `200`

The report was successfully generated.

- CommissionReportResponse
  - `data` CommissionReportRow[], required
    - `practitioner_id` string, mongo-id, nullable, required — The unique identifier of the practitioner. Deprecated: kept for backwards compatibility and only populated when `earner_type` is `practitioner`. Prefer `earner_id`, which also covers rows earned by a plain `User` under a `sold` attribution rate.
    - `practitioner_name` string, nullable, required — The practitioner's name, or "Unknown" if their record has been removed. Deprecated: kept for backwards compatibility and only populated when `earner_type` is `practitioner`. Prefer `earner_name`.
    - `earner_id` string, required — The unique identifier of the entity that earned this commission — a `Practitioner` for a `performed` rate, or a `Practitioner` or `User` for a `sold` rate, depending on who is recorded as the basket item's `sold_by` attribution.
    - `earner_name` string, required — The earner's name, or "Unknown" if their record has been removed.
    - `earner_type` 'practitioner' | 'user', required — Discriminator indicating which underlying entity `earner_id` refers to.
    - `commission_package_name` string, required
    - `date_from` string, date, required
    - `date_to` string, date, required
    - `total_sales` integer, required — The total qualifying sales for the period, in the site currency's minor unit.
    - `total_commission` integer, required — The net commission owed to the practitioner, in the site currency's minor unit.
    - `total_surcharge` integer, required — Any commission surcharge applied to the calculation, in the site currency's minor unit.
    - `total_gross_commission` integer, required — The gross commission before any surcharges, in the site currency's minor unit.
    - `item_count` integer, required — The number of qualifying items in the period.
    - `currency` string, required

## Other responses

- `400` — The request failed.

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
