List All Accounts
Overview
This endpoint allows you to retrieve a list of all accounts associated with an entity customer within the Passport API. The response includes details such as account type, balance, and entity association.
Endpoint Details
Definition | Description |
---|---|
Endpoint | https://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/accounts |
Method | GET |
Headers | Authorization |
Authentication | Access Token (Bearer Token) |
This endpoint retrieves all accounts linked to an authenticated entity.
Request Body
- No request body
Example Request
3
3
curl --location 'https://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/accounts' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data ''
Response Body
Example of Response
18
18
{
"accounts": [
{
"number": "880599890",
"type": "LOW_VALUE",
"id": "93e47f07-0c6a-4dae-bcff-81032c4fa403",
"entity_customer_id": "cde52c0b-029e-47a7-b6fe-58996680611f",
"pending_balance": {
"value": "1000.00",
"currency": "COP"
},
"available_balance": {
"value": "2000.00",
"currency": "COP"
}
}
]
}
The available_balance
represents 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 request is malformed or contains invalid parameters. |
401 Unauthorized | Expired Token | The access token is invalid or has expired. |
403 Forbidden | Access Denied | The request is not authorized to list accounts. |
500 Internal Server Error | Server Error | An unexpected error occurred while retrieving accounts. |
Best Practices
- Ensure the authentication token is valid before making a request.
- Check Pagination if needed when dealing with large data sets.
- Monitor account balances to prevent insufficient funds errors in transactions.