# Create banking asset redemption Create a banking asset redemption. A banking asset redemption is the repayment of the original value of the asset to the investor. If the request succeeds, this endpoint generates an [Asset redeemed](https://developers.pismo.io/events/docs/assets-asset-redemption-1) event and an [Asset status changed](https://developers.pismo.io/events/docs/assets-asset-status-change-1) event. If it fails, it generates an [Asset redemption failed](https://developers.pismo.io/events/docs/assets-asset-redemption-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" }, "AssetRedemption": { "title": "AssetRedemption", "example": { "units": 50, "document_number": "83759935060", "deposit_number": 9999999, "external_id": "cac02d17-2587-4a7e-ae6a-b449049a8529", "redemption_date": "2022-07-01" }, "type": "object", "properties": { "units": { "$ref": "#/components/schemas/Units" }, "document_number": { "$ref": "#/components/schemas/DocumentNumber" }, "external_id": { "$ref": "#/components/schemas/ExternalID" }, "redemption_date": { "$ref": "#/components/schemas/RedemptionDate" }, "deposit_number": { "$ref": "#/components/schemas/DepositNumber" } }, "required": [ "external_id", "units", "document_number" ] }, "AssetRegistrationResponse": { "title": "AssetRegistrationResponse", "type": "object", "properties": { "asset_id": { "$ref": "#/components/schemas/AssetID" }, "message": { "$ref": "#/components/schemas/Message" } }, "required": [ "asset_id", "message" ] }, "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" }, "ExternalID": { "type": "string", "description": "Client-provided external asset ID. No longer than 128 alphanumeric characters.", "example": "93830-FFFF-84940", "minLength": 0, "maxLength": 128 }, "Message": { "type": "string", "description": "Message about asset/quote operation", "example": "Message about request operation", "minLength": 0, "maxLength": 128 }, "RedemptionDate": { "type": "string", "description": "Redemption date, format = yyyy/mm/dd", "example": "2023/03/30" }, "Units": { "type": "integer", "format": "int32", "description": "Number of asset units", "example": 20 } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad Request" }, "401Unauthorized": { "description": "Unauthorized" }, "500InternalServerError": { "description": "Internal server error" }, "404NotFound": { "description": "Not found" } } }, "paths": { "/v2/issuer/{issuer_id}/assets/{asset_id}/redemption": { "put": { "summary": "Create banking asset redemption", "description": "Create a banking asset redemption. A banking asset redemption is the repayment of the original value of the asset to the investor.\n\nIf the request succeeds, this endpoint generates an [Asset redeemed](https://developers.pismo.io/events/docs/assets-asset-redemption-1) event and an [Asset status changed](https://developers.pismo.io/events/docs/assets-asset-status-change-1) event.\nIf it fails, it generates an [Asset redemption failed](https://developers.pismo.io/events/docs/assets-asset-redemption-failure-1) event.\n", "tags": [ "Assets" ], "operationId": "AssetRedemptionV2", "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/AssetRedemption" } } } }, "responses": { "202": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetRegistrationResponse" } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "404": { "$ref": "#/components/responses/404NotFound" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```