---
title: "Get a list of all coupon codes"
method: GET
path: "/api-offers/coupon-codes"
tags: ["Coupon codes"]
---

# Get a list of all coupon codes

`GET /api-offers/coupon-codes`

## Request

- Base URL: `https://live.copilot.fabric.inc`
- URL: `https://live.copilot.fabric.inc/api-offers/coupon-codes`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/fabric/apis/offers-v2/docs/api-offers/coupon-codes/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a paginated list of all coupon codes.

## Query parameters

- `size` integer
- `startCursor` string, nullable
- `userId` string
- `promotionId` string
- `promoCode` string
- `status` 'ACTIVE' | 'INACTIVE' | 'REDEEMED'
- `startFrom` string, date-time
- `startTo` string, date-time
- `endFrom` string, date-time
- `endTo` string, date-time
- `additionalAttributes` string
- `promoAdditionalAttributes` string
- `title` string

## Headers

- `x-site-context` string, required

## Response `200`

OK

- CouponListResponse
  - `query` object
    - `limit` number: The maximum number of records per page.
    - `offset` number: The number of records to skip before returning records. For example, when offset is 20 and limit is 10, this endpoint returns records from 21 to 30.
    - `count` number: The total number of records.
  - `promos` object[]
    - `_id` string: A 24-character system-generated promotion ID.
    - `promoId` number: A unique identifier of the promotion, for external use.
    - `promoCodes` string[]: A list of coupon codes that are applicable only for coupons. For coupons, the response includes promo codes associated with the coupon. For promotions, the response includes an empty array.
    - `promoCount` number: The number of coupon codes associated with a coupon. This value is always `0` for promotions.
    - `state` 'ACTIVE' | 'SCHEDULED' | 'DISABLED' | 'EXPIRED': The status of the promotion. <br />1. `ACTIVE` indicates the promotion is live and available. <br />2. `SCHEDULED` indicates the promotion is set up and is scheduled to be active in a future date. <br />3. `DISABLED` indicates the promotion is turned off and can be re-enabled at a later time if required. <br />4. `EXPIRED` indicates the promotion is no longer valid.
    - `isImplicit` boolean: A flag indicating whether an offer is applied automatically. Set it to `true` for promotions, which should be applied automatically and `false` for coupons, which must be applied explicitly.
    - `title` string: The name of the promotion.
    - `startDate` string, date-time: The start time of the promotion, in UTC format.
    - `endDate` string, date-time: The end time of the promotion, in UTC format.
    - `isExclusive` boolean: A flag indicating whether a coupon can be stacked with an existing promotion. Set it to `true` to prevent the coupon from being applied to items that already have promotions and `false` to allow coupon to be applied with existing promotions.
    - `eligiblePriceList` number[]: The price lists to be considered for the given promotion.
    - `level` integer: The promotion execution order. Promotion types are assigned default execution orders. Initial evaluation begins with level 1 promotions. The result of level 1 is used as the base price for level 2. Similarly, the result of level 2 becomes the base price for level 3, and so on.
    - `stackingType` 'STACKABLE' | 'EXCLUSIVE' | 'TYPE_EXCLUSIVE' | 'UNIVERSAL': Defines the rules for how a promotion can be combined with other promotions. This field determines whether a specific promotion can be applied in conjunction with other active promotions during a transaction or if it must be used exclusively. Possible values: - `STACKABLE`: This promotion can be combined with other stackable promotions, allowing multiple discounts to be applied together. The order in which stackable promotions are applied is determined by the `level` field, with promotions having a higher priority (lower numeric value) being applied before those with a lower priority. - `EXCLUSIVE`: This promotion cannot be combined with any other promotions. The `level` field is used to determine which exclusive promotion will be evaluated and applied first. Once an exclusive promotion is applied, no other promotions can be used in the same transaction. - `TYPE_EXCLUSIVE`: This promotion cannot be combined with other promotions of the same type. The `level` field is used to determine which promotion within the same type will be evaluated and applied first. - `UNIVERSAL`: This promotion can be combined with any other promotions without restrictions. Universal promotions will be evaluated last.
    - `updatedAt` string, date-time: The time when the promotion was last updated, in UTC format.

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

---

[API](https://skmtc.dev/fabric/apis/offers-v2.md) - [All operations](https://skmtc.dev/fabric/apis/offers-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/fabric/apis/offers-v2/revisions/da2bd742b9bc?raw)
