---
title: "Get all coupon codes"
method: GET
path: "/coupon-codes"
tags: ["Coupon Codes"]
---

# Get all coupon codes

`GET /coupon-codes`

## Request

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

This endpoint provides coupon code lists. Use parameters to filter results, for example, set `status` as 'ACTIVE' for active coupons, or add `userId` for user-specific coupon codes. Navigate the results using the query parameters `size` and `startCursor`.

## Query parameters

- `size` integer
- `startCursor` string
- `userId` string
- `promotionId` string
- `couponCode` string
- `status` 'ACTIVE' | 'INACTIVE' | 'REDEEMED'
- `startFrom` string
- `startTo` string
- `endFrom` string
- `endTo` string
- `additionalAttributes` string
- `promotionAdditionalAttributes` string
- `title` string

## Headers

- `x-fabric-tenant-id` string, required
- `x-fabric-channel-id` string
- `x-client-id` string
- `x-fabric-request-id` string

## Response `200`

OK

- GetCouponCodesResponse: The paginated response of coupon codes.
  - `query` CursorQuery: The pagination details.
    - `size` integer: The maximum number of records per page.
    - `nextCursor` string, nullable: Reference point to start the search for records in the next data set
  - `data` CouponCodes[]: An array containing coupon details.
    - `id` string, required: 24-character system-generated coupon code
    - `title` string: Title of the promotion associated with the coupon code
    - `userId` string, nullable: User ID of the user who created the coupon code
    - `couponCode` string, required: Coupon code
    - `versionId` string: Version ID of the coupon code, for internal reference
    - `promotionId` string, required: 24-character system-generated promotion ID
    - `startAt` string, date-time: Start date of the coupon code, in UTC format
    - `endAt` string, date-time: End date of the coupon code, in UTC format
    - `status` 'ACTIVE' | 'INACTIVE' | 'REDEEMED', required: Status of the coupon code
    - `additionalAttributes` object[]: Merchant-specified attributes associated with the coupon code
      - `name` string, required: Merchant-specified attribute `name` associated with the coupon code
      - `values` union, required
        - string: Merchant-specified attribute `value` associated with the coupon code
        - string[]: Merchant-specified attribute `values` associated with the coupon code
    - `promotionAdditionalAttributes` object[]: Merchant-specified attributes of the promotion associated with the coupon code
      - `name` string, required: Merchant-specified attribute `name` associated with the related promotion
      - `values` union, required
        - string: Merchant-specified attribute `value` associated with the related promotion
        - string[]: Merchant-specified attribute `values` associated with the related promotion
    - `createdAt` string, date-time, required: Record's creation time
    - `updatedAt` string, date-time, required: Record's last updated time

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `500`: Internal server error

---

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