# Card token operation Perform token operation for card identified in path. # 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": { "CardIDpath2": { "name": "card_id", "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" } } }, "TokenOperationByCard": { "type": "object", "required": [ "operation_reason", "operation_type" ], "properties": { "operation_reason": { "type": "string", "description": "Token operation reason. Be descriptive, it should be clear what the customer needs to do.", "maxLength": 255, "example": "Suspended due to lost device." }, "operation_type": { "type": "string", "description": "Token operation to execute", "enum": [ "SUSPEND", "RESUME", "DELETE" ], "example": "SUSPEND" }, "operator_id": { "type": "string", "description": "Client-generated ID for person or system performing the operation.", "example": "NbChEH" } } } }, "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" } } }, "security": [ { "BearerAuth": [] } ], "paths": { "/v1/cards/{card_id}": { "post": { "summary": "Card token operation", "description": "Perform token operation for card identified in path.\n", "operationId": "card-token-operation", "tags": [ "Card lifecycle" ], "parameters": [ { "$ref": "#/components/parameters/CardIDpath2" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenOperationByCard" } } } }, "responses": { "200": { "description": "No Content" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "examples": { "example-1": { "summary": "example errors", "value": { "message": "Fail on send event" } }, "example-2": { "summary": "400BadRequest", "value": { "message": "network respond bad request error", "error_code": "ERR4021" } }, "example-3": { "summary": "404NotFound", "value": { "message": "Token not found", "error_code": "ERR4091" } } } } } }, "500": { "description": "Internal server error" } } } } } } ```