Delete a Shift Hour

Purpose

To delete the shift hours configured for your organization.

Request Details

Request URL

{api-domain}/crm/{version}/settings/business_hours/shift_hours/{shift_hour_id}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
X-CRM-ORG:{your_org_id}

Scope

scope=ZohoCRM.settings.business_hours.ALL
(or)
scope=ZohoCRM.settings.business_hours.DELETE

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v6/settings/business_hours/shift_hours/3652397000011179005"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-H "X-CRM-ORG: {your_org_ID}"

Possible Errors

  • INVALID_DATAHTTP 400

    The ID of the shift hour you want to delete is incorrect.
    Resolution: Use the Get Shift Hours API to get the ID of each shift hour in your org.

  • INVALID_REQUEST_METHODHTTP 404

    The HTTP request method is incorrect.
    Resolution: The HTTP method is DELETE to delete a shift hour.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    You do not have the right scope to access this API.
    Resolution: Create new token with ZohoCRM.settings.business_hours.ALL or ZohoCRM.settings.business_hours.DELETE scopes.

  • NO_PERMISSIONHTTP 403

    You d not have the "Manage Users" permission.
    Resolution: Contact your administrator to obtain the necessary permission to perform this action.

Sample Response

Copied{
    "shift_hours": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "3652397000011179005"
            },
            "message": "shift hours deleted successfully",
            "status": "success"
        }
    ]
}