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

# Validate Gift Card Code

> Validate that a provider-entered custom gift card code is usable.



## OpenAPI

````yaml post /billing/gift-cards/code/validate
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/gift-cards/code/validate:
    post:
      tags:
        - Gift Cards
      summary: Validate Gift Card Code
      description: Validate that a provider-entered custom gift card code is usable.
      operationId: validate_gift_card_code_billing_gift_cards_code_validate_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GiftCardCodeValidationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GiftCardCodeValidationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GiftCardCodeValidationRequest:
      properties:
        code:
          type: string
          title: Code
          description: Provider-entered gift card code to validate.
        chargeItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Chargeitemid
          description: >-
            Optional charge item ID to ignore when validating an
            already-materialized pending card.
      type: object
      required:
        - code
      title: GiftCardCodeValidationRequest
    GiftCardCodeValidationResponse:
      properties:
        code:
          type: string
          title: Code
        available:
          type: boolean
          title: Available
          default: true
      type: object
      required:
        - code
      title: GiftCardCodeValidationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````