**Version: 202701**

# Get coupon

**GET** `/openapi/2027-01/coupons/:id`

Gets coupon campaign details by ID.

## Request

**Path Parameters**

- `id` string (required)

  Coupon ID

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `coupon` object

    The queried coupon payload

    - `id` string

      Coupon ID
    - `title` string

      Coupon title displayed to merchants
    - `remarks` string

      Merchant-side note
    - `life_cycle_type` string

      Coupon lifecycle type:

      *   `begin_end`: Uses explicit start and end timestamps
      *   `survival`: Uses survival\_time after claiming
    - `starts_at` int64

      Distribution start timestamp
    - `ends_at` int64

      Distribution end timestamp
    - `use_coupon_starts_at` int64

      Usage start timestamp
    - `use_coupon_ends_at` int64

      Usage end timestamp
    - `survival_time` int64

      Valid duration after claiming
    - `discount_type` string

      Discount threshold strategy type:

      *   `percentage`: Percentage discount with no-condition or quantity condition
      *   `amount_percentage`: Percentage discount with amount condition
      *   `fixed_amount`: Fixed amount discount with no-condition or amount condition
      *   `item_fixed_amount`: Fixed amount discount with quantity condition
    - `value` string

      Discount value
    - `value_type` string

      Discount value type:

      *   `percentage`: Percentage discount
      *   `fixed_amount`: Fixed amount reduction
      *   `voucher`: Free voucher style benefit
    - `unlimited_usage` boolean

      Whether the coupon quantity is unlimited
    - `stock` int32

      Remaining coupon stock
    - `once_per_customer` int32

      Maximum claims per customer
    - `user_with_other` boolean

      Whether this coupon can be used with other discounts
    - `prerequisite_subtotal_range` object[]

      Amount-based prerequisite ranges

      *   Array \[

      - `greater_than_or_equal_to` string

        The lower bound of the threshold, inclusive
      - `value` string

        The threshold value represented as a string
      *   \]
    - `prerequisite_quantity_range` object[]

      Quantity-based prerequisite ranges

      *   Array \[

      - `greater_than_or_equal_to` string

        The lower bound of the threshold, inclusive
      - `value` string

        The threshold value represented as a string
      *   \]
    - `entitled_product_ids` string[]

      Product IDs eligible for this coupon
    - `entitled_collection_ids` string[]

      Collection IDs eligible for this coupon
    - `prerequisite_customer_segment_ids` string[]

      Eligible customer segment IDs
    - `prerequisite_customer_ids` string[]

      Eligible customer IDs
    - `sort` object

      Sort options for selected products

      - `by` string

        The field used to sort selected products
      - `direction` string

        The sort direction, for example asc or desc
    - `config` object

      Storefront visual configuration

      - `banner_url` string

        The banner image URL
      - `count_down` object

        Countdown presentation configuration

        - `background_color_end` string

          The ending background color of the countdown banner
        - `background_color_start` string

          The starting background color of the countdown banner
        - `color` string

          The primary text color in coupon countdown components
        - `count_down_background_color` string

          The background color of the countdown timer block
        - `count_down_color` string

          The text color of the countdown timer value
        - `detail_page_show_code` boolean

          Whether coupon code is shown on the detail page countdown area
        - `show_count_down` boolean

          Whether countdown visualization is enabled

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "coupon": {
      "id": "string",
      "title": "string",
      "remarks": "string",
      "life_cycle_type": "string",
      "starts_at": 0,
      "ends_at": 0,
      "use_coupon_starts_at": 0,
      "use_coupon_ends_at": 0,
      "survival_time": 0,
      "discount_type": "string",
      "value": "string",
      "value_type": "string",
      "unlimited_usage": true,
      "stock": 0,
      "once_per_customer": 0,
      "user_with_other": true,
      "prerequisite_subtotal_range": [
        {
          "greater_than_or_equal_to": "string",
          "value": "string"
        }
      ],
      "prerequisite_quantity_range": [
        {
          "greater_than_or_equal_to": "string",
          "value": "string"
        }
      ],
      "entitled_product_ids": [
        "string"
      ],
      "entitled_collection_ids": [
        "string"
      ],
      "prerequisite_customer_segment_ids": [
        "string"
      ],
      "prerequisite_customer_ids": [
        "string"
      ],
      "sort": {
        "by": "string",
        "direction": "string"
      },
      "config": {
        "banner_url": "string",
        "count_down": {
          "background_color_end": "string",
          "background_color_start": "string",
          "color": "string",
          "count_down_background_color": "string",
          "count_down_color": "string",
          "detail_page_show_code": true,
          "show_count_down": true
        }
      }
    }
  }
}
```
