This section provides documentation for essential API calls that retrieve lists of accounts and details for individual accounts. By following these guidelines, you can effectively retrieve and utilize financial data to power your applications and services.
Panel |
---|
|
Exchange Authorization Code for API Access Token |
Before calling any other APIs, you must exchange the authorization code received during the user authorization process for an access token. This access token is necessary for authenticating subsequent API requests.
API Endpoint: https://api-openbanking.leatherback.co/auth/token
Method: POST
Request Headers:
Content-Type: application/x-www-form-urlencoded
Panel |
---|
|
Request Body (form-encoded): |
Code Block |
---|
grant_type=authorization_code&code=<authorization_code>&client_id=<client_id>&password=<password>&scope=account |
Code Block |
---|
curl -X POST "https://api.leatherback.com/api/v1/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code&code=<authorization_code>&client_id=<client_id>&password=<password>&scope=account" |
Code Block |
---|
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjVEODhEQjBDMDMyMzRENjQ5NEM1NDI0ODEzRkFBQTkxIiwiY3VzdG9tZXJJZCI6IjU1ODkzNDM2LTcyY2UtNGQzYi04N2VhLTA4ZGI1YWQwNzhiYiIsImNvbnNlbnRJZCI6IjczMDkyN2U4LTY3OWMtNDlhZC05NzljLTAzMjI0YjE1MTI2MyIsIm5iZiI6MTcxOTkxNzQ2MSwiZXhwIjoxNzE5OTE3NzYxLCJpYXQiOjE3MTk5MTc0NjF9.3dPIHz9hvP4MY1u65Xb8GkkdKR6Qv0tUJZa_2tzRrWk",
"token_type": "Bearer",
"expires_in": 39361,
"id_token": "oa_stg_GBjFz9x8GwZPwPpqzsQpB4nqjkCbPFFv8sQq0U4ITw0KzRzwCu",
"access_token_id": "a8SD5zU5Dx3cXRGHz65gdyDIVeMAbUBY3ihxkjp5ZjURb6vooz"
} |
Panel |
---|
|
Get a List of Accounts |
To retrieve a comprehensive list of accounts associated with a customer, you can use the following API call:
...
Code Block |
---|
|
{
"isSuccess": true,
"error": "string",
"message": "string",
"responseCode": "string",
"value": {
"accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"accountDetails": [
{
"accountNumber": "string",
"bankCountry": "string",
"bankCountryIso": "string",
"bankName": "string",
"bankAddress": "string",
"paymentMethodType": "string",
"paymentMethodValue": "string",
"transitNumber": "string",
"institutionCode": "string"
}
]
}
} |
Panel |
---|
|
Get a Single Account Balance |
To retrieve available and ledger balance information for a specific account, use the following API call:
API Endpoint: https://api-openbanking.leatherback.co/accounts/{accountId}/balances
Method: GET
Path Parameters
accountId
: The unique identifier of the account.
Authorization: Bearer {access_token}
Content-Type: application/json
Code Block |
---|
{
"Data": {
"Balance": [
{
"AccountId": "string",
"Amount": {
"Amount": "string",
"Currency": "string"
},
"CreditDebitIndicator": "string",
"Type": "string",
"DateTime": "2024-07-02T21:28:05.010Z"
}
]
},
"Links": {
"Self": "string"
},
"Meta": {
"TotalPages": 0
}
} |
Panel |
---|
|
Get a Single Account Beneficiaries |
To retrieve beneficiaries information for a specific account, use the following API call:
API Endpoint: https://api-openbanking.leatherback.co/accounts/{accountId}/beneficiaries
Method: GET
Path Parameters:
accountId
: The unique identifier of the account.
Authorization: Bearer {access_token}
Content-Type: application/json
Code Block |
---|
{
"Data": {
"Account": [
{
"AccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"BeneficiaryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Account": [
{
"SchemeName": "string",
"Identification": "string",
"Name": "string"
}
]
}
]
},
"Links": {
"Self": "string"
},
"Meta": {
"TotalPages": 0
}
} |
\uD83D\uDCCB Related articles
...