Update a client contact record
Update
| Parameter | Mandatory | Description | Examples | More Info |
|---|---|---|---|---|
| API | Yes | The API area | clientcontacts.json | |
| General | Yes | Parameters described in overview | Authorization: Bearer <access_token> header — see Synergist API Authentication | Structure of an API call |
| Action | Yes | The action to perform | action=update | |
| Input | Yes | JSON string | See below |
| JSON Input | Mandatory | Description | Examples |
|---|---|---|---|
| Identifier | Yes | Contact ID or UUID | "clientcontactInternalRef":6535 |
| Update data | Yes | Data to update | "clientcontactName":"Smith" |
To update opt-out for GDPR, use "clientcontactOptOutPhone":true or false
Example request (OAuth 2.0):
Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/clientcontacts.json?&version=6&action=update&input={
"data": [
{
"clientcontactInternalRef": 6535,
"clientcontactFirstName": "Babs",
"clientcontactName": "Smith"
}
]
}
Example request (legacy username/password):
http://<SERVER>/jsonapi/clientcontacts.json?&version=6&action=update&input={
"data": [
{
"clientcontactInternalRef": 6535,
"clientcontactFirstName": "Babs",
"clientcontactName": "Smith"
}
]
}&user=<username>&password=<password>
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"clientcontactInternalRef": 6535,
"clientcontactuuid": "05F73F03055D4F0D942A7E03D0BA09EE",
"clientcontactTimeStampModified": 1544094783,
"clientcontactRecordVersionNumber": 11
}
]
}Note:
To discover which fields are editable make a call to the "Contacts details" endpoint and specify '&style=modelstructure' see Meta-data
