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

# Gift cards you can sell

> Cards with the naira rate per US dollar. `minimum` is in dollars.



## OpenAPI

````yaml https://merchant.bitliva.com/docs/openapi.json GET /giftcards
openapi: 3.1.0
info:
  title: Bitliva Merchant API
  version: 1.0.0
  license:
    name: Proprietary
  description: >-
    Create customers, give them crypto addresses, buy and sell crypto, sell gift
    cards, and read your naira wallet.


    Every response has the same shape: `status`, `message`, and `data` when
    there is something to return. Errors also carry a stable `code`.
servers:
  - url: https://merchant.bitliva.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Account and wallet
    description: Your key, naira balance and transaction history.
  - name: Customers and wallet addresses
    description: >-
      One customer per user of yours, with a deposit address per coin and
      network.
  - name: Buying and selling crypto
    description: Naira moves through your wallet; the crypto belongs to the customer.
  - name: Gift cards
    description: Sell gift card. Paid to your wallet on approval.
  - name: Sandbox-only helpers
    description: Sandbox only.
paths:
  /giftcards:
    get:
      tags:
        - Gift cards
      summary: Gift cards you can sell
      description: Cards with the naira rate per US dollar. `minimum` is in dollars.
      operationId: giftcardsList
      parameters:
        - name: category_id
          in: query
          required: false
          description: >-
            Only cards in this category (ids come from `categories` in the
            response).
          schema:
            type: integer
        - name: country
          in: query
          required: false
          description: Only cards for this country, for example `US` (not case sensitive).
          schema:
            type: string
        - name: form
          in: query
          required: false
          description: >-
            Only cards of this form, for example `physical` or `ecode` (not case
            sensitive).
          schema:
            type: string
      responses:
        '200':
          description: Gift cards you can sell
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
              example:
                status: success
                message: Gift cards retrieved successfully.
                data:
                  categories:
                    - id: 3
                      name: Amazon
                      image_url: https://merchant.example.com/media/giftcards/3
                  countries:
                    - US
                  forms:
                    - physical
                  giftcards:
                    - id: 12
                      category_id: 3
                      name: Amazon USD
                      rate: '1180.00'
                      minimum: '10.00'
                      form: physical
                      country: US
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
components:
  schemas:
    Envelope:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
        message:
          type: string
        data:
          type: object
    Error:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
        code:
          type: string
          enum:
            - invalid_api_key
            - account_inactive
            - live_not_enabled
            - sandbox_only
            - not_found
            - customer_not_found
            - method_not_allowed
            - reference_conflict
            - customer_pending
            - validation_failed
            - unsupported_currency
            - invalid_network
            - amount_below_minimum
            - insufficient_crypto_balance
            - insufficient_wallet_balance
            - sale_not_possible
            - address_required
            - customer_limit_reached
            - giftcard_unavailable
            - giftcard_submission_failed
            - rate_limited
            - service_unavailable
            - temporarily_unavailable
          description: >-
            - `invalid_api_key` (HTTP 401): The API key is missing, wrong or
            revoked.

            - `account_inactive` (HTTP 403): Your merchant account is not
            active. Contact support.

            - `live_not_enabled` (HTTP 403): Live access is not enabled: your
            business is not verified yet, or the account is suspended.

            - `sandbox_only` (HTTP 403): This endpoint only exists in the
            sandbox.

            - `not_found` (HTTP 404): Nothing with that id .

            - `customer_not_found` (HTTP 404): No customer with that id found.

            - `method_not_allowed` (HTTP 405): That endpoint does not accept
            this HTTP method.

            - `reference_conflict` (HTTP 409): This reference was already used
            for a different request. Use a new reference.

            - `customer_pending` (HTTP 409): This customer is still being set
            up. Retry in a moment with the same reference.

            - `validation_failed` (HTTP 422): One or more fields are missing or
            invalid. `errors` lists them by field name.

            - `unsupported_currency` (HTTP 422): That coin is not supported.

            - `invalid_network` (HTTP 422): The network is missing or not valid
            for that coin.

            - `amount_below_minimum` (HTTP 422): The amount is zero, or below
            the minimum for this action. The message states the minimum.

            - `insufficient_crypto_balance` (HTTP 422): The customer does not
            hold enough of that coin for this sale.

            - `insufficient_wallet_balance` (HTTP 422): Your naira wallet does
            not hold enough for this purchase. Top up in the dashboard.

            - `sale_not_possible` (HTTP 422): The sale could not be started,
            most often because the customer's balance is too low or the amount
            is too small to price. Check the balance and retry.

            - `address_required` (HTTP 422): The customer needs a deposit
            address for that coin first. Generate one, then retry.

            - `customer_limit_reached` (HTTP 422): The sandbox customer limit
            has been reached.

            - `giftcard_unavailable` (HTTP 422): That gift card cannot be sold
            right now, or does not exist.

            - `giftcard_submission_failed` (HTTP 422): The gift card could not
            be submitted.

            - `rate_limited` (HTTP 429): Too many requests. Wait the number of
            seconds in the `Retry-After` header.

            - `service_unavailable` (HTTP 502): Something went wrong on our
            side.

            - `temporarily_unavailable` (HTTP 503): This action is temporarily
            unavailable.
        errors:
          type: object
          description: Field errors, by field name, when `code` is `validation_failed`.
  responses:
    Error:
      description: Something went wrong. Match on `code`, never on `message`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            message: Invalid or missing API key.
            code: invalid_api_key
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key.

````

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