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

# Look Up Gift Card Balance

> Read one gift card's balance and status by its printed number.

Exact match on a gift-card program the caller owns. The response is balance and status only. It does not return the card number, security code, or customer.

A partial number returns 404. Another merchant's program returns 404.

This route accepts a normal bearer token. JWT app keys and legacy tokens do not need the Epos Now HMAC headers here. Other gift-card routes still require those headers for JWT and legacy tokens.

**Query parameters**:
- `number`: printed card number, required, exact match, at most 20 characters.

**Scopes**: `ld_*` keys need `giftcards:read`.

**Status codes**:
- 200: balance and status
- 400: `number` is missing
- 404: card or program not found



## OpenAPI

````yaml /openapi.public.json get /v2/giftcards/programs/{programId}/cards/lookup
openapi: 3.1.0
info:
  title: LoyaltyDog Public API
  description: >-
    Merchant-product REST API. Authenticate with Authorization: Bearer. This is
    the frozen public schema (not the full dashboard/admin OpenAPI).
  termsOfService: https://loyalty.dog/loyalty-program-terms-service
  contact:
    name: LoyaltyDog Support
    url: https://loyalty.dog/contact-us
    email: support@loyalty.dog
  version: 1.0.2
servers:
  - url: https://api.loyalty.dog
    description: Production
security:
  - bearerAuth: []
paths:
  /v2/giftcards/programs/{programId}/cards/lookup:
    get:
      tags:
        - Gift Cards
      summary: Look Up Gift Card Balance
      description: >-
        Read one gift card's balance and status by its printed number.


        Exact match on a gift-card program the caller owns. The response is
        balance and status only. It does not return the card number, security
        code, or customer.


        A partial number returns 404. Another merchant's program returns 404.


        This route accepts a normal bearer token. JWT app keys and legacy tokens
        do not need the Epos Now HMAC headers here. Other gift-card routes still
        require those headers for JWT and legacy tokens.


        **Query parameters**:

        - `number`: printed card number, required, exact match, at most 20
        characters.


        **Scopes**: `ld_*` keys need `giftcards:read`.


        **Status codes**:

        - 200: balance and status

        - 400: `number` is missing

        - 404: card or program not found
      operationId: >-
        lookup_gift_card_balance_v2_giftcards_programs__programId__cards_lookup_get
      parameters:
        - name: programId
          in: path
          required: true
          schema:
            anyOf:
              - $ref: '#/components/schemas/PydanticObjectId'
              - type: string
            title: Programid
        - name: number
          in: query
          required: true
          description: Printed card number. Exact match.
          schema:
            type: string
            minLength: 1
            maxLength: 20
            title: Number
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicGiftCardBalance'
        '400':
          description: Card number is missing
        '404':
          description: Gift card not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    PublicGiftCardBalance:
      type: object
      properties:
        balance:
          type: string
          title: Balance
          description: Decimal string with two places, for example 25.50.
          examples:
            - '25.50'
        status:
          $ref: '#/components/schemas/GiftCardStatus'
      required:
        - balance
        - status
      title: PublicGiftCardBalance
      description: Printed-number lookup. Balance and status only.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GiftCardStatus:
      type: string
      enum:
        - pending
        - active
        - suspended
        - expired
        - voided
        - depleted
      title: GiftCardStatus
      description: Gift card status enumeration.
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from POST /v2/token.

````

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