Delete Services
Purpose
To delete existing services in your organization.
Request Details
Request URL
{api-domain}/crm/{version}/Services__s?ids={service_id1,service_id2,...service_id100}
To delete a specific service:
{api-domain}/crm/{version}/Services__s/{service_id}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.modules.services.{operation_type}
Possible operation types
ALL - Full access to services data
DELETE - Delete services data
Parameters
- idsstring, mandatory (only when deleting more than one service)
Specify the distinctive IDs of the services that have to be deleted.
You can obtain the service ID from GET Services API.
You can delete a maximum of 100 services per API call.
All the appointments related to the deleted service will defaultly get deleted.
Deals created on completion of an appointment under the deleted service will not be deleted.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v3/Services__s?ids=5545974000002109065,5545974000002109033,5545974000002109001"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Possible Errors
- INVALID_DATAHTTP 400
The Service ID given in the request URL is either incorrect or already deleted.
Solution: Make a GET Services API call and provide a valid Service ID. - INVALID_REQUEST_METHODHTTP 400
The given http request method type is invalid.
Solution: Use only the DELETE method in the request URL to access this API. - REQUIRED_PARAM_MISSINGHTTP 400
You failed to specify the ID of the service which has to be deleted.
Solution: Specify the service ID in the request URL. - INVALID_TOKENHTTP 401
You have used an invalid oauth token.
Solution: The token you used has expired. Kindly refresh your token and retry. - OAUTH_SCOPE_MISMATCHHTTP 401
The token you used has been created using the wrong oauth scope.
Solution: Use either ZohoCRM.modules.services.Delete or ZohoCRM.modules.services.ALL scope to create a new valid token. - NO_PERMISSIONHTTP 403
You do not have permission to delete any services.
Solution: Contact your system administrator. - INVALID_URL_PATTERNHTTP 404
Check if you are trying to access the correct URL.
Solution: You have given an invalid request URL. Use either /Services__s?ids={service_id1,service_id2,...service_id100} or /Services__s/{service_id} endpoints to provide a valid URL. - INTERNAL_ERRORHTTP 500
Internal Server Error
Solution: Unexpected and unhandled exception in server. Please contact our support team.
Sample Response
Copied{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "5545974000002109065"
},
"message": "record deleted",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "5545974000002109033"
},
"message": "record deleted",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "5545974000002109001"
},
"message": "record deleted",
"status": "success"
}
]
}