---
title: "Retrieve a coupon"
method: GET
path: "/coupons/{couponId}"
tags: ["Coupons"]
---

# Retrieve a coupon

`GET /coupons/{couponId}`

## Request

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

Use this endpoint to retrieve the details of a coupon by its ID.

## Path parameters

- `couponId` string, required

## Headers

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

## Response `200`

OK

- GetCouponResponse: The coupon details.
  - `id` string, required: A 24-character system-generated coupon ID, generated using the [create coupon](/v3/api-reference/offers/coupons/create-coupon) endpoint.
  - `name` string, required: The name of the coupon.
  - `status` 'ACTIVE' | 'SCHEDULED' | 'DISABLED' | 'EXPIRED', required: The status of the coupon.
  - `type` 'PRODUCT' | 'CART' | 'QUANTITY' | 'SHIPPING' | 'BUYGET' | 'SPEND_GET', required: The type of coupon promotion you want to create. The following are the coupon promotion types you can create: - `PRODUCT`: A SKU coupon promotion. Applies a discount to SKUs based on the value specified in the `discount` object of the request body. - `CART`: A cart coupon promotion. Applies a discount to the minimum order amount of the cart based on the `ORDER_VALUE` specified in the `condition` object of the request body. - `QUANTITY`: A quantity coupon promotion. Provides discounts on items based on the quantity requirement set in the coupon promotion. - `SHIPPING`: A shipping coupon promotion. Provides discounts on the shipping cost. - `BUYGET`: A BuyGet coupon promotion. Specifies the _Buy_ conditions and corresponding _Get_ discounts. - `SPEND_GET`: A SpendGet coupon promotion. Specifies the total order value required to qualify for discounts and the applicable discounts based on the order value.
  - `startAt` string, date-time, required: The start time of a coupon, in UTC format.
  - `endAt` string, date-time, required: The end time of a coupon, in UTC format.
  - `buyOperator` 'AND' | 'OR': Operator for `conditions` array. It's applied when the coupon type is `BUYGET`. It's used as an operator between different condition objects mentioned in the *conditions* array.
  - `note` string: A brief note or description of the coupon.
  - `isExclusive` boolean: `true`: Coupon can be applied with other promotions. `false`: Coupon can't be applied if other promotions are already applied.
  - `couponCodes` string[]: An array containing generated coupon codes.
  - `couponCodesCount` integer: The total number of coupon codes.
  - `details` object[], required: Coupon setup details
    - `discounts` object[]: An array containing discount details.
      - `unit` 'PERCENTAGE_OFF' | 'AMOUNT_OFF' | 'FIXED', required: Discount type
      - `amount` number, double, required: Discount amount to be given
      - `type` 'SKU' | 'CART' | 'SERVICE' | 'SERVICE_CART', required: Discount type for where the discount applies. The following are valid target options for applying the discount: - `SKU`: Discount is applied to products. - `CART`: Discount is applied to the entire cart value. - `SERVICE`: Discount is applied to SKU shipping. - `SERVICE_CART`: Discount is applied to cart shipping cost.
      - `values` union
        - string, nullable: Should be null for SKU and CART
        - object[]
      - `maximumQuantity` number, double: Maximum quantity of items that can receive the discount. Quantity is required when the promotion type is SPEND_GET or BUYGET.
      - `includeOperator` 'AND' | 'OR': Select the `AND` or `OR` condition to include products in a promotion. - Use the `OR` condition to apply a single rule for product inclusion. - Use the `AND` condition to apply multiple rules for product inclusion.
      - `excludeOperator` 'AND' | 'OR': Select the `AND` or `OR` condition to exclude products from a promotion. - Use the `OR` condition to apply a single rule for product exclusion. - Use the `AND` condition to apply multiple rules for product exclusion.
      - `discountId` string: Discount ID to link `discount` and `targetProduct`. It's required for BUYGET and SPEND_GET promotions.
      - `isAutoAdd` boolean: Represents if validate endpoint (evaluation endpoint from Real-time Pricing Engine) should suggest free items. Currently used for BUY-GET type of promotion.
      - `sets` string[]: Reserved for additional information. It's used to create a group of items in a set so that you can easily apply promotions or coupons to the defined set of items.
    - `targetProducts` object[]: A list of target products for applying the discount.
      - `type` 'SKU' | 'CATEGORY' | 'ATTRIBUTE' | 'PRICE_TYPE' | 'COLLECTION' | 'PREVIOUS_DISCOUNTS', required: The target type for the promotion.
      - `values` union, required: The values corresponding to the selection `type`.
        - string: A list of target products. An asterisk (*) indicates all products are selected; hence, the discount is applied on all products.
        - union[]
          - union
            - integer: A numeric identifier of the target record.
            - string: A non-numeric identifier of the target record.
            - object: The merchant-defined attributes associated with the promotion.
              - …
        - integer: Condition numeric identifier
      - `operator` 'IN' | 'NOT_IN' | 'EQUAL' | 'GREATER_THAN', required: Indicates whether a target product is included or excluded from discounts. The following options are available: - `IN`: The target product, with the specified `type` and `value`, is included for the discount to be applied. - `NOT_IN`: The target product, with the specified `type` and `value`, is excluded from being discounted. - `EQUAL`: The target product will be eligible for the discount if the defined `type` and `value` match the product selection.
      - `discountId` string: Discount ID to link `discount` and `targetProduct`; required for `BUYGET` promotion
    - `conditions` object[]: Conditions list for the promotion to be applied
      - `id` string, nullable: Promotion condition ID
      - `operator` 'AND' | 'OR', required: Operator for condition within each object of the `conditions` array
      - `includeOperator` 'AND' | 'OR': Select the `AND` or `OR` condition to include products in a promotion. - Use the `OR` condition to apply a single rule for product inclusion. - Use the `AND` condition to apply multiple rules for product inclusion.
      - `excludeOperator` 'AND' | 'OR': Select the `AND` or `OR` condition to exclude products from a promotion. - Use the `OR` condition to apply a single rule for product exclusion. - Use the `AND` condition to apply multiple rules for product exclusion.
      - `conditions` PromotionConditionDetail[], required: Conditions for the promotion to apply on specific targets
        - `type` 'SKU' | 'QUANTITY' | 'CATEGORY' | 'ATTRIBUTE' | 'PRICE_TYPE' | 'CHANEL' | 'ORDER_VALUE' | 'USER_SEGMENT' | 'USER_TYPE' | 'DATE' | 'SKU_QUANTITY' | 'COLLECTION' | 'PRICE' | 'ORDER_LINE_ITEMS' | 'REGION' | 'PREVIOUS_DISCOUNTS', required: Condition type
        - `values` union, required
          - string: Applied on all items. Asterisk (*) indicates all items
          - number, double: Comparison quantity or amount.
          - union[]
            - union
              - …
        - `operator` 'NOT_EQUAL' | 'EQUAL' | 'GREATER_THAN' | 'LESS_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN_OR_EQUAL_TO' | 'NOT_IN' | 'IN', required: Operator between `type` and `values` within each object of *conditions* array
      - `set` 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z': It's used to create a group of items in a set so that you can easily apply promotions or coupons to the defined set of items.
  - `termsAndConditions` object[]: Terms and conditions for the promotion
    - `name` string: Terms and conditions name
    - `description` string: Terms and conditions description
  - `promotionMessages` object[]: Message description for the promotion
    - `title` string: Message name
    - `message` string: Message description
    - `pages` string[]: The types of web pages where the message is displayed.
    - `locales` string[]: The locales in which the promotion message is displayed. Locale is a set of language or country-based preferences for user interface.
  - `proximityMessages` ProximityMessages
    - `threshold` integer: The proximity threshold value. You muse use a value greater than or equal to 0.
    - `localizedMessages` object[]
      - `locales` string[]
      - `message` string: The localized message for the specified locales.
  - `shipmentMethodIds` string[]: Required for *Shipping* type promotion to provide eligible shipment methods.
  - `eligiblePriceLists` integer[]: Price list IDs to be considered for this promotion.
  - `limits` object[]: Restrictions or conditions that apply to the use of a coupon.
    - `type` 'SITE_WIDE' | 'PER_USER' | 'ORDER': The types of coupons that limit their usage. `ORDER` is applicable to `PRODUCT` and `BUYGET` coupon types only.
    - `quantity` integer: The number of times a coupon can be applied. If not specified, `PRODUCT` and `BUYGET` type coupons can be applied as many times as possible.
  - `additionalAttributes` object[]: Merchant-specified attributes associated with the coupon.
    - `name` string, required: Merchant-specified attribute `name` associated with the coupon.
    - `values` union, required
      - string: Merchant-specified attribute `value` associated with the coupon.
      - string[]: Merchant-specified attribute `values` associated with the coupon.
  - `createdAt` string, date-time: The timestamp in UTC format indicating when the coupon was created.
  - `updatedAt` string, date-time: The timestamp in UTC format indicating when the coupon was last updated.
  - `level` integer: The order in which the coupons must be executed.
  - `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. If configured, `stackingType` will have precedence over the `isStackable` and `isAlwaysApplied` 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 can't 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 can't 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.
  - `isStackable` boolean: - `true`: Allows the coupon to be stacked so it can be applied with other coupons. - `false`: Disables coupon stacking.
  - `isAlwaysApplied` boolean: Set `true` to always apply the coupon, even on non-stackable coupons, or `false` to apply coupon based on configured conditions.
  - `singleMultiUse` 'SINGLE_USE' | 'MULTI_USE': Determines whether the coupon is valid for single use or for multiple uses. The options are: - `SINGLE_USE`: The coupon can be used only once. - `MULTI_USE`: The coupon can be used multiple times.

## Other responses

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

---

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