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

# Validate ticket discount code

> Validate ticket discount code



## OpenAPI

````yaml post /discount-codes/tickets/validate/{code}
openapi: 3.0.0
info:
  title: Channel Manager API
  version: 0.1.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: []
tags: []
paths:
  /discount-codes/tickets/validate/{code}:
    post:
      tags:
        - DiscountCodes
      summary: Validate ticket discount code
      description: Validate ticket discount code
      operationId: validateTicketDiscountCode
      parameters:
        - name: code
          in: path
          description: The code of the discount
          required: true
          schema:
            type: string
        - name: rate_id
          in: query
          description: The unique ID of the rate this discount will be applied to
          required: true
          schema:
            type: string
        - name: supplements_total_price
          in: query
          description: The total price of the supplements selected by the user
          required: true
          schema:
            type: number
        - name: quantity
          in: query
          description: The number of tickets selected by the user
          required: true
          schema:
            type: number
      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
          example: abc123discount
          description: Unique identifier of the discount code.
        organizationId:
          type: string
          example: org123456789
          description: Unique identifier for the organization.
        eventId:
          type: string
          example: event987654321
          description: Unique identifier of the related event.
        code:
          type: string
          example: WELCOME2025
          description: Discount code string.
        fixedAmount:
          type: number
          example: 5
          description: Fixed discount amount applied to the total.
        percentage:
          type: number
          example: 20
          description: Percentage discount applied to the total.
        minAmount:
          type: number
          example: 30
          description: Minimum purchase amount required for the discount to apply.
        minUnits:
          type: number
          example: 2
          description: Minimum number of units required for the discount to apply.
        maxUnits:
          type: number
          example: 10
          description: Maximum number of units for which the discount can be applied.
        maxRedeems:
          type: number
          example: 1
          description: Maximum number of times the code can be redeemed by a single user.
        maxSales:
          type: number
          example: 50
          description: Maximum total redemptions allowed across all users.
      required:
        - _id
        - organizationId
        - eventId
        - code
  securitySchemes:
    ApiKey:
      in: header
      name: X-Api-Key
      type: apiKey

````