Get Contact Roles of a Specific Deal

Purpose

To get the details of contact roles associated with a specific deal

Request Details

Request URL

{api-domain}/crm/{version}/Deals/{deal_id}/Contact_Roles

To get a specific contact role:
{api-domain}/crm/{version}/Deals/{deal_id}/Contact_Roles/{contact_id}

To get multiple contact roles:
{api-domain}/crm/{version}/Deals/{deal_id}/Contact_Roles?ids={contact_id1,contact_id2,...}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.modules.ALL
(or)
scope=ZohoCRM.modules.contacts.{operation_type}
(and)
scope=ZohoCRM.modules.deals.{operation_type}

Possible operation types

ALL - Full access to records
READ - Read records

Parameters

  • idsstring, optional

    Specify comma-separated unique IDs of the contact roles.

  • fieldsstring, mandatory

    Specify the API names of the fields whose details you want to receive in the response.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v4/Deals/4876876000001288017/Contact_Roles?fields=Email,Department"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"

Response JSON keys

  • Contact_RoleJSON object

    Represents the name and ID of the contact role.

  • idstring

    Represents the unique ID of the contact.

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.READ scope. Create a new client with valid scope. Refer to scope section above.

  • NO_PERMISSIONHTTP 403

    Permission denied to read records
    Resolution: The user does not have permission to read records in Deals or Contacts module. 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 read records
    Resolution: The user does not have the permission to read records. Contact your system administrator.

  • INVALID_DATAHTTP 400

    the related id given seems to be invalid
    Resolution: Specify a valid {deal_id}. To retrieve valid record IDs, refer to Get Records API.

  • REQUIRED_PARAM_MISSINGHTTP 400

    One of the expected parameter is missing
    Resolution: Specify the mandatory parameter fields.

Sample Response

Copied{
    "data": [
        {
            "Department": "Engineering",
            "Contact_Role": {
                "name": "Economic Decision Maker",
                "id": "3652397000000006881"
            },
            "Email": "krismarrier@gmail.com",
            "id": "4876876000000333191"
        },
        {
            "Department": "Purchasing",
            "Contact_Role": {
                "name": "Purchasing",
                "id": "3652397000000006875"
            },
            "Email": "brian@villa.com",
            "id": "4876876000001236004"
        },
        {
            "Department": null,
            "Contact_Role": {
                "name": "Product Management",
                "id": "4876876000001106883"
            },
            "Email": "tom.hanks@mkita.com",
            "id": "4876876000001288001"
        }
    ],
    "info": {
        "per_page": 200,
        "next_page_token": null,
        "count": 3,
        "page": 1,
        "previous_page_token": null,
        "page_token_expiry": null,
        "more_records": false
    }
}