Chilkat Online Tools

unicodeCpp / Zoho CRM REST APIs / Update Details of a Notification

Back to Collection Items

#include <CkHttpW.h>
#include <CkJsonObjectW.h>
#include <CkStringBuilderW.h>
#include <CkHttpResponseW.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttpW http;
    bool success;

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "watch": [
    //     {
    //       "channel_id": "1000000068001",
    //       "events": [
    //         "Solutions.edit",
    //         "Price_Books.edit",
    //         "Contacts.delete",
    //         "Solutions.create"
    //       ],
    //       "channel_expiry": "2018-02-02T11:30:00 05:30",
    //       "token": "ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001",
    //       "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2"
    //     },
    //     {
    //       "channel_id": "1000000068002",
    //       "events": [
    //         "Deals.create"
    //       ],
    //       "channel_expiry": "2018-02-02T11:30:00 05:30",
    //       "token": "ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002",
    //       "notify_url": "",
    //     }
    //   ]
    // }

    CkJsonObjectW json;
    json.UpdateString(L"watch[0].channel_id",L"1000000068001");
    json.UpdateString(L"watch[0].events[0]",L"Solutions.edit");
    json.UpdateString(L"watch[0].events[1]",L"Price_Books.edit");
    json.UpdateString(L"watch[0].events[2]",L"Contacts.delete");
    json.UpdateString(L"watch[0].events[3]",L"Solutions.create");
    json.UpdateString(L"watch[0].channel_expiry",L"2018-02-02T11:30:00 05:30");
    json.UpdateString(L"watch[0].token",L"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001");
    json.UpdateString(L"watch[0].notify_url",L"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2");
    json.UpdateString(L"watch[1].channel_id",L"1000000068002");
    json.UpdateString(L"watch[1].events[0]",L"Deals.create");
    json.UpdateString(L"watch[1].channel_expiry",L"2018-02-02T11:30:00 05:30");
    json.UpdateString(L"watch[1].token",L"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002");
    json.UpdateString(L"watch[1].notify_url",L"");

    // Adds the "Authorization: Bearer <access_token>" header.
    http.put_AuthToken(L"<access_token>");

    CkStringBuilderW sbRequestBody;
    json.EmitSb(sbRequestBody);

    CkHttpResponseW *resp = http.PTextSb(L"PUT",L"https://domain.com/crm/v2.1/actions/watch",sbRequestBody,L"utf-8",L"application/json",false,false);
    if (http.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    CkStringBuilderW sbResponseBody;
    resp->GetBodySb(sbResponseBody);

    CkJsonObjectW jResp;
    jResp.LoadSb(sbResponseBody);
    jResp.put_EmitCompact(false);

    wprintf(L"Response Body:\n");
    wprintf(L"%s\n",jResp.emit());

    int respStatusCode = resp->get_StatusCode();
    wprintf(L"Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",resp->header());
        wprintf(L"Failed.\n");
        delete resp;
        return;
    }

    delete resp;

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "watch": [
    //     {
    //       "code": "SUCCESS",
    //       "details": {
    //         "events": [
    //           {
    //             "channel_expiry": "2021-05-11T15:02:45+05:30",
    //             "resource_uri": "https://www.zohoapis.com/crm/v2/Contacts",
    //             "resource_id": "4150868000000002179",
    //             "resource_name": "Contacts",
    //             "channel_id": "1000000068001"
    //           },
    //           {
    //             "channel_expiry": "2021-05-11T15:02:45+05:30",
    //             "resource_uri": "https://www.zohoapis.com/crm/v2/Solutions",
    //             "resource_id": "4150868000000002211",
    //             "resource_name": "Solutions",
    //             "channel_id": "1000000068001"
    //           },
    //           {
    //             "channel_expiry": "2021-05-11T15:02:45+05:30",
    //             "resource_uri": "https://www.zohoapis.com/crm/v2/Price_Books",
    //             "resource_id": "4150868000000002217",
    //             "resource_name": "Price_Books",
    //             "channel_id": "1000000068001"
    //           }
    //         ]
    //       },
    //       "message": "Successfully subscribed for actions-watch of the given module",
    //       "status": "success"
    //     },
    //     {
    //       "code": "SUCCESS",
    //       "details": {
    //         "events": [
    //           {
    //             "channel_expiry": "2021-05-11T15:02:45+05:30",
    //             "resource_uri": "https://www.zohoapis.com/crm/v2/Deals",
    //             "resource_id": "4150868000000002181",
    //             "resource_name": "Deals",
    //             "channel_id": "1000000068002"
    //           }
    //         ]
    //       },
    //       "message": "Successfully subscribed for actions-watch of the given module",
    //       "status": "success"
    //     }
    //   ]
    // }

    // Sample code for parsing the JSON response...
    // Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

    const wchar_t *code = 0;
    const wchar_t *message = 0;
    const wchar_t *status = 0;
    int j;
    int count_j;
    const wchar_t *channel_expiry = 0;
    const wchar_t *resource_uri = 0;
    const wchar_t *resource_id = 0;
    const wchar_t *resource_name = 0;
    const wchar_t *channel_id = 0;

    int i = 0;
    int count_i = jResp.SizeOfArray(L"watch");
    while (i < count_i) {
        jResp.put_I(i);
        code = jResp.stringOf(L"watch[i].code");
        message = jResp.stringOf(L"watch[i].message");
        status = jResp.stringOf(L"watch[i].status");
        j = 0;
        count_j = jResp.SizeOfArray(L"watch[i].details.events");
        while (j < count_j) {
            jResp.put_J(j);
            channel_expiry = jResp.stringOf(L"watch[i].details.events[j].channel_expiry");
            resource_uri = jResp.stringOf(L"watch[i].details.events[j].resource_uri");
            resource_id = jResp.stringOf(L"watch[i].details.events[j].resource_id");
            resource_name = jResp.stringOf(L"watch[i].details.events[j].resource_name");
            channel_id = jResp.stringOf(L"watch[i].details.events[j].channel_id");
            j = j + 1;
        }

        i = i + 1;
    }
    }

Curl Command

curl -X PUT
	-H "Authorization: Bearer <access_token>"
	-d '{
    "watch": [
       {
            "channel_id": "1000000068001",
            "events": [
                "Solutions.edit",
                "Price_Books.edit",
                "Contacts.delete",
                "Solutions.create"
            ],
            "channel_expiry": "2018-02-02T11:30:00+05:30",
            "token": "ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001",
            "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2"
        },
       {
            "channel_id": "1000000068002",
            "events": [
                "Deals.create"
            ],
            "channel_expiry": "2018-02-02T11:30:00+05:30",
            "token": "ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002",
            "notify_url": """https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val&key3=val1"
        }
    ]
}'
https://domain.com/crm/v2.1/actions/watch

Postman Collection Item JSON

{
  "name": "Update Details of a Notification",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "PUT",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"watch\": [\n       {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.edit\",\n                \"Price_Books.edit\",\n                \"Contacts.delete\",\n                \"Solutions.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2\"\n        },\n       {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"\"\"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val&key3=val1\"\n        }\n    ]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{api-domain}}/crm/v2.1/actions/watch",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2.1",
        "actions",
        "watch"
      ]
    },
    "description": "To update the details of the notifications enabled by a user. All the provided details would be persisted and rest of the details would be removed."
  },
  "response": [
    {
      "name": "SUCCESS RESPONSE",
      "originalRequest": {
        "method": "PUT",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n       {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.edit\",\n                \"Price_Books.edit\",\n                \"Contacts.delete\",\n                \"Solutions.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2\"\n        },\n       {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val&key3=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "actions",
            "watch"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:32:45 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-11T14:00:30+05:30"
        },
        {
          "key": "clientVersion",
          "value": "4019232"
        },
        {
          "key": "clientsubVersion",
          "value": "19804a82a902c9fa618d2b359b97e26a"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"watch\": [\n        {\n            \"code\": \"SUCCESS\",\n            \"details\": {\n                \"events\": [\n                    {\n                        \"channel_expiry\": \"2021-05-11T15:02:45+05:30\",\n                        \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Contacts\",\n                        \"resource_id\": \"4150868000000002179\",\n                        \"resource_name\": \"Contacts\",\n                        \"channel_id\": \"1000000068001\"\n                    },\n                    {\n                        \"channel_expiry\": \"2021-05-11T15:02:45+05:30\",\n                        \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Solutions\",\n                        \"resource_id\": \"4150868000000002211\",\n                        \"resource_name\": \"Solutions\",\n                        \"channel_id\": \"1000000068001\"\n                    },\n                    {\n                        \"channel_expiry\": \"2021-05-11T15:02:45+05:30\",\n                        \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Price_Books\",\n                        \"resource_id\": \"4150868000000002217\",\n                        \"resource_name\": \"Price_Books\",\n                        \"channel_id\": \"1000000068001\"\n                    }\n                ]\n            },\n            \"message\": \"Successfully subscribed for actions-watch of the given module\",\n            \"status\": \"success\"\n        },\n        {\n            \"code\": \"SUCCESS\",\n            \"details\": {\n                \"events\": [\n                    {\n                        \"channel_expiry\": \"2021-05-11T15:02:45+05:30\",\n                        \"resource_uri\": \"https://www.zohoapis.com/crm/v2/Deals\",\n                        \"resource_id\": \"4150868000000002181\",\n                        \"resource_name\": \"Deals\",\n                        \"channel_id\": \"1000000068002\"\n                    }\n                ]\n            },\n            \"message\": \"Successfully subscribed for actions-watch of the given module\",\n            \"status\": \"success\"\n        }\n    ]\n}"
    },
    {
      "name": "INVALID_URL_PATTERN",
      "originalRequest": {
        "method": "PUT",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n       {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.edit\",\n                \"Price_Books.edit\",\n                \"Contacts.delete\",\n                \"Solutions.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2\"\n        },\n       {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val&key3=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/actions/watc",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "actions",
            "watc"
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:33:04 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "131"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-11T14:00:30+05:30"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"INVALID_URL_PATTERN\",\n    \"details\": {},\n    \"message\": \"Please check if the URL trying to access is a correct one\",\n    \"status\": \"error\"\n}"
    },
    {
      "name": "UNABLE_TO_PARSE_DATA_TYPE",
      "originalRequest": {
        "method": "PUT",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n       {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.edit\",\n                \"Price_Books.edit\",\n                \"Contacts.delete\",\n                \"Solutions.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2\"\n        },\n       {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"\"\"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val&key3=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:36:37 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "136"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"UNABLE_TO_PARSE_DATA_TYPE\",\n    \"details\": {},\n    \"message\": \"either the request body or parameters is in wrong format\",\n    \"status\": \"error\"\n}"
    },
    {
      "name": "AUTHENTICATION_FAILURE",
      "originalRequest": {
        "method": "PUT",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n       {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.edit\",\n                \"Price_Books.edit\",\n                \"Contacts.delete\",\n                \"Solutions.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2\"\n        },\n       {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val&key3=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:37:25 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "98"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"AUTHENTICATION_FAILURE\",\n    \"details\": {},\n    \"message\": \"Authentication failed\",\n    \"status\": \"error\"\n}"
    },
    {
      "name": "INVALID_REQUEST_METHOD",
      "originalRequest": {
        "method": "COPY",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n       {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.edit\",\n                \"Price_Books.edit\",\n                \"Contacts.delete\",\n                \"Solutions.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2\"\n        },\n       {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"\"\"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val&key3=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:39:56 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "124"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "X-Frame-Options",
          "value": "deny"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"INVALID_REQUEST_METHOD\",\n    \"details\": {},\n    \"message\": \"The http request method type is not a valid one\",\n    \"status\": \"error\"\n}"
    },
    {
      "name": "INVALID_REQUEST",
      "originalRequest": {
        "method": "PUT",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n       {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.edit\",\n                \"Price_Books.edit\",\n                \"Contacts.delete\",\n                \"Solutions.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key=val2\"\n        },\n       {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.create\"\n            ],\n            \"channel_expiry\": \"2018-02-02T11:30:00+05:30\",\n            \"token\": \"ALTERED_TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"\"\"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val&key3=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Thu, 13 May 2021 08:25:31 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "192"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"INVALID_REQUEST\",\n    \"details\": {},\n    \"message\": \"unable to process your request. please verify whether you have entered proper method name, parameter and parameter values.\",\n    \"status\": \"error\"\n}"
    }
  ]
}