Add Contact Roles to a Specific Deal
Purpose
To add contact roles to a specific deal.
Request Details
Request URL
{api-domain}/crm/{version}/Deals/{deal_id}/Contact_Roles/{contact_id}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.modules.ALL
(or)
scope=ZohoCRM.modules.deals.{operation_type}
(and)
scope=ZohoCRM.modules.contacts.{operation_type}
Possible operation types
ALL - Full access to the records
WRITE - Edit records
UPDATE - Update records
Sample Input
Copiedcurl "https://www.zohoapis.com/crm/v4/Deals/4150868000003384003/Contact_Roles/4150868000003283024"
-X PUT
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Input JSON Keys
- Contact_RoleJSON object, mandatory
Specify the name and ID of the contact role to be assigned. To get valid contact roles, refer to the Get Contact Roles API.
Sample Input
Copied{
"data": [
{
"Contact_Role": {
"name": "Executive Sponsor",
"id": "3652397000000006877"
}
}
]
}
Possible Errors
- INVALID_URL_PATTERNHTTP 404
Please check if the URL trying to access is a correct one
Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: Client does not have ZohoCRM.modules.contacts.UPDATE (or) ZohoCRM.modules.deals.UPDATE scope. Create a new client with valid scope. Refer to scope section above. - NO_PERMISSIONHTTP 403
Permission denied to update records
Resolution: The user does not have permission to update records. Contact your system administrator. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in Server. Contact support team. - INVALID_REQUEST_METHODHTTP 400
The http request method type is not a valid one
Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above. - AUTHORIZATION_FAILEDHTTP 400
User does not have sufficient privilege to update records
Resolution: The user does not have the permission to update records. Contact your system administrator. - MANDATORY_NOT_FOUNDHTTP 400
required field not found
Resolution: Specify the API name of the contact role in your request input. Refer to Get Contact Roles API to get valid contact role names. - INVALID_DATAHTTP 400
the related id given seems to be invalid
Resolution: The {deal_id} specified in the request URL is invalid. Specify a valid {deal_id}. Refer to Get Records API to get valid record IDs. - INVALID_DATAHTTP 400
the id given seems to be invalid
Resolution: The {contact_id} specified in the request URL is invalid. Specify a valid {contact_id}. Refer to Get Records API to get valid record IDs. - INVALID_DATAHTTP 400
invalid data
Resolution: The API name of the contact role specified in the request input is invalid. Specify a valid contact role API name. To retrieve the same through API, refer to Get Contact Roles API.
Sample Response
Copied{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "4150868000003283024"
},
"message": "relation updated",
"status": "success"
}
]
}