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

# Search Gift Cards By Code

> Search issued gift cards by (partial) code for the command palette.

POST keeps the code out of access logs/proxies/history (same as
`/gift-cards/balance`). Returns at most a handful of matches.



## OpenAPI

````yaml post /billing/gift-cards/search
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/search:
    post:
      tags:
        - Gift Cards
      summary: Search Gift Cards By Code
      description: |-
        Search issued gift cards by (partial) code for the command palette.

        POST keeps the code out of access logs/proxies/history (same as
        `/gift-cards/balance`). Returns at most a handful of matches.
      operationId: search_gift_cards_by_code_billing_gift_cards_search_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/GiftCardCodeSearchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/GiftCardCodeSearchResult'
                type: array
                title: >-
                  Response Search Gift Cards By Code Billing Gift Cards Search
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GiftCardCodeSearchRequest:
      properties:
        query:
          type: string
          minLength: 2
          title: Query
          description: Partial or full gift card code to search for.
      type: object
      required:
        - query
      title: GiftCardCodeSearchRequest
    GiftCardCodeSearchResult:
      properties:
        id:
          type: string
          title: Id
        code:
          type: string
          title: Code
        currentBalance:
          type: integer
          title: Currentbalance
        status:
          $ref: '#/components/schemas/GiftCardStatus'
        purchasingPatientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchasingpatientid
        purchasingPatientName:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchasingpatientname
      type: object
      required:
        - id
        - code
        - currentBalance
        - status
      title: GiftCardCodeSearchResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GiftCardStatus:
      type: string
      enum:
        - PENDING
        - ACTIVE
        - DISABLED
        - VOIDED
      title: GiftCardStatus
    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

````