# Get PIN as PINblock Get the card PIN (Personal Identification Number) as a PINblock. PINblocks are 64-bit strings that encode a PIN ready for encryption and secure transmission in banking networks. For more information, refer to the [PIN/PINBlock](doc:pinpinblock-tutorial) tutorial. **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 } }, "schemas": { "AccountID": { "type": "integer", "description": "Pismo account ID", "example": 7654776 }, "CorrelationID": { "type": "string", "description": "Correlation ID used in request x-cid header. This is used to link related API requests and events. For example, if a user makes an authorization request with 10 installments, this generates 1 authorization event and 10 transaction events all containing the same correlation ID. The x-cid can help the Pismo engineering team track everything related to a call. If this field isn't passed, one is generated. You can find the x-cid field in the response header from an API endpoint call.\n", "example": "3b56dbec-e509-9550-8c8c-ae5ab081e4d5" }, "GetPinAsPinblockResponse": { "type": "object", "description": "Card data and PINBlock response object", "properties": { "card_id": { "type": "integer", "description": "Pismo card ID" }, "account_id": { "$ref": "#/components/schemas/AccountID" }, "org_id": { "$ref": "#/components/schemas/OrgID" }, "correlation_id": { "$ref": "#/components/schemas/CorrelationID" }, "pinblock": { "$ref": "#/components/schemas/PinBlock" }, "pan": { "$ref": "#/components/schemas/PrimaryAccountNumber" }, "key_id": { "type": "string", "description": "Generated key ID. \n\nA Zone PIN Key (ZPK) identifier. The ZPK is a data encrypting or decrypting key for PIN transfer between parties. Ffor example, between issuers and processors or acquirers and networks or networks and processors, and so on.\n\nIn a sandbox environment, a fixed ZPK is used:\n\n key_id: 7d14ca2e-1057-11ee-8cee-060f666de710\n\n HSM key: 0404F2543B1C6E70AB61586E1304B6A7\n\nFor production, open a Jira ticket with type = **Configuration**. Request you need the key to use endpoints with PIN management such as PINBLOCK.\n", "example": "32a147ec-b2d9-4b0d-8c5b-557e6cf41e0e" }, "password_updated": { "$ref": "#/components/schemas/PasswordUpdated" } } }, "OrgID": { "type": "string", "description": "Organization/tenant ID", "example": "TN-f878e4a1-2879-48ba-be16-821e73ac98db" }, "PrimaryAccountNumber": { "type": "string", "description": "Card's Primary Account Number (PAN)", "example": "123456******789" }, "PasswordUpdated": { "type": "boolean", "description": "Has password been updated?" }, "PinBlock": { "type": "string", "description": "PINBlocks are 64-bit strings that encode a PIN ready for encryption and secure transmission in banking networks. It contains both the PIN and additional data needed to encrypt it for transmission. The PIN block is typically encrypted using a secure cryptographic algorithm to prevent unauthorized access or tampering during transmission. \n", "example": "4E49BF480C44A36C" } }, "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": { "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" }, "409ConflictPinNull": { "description": "Card PIN must not be null" }, "500InternalServer": { "description": "Internal server error" } } }, "paths": { "/pcicards/v1/pcicards/{cardId}/pinblock": { "get": { "operationId": "get-v1-pin-as-pinblock", "summary": "Get PIN as PINblock", "description": "Get the card PIN (Personal Identification Number) as a PINblock. PINblocks are 64-bit strings that encode a PIN ready for encryption and secure transmission in banking networks.\n\nFor more information, refer to the [PIN/PINBlock](https://developers.pismo.io/pismo-docs/docs/pinpinblock-tutorial) tutorial. \n\n**Note:** This is a PCI endpoint, use the https://gw-pci.pismolabs.io environment.\n", "tags": [ "PCI" ], "parameters": [ { "in": "query", "name": "key-id", "schema": { "type": "string" }, "description": "A Zone PIN Key (ZPK) identifier. The ZPK is a data encrypting or decrypting key for PIN transfer between parties. For example, between issuers and processors or acquirers and networks or networks and processors, and so on.\n\nIn a sandbox environment, a fixed ZPK is used:\n\n key_id: 7d14ca2e-1057-11ee-8cee-060f666de710\n\n HSM key: 0404F2543B1C6E70AB61586E1304B6A7\n\nFor production, open a Jira ticket with type = **Configuration**. Request you need the key to use endpoints with PIN management such as PINBLOCK.\n", "example": "32a147ec-b2d9-4b0d-8c5b-557e6cf41e0e", "required": true }, { "$ref": "#/components/parameters/cardId" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPinAsPinblockResponse" } } }, "description": "Get card PIN as PINBlock success object" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "403": { "$ref": "#/components/responses/403Forbidden" }, "404": { "$ref": "#/components/responses/404NotFound" }, "409": { "$ref": "#/components/responses/409ConflictPinNull" }, "500": { "$ref": "#/components/responses/500InternalServer" } } } } } } ```