Update Contact Information
PUT/api/contacts/{id}
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| id | Number | Mandatory Customer Contact id. |
| firstname | String | Mandatory First Name |
| lastname | String | Mandatory Last Name |
| String | Mandatory E-mail | |
| title | String | optional Optional Position |
| phonenumber | String | optional Optional Phone Number |
| direction | String | optional Optional Direction (rtl or ltr)
|
| password | String | optional Optional password (only required if you pass send_set_password_email parameter) |
| is_primary | String | optional Optional Primary Contact (set on or don't pass it)
|
| donotsendwelcomeemail | String | optional Optional Do Not Send Welcome Email (set on or don't pass it) |
| send_set_password_email | String | optional Optional Send Set Password Email (set on or don't pass it) |
| permissions | Array | optional Optional Permissions for this contact(["1", "2", "3", "4", "5", "6" ]) [ "1", // Invoices permission "2", // Estimates permission "3", // Contracts permission "4", // Proposals permission "5", // Support permission "6" // Projects permission ] |
| invoice_emails | String | optional Optional E-Mail Notification for Invoices (set value same as name or don't pass it)
|
| estimate_emails | String | optional Optional E-Mail Notification for Estimate (set value same as name or don't pass it)
|
| credit_note_emails | String | optional Optional E-Mail Notification for Credit Note (set value same as name or don't pass it)
|
| project_emails | String | optional Optional E-Mail Notification for Project (set value same as name or don't pass it)
|
| ticket_emails | String | optional Optional E-Mail Notification for Tickets (set value same as name or don't pass it)
|
| task_emails | String | optional Optional E-Mail Notification for Task (set value same as name or don't pass it)
|
| contract_emails | String | optional Optional E-Mail Notification for Contract (set value same as name or don't pass it)
|
curl -X PUT "https://yoursite.com/api/contacts/123" \
-H "authtoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "firstname": "...", "lastname": "...", "email": "..." }' Success-Response:
HTTP/1.1 200 OK
{
"status": true,
"message": "Contact Updated Successfully"
} Error-Response:
HTTP/1.1 409 Conflict
{
"status": false,
"error": {
"email":"This Email is already exists"
},
"message": "This Email is already exists"
} Error-Response:
HTTP/1.1 404 Not Found
{
"status": false,
"message": "Contact Update fail"
}