Rename a document
Update
| Parameter | Mandatory | Description | Examples | More Info |
|---|---|---|---|---|
| API | Yes | The API area | attachments.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 | Data identifying attachment to update | "attachmentID": 6958 |
| Update data | Yes | Data to update on attachment | "attachmentDescription": "Meeting at Boundry Mill" |
Example request (OAuth 2.0):
Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/attachments.json?company=1&&version=6&action=update&input={
"data": [
{
"attachmentID": 6958,
"attachmentDescription": "Meeting at Boundry Mill"
}
]
}
Example request (legacy username/password):
http://<SERVER>/jsonapi/attachments.json?company=1&&version=6&action=update&input={
"data": [
{
"attachmentID": 6958,
"attachmentDescription": "Meeting at Boundry Mill"
}
]
}&user=<username>&password=<password>
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"attachmentID": 5464,
"attachmentUuid": "9B7100C5B37B4F49B6B04F30833BAFC2",
"attachmentTimestampModified": 1501073421,
"attachmentRecordVersionNumber": 1
}
]
}Note:
To discover which fields are editable make a call to the "Attachment details" endpoint and specify '&style=modelstructure' see Meta-data
