Get Contact Roles
When multiple contacts are associated with a deal/opportunity, the contacts' details are stored in the Contact Roles related list.
Purpose
To get the list of contact roles.
Endpoints
- GET /Contacts/roles
- GET /Contacts/roles/{contact_role_ID}
Request Details
Request URL
{api-domain}/crm/{version}/Contacts/roles
To get a specific contact role:
{api-domain}/crm/{version}/Contacts/roles/{contact_role_ID}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.modules.ALL
(or)
ZohoCRM.modules.contacts.{operation_type}
Possible operation types
ALL - Full access to contacts
READ - Read contacts
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/Contacts/roles"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Response JSON keys
- sequence_numberinteger
Represents the position of the contact role in the picklist in the CRM UI.
- namestring
Represents the name of the contact role.
- idstring
Represents the unique ID of the contact role.
Possible Errors
- INVALID_REQUEST_METHODHTTP 400
The request method is incorrect.
Resolution: Use the HTTP GET method to make this API call. Any other request method will result in this error. - AUTHORIZATION_FAILEDHTTP 400
You do not have sufficient permission to add subform or module records.
Resolution: Contact your system administrator. - OAUTH_SCOPE_MISMATCHHTTP 401
The access token you have used to make this API call does not have the required scope.
Resolution: Generate a new access token with the scope mentioned in the Scopes section. - NO_PERMISSIONHTTP 403
Permission denied to read records
Resolution: The user does not have permission to read records. Contact your system administrator. - INVALID_URL_PATTERNHTTP 404
The request URL is incorrect.
Resolution: Specify a valid request URL. Refer to the Request URL section for the right URL. - INTERNAL_ERRORHTTP 500
Unexpected and unhandled exception in the server.
Resolution: Contact the support team at support@zohocrm.com.
Sample Response
Copied{
"contact_roles": [
{
"sequence_number": 1,
"name": "Purchasing",
"id": "4150868000000006875"
},
{
"sequence_number": 2,
"name": "Engineering Lead",
"id": "4150868000000006879"
},
{
"sequence_number": 3,
"name": "Economic Decision Maker",
"id": "4150868000000006881"
},
{
"sequence_number": 4,
"name": "Product Management",
"id": "4150868000000006883"
}
]
}