---
title: "Promo code usage breakdown"
method: GET
path: "/shop/reports/promo-code-usage/breakdown"
tags: ["DiscountUsage"]
---

# Promo code usage breakdown

`GET /shop/reports/promo-code-usage/breakdown`

This endpoint provides a breakdown of discount usage by promo code for individual orders matching the given parameters.

## Query parameters

- `site_id` string, uuid, required
- `revenue_date_from` string, date
- `revenue_date_to` string, date
- `submitted_at_from` string, date
- `submitted_at_to` string, date
- `page` integer
- `per_page` integer
- `sort` string
- `sort_order` 'asc' | 'desc'
- `applied_by` string, uuid

## Response `200`

The breakdown of `UsedPromoCodes` was successfully retrieved

- object
  - `data` UsedPromoCodeBreakdown[], required
    - `discount_type_id` string, uuid, required — The ID of the used promo code.
    - `discount_type_code` string, required — The code for the used promo code.
    - `order_id` string, uuid, required — The ID of the basket the used promo code was applied to.
    - `order_ref` string, required — The reference of the order the used promo code was applied to.
    - `order_total` integer, required — The total value of the order the used promo code was applied to.
    - `total_discount_on_order` integer, required — The total discount on the order from the used promo code.
    - `currency` string, required — The currency of the total discount on the order from the used promo code. This is associated with the site.
    - `applied_by` UserSummary, required
      - `id` string, mongo-id, required — The ID of the user.
      - `avatar` Media
        - `id` string, uuid, required — Unique identifier of the uploaded media item, returned from `createMedia`. Pass this ID into any field that accepts a media reference (logos, hero images, product images, etc.).
        - `file_name` string, required — Original filename of the uploaded asset, preserved as provided at upload time. Used for display in the media library and as a hint when serving downloads.
        - `mime_type` string, required — The mime type of the media item.
        - `original_url` string, required — The url of the media resource.
        - `size` integer, required — The size of the media item in bytes.
        - `url` string, required — The url of the converted media resource.
      - `email` string, email, required
      - `first_name` string, required
      - `full_name` string, required
      - `last_name` string, required
    - `applied_at` string, date-time, required — The date and time the promo code was applied.
    - `is_archived` boolean, required — Whether the used promo code has been archived.
    - `site_id` string, uuid, required — The ID of the site the used promo code is associated with.
  - `meta` PaginationMeta, required — Counts and positional information for the current page of a list response. Use `current_page` and `last_page` to drive pagination UI, `total` for result counts, and `per_page` to confirm the page size the server actually applied (which may differ from the requested value when capped).
    - `from` integer, required — The item number from which this results set starts from
    - `to` integer, required — The item number from which this results set ends at
    - `total` integer, required — The total number of results
    - `current_page` integer, required — The current page number
    - `last_page` integer, required — The page number of the last result set
    - `per_page` integer, required — The number of results per page
    - `path` string, required — The path of this api request
  - `links` PaginationLinks, required — Hypermedia navigation links for paging through a list response. Each property is a fully-qualified URL that preserves the original query string (filters, sort, page size) and only swaps the `page` parameter. `next` and `prev` are `null` at the ends of the result set; `first` and `last` are always present.
    - `first` string, required — The url of the first page for the paginated results set
    - `next` string, nullable, required — The url of the next page for the paginated results set
    - `prev` string, nullable, required — The url of the previous page for the paginated results set
    - `last` string, required — The url of the last page for the paginated results set

## Other responses

- `401` — The user is unauthenticated

---

[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)
