Delete Variables
Purpose
To delete details of CRM variables.
Request Details
Request URL
{api-domain}/crm/{version}/settings/variables?ids={variable_id1, variable_id2, variable_id3}
To delete a specific variable:
{api-domain}/crm/{version}/settings/variables/{variable_id}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.settings.variables.{operation_type}
Possible operation types
ALL - Full access to variable data
DELETE - Delete variable data
Parameters
- idsstring, mandatory when deleting multiple variables
Specify comma separated variable IDs.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v6/settings/variables?ids=40000000047007,40000000047009,40000000047010"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Copiedresponse = invokeurl
[
url: "https://www.zohoapis.com/crm/v6/settings/variables?ids=40000000047007,40000000047009,40000000047010"
type: DELETE
connection:"crm_oauth_connection"
];
info response;
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.settings.variables.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 variables. 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. - NOT_ALLOWEDHTTP 400
The variable you want to delete is associated with other features
Resolution: You cannot delete a variable that is used in other features such as email or inventory templates, webhooks, functions etc. The "details" key in the response contains the places where the variables are used. Remove the variables from these places and then delete them. - AUTHORIZATION_FAILEDHTTP 400
User does not have sufficient privilege to delete variables
Resolution: The user does not have the permission to delete variables. Contact your system administrator. - INVALID_DATAHTTP 400
variable not deleted
Resolution: The specified ID of the variable is incorrect. Refer to Get Variables API to get unique variable ID. - UNABLE_TO_PARSE_DATA_TYPEHTTP 400
either the request body or parameters is in wrong format
Resolution: The parameter values are in the wrong format. Specify valid record IDs in the correct format. Refer to endpoints section above. - REQUIRED_PARAM_MISSINGHTTP 400
One of the expected parameter is missing
Resolution: 'ids' parameter is missing in the request. Please specify the valid IDs of the variables to be deleted. Refer to Get Variable Data API to get valid record IDs.
Sample Response
Copied{
"variables": [
{
"code": "SUCCESS",
"details": {
"id": "40000000047007"
},
"message": "variable deleted",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "40000000047009"
},
"message": "variable deleted",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "40000000047010"
},
"message": "variable deleted",
"status": "success"
}
]
}