Skip to content

Get Beneficiaries

Request URL

GET /beneficiaries

Description

This endpoint returns an array of records for all beneficiaries registered for the current user.

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'GET',
  url: '${AMPLIFI_BASE_URL}/beneficiaries',
  headers: {
    'token': "A long random string token received from /token request"
  },
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/beneficiaries"  --header "token: A long random string token received from /token request" 

Successful Response Examples

200 BENEFICIARIES SUCCESSFUL RESPONSE

HEADERS

Header Value
token A long random string token received from /token request

REQUEST BODY

none

RESPONSE BODY

{
    "success": true,
    "beneficiaries": [
        {
            "name": "Card Payee Account",
            "defaultSourceAccountId": "1234567",
            "txnType": "tocard",
            "isHidden": false,
            "isActive": false,
            "status": "Pending",
            "defaultAmount": 17,
            "dtsCreated": "2023-04-13T17:56:21.205Z",
            "destinationFirstName": "John",
            "destinationLastName": "Payeeman",
            "mobile": "1234567890",
            "address": {
                "addressLine1": "123 Main Street",
                "addressLine2": "Ste. ABC",
                "city": "San Francisco",
                "province": "CA",
                "countryCode": "US",
                "postalCode": "12345"
            },
            "type": "CHECKING",
            "typeName": "Card",
            "AFiBeneficiaryId": "qwepgbenlgff98idot",
            "userId": "qweaurl8kgtlv9pc",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "isFavourite": true,
            "beneficiaryId": "qwepgbenlgff98idot"
        },
        {
            "name": "Cheque Payee Account",
            "defaultSourceAccountId": "1234567",
            "txnType": "cheque",
            "isHidden": false,
            "isActive": true,
            "status": "Active",
            "defaultAmount": 17,
            "dtsCreated": "2023-04-13T17:48:16.474Z",
            "legalName": "Acme Inc.",
            "address": {
                "addressLine1": "123 Main Street",
                "addressLine2": "Ste. ABC",
                "city": "San Francisco",
                "province": "CA",
                "countryCode": "US",
                "postalCode": "12345"
            },
            "typeName": "Paper check",
            "AFiBeneficiaryId": "qwepgbenlgfeyuhmvw",
            "userId": "qweaurl8kgtlv9pc",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "isFavourite": true,
            "backOfficeId": "evolve",
            "backOfficeName": "evolve",
            "beneficiaryId": "qwepgbenlgfeyuhmvw"
        },
        {
            "name": "PayPal Payee Account",
            "defaultSourceAccountId": "1234567",
            "txnType": "paypal",
            "isHidden": false,
            "isActive": false,
            "status": "Pending",
            "defaultAmount": 15,
            "dtsCreated": "2023-04-13T15:47:50.472Z",
            "paypalId": "somepaypalaccount@someemail.test",
            "typeName": "PayPal",
            "AFiBeneficiaryId": "qwepgbenlgfanyvcts",
            "userId": "qweaurl8kgtlv9pc",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "isFavourite": true,
            "beneficiaryId": "qwepgbenlgfanyvcts"
        },
        {
            "name": "ACH Payee Account",
            "defaultSourceAccountId": "1234567",
            "txnType": "USA",
            "isFavourite": true,
            "isHidden": false,
            "isActive": true,
            "status": "Active",
            "defaultAmount": 2,
            "dtsCreated": "2023-04-13T15:31:36.396Z",
            "destinationName": "Receiving Account",
            "bankName": "Citibank NA",
            "routingNumber": "123456789",
            "accountNumber": "***4567",
            "type": "CHECKING",
            "typeName": "USA interbank transfer",
            "AFiBeneficiaryId": "qwepgbenlgfa339ody",
            "userId": "qweaurl8kgtlv9pc",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "backOfficeId": "evolve",
            "backOfficeName": "evolve",
            "beneficiaryId": "qwepgbenlgfa339ody"
        },
        {
            "name": "ACH Payee Account",
            "defaultSourceAccountId": "1234567",
            "txnType": "USA_wire",
            "isHidden": false,
            "isActive": true,
            "status": "Active",
            "defaultAmount": 2,
            "dtsCreated": "2023-04-12T20:00:00.774Z",
            "destinationName": "Receiving Account",
            "bankName": "Citibank NA",
            "routingNumber": "123456789",
            "accountNumber": "***1234567",
            "type": "CHECKING",
            "address": {
                "addressLine1": "123 Main Street",
                "addressLine2": "Ste. ABC",
                "city": "San Francisco",
                "province": "CA",
                "countryCode": "US",
                "postalCode": "12345"
            },
            "typeName": "USA interbank transfer",
            "AFiBeneficiaryId": "qwepgbenlge48etick",
            "userId": "qweaurl8kgtlv9pc",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "isFavourite": true,
            "backOfficeId": "evolve",
            "backOfficeName": "evolve",
            "beneficiaryId": "qwepgbenlge48etick"
        }
    ]
}