Delete Data Sharing Rule

Purpose

To delete a data sharing rule from your Zoho CRM organization.

Endpoints

  • DELETE /settings/data_sharing/rules/{data_sharing_rule_ID}?module={module_API_name}

Request Details

Request URL

{api-domain}/crm/{version}/settings/data_sharing/rules/{data_sharing_rule_ID}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.data_sharing.DELETE 
(or) 
ZohoCRM.settings.data_sharing.ALL 

Parameter

  • modulestring, mandatory

    Specify the API name of the module for which the rule is configured. Use the GET - Modules Metadata API to retrieve the module API names. 

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/data_sharing/rules/2276164000002052006"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Possible Errors

  • REQUIRED_PARAM_MISSINGHTTP 400

    Required parameter is missing
    Resolution: Specify the "module" parameter. Use the GET - Modules Metadata API to retrieve the module API names.

  • CANNOT_PROCESSHTTP 400

    Cannot process your request
    Resolution: The data sharing rule you are trying to delete is currently in the scheduler process. The API will work for other rules only after the scheduler completes its execution. Please try again later.

  • INVALID_DATAHTTP 400

    Invalid data sharing rule ID provided
    Resolution: Specify a valid data sharing rule ID in the URL to delete it from Zoho CRM org. Use the GET - Retrieve Data Sharing Rules API to retrieve valid IDs.

  • 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 the Endpoints section.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: The client does not have a valid scope to delete the data sharing rule. Create a new token with valid scope. Refer to the Scope section.

  • AUTHENTICATION_FAILUREHTTP 401

    Authentication failed
    Resolution: Pass the access token in the request header of the API call.

  • 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 the Request URL section for details. Refer to the Request URL section.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

Sample Response

Copied{
    "sharing_rules": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "2276164000002052006"
            },
            "message": "Sharing Rule deleted",
            "status": "success"
        }
    ]
}