π¦How to get your account, balance, and transaction data
The Account information API allows you access to your account and transaction data. It can be used to retrieve things like account details and balances.
Using Postman
If youβre new to APIs and want to get familiar with using the endpoints, we recommend you create a Postman account (it's free) and use the Postman collections provided to test things out.
1. Get your accounts and account ID with Postman
Follow these steps for π¦ Private Banking and π§° CIB, using the appropriate Postman collection and API endpoints as above.
Ensure have authenticated and pasted in your bearer token into the "Variables" tables.
Navigate to the Accounts folder and the GET Accounts query
Hit Send to make a call to the account information API endpoint (no additional parameters need to be set).
π¦ https://openapi.investec.com/za/pb/v1/accounts
π§° https://openapi.investec.com/za/bb/v1/accounts
The JSON response will include all of your accounts and each account has a unique ID (accountID) that you will use when transacting against it.
2. Get your account balance with Postman
Follow these steps for π¦ Private Banking using the appropriate Postman collection and API endpoints as above. The account balance for π§° CIB is included in the Get Accounts request.
Retrieve the accountID from your previous call to get accounts.
Head over to the "Variables" table to insert your accountID. You can also set it under the Params tab on the query page.
Navigate to the Accounts folder and the GET Account Balance query .
Hit Send to make a call to the API endpoint.
π¦ https://openapi.investec.com/za/pb/v1/accounts/:accountId/balance
3. Get your transaction data with Postman
Follow these steps for π¦ Private Banking and π§° CIB, using the appropriate Postman collection and API endpoints as above.
Ensure you have added your accountID to the "Variables" table
Navigate to the GET Account transactions query and set the dates for which you would like to view the transactions by selecting fromDate and toDate in the Query params table and adding the dates.
fromDate and toDate can be any formatted ISO 8601 date [Example of formatted date: 1999-09-09]].
Hit Send to make a call to the API endpoint.
π¦ https://openapi.investec.com/za/pb/v1/accounts/:accountId/transactions?fromDate=2023-03-10&toDate=2023-03-10
π§° https://openapi.investec.com/za/bb/v1/accounts/:accountId/transactions?fromDate=2023-01-01&toDate=2023-01-31
cuRL code snippets
π¦ Private Banking
Get accounts and accountID
curl --location 'https://openapi.investec.com/za/pb/v1/accounts' \
--header 'Accept: application/json'
Get account balance
curl --location 'https://openapi.investec.com/za/pb/v1/accounts//balance' \
--header 'Accept: application/json'
Get transaction data
curl --location 'https://openapi.investec.com/za/pb/v1/accounts//transactions' \
--header 'Accept: application/json'
π§° CIB
Get accounts, accountID and account balance
curl --location 'https://openapi.investec.com/za/bb/v1/accounts' \
--header 'Accept: application/json' \
--header 'Authorization: [[Authorization-masked-secret]]'
Get transaction data
curl --location 'https://openapi.investec.com/za/bb/v1/accounts/<<account id>>/transactions?fromDate=2023-01-01&toDate=2023-01-31' \
--header 'Accept: application/json' \
--header 'Authorization: [[Authorization-masked-secret]]'
Last updated
Was this helpful?