Request Details

Request URL

{api-domain}/crm/{version}/{module_api_name}/actions/count

Supported modules

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

Header

Authorization: Zoho-oauthtoken <access_token>

Scope

Scope = ZohoSearch.securesearch.READ
(and)
ZohoCRM.modules.{module_name}.READ

Parameters
  • criteriastring, optional

    The condition to obtain the number of records that match the criterion. You can filter the records based on the API name of the field. The supported comparators are starts_with and equals. Examples: criteria=(Last_Name:starts_with:B), criteria=(Phone:equals:9876543210) etc.

  • phonestring, optional

    The total number of records you want to retrieve that contain the given phone number in their Phone field.
    Example: phone=9876543210.

  • emailstring, optional

    The total number of records you want to retrieve that contain the given email ID in their Email field. Ensure that you encode any special characters in the email ID.
    Example: email=p%2Bboyle@abc.com (the encoded form for the email p+boyle@abc.com).

  • wordstring, optional

    The total number of records you want to retrieve that contain the given word in any of their fields.
    Example: word=fin.

Note
  • Apart from the above parameters, you can also use other optional parameters mentioned on the Search records page.

  • There would be a 1-10 minute delay in refreshing the statistics.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v3/Leads/actions/count"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Possible Errors

  • INVALID_QUERYHTTP 400

    Reasons:

    • You have formed an invalid search query.

    • The operator is not supported for that field in the query.

    Resolution: Refer to the "details" key in the response.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    You do not have the scope required to use this API.
    Resolution: Use the correct scope and generate the grant and access tokens.

Sample Response

Copied{
    "count": 694
}