VTEX Gift Card API

The Gift Card API from VTEX — 3 operation(s) for gift card.

Operations 3

POST /giftcards VTex Create a gift card #
GET /giftcards/{giftCardId} VTex Get a gift card by ID #
POST /giftcards/_search VTex List all gift cards #

Documentation

📖
Documentation
https://developers.vtex.com/docs/guides/how-the-integration-protocol-between-vtex-and-antifraud-companies-works
📖
Documentation
https://developers.vtex.com/docs/guides/bulk-import-buyer-organizations-spreadsheet
📖
Documentation
https://developers.vtex.com/docs/guides/catalog-api-seller-portal-overview
📖
Documentation
https://developers.vtex.com/docs/guides/catalog-overview
📖
Documentation
https://developers.vtex.com/docs/guides/checkout-overview
📖
Documentation
https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0
📖
Documentation
https://help.vtex.com/en/tutorial/data-subject-rights--6imchxTx09icupKMbzHVIM
📖
Documentation
https://developers.vtex.com/docs/api-reference/do-api
📖
Documentation
https://developers.vtex.com/docs/guides/managing-vtex-gift-cards
📖
Documentation
https://developers.vtex.com/docs/guides/gift-card-integration-guide
📖
Documentation
https://developers.vtex.com/docs/guides/faststore/headless-cms-overview
📖
Documentation
https://developers.vtex.com/docs/api-reference/vtex-id-api
📖
Documentation
https://help.vtex.com/en/tracks/vtex-intelligent-search--19wrbB7nEQcmwzDPl1l4Cb/3qgT47zY08biLP3d5os3DG
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.search@1.0.8
📖
Documentation
https://help.vtex.com/en/tracks/cms--2YcpgIljVaLVQYMzxQbc3z/1oN446gRGcR2s70RvBCAmj
📖
Documentation
https://developers.vtex.com/docs/guides/search-overview
📖
Documentation
https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3
📖
Documentation
https://developers.vtex.com/docs/guides/fulfillment
📖
Documentation
https://developers.vtex.com/docs/guides/marketplace-overview
📖
Documentation
https://developers.vtex.com/updates/release-notes/marketplace-protocol-documentation-update
📖
Documentation
https://developers.vtex.com/docs/guides/external-marketplace-integration-guide
📖
Documentation
https://developers.vtex.com/docs/guides/external-seller-integration-connector
📖
Documentation
https://developers.vtex.com/docs/guides/external-seller-integration-guide
📖
Documentation
https://help.vtex.com/en/tutorial/master-data--4otjBnR27u4WUIciQsmkAw
📖
Documentation
https://help.vtex.com/en/tutorial/understanding-the-message-center--tutorials_84
📖
Documentation
https://developers.vtex.com/docs/guides/orders-overview
📖
Documentation
https://developers.vtex.com/docs/guides/changes-in-vtex-features-behavior-to-handle-pii-data
📖
Documentation
https://help.vtex.com/en/tutorial/payment-provider-protocol--RdsT2spdq80MMwwOeEq0m
📖
Documentation
https://developers.vtex.com/docs/guides/payments-integration-guide
📖
Documentation
https://help.vtex.com/en/tutorial/vtex-pick-and-pack-last-mile--HN7WKV0xoq2ssVjsJlfzr
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-io-documentation-policies
📖
Documentation
https://developers.vtex.com/docs/guides/pricing-hub
📖
Documentation
https://developers.vtex.com/docs/guides/pricing-overview
📖
Documentation
https://developers.vtex.com/docs/guides/profile-system
📖
Documentation
https://developers.vtex.com/docs/guides/promotions-overview
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.reviews-and-ratings
📖
Documentation
https://developers.vtex.com/docs/guides/sent-offers-integration-guide-connectors
📖
Documentation
https://developers.vtex.com/docs/guides/sessions-system-overview
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-shipping-network
📖
Documentation
https://help.vtex.com/en/tutorial/sku-bindings--1SmrVgNwjJX17hdqwLa0TX
📖
Documentation
https://developers.vtex.com/docs/guides/subscriptions
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.search/suggestions
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-tracking

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/vtex-gift-card-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

vtex-gift-card-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: VTex GiftCard Gift Card API
  description: '>ℹ️ Check the new Payments onboarding guide.'
  contact: {}
  version: '1.0'
servers:
- url: https://{accountName}.{environment}.com.br/api/
  description: VTEX server URL.
  variables:
    accountName:
      description: Name of the VTEX account. Used as part of the URL.
      default: apiexamples
    environment:
      description: Environment to use. Used as part of the URL.
      enum:
      - vtexcommercestable
      default: vtexcommercestable
security:
- appKey: []
  appToken: []
- VtexIdclientAutCookie: []
tags:
- name: Gift Card
paths:
  /giftcards:
    post:
      tags:
      - Gift Card
      summary: VTex Create a gift card
      description: 'Creates a gift card for a specific user.


        >⚠️ The `redemptionCode` field is auto-generated during gift card creation and cannot be set to an arbitrary value.


        ## Permissions


        Any user or application key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:


        | **Product** | **Category** | **Resource** |

        | --------------- | ----------------- | ----------------- |

        | GiftCard | GiftCard | **Gift card full access** |


        There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see Authentication overview.


        >❗ To prevent integrations from having excessive permissions, consider the best practices for managing app keys when assigning License Manager roles to integrations.'
      operationId: CreateGiftCard
      parameters:
      - name: Content-Type
        in: header
        description: Type of the content being sent.
        required: true
        style: simple
        schema:
          type: string
          default: application/json
      - name: Accept
        in: header
        description: HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.
        required: true
        style: simple
        schema:
          type: string
          default: application/json
      requestBody:
        content:
          application/vnd.vtex.giftcard.v1+json:
            schema:
              $ref: '#/components/schemas/CreateGiftCardRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/response'
              example:
                id: '954'
                redemptionToken: 32ScL57220Vapb8pc50HJ3mWH1cl1L8x
                redemptionCode: '***********ASDQ'
                balance: 0
                relationName: cardName
                emissionDate: '2014-04-24T20:22:58.163'
                expiringDate: '2016-01-01T00:00:00'
                caption: Programa Vtex Fidelidade
                currencyCode: USD
                transactions:
                  href: cards/954/transactions
      deprecated: false
  /giftcards/{giftCardId}:
    get:
      tags:
      - Gift Card
      summary: VTex Get a gift card by ID
      description: 'Returns information for a specific gift card.


        ## Permissions


        Any user or application key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:


        | **Product** | **Category** | **Resource** |

        | --------------- | ----------------- | ----------------- |

        | GiftCard | GiftCard | **Gift card full access** |


        There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see Authentication overview.


        >❗ To prevent integrations from having excessive permissions, consider the best practices for managing app keys when assigning License Manager roles to integrations.'
      operationId: GetGiftCardbyID
      parameters:
      - name: Content-Type
        in: header
        description: Type of the content being sent.
        required: true
        style: simple
        schema:
          type: string
          default: application/json
      - name: Accept
        in: header
        description: HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.
        required: true
        style: simple
        schema:
          type: string
          default: application/json
      - name: giftCardId
        in: path
        description: Gift card identification.
        required: true
        style: simple
        schema:
          type: string
          example: '2'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                required:
                - id
                - redemptionToken
                - redemptionCode
                - balance
                - emissionDate
                - expiringDate
                - transactions
                type: object
                properties:
                  id:
                    type: string
                    description: Gift card identification.
                  redemptionToken:
                    type: string
                    description: Gift card redemption token.
                  redemptionCode:
                    type: string
                    description: Gift card identification code used at checkout. Minimum of 6 characters.
                  balance:
                    type: number
                    description: Gift card current balance. For newly created gift cards, the balance will be 0.0.
                  emissionDate:
                    type: string
                    description: Gift card creation date.
                  expiringDate:
                    type: string
                    description: Gift card expiration date.
                  currencyCode:
                    type: string
                    description: Currency code in ISO 4217.
                  transactions:
                    $ref: '#/components/schemas/Transactions'
              example:
                id: '954'
                redemptionToken: 32ScL57220Vapb8pc50HJ3mWH1cl1L8x
                redemptionCode: '***********ASDQ'
                balance: 0
                emissionDate: '2014-04-24T20:22:58.163'
                expiringDate: '2016-01-01T00:00:00'
                currencyCode: USD
                transactions:
                  href: cards/954/transactions
      deprecated: false
  /giftcards/_search:
    post:
      tags:
      - Gift Card
      summary: VTex List all gift cards
      description: 'Returns a list of all gift cards available for a specific customer''s cart.


        ## Permissions


        Any user or application key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:


        | **Product** | **Category** | **Resource** |

        | --------------- | ----------------- | ----------------- |

        | GiftCard | GiftCard | **Gift card full access** |


        There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see Authentication overview.


        >❗ To prevent integrations from having excessive permissions, consider the best practices for managing app keys when assigning License Manager roles to integrations.'
      operationId: SearchGiftCardsfromcartdata
      parameters:
      - name: Content-Type
        in: header
        description: Type of the content being sent.
        required: true
        style: simple
        schema:
          type: string
          default: application/json
      - name: Accept
        in: header
        description: HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.
        required: true
        style: simple
        schema:
          type: string
          default: application/json
      - name: REST-Range
        in: header
        description: Pagination control. This query variable must follow the format _resources={from}-{to}_.
        required: false
        style: simple
        schema:
          type: string
          default: resources=0-49
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetGiftCardusingJSONRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/response2'
              example:
                items:
                - id: '589'
                  _self:
                    href: cards/589
                - id: '590'
                  _self:
                    href: cards/590
                - id: '591'
                  _self:
                    href: cards/591
                - id: '592'
                  _self:
                    href: cards/592
                paging:
                  page: 0
                  perPage: 10
                  total: 4
                  pages: 1
      deprecated: false
components:
  schemas:
    Paging:
      type: object
      required:
      - page
      - perPage
      - total
      - pages
      properties:
        page:
          type: integer
          description: Page number of the gift card list.
          example: 0
        perPage:
          type: integer
          description: Quantity of gift cards per page.
          example: 10
        total:
          type: integer
          description: Total of gift cards in the store.
          example: 4
        pages:
          type: integer
          description: Total number of pages.
          example: 1
    Item:
      type: object
      required:
      - productId
      - id
      - refId
      - name
      - price
      - quantity
      properties:
        productId:
          type: string
          description: Product ID.
          example: '2000000'
        id:
          type: string
          description: The ID of the SKU in VTEX platform.
          example: '2000002'
        refId:
          type: string
          description: Product Reference ID.
          example: MEV41
        name:
          type: string
          description: Product name.
          example: Shoes
        price:
          type: integer
          description: Product price.
          example: 200
        quantity:
          type: integer
          description: Product quantity.
          example: 1
    response:
      type: object
      required:
      - id
      - redemptionToken
      - redemptionCode
      - balance
      - relationName
      - emissionDate
      - expiringDate
      - caption
      - transactions
      properties:
        id:
          type: string
          description: Gift card identification.
          example: '954'
        redemptionToken:
          type: string
          description: Gift card redemption token.
          example: 32ScL57220Vapb8pc50HJ3mWH1cl1L8x
        redemptionCode:
          type: string
          description: Gift card identification code used at checkout. Minimum of 6 characters.
          example: '***********ASDQ'
        balance:
          type: number
          description: Gift card current balance. For newly created gift cards, the balance will be 0.0.
          example: 0
        relationName:
          type: string
          description: Field to be filled in when it is not necessary to use a loyalty program for the gift card. Note that a new `relationNamevalue` is required for each new gift card to be created.
          example: cardName
        emissionDate:
          type: string
          description: Gift card creation date.
          example: '2014-04-24T20:22:58.163'
        expiringDate:
          type: string
          description: Gift card expiration date.
          example: '2016-01-01T00:00:00'
        caption:
          type: string
          description: Field to be filled in if a loyalty program must be created for the Gift Card.
          example: VTEX Loyalty Program
        currencyCode:
          type: string
          description: Currency code in ISO 4217.
          example: USD
        transactions:
          $ref: '#/components/schemas/Transactions'
    GetGiftCardusingJSONRequest:
      type: object
      required:
      - cart
      - client
      properties:
        cart:
          $ref: '#/components/schemas/Cart'
        client:
          $ref: '#/components/schemas/Client'
    response2:
      type: object
      required:
      - items
      - paging
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Item1'
          description: Items information.
        paging:
          $ref: '#/components/schemas/Paging'
    Client:
      type: object
      required:
      - id
      - email
      - document
      properties:
        id:
          type: string
          description: Customer's identification.
          example: 3b1abc17
        email:
          type: string
          description: Customer's email address.
          example: email@domain.com
        document:
          type: string
          description: Document number informed by the customer.
          example: '234235'
    CreateGiftCardRequest:
      type: object
      required:
      - relationName
      - expiringDate
      - caption
      - profileId
      properties:
        relationName:
          type: string
          description: Represents the relationship between the client and the store.
          example: loyalty-program
        expiringDate:
          type: string
          description: It must be in the format `YYYY-MM-DDThh:mm:ss.fff` (ISO 8601 format).
          example: '2020-09-01T13:15:30Z'
        caption:
          type: string
          description: Field to be filled in if a loyalty program must be created for the gift card.
          example: rewards program
        profileId:
          type: string
          description: Client ID. You can use the customer's registered email or the `userId` parameter which can be found in the [Master Data](https://help.vtex.com/en/tutorial/master-data--4otjBnR27u4WUIciQsmkAw).
          example: 92de2449-0e02-4ca9-a4aa-a09cc9d8f7ff
        currencyCode:
          type: string
          description: Currency code in ISO 4217.
          example: USD
        restrictedToOwner:
          type: boolean
          description: The gift card can only be used for a specified client's ID.
          example: false
        multipleCredits:
          type: boolean
          description: The gift card balance can be changed.
          example: false
        multipleRedemptions:
          type: boolean
          description: The gift card can be used to make new purchases until its value is completely used.
          example: false
    Cart:
      type: object
      required:
      - grandTotal
      - relationName
      - redemptionCode
      - discounts
      - shipping
      - taxes
      - items
      - itemsTotal
      properties:
        grandTotal:
          type: integer
          description: Total payment value.
          example: 182
        relationName:
          type:
          - string
          - 'null'
          description: Represents the relationship between the client and the store.
          example: null
        redemptionCode:
          type: string
          description: Gift card identification code used at checkout. Minimum of 6 characters.
          example: BAHD-ASDB-ADQW-ASDQ
        discounts:
          type: integer
          description: Discounts value.
          example: 20
        shipping:
          type: integer
          description: Shipping value.
          example: 2
        taxes:
          type: integer
          description: Taxes value.
          example: 0
        items:
          type: array
          items:
            $ref: '#/components/schemas/Item'
          description: Items information.
        itemsTotal:
          type: integer
          description: Total items value.
          example: 200
    Self:
      type: object
      description: Object that carries an auto reference of the transaction (on its API).
      required:
      - href
      properties:
        href:
          type: string
          description: Gift card resource URL. The first number described in the URL refers to the gift card identification. The second number, refers to the transaction identification.
          example: cards/890/transactions/268
    Item1:
      type: object
      required:
      - id
      - _self
      properties:
        id:
          type: string
          description: Item identification.
          example: '589'
        _self:
          $ref: '#/components/schemas/Self'
    Transactions:
      type: object
      description: Transactions information.
      required:
      - href
      properties:
        href:
          type: string
          description: Gift card resource URL. The number described in the URL refers to the gift card identification.
          example: cards/954/transactions
  securitySchemes:
    appKey:
      type: apiKey
      in: header
      name: X-VTEX-API-AppKey
      description: Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys).
    appToken:
      type: apiKey
      in: header
      name: X-VTEX-API-AppToken
      description: Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys).
    VtexIdclientAutCookie:
      type: apiKey
      in: header
      name: VtexIdclientAutCookie
      description: '[User token](https://developers.vtex.com/docs/guides/api-authentication-using-user-tokens), valid for 24 hours.'