Get Notification Details

Purpose

To get the details of the notifications enabled by the user.

Request Details

Request URL

{api-domain}crm/{version}/actions/watch
 

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.notifications.{operation_type}

Possible operation types

ALL - Full access to the record
READ - Get notification details

Parameters

  • pageInteger, optional

    To get the list of records from the respective pages. Default value is 1.
    Possible values: Integer values. Example: 1(or)4(or)6

  • per_pageInteger, optional

    To get the list of records available per page. Default value is 200.
    Possible values: Integer values. Example: 200(or)400

  • channel_idInteger, mandatory

    Specify the unique ID of the notification channel.
    Possible values: Channel ID. Example: 1000000068001

  • modulestring, optional

    Specify the API name of the module for which the notification is enabled.
    Possible values: Module API names. Example: Leads

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v5/actions/watch?page=1&per_page=200"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Note
  • Use the page and per_page parameter to fetch records according to their position in the CRM. Let's assume that the user has to fetch 400 records. The maximum number of records that one can get for an API call is 200. So, for records above the 200th position, they cannot be fetched. By using the page (1, 2, 3 and 4) and per_page (100) parameter, the user can fetch all 400 records using 4 API calls.

Sample Response

Copied{
    "watch": [
       {
            "channel_expiry": "2018-02-02T11:30:00+05:30",
            "resource_uri": "https://www.zohoapis.com/crm/v5/Contacts",
            "resource_id": "1000000000045",
            "notify_url": """https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val3",
            "resource_name": "Contacts",
            "channel_id": "1000000068001",
            "events": [
                "Contacts.create"
            ],
            "token": "TOKEN_FOR_VERIFICATION_OF_1000000068001"
        },
       {
            "channel_expiry": "2018-02-02T11:30:00+05:30",
            "resource_uri": "https://www.zohoapis.com/crm/v5/Leads",
            "resource_id": "1000000000041",
            "notify_url": """https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val3",
            "resource_name": "Leads",
            "channel_id": "1000000068001",
            "events": [
                "Leads.edit",
                "Leads.create",
                "Leads.delete"
            ],
            "token": "TOKEN_FOR_VERIFICATION_OF_1000000068001"
        },
       {
            "channel_expiry": "2018-02-02T11:30:00+05:30",
            "resource_uri": "https://www.zohoapis.com/crm/v5/Deals",
            "resource_id": "1000000000047",
            "notify_url": """https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val3",
            "resource_name": "Deals",
            "channel_id": "1000000068001",
            "events": [
                "Deals.edit",
                "Deals.create",
                "Deals.delete"
            ],
            "token": "TOKEN_FOR_VERIFICATION_OF_1000000068001"
        },
       {
            "channel_expiry": "2018-02-02T11:30:00+05:30",
            "resource_uri": "https://www.zohoapis.com/crm/v5/Tasks",
            "resource_id": "1000000000063",
            "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2",
            "resource_name": "Tasks",
            "channel_id": "1000000068001",
            "events": [
                "Tasks.edit",
                "Tasks.create",
                "Tasks.delete"
            ],
            "token": "TOKEN_FOR_VERIFICATION_OF_1000000068001"
        },
       {
            "channel_expiry": "2018-02-02T10:30:00+05:30",
            "resource_uri": "https://www.zohoapis.com/crm/v5/Leads",
            "resource_id": "1000000000041",
            "notify_url": """https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val3",
            "resource_name": "Leads",
            "channel_id": "1000000058003",
            "events": [
                "Leads.edit",
                "Leads.create",
                "Leads.delete"
            ],
            "token": "TOKEN_FOR_VERIFICATION_OF_1000000058003"
        }
    ],
    "info": {
        "per_page": 200,
        "count": 5,
        "page": 1,
        "more_records": false
    }
}