# Register banking asset Register a banking asset with the Pismo platform. A banking asset is either a certificate of deposit or a bank receipt. This endpoint generates an [Asset registration succeeded](https://developers.pismo.io/events/docs/assets-asset-registration-success-1) event if it succeeds or an [Asset registration failed](https://developers.pismo.io/events/docs/assets-asset-registration-failure-1) event if it doesn't. # 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": { "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": { "AccrualFrequency": { "type": "string", "description": "Accrual frequency:\n* `daily` — Accrual for assets daily\n* `monthly` — Accrual for assets monthly\n", "enum": [ "daily", "monthly" ], "example": "daily" }, "AdditionalData": { "title": "AdditionalData", "example": { "early_redemption_attributes": [ { "date": "2021-02-01", "interest_rate": 1.09, "floating_rate": 1.18 }, { "date": "2021-03-01", "interest_rate": 100000000000001.1, "floating_rate": 1.15 } ] }, "type": "object", "properties": { "early_redemption_attributes": { "type": "array", "items": { "$ref": "#/components/schemas/EarlyRedemptionAttribute" } } } }, "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" }, "AssetType": { "type": "string", "description": "Asset type, `cdb` (certificate of deposit) or `rdb` (bank deposit receipt)", "enum": [ "cdb", "rdb" ], "example": "cdb" }, "AssetRegistration": { "title": "AssetRegistration", "example": { "asset_id": "cac02d17-2587-4a7e-ae6a-b449049a8529", "registration_mode": "many", "asset_type": "cdb", "issuing_date": "2021-04-16", "maturity_date": "2021-04-20", "purchased_units": 10, "issued_units": 1000, "unit_value": 9.99, "index_type": "di", "index_rate": 1, "customer_type": "natural", "customer_name": "Al Fresco", "document_number": "83759935060", "deposit_number": 9999999, "early_redemption_terms": "no", "currency": "986", "external_id": "external-test-cac02d17-2587-4a7e-ae6a-b449049a8529", "accrual_frequency": "daily" }, "properties": { "asset_id": { "$ref": "#/components/schemas/AssetID" }, "registration_mode": { "$ref": "#/components/schemas/RegistrationMode" }, "asset_type": { "$ref": "#/components/schemas/AssetType" }, "issuing_date": { "$ref": "#/components/schemas/IssuingDate" }, "maturity_date": { "$ref": "#/components/schemas/MaturityDate" }, "issued_units": { "$ref": "#/components/schemas/IssuedUnits" }, "unit_value": { "$ref": "#/components/schemas/UnitValue" }, "index_type": { "$ref": "#/components/schemas/IndexType" }, "index_rate": { "$ref": "#/components/schemas/IndexRate" }, "customer_type": { "$ref": "#/components/schemas/CustomerType" }, "document_number": { "$ref": "#/components/schemas/DocumentNumber" }, "deposit_number": { "$ref": "#/components/schemas/DepositNumber" }, "early_redemption_terms": { "$ref": "#/components/schemas/EarlyRedemptionTerms" }, "currency": { "$ref": "#/components/schemas/Currency" }, "customer_name": { "$ref": "#/components/schemas/CustomerName" }, "purchased_units": { "$ref": "#/components/schemas/PurchasedUnits" }, "additional_data": { "$ref": "#/components/schemas/AdditionalData" }, "external_id": { "$ref": "#/components/schemas/ExternalID" }, "accrual_frequency": { "$ref": "#/components/schemas/AccrualFrequency" } }, "required": [ "asset_id", "registration_mode", "asset_type", "issuing_date", "maturity_date", "issued_units", "unit_value", "index_type", "index_rate", "customer_type", "document_number", "deposit_number", "early_redemption_terms", "currency" ] }, "AssetRegistrationResponse": { "title": "AssetRegistrationResponse", "type": "object", "properties": { "asset_id": { "$ref": "#/components/schemas/AssetID" }, "message": { "$ref": "#/components/schemas/Message" } }, "required": [ "asset_id", "message" ] }, "Currency": { "type": "string", "description": "1SO 4217 currency code", "example": "986" }, "CustomerName": { "type": "string", "description": "Customer name - max length is 128 chars", "minLength": 1, "maxLength": 128, "example": "Bud Whyser" }, "CustomerType": { "type": "string", "description": "Customer type - `natural` or `legal`. A `natural` customer is an individual, a `legal` customer is a corporation or other legal entitiy type.", "enum": [ "natural", "legal" ], "example": "natural" }, "Date": { "type": "string", "description": "Redemption date, format = yyyy/mm/dd.", "example": "2023/03/22" }, "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" }, "EarlyRedemptionAttribute": { "title": "EarlyRedemptionAttribute", "example": { "date": "2021-02-01", "interest_rate": 1.09, "floating_rate": 1.18 }, "type": "object", "properties": { "date": { "$ref": "#/components/schemas/Date" }, "interest_rate": { "$ref": "#/components/schemas/InterestRate" }, "floating_rate": { "$ref": "#/components/schemas/FloatingRate" } } }, "EarlyRedemptionTerms": { "type": "string", "description": "Early redemption terms:\n* `yes` — Has early redemption terms\n* `no` — Does not have early redemption terms\n* `market` — Redeem at market\n", "enum": [ "yes", "no", "market" ], "example": "market" }, "ExternalID": { "type": "string", "description": "Client-provided external asset ID. No longer than 128 alphanumeric characters.", "example": "93830-FFFF-84940", "minLength": 0, "maxLength": 128 }, "FloatingRate": { "type": "number", "format": "double", "description": "Floating rate", "example": 2.33 }, "IndexRate": { "type": "number", "format": "double", "description": "Index rate", "example": 2 }, "IndexType": { "type": "string", "description": "Index type:\n* `di` — DI rate is the average rate of interbank transactions carried out through interbank certificates of deposits. It is calculated based on fixed interbank deposits transactions settled within one business day.\n* `ipca` — The Extended National Consumer Price Index (IPCA) is the reference for the Brazilian inflation-targeting system. The Banco Central do Brasil (BCB) works to ensure that the IPCA's annual inflation is centered at the inflation target set by the National Monetary Council (CMN). The IPCA is also the price index of the National Treasury's Notes Series B (NTN-B). \n* `pre` — Use when there is a tax defined for the asset.\n", "enum": [ "di", "pre", "ipca" ], "example": "pre" }, "InterestRate": { "type": "number", "format": "double", "description": "Interest rate", "example": 2.3 }, "IssuingDate": { "type": "string", "description": "Issuing date, format = yyyy/mm/dd.", "example": "2023/03/22" }, "IssuedUnits": { "type": "integer", "format": "int32", "description": "Number of issued units", "example": 10 }, "MaturityDate": { "type": "string", "description": "Asset maturity date, format = yyyy/mm/dd.", "example": "2023/03/22" }, "Message": { "type": "string", "description": "Message about asset/quote operation", "example": "Message about request operation", "minLength": 0, "maxLength": 128 }, "PurchasedUnits": { "type": "integer", "format": "int32", "description": "Number of purchased units", "example": 20 }, "RegistrationMode": { "type": "string", "description": "Registration mode — `single` or `many`", "enum": [ "single", "many" ], "example": "single" }, "UnitValue": { "type": "number", "format": "double", "description": "Per unit value", "example": 65.56 } }, "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": { "/v1/issuer/{issuer_id}/assets": { "post": { "summary": "Register banking asset", "description": "Register a banking asset with the Pismo platform. A banking asset is either a certificate of deposit or a bank receipt.\n\nThis endpoint generates an [Asset registration succeeded](https://developers.pismo.io/events/docs/assets-asset-registration-success-1) event if it succeeds or an [Asset registration failed](https://developers.pismo.io/events/docs/assets-asset-registration-failure-1) event if it doesn't.\n", "tags": [ "Assets" ], "operationId": "AssetRegistration", "parameters": [ { "$ref": "#/components/parameters/CorrelationID" }, { "$ref": "#/components/parameters/IssuerID" } ], "requestBody": { "description": "Requested body of authorization", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetRegistration" } } } }, "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" } } } } } } ```