Remove Contact Role from a Specific Deal

Purpose

To remove contact roles from a specific deal.

Request Details

Request URL

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

To remove more than one contact role from a deal:
{api-domain}/crm/{version}/Deals/{deal_id}/Contact_Roles?ids={contact1,contact2,..}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.modules.ALL
(or)
scope=ZohoCRM.modules.deals.DELETE
(and)
scope=ZohoCRM.modules.contacts.DELETE

Possible operation types

ALL - Full access to the records
DELETE - Delete records in the module

Parameters

  • idsstring, mandatory to remove more than one contact role

    Specify comma-separated unique IDs of the contacts

Note

You can remove up to 100 contact roles from a deal in a single API call.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v4/Deals/4150868000003384003/Contact_Roles/4150868000003283024"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

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.DELETE (or) ZohoCRM.modules.deals.DELETE scope. Create a new client with valid scope. Refer to scope section above.

  • NO_PERMISSIONHTTP 403

    Permission denied to delete records
    Resolution: The user does not have permission to delete 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 delete contact roles
    Resolution: The user does not have the permission to delete contact roles. Contact your system administrator.

  • INVALID_DATAHTTP 400

    contact role not deleted
    Resolution: The contact role you are trying to delete has already been deleted.

  • INVALID_DATAHTTP 400

    the related id given seems to be invalid
    Resolution: Specify a valid {deal_id} in the request URL. Refer to Get Records API to get valid record ids.

  • INVALID_DATAHTTP 400

    the id given seems to be invalid
    Resolution: Specify a valid {contact_id} in the request URL. Refer to Get Records API to get valid record ids.

  • MANDATORY_NOT_FOUNDHTTP 400

    relation not found
    Resolution: There is no relation between the specified Deal and Contact.

Sample Response

Copied{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "4150868000003283024"
            },
            "message": "relation removed",
            "status": "success"
        }
    ]
}