HTTP Method: PUT
Base Syntax:
http://deepserhost/api/rest/[entities]/
JSON Payload Syntax: a JSON object with the data to update. Don’t forget to specify the ID of the company to update in the entitiy_id field
Example Syntax:
http://deepserhost/api/rest/companies
Example JSON Payload Syntax:
[
{
"name" : "ACME Company Germany Gmbh"
},
{
"entity_id" : "6",
"name" : "ACME Bulgaria",
"description" : "ACME Company Bulgaria OOD"
}
]
Description: updates the entity, given the payload JSON data.
Example Result:
http://deepserhost/api/rest/companies/
{
"error": [
{
"message": "Invalid error \"Resource not found. \" or error code missed.",
"code": 500
}
],
"success": [
{
"item": {
"entity_id": "6",
"parent_id": "1",
"sort_order": null,
"name": "ACME Bulgaria",
"description": "ACME Company Bulgaria OOD",
"phone": null,
"fax": null,
"address": null,
"city": null,
"state": null,
"country": null,
"zip_code": null,
"notes": null,
"logo": null,
"primary_contact": null,
"mailbox_id": null,
"status": null,
"formtemplate_id": "0",
"updated_at": "2018-10-29 16:21:14",
"created_at": "2018-10-29 15:52:47",
"payment_status": null
},
"message": "Resource updated successful.",
"code": 200
}
]
}
Returns a JSON object with 2 arrays: success with all the items created successfully, the code and the message; error with all the items not created due to an error, the error code and the message.