Mass Delete Status

Purpose

To get the status of the mass delete job scheduled previously.

Endpoints

  • GET /{module_API_name}/actions/mass_delete?job_id={job_ID}

Request Details

Request URL

{api-domain}/crm/{version}/{module_API_name}/actions/mass_delete?job_id={job_ID}

Supported modules

Leads, Accounts, Contacts, Deals, Campaigns, Tasks, Calls, Meetings, Solutions, Products, Vendors, Price Books, Quotes, Sales Orders, Purchase Orders, Invoices, and Custom modules

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.mass_delete.READ
(or)
ZohoCRM.mass_delete.{module_name}.READ

Possible module names

leads, accounts, contacts, deals, campaigns, tasks, calls, meetings, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, and custom

Parameters

  • job_idstring, mandatory

    Represents the unique ID of the mass delete job obtained in the response of Mass Delete Records.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/actions/mass_delete?job_id= 3652397000009565021"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Response JSON Keys

  • Statusstring

    Indicates the status of the mass delete API. Possible values are "COMPLETED", "RUNNING", and "FAILED".

  • Total_Countinteger

    Specifies the total number of records that were scheduled to be deleted.

  • Failed_Countinteger

    Specifies the number of records that were not deleted.

  • Deleted_Countinteger

    Specifies the number of records that were deleted successfully.

Possible Errors

  • INVALID_MODULEHTTP 400

    You have either specified an invalid module API name, there is no tab permission, or the module is removed from the list of available modules.
    Resolution: Use the Modules API to get the API name of the module. If you have no tab permission or the module is removed, contact your system administrator.

  • INVALID_MODULEHTTP 400

    The given module is not supported in API.
    Resolution: The modules such as Documents and Projects are not supported in API, currently. This error will not be shown, once these modules are supported.

  • INVALID_REQUEST_METHODHTTP 400

    The request method is incorrect.
    Resolution: Use the HTTP GET method to make this API call. Any other request method will result in this error.

  • AUTHORIZATION_FAILEDHTTP 400

    You do not have sufficient permission to mass update records or to get the status.
    Resolution: Contact your system administrator.

  • MANDATORY_NOT_FOUNDHTTP 400

    You have not included the "job_id" parameter in the request.
    Resolution: Include the mandatory parameter "job_id" in the request URL.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    The access token you have used to make this API call does not have the required scope.
    Resolution: Generate a new access token with the scope ZohoCRM.mass_update.{module_name}.READ. Refer to the Possible module names and Possible operation types sections for details.

  • NO_PERMISSIONHTTP 403

    You do not have permission to retrieve mass update status.
    Resolution: Contact your system administrator.

  • NOT_FOUNDHTTP 404

    The specified "job_id" is not found or invalid.
    Resolution: Specify a valid job_id. You can get the job_id from the response of the Mass Delete API.

  • INVALID_URL_PATTERNHTTP 404

    The request URL is incorrect.
    Resolution: Specify a valid request URL. Refer to the Request URL section for the right URL.

  • INTERNAL_ERRORHTTP 500

    Unexpected and unhandled exception in the server. 
    Resolution: Contact the support team at support@zohocrm.com.

Sample Response

Copied{
    "data": [
        {
            "Status": "COMPLETED",
            "Failed_Count": 0,
            "Deleted_Count": 9,
            "Total_Count": 9
        }
    ]
}