Chilkat Online Tools

PowerBuilder / Zoho CRM REST APIs / Enable Notifications

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_Json
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_Code
string ls_Message
string ls_Status
integer j
integer li_Count_j
string ls_Channel_expiry
string ls_Resource_uri
string ls_Resource_id
string ls_Resource_name
string ls_Channel_id
integer i
integer li_Count_i

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

loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// 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.create",
//         "Price_Books.create",
//         "Contacts.create",
//         "Solutions.edit"
//       ],
//       "channel_expiry": "2018-02-02T10:30:00 05:30",
//       "token": "TOKEN_FOR_VERIFICATION_OF_1000000068001",
//       "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2"
//     },
//     {
//       "channel_id": "1000000068002",
//       "events": [
//         "Deals.all"
//       ],
//       "channel_expiry": "2018-02-02T10:30:00 05:30",
//       "token": "TOKEN_FOR_VERIFICATION_OF_1000000068002",
//       "notify_url": "",
//       "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val1": "1000000068003",
//       "events": [
//         "Cases.all"
//       ],
//       "channel_expiry": "2018-02-02T10:30:00 05:30",
//       "token": "TOKEN_FOR_VERIFICATION_OF_1000000068003",
//       "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1"
//     }
//   ]
// }

loo_Json = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_Json.ConnectToNewObject("Chilkat.JsonObject")

loo_Json.UpdateString("watch[0].channel_id","1000000068001")
loo_Json.UpdateString("watch[0].events[0]","Solutions.create")
loo_Json.UpdateString("watch[0].events[1]","Price_Books.create")
loo_Json.UpdateString("watch[0].events[2]","Contacts.create")
loo_Json.UpdateString("watch[0].events[3]","Solutions.edit")
loo_Json.UpdateString("watch[0].channel_expiry","2018-02-02T10:30:00 05:30")
loo_Json.UpdateString("watch[0].token","TOKEN_FOR_VERIFICATION_OF_1000000068001")
loo_Json.UpdateString("watch[0].notify_url","https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2")
loo_Json.UpdateString("watch[1].channel_id","1000000068002")
loo_Json.UpdateString("watch[1].events[0]","Deals.all")
loo_Json.UpdateString("watch[1].channel_expiry","2018-02-02T10:30:00 05:30")
loo_Json.UpdateString("watch[1].token","TOKEN_FOR_VERIFICATION_OF_1000000068002")
loo_Json.UpdateString("watch[1].notify_url","")
loo_Json.UpdateString("watch[1].~"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val1~"","1000000068003")
loo_Json.UpdateString("watch[1].events[0]","Cases.all")
loo_Json.UpdateString("watch[1].channel_expiry","2018-02-02T10:30:00 05:30")
loo_Json.UpdateString("watch[1].token","TOKEN_FOR_VERIFICATION_OF_1000000068003")
loo_Json.UpdateString("watch[1].notify_url","https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1")

// Adds the "Authorization: Bearer <access_token>" header.
loo_Http.AuthToken = "<access_token>"

loo_Resp = loo_Http.PostJson3("https://domain.com/crm/v2/actions/watch","application/json",loo_Json)
if loo_Http.LastMethodSuccess = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_Json
    return
end if

loo_SbResponseBody = create oleobject
// Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")

loo_Resp.GetBodySb(loo_SbResponseBody)

loo_JResp = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JResp.ConnectToNewObject("Chilkat.JsonObject")

loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0

Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()

li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
    Write-Debug "Response Header:"
    Write-Debug loo_Resp.Header
    Write-Debug "Failed."
    destroy loo_Resp
    destroy loo_Http
    destroy loo_Json
    destroy loo_SbResponseBody
    destroy loo_JResp
    return
end if

destroy loo_Resp

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

// {
//   "watch": [
//     {
//       "code": "SUCCESS",
//       "details": {
//         "events": [
//           {
//             "channel_expiry": "2021-05-11T16:42:48+00:00",
//             "resource_uri": "https://crm.localzoho.com/crm/v2/Contacts",
//             "resource_id": "738964000000000129",
//             "resource_name": "Contacts",
//             "channel_id": "1000000068001"
//           },
//           {
//             "channel_expiry": "2021-05-11T16:42:48+00:00",
//             "resource_uri": "https://crm.localzoho.com/crm/v2/Solutions",
//             "resource_id": "738964000000000161",
//             "resource_name": "Solutions",
//             "channel_id": "1000000068001"
//           },
//           {
//             "channel_expiry": "2021-05-11T16:42:48+00:00",
//             "resource_uri": "https://crm.localzoho.com/crm/v2/Price_Books",
//             "resource_id": "738964000000000167",
//             "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-11T16:42:48+00:00",
//             "resource_uri": "https://crm.localzoho.com/crm/v2/Deals",
//             "resource_id": "738964000000000131",
//             "resource_name": "Deals",
//             "channel_id": "1000000068002"
//           }
//         ]
//       },
//       "message": "Successfully subscribed for actions-watch of the given module",
//       "status": "success"
//     },
//     {
//       "code": "SUCCESS",
//       "details": {
//         "events": [
//           {
//             "channel_expiry": "2021-05-11T16:42:48+00:00",
//             "resource_uri": "https://crm.localzoho.com/crm/v2/Cases",
//             "resource_id": "738964000000000159",
//             "resource_name": "Cases",
//             "channel_id": "1000000068003"
//           }
//         ]
//       },
//       "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

i = 0
li_Count_i = loo_JResp.SizeOfArray("watch")
do while i < li_Count_i
    loo_JResp.I = i
    ls_Code = loo_JResp.StringOf("watch[i].code")
    ls_Message = loo_JResp.StringOf("watch[i].message")
    ls_Status = loo_JResp.StringOf("watch[i].status")
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("watch[i].details.events")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Channel_expiry = loo_JResp.StringOf("watch[i].details.events[j].channel_expiry")
        ls_Resource_uri = loo_JResp.StringOf("watch[i].details.events[j].resource_uri")
        ls_Resource_id = loo_JResp.StringOf("watch[i].details.events[j].resource_id")
        ls_Resource_name = loo_JResp.StringOf("watch[i].details.events[j].resource_name")
        ls_Channel_id = loo_JResp.StringOf("watch[i].details.events[j].channel_id")
        j = j + 1
    loop
    i = i + 1
loop


destroy loo_Http
destroy loo_Json
destroy loo_SbResponseBody
destroy loo_JResp

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-d '{
    "watch": [
        {
            "channel_id": "1000000068001",
            "events": [
                "Solutions.create",
                "Price_Books.create",
                "Contacts.create",
                "Solutions.edit"
            ],
            "channel_expiry": "2018-02-02T10:30:00+05:30",
            "token": "TOKEN_FOR_VERIFICATION_OF_1000000068001",
            "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2"
        },
        {
            "channel_id": "1000000068002",
            "events": [
                "Deals.all"
            ],
            "channel_expiry": "2018-02-02T10:30:00+05:30",
            "token": "TOKEN_FOR_VERIFICATION_OF_1000000068002",
            "notify_url": """https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val1"
        },
        {
            "channel_id": "1000000068003",
            "events": [
                "Cases.all"
            ],
            "channel_expiry": "2018-02-02T10:30:00+05:30",
            "token": "TOKEN_FOR_VERIFICATION_OF_1000000068003",
            "notify_url": "https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1"
        }
    ]
}'
https://domain.com/crm/v2/actions/watch

Postman Collection Item JSON

{
  "name": "Enable Notifications",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"watch\": [\n        {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.create\",\n                \"Price_Books.create\",\n                \"Contacts.create\",\n                \"Solutions.edit\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n        },\n        {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.all\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"\"\"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val1\"\n        },\n        {\n            \"channel_id\": \"1000000068003\",\n            \"events\": [\n                \"Cases.all\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n        }\n    ]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{api-domain}}/crm/v2/actions/watch",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2",
        "actions",
        "watch"
      ]
    },
    "description": "To enable instant notifications of actions performed on a module."
  },
  "response": [
    {
      "name": "SUCCESS RESPONSE",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n        {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.create\",\n                \"Price_Books.create\",\n                \"Contacts.create\",\n                \"Solutions.edit\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n        },\n        {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.all\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val1\"\n        },\n        {\n            \"channel_id\": \"1000000068003\",\n            \"events\": [\n                \"Cases.all\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 15:42:48 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-store, no-cache, must-revalidate, private"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-11T16:40:31+00:00"
        },
        {
          "key": "clientVersion",
          "value": "4027076"
        },
        {
          "key": "clientsubVersion",
          "value": "748ecbe82ec7e144b66ee25f264bbd88"
        },
        {
          "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=15768000"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"watch\": [\n        {\n            \"code\": \"SUCCESS\",\n            \"details\": {\n                \"events\": [\n                    {\n                        \"channel_expiry\": \"2021-05-11T16:42:48+00:00\",\n                        \"resource_uri\": \"https://crm.localzoho.com/crm/v2/Contacts\",\n                        \"resource_id\": \"738964000000000129\",\n                        \"resource_name\": \"Contacts\",\n                        \"channel_id\": \"1000000068001\"\n                    },\n                    {\n                        \"channel_expiry\": \"2021-05-11T16:42:48+00:00\",\n                        \"resource_uri\": \"https://crm.localzoho.com/crm/v2/Solutions\",\n                        \"resource_id\": \"738964000000000161\",\n                        \"resource_name\": \"Solutions\",\n                        \"channel_id\": \"1000000068001\"\n                    },\n                    {\n                        \"channel_expiry\": \"2021-05-11T16:42:48+00:00\",\n                        \"resource_uri\": \"https://crm.localzoho.com/crm/v2/Price_Books\",\n                        \"resource_id\": \"738964000000000167\",\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-11T16:42:48+00:00\",\n                        \"resource_uri\": \"https://crm.localzoho.com/crm/v2/Deals\",\n                        \"resource_id\": \"738964000000000131\",\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            \"code\": \"SUCCESS\",\n            \"details\": {\n                \"events\": [\n                    {\n                        \"channel_expiry\": \"2021-05-11T16:42:48+00:00\",\n                        \"resource_uri\": \"https://crm.localzoho.com/crm/v2/Cases\",\n                        \"resource_id\": \"738964000000000159\",\n                        \"resource_name\": \"Cases\",\n                        \"channel_id\": \"1000000068003\"\n                    }\n                ]\n            },\n            \"message\": \"Successfully subscribed for actions-watch of the given module\",\n            \"status\": \"success\"\n        }\n    ]\n}"
    },
    {
      "name": "UNABLE_TO_PARSE_DATA_TYPE",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n        {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.create\",\n                \"Price_Books.create\",\n                \"Contacts.create\",\n                \"Solutions.edit\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n        },\n        {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.all\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"\"\"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val1\"\n        },\n        {\n            \"channel_id\": \"1000000068003\",\n            \"events\": [\n                \"Cases.all\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 15:42:01 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "136"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Set-Cookie",
          "value": "82aad952ba=5d08dbe022277a950e88d07b515e84e3; Path=/"
        },
        {
          "key": "Set-Cookie",
          "value": "crmcsr=2401a813-12f4-489b-b1c8-bf7ce69fb4bf;path=/;SameSite=None;Secure;priority=high"
        },
        {
          "key": "Set-Cookie",
          "value": "_zcsr_tmp=2401a813-12f4-489b-b1c8-bf7ce69fb4bf;path=/;SameSite=Strict;Secure;priority=high"
        },
        {
          "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": "INVALID_DATA",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n        {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.create\",\n                \"Price_Books.create\",\n                \"Contacts.create\",\n                \"Solutions.edit\"\n            ],\n            \"channel_expiry\": 123,\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Accepted",
      "code": 202,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 15:44:19 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "149"
        },
        {
          "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-store, no-cache, must-revalidate, private"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-11T16:40:31+00:00"
        },
        {
          "key": "clientVersion",
          "value": "4027076"
        },
        {
          "key": "clientsubVersion",
          "value": "748ecbe82ec7e144b66ee25f264bbd88"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"watch\": [\n        {\n            \"code\": \"INVALID_DATA\",\n            \"details\": {\n                \"expected_data_type\": \"datetime\",\n                \"api_name\": \"channel_expiry\"\n            },\n            \"message\": \"invalid data\",\n            \"status\": \"error\"\n        }\n    ]\n}"
    },
    {
      "name": "MANDATORY_NOT_FOUND",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n        {\n            \"events\": [\n                \"Solutions.create\",\n                \"Price_Books.create\",\n                \"Contacts.create\",\n                \"Solutions.edit\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Accepted",
      "code": 202,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 15:44:39 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "132"
        },
        {
          "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-store, no-cache, must-revalidate, private"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-11T16:40:31+00:00"
        },
        {
          "key": "clientVersion",
          "value": "4027076"
        },
        {
          "key": "clientsubVersion",
          "value": "748ecbe82ec7e144b66ee25f264bbd88"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"watch\": [\n        {\n            \"code\": \"MANDATORY_NOT_FOUND\",\n            \"details\": {\n                \"api_name\": \"channel_id\"\n            },\n            \"message\": \"required field not found\",\n            \"status\": \"error\"\n        }\n    ]\n}"
    },
    {
      "name": "AUTHENTICATION_FAILURE",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n        {\n            \"events\": [\n                \"Solutions.create\",\n                \"Price_Books.create\",\n                \"Contacts.create\",\n                \"Solutions.edit\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 15:44:57 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            \"events\": [\n                \"Solutions.create\",\n                \"Price_Books.create\",\n                \"Contacts.create\",\n                \"Solutions.edit\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 15:45:11 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": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"watch\": [\n        {\n            \"channel_id\": \"1000000068001\",\n            \"events\": [\n                \"Solutions.create\",\n                \"Price_Books.create\",\n                \"Contacts.create\",\n                \"Solutions.edit\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068001\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2\"\n        },\n        {\n            \"channel_id\": \"1000000068002\",\n            \"events\": [\n                \"Deals.all\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068002\",\n            \"notify_url\": \"\"\"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1&key2=val2&key3=val1\"\n        },\n        {\n            \"channel_id\": \"1000000068003\",\n            \"events\": [\n                \"Cases.all\"\n            ],\n            \"channel_expiry\": \"2018-02-02T10:30:00+05:30\",\n            \"token\": \"TOKEN_FOR_VERIFICATION_OF_1000000068003\",\n            \"notify_url\": \"https://www.zoho.com/callback?authorization=Zoho-oauthtoken 1000.23dnsbbbh455jnn&key1=val1\"\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/v2/actions/watch",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2",
            "actions",
            "watch"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Thu, 13 May 2021 06:47:40 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}"
    }
  ]
}