Deactivate Data Sharing Rule
Purpose
To deactivate a specific data sharing rule in your Zoho CRM organization.
Request Details
Request URL
{api-domain}/crm/{version}/settings/data_sharing/rules/{active_data_sharing_rule_ID}/actions/activate
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.data_sharing.UPDATE
(or)
ZohoCRM.settings.data_sharing.ALL
Parameter
- modulestring, mandatory
To deactivate a data sharing rule, 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.
Note
Use the Get Data Sharing Rules API to list all data sharing rule IDs in your organization. To know only active rules, use the "status" key with the value "active" ("status": "active").
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/data_sharing/rules/2276164000002052006/actions/activate?module=Leads"
-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. - ID_ALREADY_DEACTIVATEDHTTP 400
The data sharing rule has already been deactivated
Resolution: Specify an activated data sharing rule ID. Use the GET - Data Sharing Rules API to retrieve the rule IDs. - CANNOT_PROCESSHTTP 400
Cannot process your request
Resolution: The data sharing rule you are trying to deactivate 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
The given data sharing ID seems to be invalid
Resolution:Specify a valid data sharing rule ID to activate. Use the GET - Data Sharing Rules API to retrieve data sharing rule 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 deactivate 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 is deactivated successfully",
"status": "success"
}
]
}