# Update card on file Updates a card on file - change the card name, status, or profile. You must pass the card uuid token as a body parameter to identify the card. Fields that are not passed are not updated. This endpoint generates a [Card on file updated](https://developers.pismo.io/events/docs/cardsonfile-patch-cards-1) event. If the card status is being changed to `SUSPENDED`, it also generates a [Card excluded](https://developers.pismo.io/events/docs/cardsonfile-exclusion-1) event. **Note**: This is a PCI endpoint, use the https://gw-pci.pismolabs.io environment. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Card issuing - Cards on file", "version": "2.0.0", "description": "Tokenize cards and manage digital wallets", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://gw-pci.pismolabs.io", "description": "Sandbox PCI API server for testing" }, { "url": "https://sandbox.pismolabs.io", "description": "Sandbox API server for testing" } ], "tags": [ { "name": "Cards on file", "description": "Cards on file management" } ], "components": { "parameters": { "authPath": { "name": "Authorization", "in": "header", "schema": { "type": "string" }, "required": true, "description": "Account access token. An account token is embedded with an account ID. Tokens can expire quickly, which can result in an Unauthorized message.\n" } }, "schemas": { "CardName": { "type": "string", "description": "Card alias name. No limit.", "example": "Vacation card" }, "CardsOnFileErrorResponse": { "properties": { "error_code": { "type": "string", "description": "Error code" }, "message": { "type": "string", "description": "Error message" } } }, "CardsOnFilePatch": { "type": "object", "required": [ "card_stored_uuid" ], "properties": { "card_stored_uuid": { "$ref": "#/components/schemas/CardStoredUuid" }, "card_name": { "$ref": "#/components/schemas/CardName" }, "card_profile": { "$ref": "#/components/schemas/CardProfile" }, "metadata": { "$ref": "#/components/schemas/Metadata" }, "status": { "type": "string", "description": "Card-on-file token status - `ACTIVE` or `SUSPENDED`.", "enum": [ "", "ACTIVE", "SUSPENDED" ], "example": "SUSPENDED" } }, "example": { "card_name": "National Bank MC", "card_profile": "0XFF00FF", "card_stored_uuid": "77cdd87e-b9b6-11ec-b4f5-4a7a44f81261", "metadata": "{'Bank': 'National MC'}", "status": "SUSPENDED" } }, "CardStoredUuid": { "type": "string", "description": "API-generated card token from registration. This is NOT a field you can change, but it must be passed to identify the card.\n", "example": "uuid-a-1ffff" }, "CardProfile": { "type": "string", "description": "Network card profile identifier or HEX color. A profile or HEX color determines a card's appearance in a mobile payment app or payment system. Issuers are responsible for configuring card profiles with the card network.\n", "example": "0XFFFFFF" }, "Metadata": { "type": "string", "description": "Any data object with key/value pairs. No limit on length.", "example": "{ \"key\": \"value\"}" } }, "responses": { "400BadRequest": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardsOnFileErrorResponse" } } } }, "500InternalServer": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardsOnFileErrorResponse" } } } } } }, "paths": { "/cardsonfile/v2/cardsonfile/cards": { "patch": { "summary": "Update card on file", "description": "Updates a card on file - change the card name, status, or profile. You must pass the card uuid token as a body parameter to identify the card.\n\nFields that are not passed are not updated.\n\nThis endpoint generates a [Card on file updated](https://developers.pismo.io/events/docs/cardsonfile-patch-cards-1) event. If the card status is being changed to `SUSPENDED`, it also generates a [Card excluded](https://developers.pismo.io/events/docs/cardsonfile-exclusion-1) event.\n\n**Note**: This is a PCI endpoint, use the https://gw-pci.pismolabs.io environment.\n", "operationId": "updates-a-cardsonfile", "tags": [ "Cards on file" ], "parameters": [ { "$ref": "#/components/parameters/authPath" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardsOnFilePatch" } } } }, "responses": { "200": { "description": "SUCCESS" }, "400": { "$ref": "#/components/responses/400BadRequest" }, "500": { "$ref": "#/components/responses/500InternalServer" } } } } } } ```