> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperline.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get promotion code

> Retrieve the details of an existing promotion code.



## OpenAPI

````yaml get /v1/promotion-codes/{id}
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/promotion-codes/{id}:
    get:
      tags:
        - Coupons > Promotion codes
      summary: Get promotion code
      description: Retrieve the details of an existing promotion code.
      operationId: getPromotionCode
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Promotion code ID.
                    example: promo_DKL4Xcb5VSa8CQ
                  code:
                    type: string
                    description: Promotion code.
                    example: PROMO123
                  coupon_id:
                    type: string
                    description: Coupon ID.
                    example: cou_DKL4Xcb5VSa8CQ
                  client_id:
                    type: string
                    description: Client ID.
                    example: cli_DKL4Xcb5VSa8CQ
                  customer_id:
                    type:
                      - string
                      - 'null'
                    description: >-
                      If a `customer_id` is set, this promotion code will only
                      be available to this customer.
                    example: cus_DKL4Xcb5VSa8CQ
                  plan_id:
                    type:
                      - string
                      - 'null'
                    description: >-
                      If a `plan_id` is set, this promotion code will only be
                      available for subscriptions with this plan ID.
                    example: plan_DKL4Xcb5VSa8CQ
                  product_id:
                    type:
                      - string
                      - 'null'
                    description: >-
                      If a `product_id` is set, this promotion code will only be
                      available for subscriptions with this product ID.
                    example: itm_DKL4Xcb5VSa8CQ
                  created_at:
                    type: string
                    format: date-time
                    description: >-
                      Promotion code creation date. UTC date time string in the
                      [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                    example: '2021-01-01T00:00:00.000Z'
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Promotion code last edition date. UTC date time string in
                      the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
                      format.
                    example: '2021-01-01T00:00:00.000Z'
                  expires_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: Date and time when the promotion code expires.
                    example: '2021-01-01T00:00:00.000Z'
                  max_redemptions:
                    type:
                      - number
                      - 'null'
                    description: >-
                      Maximum number of redemptions for the promotion code.
                      Independent from coupon's max redemptions.
                    example: 10
                  current_redemptions:
                    type:
                      - number
                      - 'null'
                    description: Current number of redemptions for the promotion code.
                    example: 0
                  duration_count:
                    type:
                      - number
                      - 'null'
                    description: >-
                      Duration count applied to the subscription for the
                      promotion code. 0 or null for `once`
                    example: 1
                  duration_period:
                    type:
                      - string
                      - 'null'
                    enum:
                      - once
                      - days
                      - weeks
                      - months
                      - years
                    description: >-
                      Duration period applied to the subscription for the
                      promotion code for the promotion code. Valid values are
                      `once`, `days`, `weeks`, `months`, `years`
                    example: months
                  only_for_first_time_order:
                    type:
                      - boolean
                      - 'null'
                    description: >-
                      Whether the promotion code is only for first time orders.
                      Defaults to `false`
                    example: false
                required:
                  - id
                  - code
                  - coupon_id
                  - client_id
                  - customer_id
                  - plan_id
                  - product_id
                  - created_at
                  - updated_at
                  - expires_at
                  - max_redemptions
                  - current_redemptions
                  - duration_count
                  - duration_period
                  - only_for_first_time_order
        '404':
          description: Promotion code not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````