# Get overdraft product details for an account Get the details of an overdraft product attached to an account. # OpenAPI definition ```json { "openapi": "3.0.0", "info": { "title": "Banking - Overdraft", "version": "1.0.0", "description": "This API manages overdraft functionality, allowing account holders to perform debit transactions even with an insufficient balance. Additionally, it enables the configuration of grace periods and interest rates for overdrafts.", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/overdraft", "description": "Sandbox API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Account", "description": "Endpoints that manage account attachments and detachment of overdraft products" } ], "components": { "parameters": { "accountIdPath": { "name": "accountId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Account ID", "example": "123456" }, "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" }, "xAccountIdHeader": { "name": "x-account-id", "in": "header", "required": true, "schema": { "type": "integer" }, "description": "Pismo account ID", "example": 9812461 } }, "schemas": { "AccountAttachment": { "type": "object", "properties": { "account_id": { "type": "integer", "description": "Pismo account ID" }, "attach_datetime": { "type": "string", "format": "date-time", "description": "Datetime when the product was attached to the account. Format: `YYYY-MM-DDThh:mm:ss.sss`.\n" }, "status": { "type": "string", "description": "Status of the product attachment" }, "overdraft": { "$ref": "#/components/schemas/Product" }, "metadata": { "type": "object", "additionalProperties": true, "minLength": 0, "maxLength": 1024, "description": "Additional details about the product attachment. The information must be in `key:value` pair format. For example, `name:`.
\n`minLength` = `0`\n`maxLength` = `1024`\n" } } }, "ErrorResponse": { "type": "object", "properties": { "code": { "type": "string", "description": "Error code", "example": "EOVD0001" }, "message": { "type": "string", "description": "Error message", "example": "Error" }, "details": { "type": "string", "description": "Details about the error", "example": "Error details" } } }, "ProcessingCode": { "type": "object", "properties": { "interest_processing_code": { "type": "string", "description": "Processing code for interest calculation", "example": "123456" } }, "required": [ "interest_processing_code" ] }, "Product": { "type": "object", "properties": { "product_id": { "type": "string", "format": "uuid", "description": "Product ID generated for an overdraft product. Once this ID is created, you must link it to your account ID." }, "name": { "type": "string", "description": "Produt name", "example": "Overdraft Limit 1000" }, "interest_plan_id": { "type": "string", "format": "uuid", "description": "Interest plan ID generated during the plan's creation. Created via the [Create interest plan](https://developers.pismo.io/pismo-docs/reference/post-v1-interest-plan-1) endpoint." }, "grace_period": { "type": "integer", "description": "Grace period during which you can restore the balance without incurring any interest charges. The unit is measured in days." }, "processing_code": { "$ref": "#/components/schemas/ProcessingCode" }, "status": { "type": "string", "format": "enum", "description": "Overdraft product status.
\n* `CREATED`: When you successfully created an overdraft product.\n* `ACTIVE`: When you attach your overdraft product to an account or a program ID. Once it's attached, the product becomes `ACTIVE`.\n", "enum": [ "CREATED", "ACTIVE" ] }, "created_at_datetime": { "type": "string", "format": "date-time", "description": "Product created datetime. Format: `YYYY-MM-DDThh:mm:ss.sss`.\n" } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "responses": { "200GetAccountAttachmentResponse": { "description": "Get attachment details successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountAttachment" }, "examples": { "Get account attachment successful": { "$ref": "#/components/examples/200GetAccountAttachmentExampple" } } } } }, "400GetAccountAttachmentErrorResponse": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "Invalid account_id path parameter": { "$ref": "#/components/examples/EOVD0043" }, "Accounts API 4xx error": { "$ref": "#/components/examples/EOVD0069" } } } } }, "404GetAccountAttachmentErrorResponse": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "Accounts API 404 error": { "$ref": "#/components/examples/EOVD0070" } } } } }, "500GetAccountAttachmentErrorResponse": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "Error getting product attachment": { "$ref": "#/components/examples/EOVD0044" }, "Accounts API request error": { "$ref": "#/components/examples/EOVD0064" }, "Accounts API request timeout": { "$ref": "#/components/examples/EOVD0065" }, "Accounts API unmarshal response error": { "$ref": "#/components/examples/EOVD0066" }, "Accounts API unmapped response code error": { "$ref": "#/components/examples/EOVD0067" }, "Accounts API 5xx error": { "$ref": "#/components/examples/EOVD0068" } } } } } }, "examples": { "200GetAccountAttachmentExampple": { "summary": "Get account attachment successful", "value": { "account_id": 123, "attach_datetime": "2024-01-23T13:26:25Z", "status": "CREATED", "overdraft": { "product_id": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c", "name": "Overdraft limit 1000", "interest_plan_id": "b935acaf-886c-4817-8f7c-c2cc3ce4d509", "grace_period": 10, "processing_code": { "interest_processing_code": "123456" }, "status": "CREATED", "created_at_datetime": "2024-01-23T13:26:25" }, "metadata": { "key": "value" } } }, "EOVD0043": { "summary": "Invalid account_id path parameter", "value": { "code": "EOVD0043", "message": "Invalid accountId path param" } }, "EOVD0069": { "summary": "Accounts API 4xx error", "value": { "code": "EOVD0069", "message": "Accounts API - Request returned error 4xx" } }, "EOVD0070": { "summary": "Accounts API 404 error", "value": { "code": "EOVD0070", "message": "Accounts API - Request returned error 404" } }, "EOVD0044": { "summary": "Get product attachment error", "value": { "code": "EOVD0044", "message": "Failed to get product attachment" } }, "EOVD0064": { "summary": "Accounts API request error", "value": { "code": "EOVD0064", "message": "Accounts API - Request error" } }, "EOVD0065": { "summary": "Accounts API request timeout", "value": { "code": "EOVD0065", "message": "Accounts API - Request timeout" } }, "EOVD0066": { "summary": "Accounts API unmarshal response", "value": { "code": "EOVD0066", "message": "Accounts API - Failed to unmarshal response body" } }, "EOVD0067": { "summary": "Accounts API unmapped response code", "value": { "code": "EOVD0067", "message": "Accounts API - Returned an unmapped response code" } }, "EOVD0068": { "summary": "Accounts API 5xx error", "value": { "code": "EOVD0068", "message": "Accounts API - Request returned error 5xx" } } } }, "paths": { "/v1/overdraft/attachments/accounts/{accountId}": { "get": { "tags": [ "Account" ], "summary": "Get overdraft product details for an account", "description": "Get the details of an overdraft product attached to an account.", "operationId": "get-overdraft-account-attachment", "parameters": [ { "$ref": "#/components/parameters/accountIdPath" }, { "$ref": "#/components/parameters/authorizationTokenHeader" }, { "$ref": "#/components/parameters/xAccountIdHeader" } ], "responses": { "200": { "$ref": "#/components/responses/200GetAccountAttachmentResponse" }, "400": { "$ref": "#/components/responses/400GetAccountAttachmentErrorResponse" }, "404": { "$ref": "#/components/responses/404GetAccountAttachmentErrorResponse" }, "500": { "$ref": "#/components/responses/500GetAccountAttachmentErrorResponse" } } } } } } ```