# Register UK bank account Register a new bank account with UK's sort code + account number (SCAN) scheme. In UK banking, a sort code is a unique identifier used to route money transfers between banks and financial institutions. Its similar to a routing number in the US. It is a six-digit number that identifies both the bank and the specific branch. Each bank and branch has its own unique sort code. The first two digits identify the bank and the remaining 4 digits identify the branch. To read about Pismo's banking offerings, see [Banking overview](doc:banking-overview). This endpoint generates a Bank account registered event. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Banking - Bank accounts", "version": "1.0.0", "description": "API for managing bank accounts in global formats", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/intl-bankaccounts", "description": "Sandbox API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Bank accounts", "description": "Bank account management endpoints" } ], "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account token - token encoded with Pismo account ID. Tokens can expire quickly, which can result in an **401 Unauthorized** error.", "bearerFormat": "JWT" } }, "parameters": { "accountIDpath": { "name": "accountId", "in": "path", "description": "Pismo account ID", "required": true, "schema": { "type": "string" }, "example": "78123456" }, "auth": { "name": "AuthorizationHeader", "in": "header", "description": "Account token - Token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a **401 Unauthorized** error. \n", "required": true, "schema": { "type": "string" }, "example": 1234 } }, "schemas": { "accountID": { "type": "integer", "description": "Account ID", "example": 78123456 }, "creationDatetime": { "type": "string", "format": "date-time", "description": "Account creation date time displayed in ISO 8601 format `2023-04-12T23:20:50.52Z`.", "example": "2023-04-12T23:20:50.52Z" }, "domain.Error": { "type": "object", "properties": { "code": { "type": "string", "description": "Error type code", "example": "EIBA0001" }, "details": { "type": "string", "description": "Error details", "example": "Key not found" }, "message": { "type": "string", "description": "Error message", "example": "Key not found" } } }, "intlbankaccounts.IntlBankAccountUkScanRequest": { "type": "object", "required": [ "scheme" ], "properties": { "scheme": { "$ref": "#/components/schemas/intlbankaccounts.UkScanScheme" }, "metadata": { "$ref": "#/components/schemas/metadata" } } }, "intlbankaccounts.IntlBankAccountUkScanResponse": { "type": "object", "required": [ "scheme" ], "properties": { "account_id": { "$ref": "#/components/schemas/accountID" }, "creation_datetime": { "$ref": "#/components/schemas/creationDatetime" }, "metadata": { "$ref": "#/components/schemas/metadata" }, "scheme": { "$ref": "#/components/schemas/intlbankaccounts.UkScanScheme" } } }, "intlbankaccounts.UkScanScheme": { "required": [ "account_number", "sort_code" ], "type": "object", "properties": { "account_number": { "type": "string", "maxLength": 8, "description": "Account number" }, "sort_code": { "$ref": "#/components/schemas/sortCode" } } }, "metadata": { "additionalProperties": true, "type": "object", "description": "A set of key-value pairs used to store custom data or additional information." }, "sortCode": { "type": "string", "description": "In UK banking, a sort code is a unique identifier used to route money transfers between banks and financial institutions. Similar to a routing number in the US. It is a six-digit number that identifies both the bank and the specific branch office. Each bank branch office has its own unique sort code. The first two digits identity the bank and the remaining 4 digits identify the branch.\n", "maxLength": 6, "minLength": 6, "example": "123456" } } }, "paths": { "/v2/accounts/{accountId}/bank-accounts/uk-scan": { "post": { "tags": [ "Bank accounts" ], "summary": "Register UK bank account", "description": "Register a new bank account with UK's sort code + account number (SCAN) scheme.\n\nIn UK banking, a sort code is a unique identifier used to route money transfers between banks and financial institutions. Its similar to a routing number in the US. It is a six-digit number that identifies both the bank and the specific branch. Each bank and branch has its own unique sort code. The first two digits identify the bank and the remaining 4 digits identify the branch.\n\nTo read about Pismo's banking offerings, see [Banking overview](https://developers.pismo.io/pismo-docs/docs/banking-overview).\n\nThis endpoint generates a Bank account registered event.\n", "operationId": "post-intl-bank-accounts-v2-accounts-account-id-bank-accounts-uk-scan", "parameters": [ { "$ref": "#/components/parameters/auth" }, { "$ref": "#/components/parameters/accountIDpath" } ], "requestBody": { "description": "Register UK bank account request body", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/intlbankaccounts.IntlBankAccountUkScanRequest" } } }, "required": true }, "responses": { "201": { "description": "Response", "headers": { "x-cid": { "description": "Request tracking identifier.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/intlbankaccounts.IntlBankAccountUkScanResponse" } } } }, "400": { "description": "Bad Request", "headers": { "x-cid": { "description": "Request tracking identifier.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/domain.Error" }, "examples": { "EIBA0009": { "summary": "Validation Error", "value": { "code": "EIBA0009", "message": "Validation error" } }, "EIBA0012": { "summary": "Accounts API invalid request", "value": { "code": "EIBA0012", "message": "Accounts - API returned 4xx error" } } } } } }, "403": { "description": "Forbidden", "headers": { "x-cid": { "description": "Request tracking identifier.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/domain.Error" }, "examples": { "EIBA0006": { "summary": "Missing tenant header", "value": { "code": "EIBA0006", "message": "Missing required header: 'x-tenant'" } }, "EIBA0007": { "summary": "Invalid account ID header", "value": { "code": "EIBA0007", "message": "Invalid account ID header: 'x-account-id'" } }, "EIBA0023": { "summary": "Account status not NORMAL", "value": { "code": "EIBA0023", "message": "Account status not NORMAL" } } } } } }, "404": { "description": "Not Found", "headers": { "x-cid": { "description": "Request tracking identifier.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/domain.Error" }, "examples": { "EIBA0010": { "summary": "Account not found", "value": { "code": "EIBA0010", "message": "Account not found" } } } } } }, "409": { "description": "Conflict", "headers": { "x-cid": { "description": "Request tracking identifier.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/domain.Error" }, "examples": { "EIBA0028": { "summary": "IntlBankAccount Already Exists", "value": { "code": "EIBA0028", "message": "IntlBankAccount - Already Exists" } } } } } }, "500": { "description": "Internal Server", "headers": { "x-cid": { "description": "Request tracking identifier.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/domain.Error" }, "examples": { "EIBA0005": { "summary": "HTTP error", "value": { "code": "EIBA0005", "message": "HTTP error" } }, "EIBA0011": { "summary": "Accounts API server error", "value": { "code": "EIBA0011", "message": "Accounts - API returned 5xx error" } }, "EIBA0013": { "summary": "Accounts API timeout", "value": { "code": "EIBA0013", "message": "Accounts - API timeout" } }, "EIBA0015": { "summary": "Database error", "value": { "code": "EIBA0015", "message": "Database internal error" } } } } } } }, "x-codegen-request-body-name": "RequestBody" } } } } ```