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

# Validate a coupon code



## OpenAPI

````yaml /openapi.json post /api/invoices/coupons/validate
openapi: 3.0.3
info:
  title: Hyze Cloud API
  description: Official API documentation
  version: 1.0.0
servers:
  - url: https://api.hyzecloud.com
security:
  - bearerAuth: []
paths:
  /api/invoices/coupons/validate:
    post:
      tags:
        - Invoices
      summary: Validate a coupon code
      operationId: postApiInvoicesCouponsValidate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - code
                - planId
              properties:
                code:
                  minLength: 1
                  maxLength: 64
                  type: string
                planId:
                  minLength: 1
                  type: string
                interval:
                  type: string
                  enum:
                    - month
                    - quarter
                    - semiannual
                    - year
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - code
                - planId
              properties:
                code:
                  minLength: 1
                  maxLength: 64
                  type: string
                planId:
                  minLength: 1
                  type: string
                interval:
                  type: string
                  enum:
                    - month
                    - quarter
                    - semiannual
                    - year
          multipart/form-data:
            schema:
              type: object
              required:
                - code
                - planId
              properties:
                code:
                  minLength: 1
                  maxLength: 64
                  type: string
                planId:
                  minLength: 1
                  type: string
                interval:
                  type: string
                  enum:
                    - month
                    - quarter
                    - semiannual
                    - year
      responses:
        default:
          description: Response
      security:
        - bearerAuth: []
        - cookieAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: hyze_your_api_key
    cookieAuth:
      type: apiKey
      in: cookie
      name: better-auth.session_token

````

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