# Get account attachment Gets an account's attached product. # OpenAPI definition ```json { "openapi": "3.0.3", "info": { "title": "Banking - Interest-bearing accounts", "version": "1.0.0", "description": "API for interest-bearing account functionality", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/savings-products", "description": "Sandbox API server for testing" } ], "tags": [ { "name": "Account attachment", "description": "Endpoints that manage account attachments to interest-bearing account products" } ], "components": { "parameters": { "authorizationTokenHeader": { "name": "AuthorizationToken", "in": "header", "schema": { "type": "string" }, "required": true, "description": "Account token. Token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a 401 Unauthorized error.\n", "example": 1234 }, "accountId": { "description": "Account ID.", "in": "path", "name": "accountId", "required": true, "schema": { "type": "integer" }, "example": 123456 } }, "schemas": { "ErrorResponse": { "type": "object", "properties": { "code": { "type": "string", "description": "Error type code.", "example": "EIBACC0003" }, "details": { "type": "string", "description": "Error details.", "example": "error EIBACC0008: Validation error [(Field 'Order' is invalid)]" }, "message": { "description": "Error message.", "example": "Bad Request", "type": "string" } } }, "PayoutAccount": { "properties": { "label": { "type": "string", "description": "Label to identify the account.\n", "example": "My payout account" }, "type": { "type": "string", "description": "Payout account type, either `INTERNAL` or `EXTERNAL`.\n", "enum": [ "INTERNAL", "EXTERNAL" ], "example": "INTERNAL" }, "internal_account_id": { "type": "number", "description": "Internal account ID for the account that receives the payments.\nRequired for type `INTERNAL` and not allowed for `EXTERNAL`.\n", "example": 123456 }, "external_account": { "type": "object", "description": "Contains user-defined key-value pairs that identify the external account receiving the payments.\n You are responsible for this content, the platform does not control it.\n\n Required for type `EXTERNAL` and not allowed for `INTERNAL`.\n", "example": { "key": "value" } } }, "type": "object" }, "AccountAttachment": { "type": "object", "properties": { "attachment_date": { "type": "string", "format": "datetime", "description": "Date on which the product is attached to the account.", "example": "2024-01-23T13:26:25.000Z" }, "interest_plan_id": { "type": "string", "description": "Interest rate plan ID. This corresponds to the ID you created using the [Create interest plan version](https://developers.pismo.io/pismo-docs/reference/patch-v1-interest-plan)) endpoint.", "example": "263d509a-d5d0-4b3a-b909-ce1b9174beff" }, "maturity_date_days": { "type": "integer", "description": "The number of days until the maturity date of the asset or investment.
\nThis field represents the duration in days before the asset reaches its maturity and can be cashed out.\n", "example": 365 }, "product_id": { "type": "string", "description": "Product identifier.", "example": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c" }, "product_type": { "type": "string", "description": "Product type.", "enum": [ "deposit", "savings-account" ] }, "payout_account": { "$ref": "#/components/schemas/PayoutAccount" } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad request.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/ErrorResponse" } ] }, "examples": { "invalidRequestBody": { "summary": "Bad Request.", "value": { "code": "EIBACC0008", "message": "Bad Request.", "detail": "error EIBACC0008: Validation error [(Field 'Order' is invalid)]" } } } } } }, "404NotFound": { "description": "Bad request.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/ErrorResponse" } ] }, "examples": { "invalidRequestBody": { "summary": "Bad Request.", "value": { "code": "EIBACC0078", "message": "Product not found." } } } } } }, "500InternalServer": { "description": "Internal error.", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/ErrorResponse" } ] }, "examples": { "internalProcessingError": { "summary": "Internal processing error.", "value": { "code": "EIBACC0007", "message": "Internal error", "detail": "Internal error" } } } } } } } }, "paths": { "/v1/products/attachments/accounts/{accountId}": { "get": { "tags": [ "Account attachment" ], "summary": "Get account attachment", "description": "Gets an account's attached product.\n", "operationId": "interest-bearing-v1-get-account-attachment", "parameters": [ { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/authorizationTokenHeader" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountAttachment" } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "404": { "$ref": "#/components/responses/404NotFound" }, "500": { "$ref": "#/components/responses/500InternalServer" } } } } }, "security": [ { "BearerAuth": [] } ] } ```