Sync Payees
Request URL
POST /payees
Description
Syncs an array of payee records. Any payees that do not already exist will be created. Existing payees will be modified, if applicable.
Schema
Array table for payees
| Array containing | Description | Required | Schema |
|---|---|---|---|
| payees items | payees items | No | Array of payees objects |
Property table for payees object
| Property | Description | Required | Schema |
|---|---|---|---|
| name | Name of the entity | No | { "type": "string", "nullable": true } |
| AFiPayeeId | ampliFi ID of the payee | No | { "type": "string", "nullable": true } |
| dtsModified | The date-time stamp when the account details were last modified in ampliFi | No | { "type": "string", "nullable": true } |
| isDeleted | true if deleted | No | { "type": "boolean", "nullable": true, "default": false } |
Request Body
Snippet Examples
javascript
const axios = require('axios');
const data = [{
"name": "testPayee"
}];
const config = {
method: 'POST',
url: '${AMPLIFI_BASE_URL}/payees',
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/payees" --data "[{ \"name\":\"testPayee\"}]" --header "Content-Type: application/json" --header "token: A long random string token received from /token request"
Successful Response Examples
200 PAYEES SUCCESSFUL RESPONSE ADDING A PAYEE
HEADERS
| Header | Value |
|---|---|
| Content-Type | application/json |
| token | A long random string token received from /token request |
REQUEST BODY
RESPONSE BODY