# Transfer card tokens to other card Transfer all active tokens (activated/suspended) from one card to another This endpoint generates a [PAN updated](https://developers.pismo.io/events/docs/cards-tokenization-pan-update-1) event. **Notes**: * This endpoint requires an account token - an access token encoded with a Pismo account ID. * This is a PCI endpoint, use the https://gw-pci.pismolabs.io/cards-tokenization environment. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Card issuing - Tokenization", "description": "API endpoints for card tokenization.", "version": "1.0.0", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://gw-pci.pismolabs.io/cards-tokenization", "description": "PCI API server for testing" }, { "url": "https://pci.pismolabs.io/cards-tokenization", "description": "Sandbox API server for testing." } ], "tags": [ { "name": "Card lifecycle", "description": "Card lifecycle endpoints" } ], "components": { "parameters": { "CardIDpath": { "name": "cardId", "in": "path", "schema": { "type": "string" }, "description": "Pismo card ID", "required": true } }, "schemas": { "ErrorObject": { "type": "object", "description": "Standard error object", "properties": { "error_code": { "type": "string", "description": "Error code" }, "message": { "type": "string", "description": "Error message" } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account token - token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a \"**401 Unauthorized**\" error.", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "examples": { "example-1": { "value": { "error_code": "ERR93836", "message": "Card profile can't be null" } } } } } }, "401Unauthorized": { "description": "Access token is missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "examples": { "example-1": { "value": { "error_code": "ERR9786", "message": "Access token is missing or invalid" } } } } } }, "500InternalServerError": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "examples": { "example-1": { "value": { "error_code": "ERR5446", "message": "Internal server error" } } } } } } } }, "security": [ { "BearerAuth": [] } ], "paths": { "/v1/cards/{cardId}/network-tokens/pan-update": { "post": { "summary": "Transfer card tokens to other card", "description": "Transfer all active tokens (activated/suspended) from one card to another\n\nThis endpoint generates a [PAN updated](https://developers.pismo.io/events/docs/cards-tokenization-pan-update-1) event.\n\n\n**Notes**: \n * This endpoint requires an account token - an access token encoded with a Pismo account ID.\n\n * This is a PCI endpoint, use the https://gw-pci.pismolabs.io/cards-tokenization environment.\n", "operationId": "transfertokens", "tags": [ "Card lifecycle" ], "parameters": [ { "$ref": "#/components/parameters/CardIDpath" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "new_card_id": { "type": "number", "description": "ID of card to receive tokens", "example": 51331 } } } } } }, "responses": { "202": { "description": "Success" }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```