Retrieve Financial Institutions Account
Retrieve List of all accounts for this user
Using the previously created user-access-token in Step 3 and public_access_token in Step 1, We can now retrieve the information about different financial institution accounts connected by this user.
curl --request GET \
--url https://sandbox.onebrick.io/v2/data/account/list \
--header 'Accept: application/json' \
--header 'public_access_token: public_access_token' \
--header 'user-access-token: user_access_token'
Where [user-access-token] is the access token generated after a successful financial Institution connection through the widget which needs to be passed in headers as user_access_token.
This API is Async API, So once you send the request you will receive the acceptance response synchronously and then will receive the data in your callback URL asynchronously. If you haven't set the callback URL till now, Feel free to set it from here.
The API responds with accounts associated with the user who logged in using the Brick widget.
{
"status": 202,
"data": {
"job_id": "KVWJUrwQ78333309",
"message": "We are processing your request and will send the data in the callback URL."
},
"metadata": {
"source": {{API/Widget/Dashboard/SDK/Portal}},
"entity": "Data"
},
"error": null
}
{
"data": {
"method": "GET",
"api": "/v2/data/account/list",
"message": "We are able to fetch a list of accounts of end-users",
"job_id": "MaBkJUww03291282",
"count": "1",
"last_updated_at": "1662103296909",
"session": "valid",
"account_list": [
{
"account_id": "XH3c7dtoskIqAmEbwHAM7Q==",
"account_holder": "ABC",
"account_number": "88XXXXXX6",
"type": "Savings",
"currency": "IDR"
"balances": {
"available": 2195258.5,
"current": 2195258.5,
"limit": null
},
{
"account_id": "XH3c7dtoskIqAmEbwHAM7Q==",
"account_holder": "XYZ ",
"account_number": "88XXXXXX7",
"type": "Savings",
"currency": "IDR"
"balances": {
"available": 2111258.5,
"current": 195258.5,
"limit": null
},
}
]
},
"metadata": {
"entity": "Data",
"source": "API"
},
"error": null,
"status": 200
}
Retrieve details of a particular financial institution account
Using the account_id retrieved from the previous API- accounts list, You can get in-depth details about the account including any identifying information that's available on the account.
curl --request GET \
--url 'https://sandbox.onebrick.io/v2/data/account/detail?account_id=account_id' \
--header 'Accept: application/json' \
--header 'public_access_token: public_access_toke' \
--header 'user-access-token: user_access_token'
Where [user-access-token] is the access token generated after a successful financial Institution connection through the widget which needs to be passed as the user_access_token and account_id is the identification of the account for which you want the details.
This API is Async API, So once you send the request you will receive the acceptance response synchronously and then will receive the data in your callback URL asynchronously. If you haven't set the callback URL till now, Feel free to set it from here.
The API responds with details of the account associated with the account_id .
{
"status": 202,
"data": {
"job_id": "KVWJUrwQ78333309",
"message": "We are processing your request and will send the data in the callback URL."
},
"metadata": {
"source": {{API/Widget/Dashboard/SDK/Portal}},
"entity": "Data"
},
"error": null
}
{
"data": {
"method": "GET",
"api": "/v2/data/account/detail",
"job_id": "GYGJ4Tbb03371498",
"last_updated_at": "1662103375848",
"message": "We are able to fetch account details for you",
"session": "valid",
"account_details": {
"account_holder": "Taufic Hidayat",
"account_id": "XH3c7dtoskIqAmEbwHAM7Q==",
"account_number": "8831355336",
"address": null,
"email": null,
"ktp_number": null,
"phone_number": null,
"type": "Savings",
"balances": {
"available": 2195258.5,
"current": 2195258.5,
"limit": null
},
"currency": "IDR"
}
},
"metadata": {
"entity": "Data",
"source": "API"
},
"error": null,
"status": 200
}
Updated over 2 years ago