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

# Get discount code

> Get discount code



## OpenAPI

````yaml get /discount-codes/{code}
openapi: 3.0.0
info:
  title: Channel Manager API
  version: 0.2.0
  description: >-
    Official API documentation for Channel Manager. All endpoints are protected
    by an API key.
servers:
  - url: https://channels-service-alpha.fourvenues.com
    description: Test server
  - url: https://channels-service.fourvenues.com
    description: Production server
security: []
paths:
  /discount-codes/{code}:
    get:
      tags:
        - DiscountCodes
      summary: Get discount code
      description: Get discount code
      operationId: getDiscountCode
      parameters:
        - name: code
          in: path
          required: true
          description: The code of the discount
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DiscountCode'
                  success:
                    type: boolean
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      security:
        - ApiKey: []
components:
  schemas:
    DiscountCode:
      type: object
      properties:
        _id:
          type: string
        event_id:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - fixed
            - percentage
        value:
          type: number
        min_amount:
          type: number
        min_units:
          type: number
        max_units:
          type: number
        max_redeems:
          type: number
        max_sales:
          type: number
        description:
          type: string
      required:
        - _id
        - event_id
        - code
        - type
        - value
        - min_amount
        - min_units
        - max_units
        - max_redeems
        - max_sales
        - description
      description: >-
        The wire contract for a discount code, AT THE LATEST VERSION.


        This is the single source of truth: `toDiscountCodeResponse` is
        annotated to

        return it (so the code cannot drift from it without a compile error),
        and the

        OpenAPI spec + docs + breaking-change gate are all generated from it.


        All identifiers are plain strings on the wire. `type` is the
        discriminator

        derived from whether a fixed amount is set; `value` carries the fixed
        amount

        or the percentage accordingly.


        There are no nested relations on this shape — every field is a primitive
        — so

        none are typed `unknown`.
  securitySchemes:
    ApiKey:
      in: header
      name: X-Api-Key
      type: apiKey

````