> ## 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.

# Reissue or Replace a Card

> Generates a new digital gift card to replace an existing one. Unloads funds from the original and adds them to the newly created card.




## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/chron/openapi.documented.yml post /v1/cards/{cardId}/reissue
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}/reissue:
    post:
      summary: Reissue or Replace a Card
      description: >
        Generates a new digital gift card to replace an existing one. Unloads
        funds from the original and adds them to the newly created card.
      operationId: reissueCard
      parameters:
        - $ref: '#/components/parameters/CardIdParam'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReissueCardRequest'
      responses:
        '200':
          description: Card reissued successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Card'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Card not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Card is not in a state that permits reissuance.
          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 card = await
            client.cards.reissue('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(card.cardId);
components:
  parameters:
    CardIdParam:
      name: cardId
      in: path
      required: true
      description: Unique identifier for the card.
      schema:
        type: string
        format: uuid
  schemas:
    ReissueCardRequest:
      type: object
      properties:
        reason:
          type: string
          description: Optional reason for reissuing the card.
    Card:
      type: object
      properties:
        cardId:
          type: string
          format: uuid
          description: Unique identifier for the card.
        clientReference:
          type: string
          description: Unique identifier provided by the client to prevent duplication.
        status:
          type: string
          description: Current status of the card.
          enum:
            - WAITING_ACTIVATION
            - ACTIVE
            - CANCELLED
            - BLOCKED
            - REISSUED
            - EXPIRED
        initialBalance:
          type: number
          description: The starting balance on the card.
        currentBalance:
          type: number
          description: The current available balance.
        expiryDate:
          type: string
          format: date-time
          description: The date and time when the card expires.
        design:
          type: string
          description: The design or template selected for the card.
        metadata:
          type: object
          additionalProperties: true
          description: Updateable custom data associated with the card.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the card was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the card was last updated.
        activatedAt:
          type: string
          format: date-time
          description: Timestamp when the card was activated (if applicable).
        cancelledAt:
          type: string
          format: date-time
          description: Timestamp when the card was cancelled (null if not cancelled).
        cancellationAmount:
          type: number
          description: >-
            The amount that was unloaded from the card at cancellation (null if
            not cancelled).
        cancellationAction:
          type: string
          description: Action that led to the card's cancellation.
          enum:
            - EXPIRY
            - CANCELLATION
            - REISSUE
        transactions:
          type: array
          description: A list of transactions associated with the card.
          items:
            $ref: '#/components/schemas/Transaction'
      required:
        - cardId
        - clientReference
        - status
        - initialBalance
        - expiryDate
        - design
        - metadata
        - createdAt
        - updatedAt
    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
    Transaction:
      type: object
      properties:
        transactionId:
          type: string
          description: Unique identifier for the transaction.
        amount:
          type: number
          description: The amount for the transaction.
        type:
          type: string
          description: Type of transaction.
          enum:
            - LOAD
            - UNLOAD
            - PURCHASE
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the transaction was recorded.
      required:
        - transactionId
        - amount
        - type
        - createdAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````