# Append issuer script Append issuer script to card that will be applied at the next authorization. You must work with Pismo to pre-register a script and get its script ID. For more information, refer to the [Card scripts](doc:card-scripts) guide. **Note:** This is a PCI endpoint, use the https://gw-pci.pismolabs.io environment. # OpenAPI definition ```json { "openapi": "3.0.1", "info": { "title": "Card issuing - Cards", "version": "1.4.6", "description": "Card endpoints API", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io", "description": "Sandbox API server for testing." }, { "url": "https://gw-pci.pismolabs.io", "description": "Sandbox PCI API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "PCI", "description": "Card PCI/sensitive information endpoints" } ], "components": { "parameters": { "cardId": { "in": "path", "name": "cardId", "schema": { "type": "string" }, "description": "Pismo card ID", "required": true }, "x-AccountIdHeader": { "in": "header", "name": "x-account-id", "schema": { "type": "string" }, "description": "Account ID", "required": true }, "x-TenantHeader": { "in": "header", "name": "x-tenant", "schema": { "type": "string" }, "description": "Organization/tenant ID", "required": true } }, "schemas": { "AccountID": { "type": "integer", "description": "Pismo account ID", "example": 7654776 }, "AppendIssuerScriptBody": { "type": "object", "description": "Object used to append issuer scripts to card", "required": [ "script_id" ], "properties": { "script_id": { "type": "string", "description": "Issuer script ID. Pismo configures a script according to your needs. Contact your Pismo representative to create a script. Once created, Pismo gives you the script ID. \n", "example": "11a10bff-830b-4649-9660-1a01a5e1c192" } } }, "AppendIssuerScriptResponse": { "type": "object", "description": "Response body containing card script created", "properties": { "card_script_id": { "type": "string", "description": "ID of script added to card.", "example": "11a10bff-830b-4649-9660-1a01a5e1c192" }, "org_id": { "$ref": "#/components/schemas/OrgID" }, "card_id": { "$ref": "#/components/schemas/CardID2" }, "account_id": { "$ref": "#/components/schemas/AccountID" }, "script_id": { "$ref": "#/components/schemas/ScriptID" }, "created_at": { "type": "string", "description": "Card script creation date, format = yyyy-MM-dd'T'HH:mm:ss.SSS\"", "example": "2021-10-16T14:09:04.549" }, "applied": { "type": "boolean", "description": "Has script been applied?", "example": false } } }, "CardID2": { "type": "integer", "description": "Pismo card ID", "example": 123456 }, "OrgID": { "type": "string", "description": "Organization/tenant ID", "example": "TN-f878e4a1-2879-48ba-be16-821e73ac98db" }, "ScriptID": { "type": "string", "description": "Issuer script ID. Pismo configures a script according to your needs. Contact your Pismo representative to create a script. Once created, Pismo gives you the script ID. \n", "example": "11a10bff-830b-4649-9660-1a01a5e1c192" } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account token - an access token encoded with a Pismo account ID. Tokens can expire quickly, which can result in an \"Unauthorized\" error.", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad Request" }, "401Unauthorized": { "description": "Access token is missing or invalid" }, "403Forbidden": { "description": "You don't have permission to access this resource" }, "404NotFound": { "description": "The specified resource was not found" }, "500InternalServer": { "description": "Internal server error" } } }, "paths": { "/pcicards/v1/pcicards/{cardId}/scripts": { "post": { "summary": "Append issuer script", "description": "Append issuer script to card that will be applied at the next authorization.\nYou must work with Pismo to pre-register a script and get its script ID.\n\nFor more information, refer to the [Card scripts](https://developers.pismo.io/pismo-docs/docs/card-scripts) guide.\n\n**Note:** This is a PCI endpoint, use the https://gw-pci.pismolabs.io environment.\n", "operationId": "post-v1-append-scripts", "tags": [ "PCI" ], "parameters": [ { "$ref": "#/components/parameters/cardId" }, { "$ref": "#/components/parameters/x-AccountIdHeader" }, { "$ref": "#/components/parameters/x-TenantHeader" } ], "requestBody": { "description": "Request body", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppendIssuerScriptBody" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppendIssuerScriptResponse" } } }, "description": "Response for success append issuer scripts" }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "403": { "$ref": "#/components/responses/403Forbidden" }, "404": { "$ref": "#/components/responses/404NotFound" }, "500": { "$ref": "#/components/responses/500InternalServer" } } } } } } ```