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

# Update gift card activation status

> This endpoint is used to activate gift cards before they're delivered to the customer. Typically used by “adapters” or external web services integrated with gift card applications, so that gift cards can be activated as part of the fabric fulfillment workflow.



## OpenAPI

````yaml shipments.openapi post /shipments/{shipmentId}/actions/update-gift-cards-status
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Orders team
  description: >-
    fabric **Shipments** API is a multi-tenant service that enables you to
    manage shipments for existing 'Allocations.' Shipments serve as records of
    the locations from which an order was fulfilled. Typical user of fabric
    Shipments service is a Warehouse management service or Point of Sale
    service. <p> **Note**: Shipments API relies on the Allocation service to
    send allocation details to external merchant systems after an order is
    placed. Allocation is the prerequisite for using Shipments API.</p>
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: Orders - Shipments API
  version: 3.0.0
  x-audience: external-public
servers:
  - description: Production
    url: https://api.fabric.inc/v3
security:
  - authorization: []
tags:
  - description: >-
      fabric **Shipments** API is a multi-tenant service that enables you to
      manage shipments for existing 'Allocations.' Shipments serve as records of
      the locations from which an order was fulfilled. Typical user of fabric
      Shipments service is a Warehouse management service or Point of Sale
      service. <p> **Note**: Shipments API relies on the Allocation service to
      send allocation details to external merchant systems after an order is
      placed. Allocation is the prerequisite for using Shipments API.</p>
    name: Shipments
externalDocs:
  description: Find out more about fabric Orders (also called OMS)
  url: https://developer.fabric.inc/v3/docs/orders-overview
paths:
  /shipments/{shipmentId}/actions/update-gift-cards-status:
    post:
      tags:
        - Shipments
      summary: Update gift card activation status
      description: >-
        This endpoint is used to activate gift cards before they're delivered to
        the customer. Typically used by “adapters” or external web services
        integrated with gift card applications, so that gift cards can be
        activated as part of the fabric fulfillment workflow.
      operationId: updateGiftCardStatus
      parameters:
        - description: >-
            24-character system-generated shipment ID. It's generated in the
            response of Create Shipment - `POST /shipments` endpoint.
          example: 627963716b19511e8a3a631b
          in: path
          name: shipmentId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/giftCardItemsActivationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/giftCardItem'
                type: array
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '400':
          content:
            application/json:
              example:
                errors:
                  - message: Invalid request
                    type: CLIENT_ERROR
                message: Bad request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '401':
          content:
            application/json:
              example:
                message: Unauthorized request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '404':
          content:
            application/json:
              example:
                message: Shipment not found
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Shipment not found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '500':
          content:
            application/json:
              example:
                message: Internal server error
                type: SERVER_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
components:
  parameters:
    xFabricTenantId:
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      example: 5f328bf0b5f328bf0b5f328b
      in: header
      name: x-fabric-tenant-id
      required: true
      schema:
        type: string
    xFabricChannelId:
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
      example: '12'
      in: header
      name: x-fabric-channel-id
      required: true
      schema:
        type: string
    xFabricRequestId:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      in: header
      name: x-fabric-request-id
      required: false
      schema:
        type: string
  schemas:
    giftCardItemsActivationRequest:
      description: Gift card activation request
      properties:
        items:
          description: Items
          items:
            $ref: '#/components/schemas/giftCardItem'
          maxItems: 1000
          minItems: 1
          type: array
      required:
        - items
      type: object
    giftCardItem:
      description: Gift card details
      properties:
        giftCards:
          description: Gift cards
          items:
            $ref: '#/components/schemas/giftCardActivation'
          maxItems: 100
          minItems: 1
          type: array
        shipmentLineItemId:
          description: >-
            Unique number assigned by merchant to identify item in a shipment.
            When this value isn't provided, fabric will auto generate (UUID
            format) during shipment.
          example: 607f1f77bcf86cd799439011
          type: string
      required:
        - giftCards
        - shipmentLineItemId
      type: object
    errorResponse:
      description: Error response
      properties:
        errors:
          description: Errors
          items:
            $ref: '#/components/schemas/errorResponse'
          type: array
        message:
          description: Error message
          example: Bad request
          type: string
        type:
          description: Error type
          example: CLIENT_ERROR
          type: string
      type: object
    giftCardActivation:
      description: Gift card info
      properties:
        giftCardNumber:
          description: Gift card number
          example: '453456765'
          type: string
        giftCardStatus:
          description: Gift card status
          enum:
            - PENDING_ACTIVATION
            - ACTIVE
            - FAILED
          example: ACTIVE
          type: string
      required:
        - giftCardNumber
        - giftCardStatus
      type: object
  headers:
    xFabricRequestIdResponseHeader:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
      schema:
        type: string
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````