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

# Update a gift card

> Update a gift card



## OpenAPI

````yaml /api/openapi.json patch /v1/gift-cards/{id}
openapi: 3.0.0
info:
  title: Vori API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.vori.com
    description: production
security: []
tags: []
paths:
  /v1/gift-cards/{id}:
    patch:
      tags:
        - Gift cards
      summary: Update a gift card
      description: Update a gift card
      operationId: updateGiftCard
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGiftCardRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GiftCard'
        '400':
          description: ''
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GiftCardDeactivatedError'
                  - $ref: '#/components/schemas/ConflictingPropertyValuesError'
                  - $ref: '#/components/schemas/DuplicateBarcodeError'
                  - $ref: '#/components/schemas/ExistingOwnerError'
                  - $ref: >-
                      #/components/schemas/PhysicalGiftCardDisassociationMissingOwnerError
                  - $ref: '#/components/schemas/UpdateTooManyAccountNumbers'
                  - $ref: '#/components/schemas/UpdateTooManyBarcodes'
        '403':
          description: ''
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InsufficientPermissionsError'
                  - $ref: '#/components/schemas/NoBannerAssociationError'
        '404':
          description: ''
      security:
        - bearer: []
components:
  schemas:
    UpdateGiftCardRequest:
      type: object
      properties:
        employee_id:
          type: string
          description: >-
            ID of the employee responsible. Only a register sends one, and it is
            required there; a back-office session records the signed-in user,
            and an API credential records itself.
        idempotency_key:
          type: string
          description: Idempotency key to avoid duplicate transactions.
        magstripe_account_numbers:
          description: >-
            The desired end state of which magnetic-stripe account numbers
            (physical gift cards) are associated with the specified gift card.
            If this field is not provided, no account numbers will be modified.
          type: array
          items:
            type: string
        owner_phone_number:
          type: string
          description: >-
            Phone number of the Shopper who will own this gift card. This
            shopper will receive messages about this and future transactions.
          format: phone
          pattern: ^\+[1-9]\d{1,14}$
        physical_barcodes:
          description: >-
            The desired end state of which barcodes (physical gift cards) are
            associated with the specified gift card. If this field is not
            provided, no barcodes will be modified.
          type: array
          items:
            type: string
      required:
        - idempotency_key
    GiftCard:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the record.
        balance:
          type: string
          description: Current balance on the gift card.
          format: monetary
          example: '199.99'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        barcodes:
          description: >-
            Barcodes on the physical cards backing this gift card, across the
            card and any cards merged into it.
          type: array
          items:
            type: string
        created_at:
          type: string
          description: When the record was created.
          format: date-time
        deactivated_at:
          type: string
          nullable: true
          description: When the gift card was deactivated, or null when it is active.
          format: date-time
        deactivated_by_api_client_id:
          type: string
          nullable: true
          description: >-
            ID of the API credential that deactivated the gift card, or null
            when it is active or was deactivated by a person.
        deactivated_by_employee_id:
          type: string
          nullable: true
          description: >-
            ID of the employee who deactivated the gift card, or null when it is
            active or was deactivated by another actor.
        deactivated_by_user_id:
          type: string
          nullable: true
          description: >-
            ID of the back-office user who deactivated the gift card, or null
            when it is active or was deactivated by another actor.
        deactivation_reason:
          type: string
          nullable: true
          description: >-
            Reason recorded when the gift card was deactivated, or null when it
            is active.
        last_order_at:
          type: string
          nullable: true
          description: >-
            When the gift card was last used in a sale or refund, or null when
            it has not been used yet.
          format: date-time
        magstripe_account_numbers:
          description: >-
            Account numbers encoded on the magnetic stripe of the physical
            cards.
          type: array
          items:
            type: string
        owner_id:
          type: string
          nullable: true
          description: >-
            ID of the shopper who owns the gift card, or null when it has no
            owner.
        printed_account_numbers:
          description: Account numbers printed on the physical cards.
          type: array
          items:
            type: string
        purchaser_id:
          type: string
          nullable: true
          description: ID of the shopper who purchased the gift card, or null when unknown.
        shopper_facing_id:
          type: string
          description: >-
            Short human-readable ID for the gift card, shown to shoppers on
            receipts and messages.
        status:
          description: >-
            Whether the gift card is active and can be used, or has been
            deactivated.
          allOf:
            - $ref: '#/components/schemas/GiftCardStatus'
        updated_at:
          type: string
          description: When the record was last changed.
          format: date-time
      description: >-
        A prepaid balance a shopper spends at the register. It can be digital,
        tied to a shopper, or backed by one or more physical cards. A gift card
        belongs to the banner rather than to any one store, and can be sold,
        redeemed, or reloaded at any of its registers.
      required:
        - id
        - balance
        - barcodes
        - created_at
        - deactivated_at
        - deactivated_by_api_client_id
        - deactivated_by_employee_id
        - deactivated_by_user_id
        - deactivation_reason
        - last_order_at
        - magstripe_account_numbers
        - owner_id
        - printed_account_numbers
        - purchaser_id
        - shopper_facing_id
        - status
        - updated_at
    GiftCardDeactivatedError:
      type: object
      properties:
        error_code:
          type: string
          enum:
            - gift_card_deactivated
      required:
        - error_code
    ConflictingPropertyValuesError:
      type: object
      properties:
        error_code:
          type: string
          enum:
            - conflicting_property_values
      required:
        - error_code
    DuplicateBarcodeError:
      type: object
      properties:
        barcode:
          type: string
        error_code:
          type: string
          enum:
            - duplicate_barcode
        gift_card_id:
          type: string
      required:
        - barcode
        - error_code
        - gift_card_id
    ExistingOwnerError:
      type: object
      properties:
        error_code:
          type: string
          enum:
            - existing_owner
        owner_id:
          type: string
      required:
        - error_code
        - owner_id
    PhysicalGiftCardDisassociationMissingOwnerError:
      type: object
      properties:
        error_code:
          type: string
          enum:
            - physical_gift_card_disassociation_missing_owner
        gift_card_id:
          type: string
      required:
        - error_code
        - gift_card_id
    UpdateTooManyAccountNumbers:
      type: object
      properties:
        account_numbers:
          type: array
          items:
            type: string
        error_code:
          type: string
          enum:
            - update_too_many_account_numbers
        gift_card_ids:
          type: array
          items:
            type: string
        new_account_numbers:
          type: array
          items:
            type: string
      required:
        - account_numbers
        - error_code
        - gift_card_ids
        - new_account_numbers
    UpdateTooManyBarcodes:
      type: object
      properties:
        barcodes:
          type: array
          items:
            type: string
        error_code:
          type: string
          enum:
            - update_too_many_barcodes
        gift_card_ids:
          type: array
          items:
            type: string
        new_barcodes:
          type: array
          items:
            type: string
      required:
        - barcodes
        - error_code
        - gift_card_ids
        - new_barcodes
    InsufficientPermissionsError:
      type: object
      properties:
        error_code:
          type: string
          enum:
            - insufficient_permissions
        error_details:
          $ref: '#/components/schemas/InsufficientPermissionsErrorDetails'
      required:
        - error_code
        - error_details
    NoBannerAssociationError:
      type: object
      properties:
        error_code:
          type: string
          enum:
            - no_banner_association
      required:
        - error_code
    GiftCardStatus:
      type: string
      enum:
        - active
        - deactivated
    InsufficientPermissionsErrorDetails:
      type: object
      properties:
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
        resource:
          allOf:
            - $ref: '#/components/schemas/Resource'
      required:
        - action
        - resource
    Action:
      type: string
      enum:
        - '*'
        - cancel
        - check_in
        - create
        - delete
        - read
        - read_credentials
        - record_events
        - refund
        - restart
        - update
        - void
    Resource:
      type: string
      enum:
        - '*'
        - accounting_integration
        - agent_chats
        - api_clients
        - asynchronous_tasks
        - banners
        - blackhawk_transactions
        - capabilities
        - coupons
        - custom_quick_actions
        - datacap_transactions
        - departments
        - discounts
        - ditto_auth_tokens
        - edge_agents
        - electronic_shelf_labels
        - employees
        - feature_orientations
        - files
        - food_modifiers
        - gift_cards
        - gl_code_mappings
        - house_accounts
        - inventory
        - inventory_sessions
        - inventory_settings
        - invoices
        - item_modifiers
        - label_dimension_sets
        - label_sheet_profiles
        - label_stock_products
        - lanes
        - loyalty_bonuses
        - loyalty_campaigns
        - loyalty_rewards
        - notification_templates
        - offers
        - order_guides
        - pos_banner_configurations
        - pos_orders
        - pos_tills
        - price_tags
        - product_ranges
        - products
        - promotions
        - purchase_orders
        - receiving
        - reporting
        - revision_sessions
        - revisions
        - roles
        - shopper_tags
        - shoppers
        - store_product_inventory_counts
        - store_product_lots
        - store_product_rules
        - store_product_tag_templates
        - store_snap_incentive_program_coupons
        - store_vendor_merge_requests
        - store_vendor_product_merge_requests
        - store_vendor_products
        - store_vendors
        - stores
        - tag_printings
        - tag_template_presets
        - tag_templates
        - tax_rates
        - users
        - variable_weights
        - vendor_merge_requests
        - vendor_product_merge_requests
        - vendors
        - wallet_payments
        - wic_products
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

## Related topics

- [Manage Gift Cards](/point-of-sale-pos/vori-store-gift-cards/manage-gift-cards.md)
- [Order & Customize Physical Gift Cards](/point-of-sale-pos/vori-store-gift-cards/how-to-order-and-customize-physical-gift-cards.md)
- [Reissue a gift card](/api-reference/gift-cards/reissue-a-gift-card.md)
