---
title: "List course credits"
method: GET
path: "/shop/reports/course-credits"
tags: ["Reports"]
---

# List course credits

`GET /shop/reports/course-credits`

Use this endpoint to retrieve a paginated list of individual course credit records,
including their current status (redeemable, redeemed, revoked, or expired), the customer
and course they belong to, key dates, and their monetary value. Course credits are
customer credits issued from a course purchase at the given site. Totals summarise the
outstanding and redeemed value of the matched credits so a site can reconcile its
course-credit liability.

## Query parameters

- `site_id` string, uuid, required
- `course_type_id` string, object-id
- `status` union
  - 'redeemable' | 'redeemed' | 'revoked' | 'expired'
  - string[]
- `issued_at_from` string, date
- `issued_at_to` string, date
- `sort` string
- `sort_direction` 'asc' | 'desc'
- `page` integer
- `per_page` integer

## Response `200`

The list of items was successfully retrieved

- ListCourseCreditResponse
  - `data` CourseCreditItem[], required
    - `id` string, uuid, required — The ID of the credit.
    - `coupon` object — The coupon associated with this credit.
      - `name` string, nullable, required — The name of the coupon.
      - `description` string, nullable, required — The description of the coupon.
      - `code` string, nullable, required — The coupon code.
    - `customer_id` string, uuid, required — The ID of the customer who owns this credit.
    - `first_name` string, nullable — The first name of the customer.
    - `last_name` string, nullable — The last name of the customer.
    - `email` string, email, nullable — The email address of the customer.
    - `course` object — The course type this credit was issued from.
      - `id` string, object-id, nullable, required — The ID of the course type.
      - `name` string, nullable, required — The name of the course type.
    - `status` 'redeemable' | 'redeemed' | 'revoked' | 'expired', required — The computed status of this credit.
    - `value` integer, required — The monetary value of the credit, in minor units (e.g. pence).
    - `issued_at` string, date-time, nullable — The date and time the credit was issued.
    - `expires_at` string, date-time, nullable — The date and time the credit expires.
    - `redeemed_at` string, date-time, nullable — The date and time the credit was redeemed.
    - `revoked_at` string, date-time, nullable — The date and time the credit was revoked.
  - `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
  - `totals` CourseCreditTotals, required
    - `total_credits` integer, required — The total number of credits matching the current filters.
    - `total_redeemed` integer, required — The number of credits that have been redeemed.
    - `total_revoked` integer, required — The number of credits that have been revoked.
    - `total_expired` integer, required — The number of credits that have expired without being redeemed.
    - `total_redeemable` integer, required — The number of credits that are currently redeemable.
    - `outstanding_value` integer, required — The total value of redeemable credits, in minor units. This is the outstanding course-credit liability.
    - `redeemed_value` integer, required — The total value of redeemed credits, in minor units.
    - `currency` string, required — The ISO 4217 currency code the values are expressed in.

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