Retrieve Account
Overview
This endpoint allows you to retrieve details of a specific account within the Passport API using the account's unique ID. The response includes account type, number, balance information, and associated entity details.
Endpoint Details
Definition | Description |
---|---|
Endpoint | https://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/accounts/{account_id} |
Method | GET |
Headers | Authorization |
Authentication | Access Token (Bearer Token) |
Request Body
- No request body
Example Request
3
curl --location 'https://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/accounts/9bb99e5e-5bd0-44c9-944a-d01c9d8ffe21' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data ''
Response Body
- HTTP Status Code: 200 OK.
- The response contains the account information.
Example of Response
14
14
{
"available_balance": {
"currency": "COP",
"value": "1000.00"
},
"pending_balance": {
"currency": "COP",
"value": "2000.00"
},
"type": "LOW_VALUE",
"entity_customer_id": "d490794d-183f-4226-80a7-e75edce0e4fe",
"number": "880368444",
"id": "9bb99e5e-5bd0-44c9-944a-d01c9d8ffe21"
}
The available_balance
represents the funds ready for use, while pending_balance
reflects transactions still being processed.
Common Errors and Handling
HTTP Status Code | Meaning | Description |
---|---|---|
400 Bad Request | Invalid Request | The account ID is missing or incorrectly formatted. |
401 Unauthorized | Expired Token | The access token is invalid or has expired. |
403 Forbidden | Access Denied | The request is not authorized to retrieve this account. |
404 Not Found | Account Not Found | No account was found with the given ID. |
500 Internal Server Error | Server Error | An unexpected error occurred while retrieving the account details. |
Best Practices
- Ensure the
account_id
is correctly provided in the request URL. - Use the retrieved account details to manage transactions and funds.