Appearance
Investec data
In this guide, we will explore how to access and retrieve your personal data using the Giga SDK for South Africa Private Bank APIs. You will learn how to manipulate this data according to your preferences and integrate it with other external APIs for enhanced functionality. Throughout this tutorial, we will be utilising the Giga AI plugin service.
Upon finishing this section, you will have acquired the skills to:
- Retrieve your account information using the Giga SDK.
- Obtain transaction details for a particular account through the Giga SDK.
- Access your list of beneficiaries using the Giga SDK.
- Execute payments to a beneficiary with the assistance of the Giga SDK.
This page will explain each step:
1. Use the giga sdk to get your account information.
The following code will get your account information for the current profile you are on and return it.
ts
giga.api.privateClient.pbsa.accounts.list().then((res) => {
return res.result;
})giga.api.privateClient.pbsa.accounts.list().then((res) => {
return res.result;
})2. Use the giga sdk to get your transactions for a specific account.
The following code will get your transaction information for the first account and return it for a specific date range.
ts
async function getTransactionData() {
try {
const transactions = await giga.api.privateClient.pbsa.transactions.get({
accountId: accountList.result.PrivateBankAccounts[0].AccountNumberForRequests,
dateFrom: '09/10/2022',
dateTo: '08/11/2022'
});
return transactions.result;
} catch (error) {
console.error(error);
}
}async function getTransactionData() {
try {
const transactions = await giga.api.privateClient.pbsa.transactions.get({
accountId: accountList.result.PrivateBankAccounts[0].AccountNumberForRequests,
dateFrom: '09/10/2022',
dateTo: '08/11/2022'
});
return transactions.result;
} catch (error) {
console.error(error);
}
}3. Use the giga sdk to get your beneficiaries.
The following code will get your beneficiaries for the current profile and return it.
ts
giga.api.privateClient.pbsa.beneficiaries.list().then(res => {
return res.result
})giga.api.privateClient.pbsa.beneficiaries.list().then(res => {
return res.result
})