Get Assignment Rules

Purpose

To fetch the assignment rules in your org.

Request Details

Request URL

All - {api-domain}/crm/{version}/settings/automation/assignment_rules
Specific - {api-domain}/crm/{version}/settings/automation/assignment_rules/{rule_id}

Supported modules

Leads, Accounts, Contacts, Deals, and Custom

Header

Authorization: Zoho-oauthtoken <access_token>

Scope

scope=ZohoCRM.settings.assignment_rules.{{operation-type}}

Possible operation types

ALL - Full access to data
READ - Get data from the module

Parameters
  • modulestring

    The API name of the module you want to fetch the assignment rule from. Supported modules are Leads, Contacts, Accounts, Deals, and Custom. This parameter is mandatory when you fetch a specific assignment rule.

Possible Errors

  • INVALID_REQUEST_METHODHTTP 400

    The request method specified is invalid.
    Resolution: Specify the request method as GET.

  • REQUIRED_PARAM_MISSINGHTTP 400

    One of the expected parameter is missing
    Resolution: Include the module parameter in the request when you fetch a specific assignment rule.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    The token does not have the scope ZohoCRM.settings.ALL.
    Resolution: Create a token with the scope ZohoCRM.settings.ALL.

  • NO_PERMISSIONHTTP 403

    You do not have the permission to read the assignment rules.
    Resolution: Contact your administrator.

  • INVALID_URL_PATTERNHTTP 404

    The request URL has syntactical errors.
    Resolution: Correct the syntactical errors in the request URL.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v5/settings/automation/assignment_rules"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Sample Response

Copied{
    "assignment_rules": [
        {
            "created_time": "2020-04-12T00:00:00+05:30",
            "modified_time": "2021-02-26T12:45:14+05:30",
            "default_assignee": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            },
            "module": {
                "api_name": "Leads",
                "id": "3652397000000002175"
            },
            "name": "Lead Assignment Rule",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            },
            "description": "Assign the Leads to the Owners based on these criteria.",
            "id": "3652397000002045001",
            "created_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            }
        }
    ]
}