Skip to content

Modify Payee

Request URL

POST /payee/:AFiPayeeId

Description

Makes changes to an existing payee record. The payee is identified by a path parameter. Only the elements that are actually changed should be included in the request body.

Schema

Property table for payee/:AFiPayeeId

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

{
    "name": "testPayee1",
    "accountNumber": "12345678901",
    "currency": "USD"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "name": "testPayee1",
    "accountNumber": "12345678901",
    "currency": "USD"
};
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/payee/:AFiPayeeId',
  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/payee/:AFiPayeeId" --data "{    \"name\":\"testPayee1\",   \"accountNumber\":\"12345678901\",   \"currency\":\"USD\"}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 PAYEE/:AFIPAYEEID SUCCESSFUL RESPONSE MODIFYING PAYEE

HEADERS

Header Value
Content-Type application/json
token A long random string token received from /token request

PARAMETERS

Parameter Description Value
AFiPayeeId [required] fkfhopkkjdxaobbkmrlfzvltgiqsjjql

REQUEST BODY

{
    "name": "testPayee1",
    "accountNumber": "12345678901",
    "currency": "USD"
}

RESPONSE BODY

{
    "success": true
}