Get Assignment Rules

Purpose

To fetch the assignment rules in your org.

Endpoints

  • GET /settings/automation/assignment_rules

Request Details

Request URL

{api-domain}/crm/{version}/settings/automation/assignment_rules

Supported modules

Leads, Accounts, Contacts, Deals, Tasks, Cases, Teams module, 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, mandatory (mandatory when you fetch a specific assignment rule)

    The API name of the module you want to fetch the assignment rule from. Supported modules are Leads, Contacts, Accounts, Deals, Tasks, Cases, Teams module, and Custom module.

Response JSON

The assignment_rules JSON array lists the details of all the Assignment Rules configured for the specified module.

  • created_timestring

    Represents the date and time when the Assignment Rule was created.

  • modified_timestring

    Represents the date and time when the Assignment Rule was last modified.

  • default_assigneeJSON object

    Represents the default user to whom the record is assigned when no rule entry criteria match.

    • namestring

      Represents the name of the default assignee.

    • idstring

      Represents the unique ID of the default assignee.

  • moduleJSON object

    Represents the module to which the Assignment Rule belongs.

    • api_namestring

      Represents the API name of the module.

    • idstring

      Represents the unique ID of the module.

  • namestring

    Represents the name of the Assignment Rule.

  • modified_byJSON object

    Represents the user who last modified the Assignment Rule.

    • namestring

      Represents the name of the user who last modified the Assignment Rule.

    • idstring

      Represents the unique ID of the user who last modified the Assignment Rule.

  • descriptionstring

    Represents the description of the Assignment Rule.

  • idstring

    Represents the unique ID of the Assignment Rule.

  • created_byJSON object

    Represents the user who created the Assignment Rule.

    • namestring

      Represents the name of the user who created the Assignment Rule.

    • idstring

      Represents the unique ID of the user who created the 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/v8/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"
            }
        }
    ]
}