> ## 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.

# List coupons

> Retrieve existing coupons.



## OpenAPI

````yaml get /v1/coupons
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/coupons:
    get:
      tags:
        - Catalog > Coupons
      summary: List coupons
      description: Retrieve existing coupons.
      operationId: listCoupons
      parameters:
        - schema:
            type:
              - number
              - 'null'
            minimum: 0
            maximum: 100
            default: 50
          required: false
          name: take
          in: query
        - schema:
            type:
              - number
              - 'null'
            minimum: 0
            default: 0
          required: false
          name: skip
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCoupon'
      security:
        - bearer: []
components:
  schemas:
    PaginatedCoupon:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: number
              description: Total of existing items.
              example: 1
            taken:
              type: number
              description: Number of items returned.
              example: 1
            skipped:
              type: number
              description: Number of items skipped.
              example: 0
          required:
            - total
            - taken
            - skipped
        data:
          type: array
          items:
            $ref: '#/components/schemas/Coupon'
          description: List of Coupon.
      required:
        - meta
        - data
    Coupon:
      anyOf:
        - type: object
          properties:
            id:
              type: string
              description: Coupon ID.
              example: cou_DKL4Xcb5VSa8CQ
            name:
              type: string
              description: Coupon name.
              example: Partner discount
            description:
              type:
                - string
                - 'null'
              description: Coupon description.
              example: null
            expiration_date:
              type:
                - string
                - 'null'
              format: date-time
              description: Date corresponding to the expiration of the coupon.
              example: null
            redemption_limit:
              type:
                - number
                - 'null'
              description: >-
                Maximum number of subscriptions to which a single coupon can be
                applied.
              example: null
            product_ids:
              type: array
              items:
                type: string
              description: >-
                IDs of the products the coupon is scoped to, read together with
                `product_scope`: the only discounted products when `include`,
                the products never discounted when `exclude`, empty when `all`.
              example:
                - itm_DKL4Xcb5VSa8CQ
                - itm_1234567890abcdef
            product_scope:
              type: string
              enum:
                - all
                - include
                - exclude
              description: >-
                Which products the coupon discounts. `all`: every product
                (`product_ids` must be empty). `include`: only the products in
                `product_ids`. `exclude`: every product except those in
                `product_ids` (lines without a product stay discounted).
                `include` and `exclude` require a non-empty `product_ids`. When
                omitted on create/update, it is inferred: `include` if
                `product_ids` is non-empty, `all` otherwise. Integrations that
                read `product_ids` without `product_scope` will misread an
                `exclude` list as the products the coupon applies to.
              example: include
            repeat:
              type:
                - string
                - 'null'
              enum:
                - once
                - forever
                - custom
                - duration
              description: >-
                Default repeat behaviour applied when the coupon is attached to
                a subscription. Valid values: `once`, `forever`, `duration`. Can
                be overridden at attach time.
              example: duration
            duration:
              type:
                - object
                - 'null'
              properties:
                count:
                  type: number
                  description: Number of periods the coupon applies for.
                  example: 3
                period:
                  type: string
                  enum:
                    - days
                    - weeks
                    - months
                    - years
                  description: >-
                    Period unit the coupon applies for. Valid values: `days`,
                    `weeks`, `months`, `years`.
                  example: months
              required:
                - count
                - period
              description: >-
                Default duration applied when `repeat` is `duration`. Required
                when `repeat` is `duration`, must be null otherwise.
              example:
                count: 3
                period: months
            created_at:
              type: string
              format: date-time
              description: >-
                UTC date time string in the [ISO
                8601](https://en.wikipedia.org/wiki/ISO_8601) format.
              example: '2024-12-20T16:04:11Z'
            deleted_at:
              type:
                - string
                - 'null'
              format: date-time
              description: Date corresponding to the deletion of the coupon.
              example: null
            properties:
              type:
                - object
                - 'null'
              additionalProperties:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: 'null'
                  - type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - type: 'null'
                        - type: 'null'
                  - type: 'null'
              description: Key/value pairs to store any metadata useful in your context.
              example:
                campaign: partner_discount
            integrations:
              type: array
              items:
                type: object
                properties:
                  entity_id:
                    type: string
                    description: ID of the entity in the provider.
                  provider_name:
                    type: string
                    enum:
                      - adyen
                      - stripe
                      - mollie
                      - gocardless
                      - airwallex
                      - paypal
                      - salesforce
                      - hubspot
                      - attio
                      - xero
                      - pennylane
                      - zoho-books
                      - exact-online
                      - quickbooks
                      - netsuite
                      - rillet
                      - campfire
                      - dualentry
                      - datev
                      - anrok
                      - sphere
                      - chargebee
                      - slack
                      - plain
                      - zendesk
                      - pylon
                      - intercom
                      - front
                      - helpscout
                      - claap
                      - grain
                      - gong
                      - jiminny
                      - modjo
                      - posthog
                    description: Provider name.
                  provider_account_id:
                    type: string
                    description: ID of the connected provider account.
                  created_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Creation date of the entity in the provider, when it was
                      imported from there. Exposed on products, coupons and
                      subscriptions; `null` when the provider does not report
                      one.
                    example: '2024-12-20T16:04:11Z'
                  activated_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Activation date of the entity in the provider, when it was
                      imported from there. Exposed on subscriptions; `null` when
                      the provider does not report one.
                    example: '2024-12-20T16:04:11Z'
                required:
                  - entity_id
                  - provider_name
                  - provider_account_id
                description: Reference to the entity in an external provider.
                example:
                  entity_id: '123456789'
                  provider_name: stripe
                  provider_account_id: acc_1234567890
              description: References to this coupon in external providers (billing, etc).
            type:
              type: string
              enum:
                - amount
            discount_amount:
              type: number
              description: >-
                Amount to apply as a discount on the total amount (excluding
                taxes) of a subscription. Expressed in the currency's smallest
                unit.
              example: 2000
            currency:
              type:
                - string
                - 'null'
              enum:
                - EUR
                - AED
                - AFN
                - XCD
                - ALL
                - AMD
                - AOA
                - ARS
                - USD
                - AUD
                - AWG
                - AZN
                - BAM
                - BBD
                - BDT
                - BGN
                - BHD
                - BIF
                - XOF
                - BMD
                - BND
                - BOB
                - BRL
                - BSD
                - BTN
                - NOK
                - BWP
                - BYR
                - BZD
                - CAD
                - CDF
                - XAF
                - CHF
                - NZD
                - CLP
                - CNY
                - COP
                - CRC
                - CUP
                - CVE
                - ANG
                - CZK
                - DJF
                - DKK
                - DOP
                - DZD
                - EGP
                - MAD
                - ERN
                - ETB
                - FJD
                - FKP
                - GBP
                - GEL
                - GHS
                - GIP
                - GMD
                - GNF
                - GTQ
                - GYD
                - HKD
                - HNL
                - HRK
                - HTG
                - HUF
                - IDR
                - ILS
                - INR
                - IQD
                - IRR
                - ISK
                - JMD
                - JOD
                - JPY
                - KES
                - KGS
                - KHR
                - KMF
                - KPW
                - KRW
                - KWD
                - KYD
                - KZT
                - LAK
                - LBP
                - LKR
                - LRD
                - LSL
                - LYD
                - MDL
                - MGA
                - MKD
                - MMK
                - MNT
                - MOP
                - MRO
                - MUR
                - MVR
                - MWK
                - MXN
                - MYR
                - MZN
                - NAD
                - XPF
                - NGN
                - NIO
                - NPR
                - OMR
                - PAB
                - PEN
                - PGK
                - PHP
                - PKR
                - PLN
                - PYG
                - QAR
                - RON
                - RSD
                - RUB
                - RWF
                - SAR
                - SBD
                - SCR
                - SDG
                - SEK
                - SGD
                - SHP
                - SLL
                - SOS
                - SRD
                - SSP
                - STD
                - SYP
                - SZL
                - THB
                - TJS
                - TMT
                - TND
                - TOP
                - TRY
                - TTD
                - TWD
                - TZS
                - UAH
                - UGX
                - UYU
                - UZS
                - VEF
                - VND
                - VUV
                - WST
                - YER
                - ZAR
                - ZMW
                - ZWL
              description: >-
                Currency code. See [ISO
                4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
              example: EUR
          required:
            - id
            - name
            - description
            - expiration_date
            - redemption_limit
            - product_ids
            - product_scope
            - repeat
            - duration
            - created_at
            - deleted_at
            - properties
            - integrations
            - type
            - discount_amount
            - currency
          title: Coupon amount
        - type: object
          properties:
            id:
              type: string
              description: Coupon ID.
              example: cou_DKL4Xcb5VSa8CQ
            name:
              type: string
              description: Coupon name.
              example: Partner discount
            description:
              type:
                - string
                - 'null'
              description: Coupon description.
              example: null
            expiration_date:
              type:
                - string
                - 'null'
              format: date-time
              description: Date corresponding to the expiration of the coupon.
              example: null
            redemption_limit:
              type:
                - number
                - 'null'
              description: >-
                Maximum number of subscriptions to which a single coupon can be
                applied.
              example: null
            product_ids:
              type: array
              items:
                type: string
              description: >-
                IDs of the products the coupon is scoped to, read together with
                `product_scope`: the only discounted products when `include`,
                the products never discounted when `exclude`, empty when `all`.
              example:
                - itm_DKL4Xcb5VSa8CQ
                - itm_1234567890abcdef
            product_scope:
              type: string
              enum:
                - all
                - include
                - exclude
              description: >-
                Which products the coupon discounts. `all`: every product
                (`product_ids` must be empty). `include`: only the products in
                `product_ids`. `exclude`: every product except those in
                `product_ids` (lines without a product stay discounted).
                `include` and `exclude` require a non-empty `product_ids`. When
                omitted on create/update, it is inferred: `include` if
                `product_ids` is non-empty, `all` otherwise. Integrations that
                read `product_ids` without `product_scope` will misread an
                `exclude` list as the products the coupon applies to.
              example: include
            repeat:
              type:
                - string
                - 'null'
              enum:
                - once
                - forever
                - custom
                - duration
              description: >-
                Default repeat behaviour applied when the coupon is attached to
                a subscription. Valid values: `once`, `forever`, `duration`. Can
                be overridden at attach time.
              example: duration
            duration:
              type:
                - object
                - 'null'
              properties:
                count:
                  type: number
                  description: Number of periods the coupon applies for.
                  example: 3
                period:
                  type: string
                  enum:
                    - days
                    - weeks
                    - months
                    - years
                  description: >-
                    Period unit the coupon applies for. Valid values: `days`,
                    `weeks`, `months`, `years`.
                  example: months
              required:
                - count
                - period
              description: >-
                Default duration applied when `repeat` is `duration`. Required
                when `repeat` is `duration`, must be null otherwise.
              example:
                count: 3
                period: months
            created_at:
              type: string
              format: date-time
              description: >-
                UTC date time string in the [ISO
                8601](https://en.wikipedia.org/wiki/ISO_8601) format.
              example: '2024-12-20T16:04:11Z'
            deleted_at:
              type:
                - string
                - 'null'
              format: date-time
              description: Date corresponding to the deletion of the coupon.
              example: null
            properties:
              type:
                - object
                - 'null'
              additionalProperties:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: 'null'
                  - type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - type: 'null'
                        - type: 'null'
                  - type: 'null'
              description: Key/value pairs to store any metadata useful in your context.
              example:
                campaign: partner_discount
            integrations:
              type: array
              items:
                type: object
                properties:
                  entity_id:
                    type: string
                    description: ID of the entity in the provider.
                  provider_name:
                    type: string
                    enum:
                      - adyen
                      - stripe
                      - mollie
                      - gocardless
                      - airwallex
                      - paypal
                      - salesforce
                      - hubspot
                      - attio
                      - xero
                      - pennylane
                      - zoho-books
                      - exact-online
                      - quickbooks
                      - netsuite
                      - rillet
                      - campfire
                      - dualentry
                      - datev
                      - anrok
                      - sphere
                      - chargebee
                      - slack
                      - plain
                      - zendesk
                      - pylon
                      - intercom
                      - front
                      - helpscout
                      - claap
                      - grain
                      - gong
                      - jiminny
                      - modjo
                      - posthog
                    description: Provider name.
                  provider_account_id:
                    type: string
                    description: ID of the connected provider account.
                  created_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Creation date of the entity in the provider, when it was
                      imported from there. Exposed on products, coupons and
                      subscriptions; `null` when the provider does not report
                      one.
                    example: '2024-12-20T16:04:11Z'
                  activated_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Activation date of the entity in the provider, when it was
                      imported from there. Exposed on subscriptions; `null` when
                      the provider does not report one.
                    example: '2024-12-20T16:04:11Z'
                required:
                  - entity_id
                  - provider_name
                  - provider_account_id
                description: Reference to the entity in an external provider.
                example:
                  entity_id: '123456789'
                  provider_name: stripe
                  provider_account_id: acc_1234567890
              description: References to this coupon in external providers (billing, etc).
            type:
              type: string
              enum:
                - percent
            discount_percent:
              type: number
              description: >-
                Percentage to apply as a discount on the amount (excluding
                taxes) of a product.
              example: 15
          required:
            - id
            - name
            - description
            - expiration_date
            - redemption_limit
            - product_ids
            - product_scope
            - repeat
            - duration
            - created_at
            - deleted_at
            - properties
            - integrations
            - type
            - discount_percent
          title: Coupon percent
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.