Skip to content

Rewards

Manage PBSA rewards

Private Client SA

Get rewards landing info

js
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const rewards = await invsy.api.privateClient.pbsa.rewards.getLanding(
            accountList.result.PrivateBankAccounts[0].AccountNumberForRequests
        );
        return rewards.result;
    } catch (error) {
        console.error(error);
    }
})()
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const rewards = await invsy.api.privateClient.pbsa.rewards.getLanding(
            accountList.result.PrivateBankAccounts[0].AccountNumberForRequests
        );
        return rewards.result;
    } catch (error) {
        console.error(error);
    }
})()

Get rewards partners categories

js
invsy.api.privateClient.pbsa.rewards.getPartnerCategories().then(account => {
    return res.result
})
invsy.api.privateClient.pbsa.rewards.getPartnerCategories().then(account => {
    return res.result
})

Get rewards partners

js
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const partners = await invsy.api.privateClient.pbsa.rewards.getPartners(
            accountList.result.PrivateBankAccounts[0].AccountNumberForRequests
        );
        return partners.result;
    } catch (error) {
        console.error(error);
    }
})()
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const partners = await invsy.api.privateClient.pbsa.rewards.getPartners(
            accountList.result.PrivateBankAccounts[0].AccountNumberForRequests
        );
        return partners.result;
    } catch (error) {
        console.error(error);
    }
})()

Redeem rewards

ts
invsy.api.privateClient.pbsa.accounts.list().then(account => {
    invsy.api.privateClient.pbsa.rewards.redemption({categoryId:'0',redemption: {Quantity:'',PartnerId:'', AccountId: account.result.PrivateBankAccounts[0].AccountNumberForRequests}}: RewardsRedemptionInterface).then(res => {
      return res.result
    })
  })

  RewardsRedemptionInterface{
    "categoryId":string,
      "redemption":
    { "Quantity":string,
      "PartnerId":string,
      "AccountId":string,
      "InvestecUnitTrust"?: {
        "FundType": string,
        "PreferredContactNumber": string,
        "AccountNumber": string
      },
      "Travel"?: {
        "BritishAirways": {
          "ClubCardMemberSurname": string,
          "AirlineMembershipNumber": string,
          "PreferredContactNumber": string
        },
        "SaaVoyager": {
          "AirlineMembershipNumber": string,
          "PreferredContactNumber": string
        }
      },
      "Leisure"?: {
        "RecipientName": string,
        "SAIdentityNumber": string,
        "CellNumber": string
      },
      "PointsToCash"?: {
        "RandValue": string
      }
    }
  }
invsy.api.privateClient.pbsa.accounts.list().then(account => {
    invsy.api.privateClient.pbsa.rewards.redemption({categoryId:'0',redemption: {Quantity:'',PartnerId:'', AccountId: account.result.PrivateBankAccounts[0].AccountNumberForRequests}}: RewardsRedemptionInterface).then(res => {
      return res.result
    })
  })

  RewardsRedemptionInterface{
    "categoryId":string,
      "redemption":
    { "Quantity":string,
      "PartnerId":string,
      "AccountId":string,
      "InvestecUnitTrust"?: {
        "FundType": string,
        "PreferredContactNumber": string,
        "AccountNumber": string
      },
      "Travel"?: {
        "BritishAirways": {
          "ClubCardMemberSurname": string,
          "AirlineMembershipNumber": string,
          "PreferredContactNumber": string
        },
        "SaaVoyager": {
          "AirlineMembershipNumber": string,
          "PreferredContactNumber": string
        }
      },
      "Leisure"?: {
        "RecipientName": string,
        "SAIdentityNumber": string,
        "CellNumber": string
      },
      "PointsToCash"?: {
        "RandValue": string
      }
    }
  }

Rewards transfer

js
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const transferResult = await invsy.api.privateClient.pbsa.rewards.transfer({
            fromAccount: accountList.result.PrivateBankAccounts[0].AccountNumber,
            toAccount: accountList.result.PrivateBankAccounts[0].AccountNumber,
            transferPoints: 1
        });
        return transferResult.result;
    } catch (error) {
        console.error(error);
    }
})()
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const transferResult = await invsy.api.privateClient.pbsa.rewards.transfer({
            fromAccount: accountList.result.PrivateBankAccounts[0].AccountNumber,
            toAccount: accountList.result.PrivateBankAccounts[0].AccountNumber,
            transferPoints: 1
        });
        return transferResult.result;
    } catch (error) {
        console.error(error);
    }
})()

Get rewards unit trust categories

js
invsy.api.privateClient.pbsa.rewards.getUnitTrustCategories().then(account => {
    return res.result
})
invsy.api.privateClient.pbsa.rewards.getUnitTrustCategories().then(account => {
    return res.result
})

Get rewards unit trusts

js
invsy.api.privateClient.pbsa.rewards.getUnitTrusts().then(account => {
    return res.result
})
invsy.api.privateClient.pbsa.rewards.getUnitTrusts().then(account => {
    return res.result
})

Rewards calculator solutions

js
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const calculatorSolutions = await invsy.api.privateClient.pbsa.rewards.getCalculatorSolutions(
            accountList.result.PrivateBankAccounts[0].AccountNumberForRequests
        );
        return calculatorSolutions.result;
    } catch (error) {
        console.error(error);
    }
})()
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const calculatorSolutions = await invsy.api.privateClient.pbsa.rewards.getCalculatorSolutions(
            accountList.result.PrivateBankAccounts[0].AccountNumberForRequests
        );
        return calculatorSolutions.result;
    } catch (error) {
        console.error(error);
    }
})()

Get rewards transaction types

js
invsy.api.privateClient.pbsa.rewards.getTransactionTypes().then(account => {
    return res.result
})
invsy.api.privateClient.pbsa.rewards.getTransactionTypes().then(account => {
    return res.result
})

Get rewards transactions

js
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const transactions = await invsy.api.privateClient.pbsa.rewards.getTransactions(
            accountList.result.PrivateBankAccounts[0].AccountNumberForRequests,
            '0'
        );
        return transactions.result;
    } catch (error) {
        console.error(error);
    }
})()
(async function fetchData() {
    try {
        const accountList = await invsy.api.privateClient.pbsa.accounts.list();
        const transactions = await invsy.api.privateClient.pbsa.rewards.getTransactions(
            accountList.result.PrivateBankAccounts[0].AccountNumberForRequests,
            '0'
        );
        return transactions.result;
    } catch (error) {
        console.error(error);
    }
})()