Modify Beneficiary
Request URL
POST /beneficiary/:AFiBeneficiaryId
Description
This endpoint makes changes to an existing beneficiary record. The beneficiary is identified by a path parameter. Only the elements that are actually changed should be included in the request body.
Schema
Property table for beneficiary/:AFiBeneficiaryId
Property | Description | Required | Schema |
---|---|---|---|
AFiBeneficiaryId | ampliFi ID of the beneficiary | Yes | { "type": "string" } |
name | Name of the entity | No | { "type": "string", "nullable": true } |
defaultAmount | Default transfer amount | No | { "type": "number", "nullable": true } |
defaultCurrency | 3-letter currency designator for default amount | No | { "type": "string", "nullable": true } |
status | Current status of entity | No | { "type": "string", "nullable": true } |
isActive | true if active | No | { "type": "boolean", "nullable": true } |
isHidden | true if hidden | No | { "type": "boolean", "nullable": true } |
isFavourite | true if designated a favorite | No | { "type": "boolean", "nullable": true } |
paypalId | PayPal ID, for PayPal transfers | No | { "type": "string", "nullable": true } |
bankName | Name of the bank | No | { "type": "string", "nullable": true } |
accountNumber | Account number | No | { "type": "string", "nullable": true } |
routingNumber | Routing number | No | { "type": "string", "nullable": true, "minLength": 9, "maxLength": 9 } |
destinationName | Name on the destination account | No | { "type": "string", "nullable": true } |
type | Entity type | No | { "type": "string", "nullable": true } |
destinationFirstName | First name on the destination account | No | { "type": "string", "nullable": true } |
destinationLastName | Last name on the destination account | No | { "type": "string", "nullable": true } |
destinationPAN | PAN, for cards | No | { "type": "string", "nullable": true } |
expiryMM | The expiration date month in MM format | No | { "type": "string", "nullable": true } |
expiryYY | The expiration date year in YY format | No | { "type": "string", "nullable": true } |
narrativeCredit | A brief description, used if transaction is credit | No | { "type": "string", "nullable": true } |
narrativeDebit | A brief description, used if transaction is debit | No | { "type": "string", "nullable": true } |
defaultSourceAccountId | defaultSourceAccountId | No | { "type": "string", "nullable": true } |
AFiPayeeId | ampliFi ID of the payee | No | { "type": "string", "nullable": true } |
Request Body
{
"name": "test",
"defaultAmount": 101,
"defaultCurrency": "USD",
"status": "asd",
"isFavourite": false,
"narrativeCredit": 1,
"narrativeDebit": 1
}
Snippet Examples
javascript
const axios = require('axios');
const data = {
"name": "test",
"defaultAmount": 101,
"defaultCurrency": "USD",
"status": "asd",
"isFavourite": false,
"narrativeCredit": 1,
"narrativeDebit": 1
};
const config = {
method: 'POST',
url: '${AMPLIFI_BASE_URL}/beneficiary/:AFiBeneficiaryId',
headers: {
'Content-Type': "application/json",
'token': "A long random string token received from /token request"
},
data
};
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/beneficiary/:AFiBeneficiaryId" --data "{ \"name\":\"test\", \"defaultAmount\":101, \"defaultCurrency\":\"USD\", \"status\":\"asd\", \"isFavourite\":false, \"narrativeCredit\":1, \"narrativeDebit\":1}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request"
Successful Response Examples
200 BENEFICIARY/:AFIBENEFICIARYID SUCCESSFUL RESPONSE FOR MODIFYING A BENEFICIARY
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
token | A long random string token received from /token request |
PARAMETERS
Parameter | Description | Value |
---|---|---|
AFiBeneficiaryId | [required] | qwepgbenlq1lxq8zzi |
REQUEST BODY
{
"name": "test",
"defaultAmount": 101,
"defaultCurrency": "USD",
"status": "asd",
"isFavourite": false,
"narrativeCredit": 1,
"narrativeDebit": 1
}
RESPONSE BODY
{
"success": true,
"beneficiary": {
"txnType": "international",
"bic": "AEIBCHGV",
"iban": "AE630030000701063132001",
"destinationName": "John Doe",
"routingNumber": "031101279",
"accountNumber": "***3215",
"typeName": "International",
"AFiBeneficiaryId": "qwepgbenlq1lxq8zzi",
"defaultAmount": 101,
"dtsCreated": "2023-12-12T00:31:38.531Z",
"status": "asd",
"userId": "qweaurl8kgtlv9pc",
"AFiUserId": "qweaurl8kgtlv9pc",
"isDeleted": false,
"isFavourite": false,
"defaultCurrency": "USD",
"name": "test",
"narrativeCredit": 1,
"narrativeDebit": 1,
"isHidden": null,
"isActive": true,
"defaultSourceAccountId": null,
"AFiPayeeId": null,
"dtsModified": "2023-12-12T11:46:30.929Z"
},
"undo": {
"id": "fcjla",
"isActionable": false,
"dtsQueued": "2023-12-12T11:46:30.935Z",
"dtsExpiry": "2023-12-12T11:46:50.937Z"
}
}