# Migrate banking asset Migrate banking asset If the request succeeds, this endpoint generates an asset_block-1 event. If it fails, it generates an asset_block_failure-1 event. # OpenAPI definition ```json { "openapi": "3.0.3", "info": { "title": "Banking - Assets", "version": "1.0.0", "description": "API to handle banking assets operations and management", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/assets-accrual", "description": "Sandbox API server for testing" }, { "url": "https://sandbox.pismolabs.io/assets-accrual", "description": "Sandbox API for oauth2" }, { "url": "https://api.pismolabs.io/assets-accrual", "description": "API server for production" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Assets", "description": "Asset endpoints" } ], "components": { "parameters": { "AssetID": { "name": "asset_id", "in": "path", "description": "Client assigned asset ID. Must consist of the characters [a-z,A-Z,0-9,-,:] with a range from 1 to 128.\n", "required": true, "schema": { "type": "string" }, "example": "2345" }, "CorrelationID": { "in": "header", "name": "x-cid", "schema": { "type": "string" }, "description": "The Correlation IDentifier field is used to link related API requests and events. The x-cid can help the Pismo engineering team track everything related to a call. You can find the x-cid field in the response header from an API endpoint call.\n\nIf this field isn't passed, one is automatically generated.\n", "example": "5bb05174-4e80-11ea-b77f-2e728ce88125" }, "IssuerID": { "name": "issuer_id", "in": "path", "required": true, "description": "Issuer ID. For more information, refer to [issuer identification number](https://www.investopedia.com/terms/i/issuer-identification-number-iin.asp)", "schema": { "type": "string" }, "example": "24" } }, "schemas": { "AssetID": { "type": "string", "description": "Asset ID. This ID is client-generated. It must be between 1 and 128 characters long and consist of only the characters [a-z,A-Z,0-9,-,:].", "minLength": 1, "maxLength": 128, "example": "6ea8094b-73ba-4737-93ad-370c27c54813" }, "AssetMigrate": { "type": "object", "properties": { "asset_type": { "$ref": "#/components/schemas/AssetType" }, "document_number": { "$ref": "#/components/schemas/DocumentNumber" }, "deposit_number": { "$ref": "#/components/schemas/DepositNumber" } } }, "AssetType": { "type": "string", "description": "Asset type, `cdb` (certificate of deposit) or `rdb` (bank deposit receipt)", "enum": [ "cdb", "rdb" ], "example": "cdb" }, "DepositNumber": { "type": "integer", "format": "int32", "description": "Deposit number", "example": 567339022 }, "DocumentNumber": { "type": "string", "description": "A government document number, such as a social security number (US). Must be numeric with 11-14 digits.\n", "minLength": 1, "maxLength": 14, "example": "123412341234" }, "Message": { "type": "string", "description": "Message about asset/quote operation", "example": "Message about request operation", "minLength": 0, "maxLength": 128 } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "responses": { "202AssetMigrateResponse": { "description": "ACCEPTED", "content": { "application/json": { "schema": { "type": "object", "properties": { "asset_id": { "$ref": "#/components/schemas/AssetID" }, "message": { "$ref": "#/components/schemas/Message" } } } } } }, "400BadRequest": { "description": "Bad Request" }, "401Unauthorized": { "description": "Unauthorized" }, "500InternalServerError": { "description": "Internal server error" }, "404NotFound": { "description": "Not found" } } }, "paths": { "/v1/issuer/{issuer_id}/assets/{asset_id}/migrate": { "post": { "summary": "Migrate banking asset", "description": "Migrate banking asset\n\nIf the request succeeds, this endpoint generates an asset_block-1 event.\nIf it fails, it generates an asset_block_failure-1 event.\n", "tags": [ "Assets" ], "operationId": "postAssetBlock", "parameters": [ { "$ref": "#/components/parameters/CorrelationID" }, { "$ref": "#/components/parameters/IssuerID" }, { "$ref": "#/components/parameters/AssetID" } ], "requestBody": { "description": "Request body", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetMigrate" } } } }, "responses": { "202": { "$ref": "#/components/responses/202AssetMigrateResponse" }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "404": { "$ref": "#/components/responses/404NotFound" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```