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

# Provision Card to Apple

> Provisions a card for Apple Wallet by passing required client device and wallet parameters.




## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/chron/openapi.documented.yml post /v1/cards/{cardId}/provision/apple
openapi: 3.0.3
info:
  title: Digital Gift Card Issuing API
  version: 1.0.0
  description: |
    API for issuing and managing digital gift cards.
servers:
  - url: https://api.chron.com
security:
  - bearerAuth: []
paths:
  /v1/cards/{cardId}/provision/apple:
    post:
      summary: Provision Card to Apple
      description: >
        Provisions a card for Apple Wallet by passing required client device and
        wallet parameters.
      operationId: provisionApple
      parameters:
        - $ref: '#/components/parameters/CardIdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProvisionToAppleRequest'
      responses:
        '200':
          description: Card provisioned to Apple successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProvisionToAppleResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Card not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid request payload or card state for provisioning.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Chron from '@chron/sdk';


            const client = new Chron({
              apiKey: 'My API Key',
            });


            const response = await
            client.cards.provision.apple('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            {
              clientDeviceID: 'clientDeviceID',
              clientWalletAccountID: 'clientWalletAccountID',
              clientWalletProvider: 'clientWalletProvider',
            });


            console.log(response.activationData);
components:
  parameters:
    CardIdParam:
      name: cardId
      in: path
      required: true
      description: Unique identifier for the card.
      schema:
        type: string
        format: uuid
  schemas:
    ProvisionToAppleRequest:
      type: object
      properties:
        clientDeviceID:
          type: string
          description: The identifier for the client device.
        clientWalletProvider:
          type: string
          description: The wallet provider code.
        clientWalletAccountID:
          type: string
          description: The wallet account identifier.
      required:
        - clientDeviceID
        - clientWalletProvider
        - clientWalletAccountID
    ProvisionToAppleResponse:
      type: object
      properties:
        primaryAccountNumberPrefix:
          type: string
          description: The prefix of the primary account number.
        activationData:
          type: string
          description: The activation data provided by Apple.
        authenticationData:
          type: string
          description: The authentication data provided by Apple.
      required:
        - primaryAccountNumberPrefix
        - activationData
        - authenticationData
    ErrorResponse:
      type: object
      properties:
        errorCode:
          type: string
          description: A machine-readable error code.
        message:
          type: string
          description: A human-readable error message.
        details:
          type: object
          additionalProperties: true
          description: Additional details about the error.
      required:
        - errorCode
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````