Chilkat Online Tools

PowerBuilder / Zoho CRM REST APIs / Get Territories Assigned

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_Name
string ls_Id
string ls_V_Email
string ls_Scurrency_symbol
string ls_Account_Type
string ls_SIC_Code
string ls_Ssharing_permission
string ls_Last_Activity_Time
string ls_Industry
string ls_Account_Site
string ls_Sstate
integer li_Sprocess_flow
integer li_Exchange_Rate
string ls_V_Currency
string ls_Billing_Country
string ls_Id
integer li_Sapproved
integer li_Delegate
integer li_Approve
integer li_Reject
integer li_Resubmit
string ls_Billing_Street
string ls_Created_Time
integer li_Seditable
string ls_Billing_Code
string ls_Shipping_City
string ls_Shipping_Country
string ls_Shipping_Code
string ls_Billing_City
string ls_Created_ByName
string ls_Created_ById
string ls_Created_ByEmail
string ls_Annual_Revenue
string ls_Shipping_Street
string ls_Ownership
string ls_Description
string ls_Rating
string ls_Shipping_State
integer li_Sreview_processApprove
integer li_Sreview_processReject
integer li_Sreview_processResubmit
string ls_Website
string ls_Employees
string ls_Scanvas_id
string ls_Record_Image
string ls_Modified_ByName
string ls_Modified_ById
string ls_Modified_ByEmail
string ls_Sreview
string ls_Phone
string ls_Account_Name
string ls_Account_Number
string ls_Ticker_Symbol
string ls_Modified_Time
integer li_Sorchestration
string ls_Parent_Account
string ls_Contacts
string ls_LayoutName
string ls_LayoutId
integer li_Sin_merge
string ls_Total
string ls_Billing_State
string ls_Fax
string ls_Sapproval_state
integer li_Multiuserlookup
integer j
integer li_Count_j
string ls_Sassigned
string ls_Sassigned_time
string ls_Sassigned_by
string ls_Sassigned_byName
string ls_Sassigned_byId
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
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

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

loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")

li_Success = loo_Http.QuickGetSb("https://domain.com/crm/v2.1/Accounts/4150868000004395059",loo_SbResponseBody)
if li_Success = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_SbResponseBody
    return
end if

loo_JResp = create oleobject
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_Http.LastStatus
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
    Write-Debug "Response Header:"
    Write-Debug loo_Http.LastHeader
    Write-Debug "Failed."
    destroy loo_Http
    destroy loo_SbResponseBody
    destroy loo_JResp
    return
end if

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

// {
//   "data": [
//     {
//       "Owner": {
//         "name": "Patricia Boyle",
//         "id": "4150868000000225013",
//         "email": "patricia.ss@zylker.com"
//       },
//       "$currency_symbol": "DA",
//       "Account_Type": "Analyst",
//       "SIC_Code": null,
//       "$sharing_permission": "full_access",
//       "Last_Activity_Time": "2021-03-09T13:31:06+05:30",
//       "Industry": null,
//       "Account_Site": null,
//       "$state": "save",
//       "$process_flow": false,
//       "Exchange_Rate": 3,
//       "Currency": "DZD",
//       "Billing_Country": null,
//       "id": "4150868000004395059",
//       "$approved": true,
//       "$approval": {
//         "delegate": false,
//         "approve": false,
//         "reject": false,
//         "resubmit": false
//       },
//       "Billing_Street": null,
//       "Created_Time": "2021-01-22T10:44:07+05:30",
//       "$editable": true,
//       "Billing_Code": null,
//       "Shipping_City": null,
//       "Shipping_Country": null,
//       "Shipping_Code": null,
//       "Billing_City": null,
//       "Created_By": {
//         "name": "Patricia Boyle",
//         "id": "4150868000000225013",
//         "email": "patricia.ss@zylker.com"
//       },
//       "Annual_Revenue": null,
//       "Stakeholders": [
//       ],
//       "Shipping_Street": null,
//       "Ownership": null,
//       "Description": null,
//       "Rating": null,
//       "Shipping_State": null,
//       "$review_process": {
//         "approve": false,
//         "reject": false,
//         "resubmit": false
//       },
//       "Website": null,
//       "Employees": null,
//       "$canvas_id": null,
//       "Record_Image": null,
//       "Modified_By": {
//         "name": "Patricia Boyle",
//         "id": "4150868000000225013",
//         "email": "patricia.ss@zylker.com"
//       },
//       "$review": null,
//       "Phone": null,
//       "Account_Name": "Sample Account",
//       "Account_Number": "0",
//       "multiuserlookup": [
//       ],
//       "Ticker_Symbol": null,
//       "Modified_Time": "2021-01-25T14:09:56+05:30",
//       "Territories": [
//         {
//           "$assigned": "automatically",
//           "$assigned_time": "2021-01-22T10:44:07+05:30",
//           "id": "4150868000000264087",
//           "$assigned_by": null,
//           "Name": "Sample for API testing"
//         },
//         {
//           "$assigned": "automatically",
//           "$assigned_time": "2021-01-22T10:44:07+05:30",
//           "id": "4150868000001390007",
//           "$assigned_by": null,
//           "Name": "sample"
//         },
//         {
//           "$assigned": "automatically",
//           "$assigned_time": "2021-01-22T10:44:07+05:30",
//           "id": "4150868000003259003",
//           "$assigned_by": null,
//           "Name": "mass delete"
//         },
//         {
//           "$assigned": "automatically",
//           "$assigned_time": "2021-03-04T12:18:55+05:30",
//           "id": "4150868000004822544",
//           "$assigned_by": null,
//           "Name": "leads"
//         },
//         {
//           "$assigned": "manually",
//           "$assigned_time": "2021-04-29T17:27:28+05:30",
//           "id": "4150868000005232017",
//           "$assigned_by": {
//             "name": "Patricia Boyle",
//             "id": "4150868000000225013"
//           },
//           "Name": "sample 8"
//         }
//       ],
//       "$orchestration": false,
//       "Parent_Account": null,
//       "Contacts": null,
//       "Layout": {
//         "name": "Standard",
//         "id": "4150868000000091029"
//       },
//       "$in_merge": false,
//       "Contact_Details": [
//       ],
//       "Total": null,
//       "Billing_State": null,
//       "Tag": [
//       ],
//       "Fax": null,
//       "$approval_state": "approved",
//       "$has_more": {
//         "multiuserlookup": false
//       }
//     }
//   ]
// }

// 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("data")
do while i < li_Count_i
    loo_JResp.I = i
    ls_Name = loo_JResp.StringOf("data[i].Owner.name")
    ls_Id = loo_JResp.StringOf("data[i].Owner.id")
    ls_V_Email = loo_JResp.StringOf("data[i].Owner.email")
    ls_Scurrency_symbol = loo_JResp.StringOf("data[i].$currency_symbol")
    ls_Account_Type = loo_JResp.StringOf("data[i].Account_Type")
    ls_SIC_Code = loo_JResp.StringOf("data[i].SIC_Code")
    ls_Ssharing_permission = loo_JResp.StringOf("data[i].$sharing_permission")
    ls_Last_Activity_Time = loo_JResp.StringOf("data[i].Last_Activity_Time")
    ls_Industry = loo_JResp.StringOf("data[i].Industry")
    ls_Account_Site = loo_JResp.StringOf("data[i].Account_Site")
    ls_Sstate = loo_JResp.StringOf("data[i].$state")
    li_Sprocess_flow = loo_JResp.BoolOf("data[i].$process_flow")
    li_Exchange_Rate = loo_JResp.IntOf("data[i].Exchange_Rate")
    ls_V_Currency = loo_JResp.StringOf("data[i].Currency")
    ls_Billing_Country = loo_JResp.StringOf("data[i].Billing_Country")
    ls_Id = loo_JResp.StringOf("data[i].id")
    li_Sapproved = loo_JResp.BoolOf("data[i].$approved")
    li_Delegate = loo_JResp.BoolOf("data[i].$approval.delegate")
    li_Approve = loo_JResp.BoolOf("data[i].$approval.approve")
    li_Reject = loo_JResp.BoolOf("data[i].$approval.reject")
    li_Resubmit = loo_JResp.BoolOf("data[i].$approval.resubmit")
    ls_Billing_Street = loo_JResp.StringOf("data[i].Billing_Street")
    ls_Created_Time = loo_JResp.StringOf("data[i].Created_Time")
    li_Seditable = loo_JResp.BoolOf("data[i].$editable")
    ls_Billing_Code = loo_JResp.StringOf("data[i].Billing_Code")
    ls_Shipping_City = loo_JResp.StringOf("data[i].Shipping_City")
    ls_Shipping_Country = loo_JResp.StringOf("data[i].Shipping_Country")
    ls_Shipping_Code = loo_JResp.StringOf("data[i].Shipping_Code")
    ls_Billing_City = loo_JResp.StringOf("data[i].Billing_City")
    ls_Created_ByName = loo_JResp.StringOf("data[i].Created_By.name")
    ls_Created_ById = loo_JResp.StringOf("data[i].Created_By.id")
    ls_Created_ByEmail = loo_JResp.StringOf("data[i].Created_By.email")
    ls_Annual_Revenue = loo_JResp.StringOf("data[i].Annual_Revenue")
    ls_Shipping_Street = loo_JResp.StringOf("data[i].Shipping_Street")
    ls_Ownership = loo_JResp.StringOf("data[i].Ownership")
    ls_Description = loo_JResp.StringOf("data[i].Description")
    ls_Rating = loo_JResp.StringOf("data[i].Rating")
    ls_Shipping_State = loo_JResp.StringOf("data[i].Shipping_State")
    li_Sreview_processApprove = loo_JResp.BoolOf("data[i].$review_process.approve")
    li_Sreview_processReject = loo_JResp.BoolOf("data[i].$review_process.reject")
    li_Sreview_processResubmit = loo_JResp.BoolOf("data[i].$review_process.resubmit")
    ls_Website = loo_JResp.StringOf("data[i].Website")
    ls_Employees = loo_JResp.StringOf("data[i].Employees")
    ls_Scanvas_id = loo_JResp.StringOf("data[i].$canvas_id")
    ls_Record_Image = loo_JResp.StringOf("data[i].Record_Image")
    ls_Modified_ByName = loo_JResp.StringOf("data[i].Modified_By.name")
    ls_Modified_ById = loo_JResp.StringOf("data[i].Modified_By.id")
    ls_Modified_ByEmail = loo_JResp.StringOf("data[i].Modified_By.email")
    ls_Sreview = loo_JResp.StringOf("data[i].$review")
    ls_Phone = loo_JResp.StringOf("data[i].Phone")
    ls_Account_Name = loo_JResp.StringOf("data[i].Account_Name")
    ls_Account_Number = loo_JResp.StringOf("data[i].Account_Number")
    ls_Ticker_Symbol = loo_JResp.StringOf("data[i].Ticker_Symbol")
    ls_Modified_Time = loo_JResp.StringOf("data[i].Modified_Time")
    li_Sorchestration = loo_JResp.BoolOf("data[i].$orchestration")
    ls_Parent_Account = loo_JResp.StringOf("data[i].Parent_Account")
    ls_Contacts = loo_JResp.StringOf("data[i].Contacts")
    ls_LayoutName = loo_JResp.StringOf("data[i].Layout.name")
    ls_LayoutId = loo_JResp.StringOf("data[i].Layout.id")
    li_Sin_merge = loo_JResp.BoolOf("data[i].$in_merge")
    ls_Total = loo_JResp.StringOf("data[i].Total")
    ls_Billing_State = loo_JResp.StringOf("data[i].Billing_State")
    ls_Fax = loo_JResp.StringOf("data[i].Fax")
    ls_Sapproval_state = loo_JResp.StringOf("data[i].$approval_state")
    li_Multiuserlookup = loo_JResp.BoolOf("data[i].$has_more.multiuserlookup")
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("data[i].Stakeholders")
    do while j < li_Count_j
        loo_JResp.J = j
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("data[i].multiuserlookup")
    do while j < li_Count_j
        loo_JResp.J = j
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("data[i].Territories")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Sassigned = loo_JResp.StringOf("data[i].Territories[j].$assigned")
        ls_Sassigned_time = loo_JResp.StringOf("data[i].Territories[j].$assigned_time")
        ls_Id = loo_JResp.StringOf("data[i].Territories[j].id")
        ls_Sassigned_by = loo_JResp.StringOf("data[i].Territories[j].$assigned_by")
        ls_Name = loo_JResp.StringOf("data[i].Territories[j].Name")
        ls_Sassigned_byName = loo_JResp.StringOf("data[i].Territories[j].$assigned_by.name")
        ls_Sassigned_byId = loo_JResp.StringOf("data[i].Territories[j].$assigned_by.id")
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("data[i].Contact_Details")
    do while j < li_Count_j
        loo_JResp.J = j
        j = j + 1
    loop
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("data[i].Tag")
    do while j < li_Count_j
        loo_JResp.J = j
        j = j + 1
    loop
    i = i + 1
loop


destroy loo_Http
destroy loo_SbResponseBody
destroy loo_JResp

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://domain.com/crm/v2.1/Accounts/4150868000004395059

Postman Collection Item JSON

{
  "name": "Get Territories Assigned",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{api-domain}}/crm/v2.1/Accounts/4150868000004395059",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2.1",
        "Accounts",
        "4150868000004395059"
      ]
    },
    "description": "To get the details of the territories assigned to a record."
  },
  "response": [
    {
      "name": "SUCCESS RESPONSE",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/Accounts/4150868000004395059",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "Accounts",
            "4150868000004395059"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Mon, 03 May 2021 11:27:25 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": "Set-Cookie",
          "value": "listview_enabled=true;Path=/"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-03T17:48:32+05:30"
        },
        {
          "key": "clientVersion",
          "value": "4000204"
        },
        {
          "key": "clientsubVersion",
          "value": "9875f452294f1c73e02cebb497ee077e"
        },
        {
          "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    \"data\": [\n        {\n            \"Owner\": {\n                \"name\": \"Patricia Boyle\",\n                \"id\": \"4150868000000225013\",\n                \"email\": \"patricia.ss@zylker.com\"\n            },\n            \"$currency_symbol\": \"DA\",\n            \"Account_Type\": \"Analyst\",\n            \"SIC_Code\": null,\n            \"$sharing_permission\": \"full_access\",\n            \"Last_Activity_Time\": \"2021-03-09T13:31:06+05:30\",\n            \"Industry\": null,\n            \"Account_Site\": null,\n            \"$state\": \"save\",\n            \"$process_flow\": false,\n            \"Exchange_Rate\": 3,\n            \"Currency\": \"DZD\",\n            \"Billing_Country\": null,\n            \"id\": \"4150868000004395059\",\n            \"$approved\": true,\n            \"$approval\": {\n                \"delegate\": false,\n                \"approve\": false,\n                \"reject\": false,\n                \"resubmit\": false\n            },\n            \"Billing_Street\": null,\n            \"Created_Time\": \"2021-01-22T10:44:07+05:30\",\n            \"$editable\": true,\n            \"Billing_Code\": null,\n            \"Shipping_City\": null,\n            \"Shipping_Country\": null,\n            \"Shipping_Code\": null,\n            \"Billing_City\": null,\n            \"Created_By\": {\n                \"name\": \"Patricia Boyle\",\n                \"id\": \"4150868000000225013\",\n                \"email\": \"patricia.ss@zylker.com\"\n            },\n            \"Annual_Revenue\": null,\n            \"Stakeholders\": [],\n            \"Shipping_Street\": null,\n            \"Ownership\": null,\n            \"Description\": null,\n            \"Rating\": null,\n            \"Shipping_State\": null,\n            \"$review_process\": {\n                \"approve\": false,\n                \"reject\": false,\n                \"resubmit\": false\n            },\n            \"Website\": null,\n            \"Employees\": null,\n            \"$canvas_id\": null,\n            \"Record_Image\": null,\n            \"Modified_By\": {\n                \"name\": \"Patricia Boyle\",\n                \"id\": \"4150868000000225013\",\n                \"email\": \"patricia.ss@zylker.com\"\n            },\n            \"$review\": null,\n            \"Phone\": null,\n            \"Account_Name\": \"Sample Account\",\n            \"Account_Number\": \"0\",\n            \"multiuserlookup\": [],\n            \"Ticker_Symbol\": null,\n            \"Modified_Time\": \"2021-01-25T14:09:56+05:30\",\n            \"Territories\": [\n                {\n                    \"$assigned\": \"automatically\",\n                    \"$assigned_time\": \"2021-01-22T10:44:07+05:30\",\n                    \"id\": \"4150868000000264087\",\n                    \"$assigned_by\": null,\n                    \"Name\": \"Sample for API testing\"\n                },\n                {\n                    \"$assigned\": \"automatically\",\n                    \"$assigned_time\": \"2021-01-22T10:44:07+05:30\",\n                    \"id\": \"4150868000001390007\",\n                    \"$assigned_by\": null,\n                    \"Name\": \"sample\"\n                },\n                {\n                    \"$assigned\": \"automatically\",\n                    \"$assigned_time\": \"2021-01-22T10:44:07+05:30\",\n                    \"id\": \"4150868000003259003\",\n                    \"$assigned_by\": null,\n                    \"Name\": \"mass delete\"\n                },\n                {\n                    \"$assigned\": \"automatically\",\n                    \"$assigned_time\": \"2021-03-04T12:18:55+05:30\",\n                    \"id\": \"4150868000004822544\",\n                    \"$assigned_by\": null,\n                    \"Name\": \"leads\"\n                },\n                {\n                    \"$assigned\": \"manually\",\n                    \"$assigned_time\": \"2021-04-29T17:27:28+05:30\",\n                    \"id\": \"4150868000005232017\",\n                    \"$assigned_by\": {\n                        \"name\": \"Patricia Boyle\",\n                        \"id\": \"4150868000000225013\"\n                    },\n                    \"Name\": \"sample 8\"\n                }\n            ],\n            \"$orchestration\": false,\n            \"Parent_Account\": null,\n            \"Contacts\": null,\n            \"Layout\": {\n                \"name\": \"Standard\",\n                \"id\": \"4150868000000091029\"\n            },\n            \"$in_merge\": false,\n            \"Contact_Details\": [],\n            \"Total\": null,\n            \"Billing_State\": null,\n            \"Tag\": [],\n            \"Fax\": null,\n            \"$approval_state\": \"approved\",\n            \"$has_more\": {\n                \"multiuserlookup\": false\n            }\n        }\n    ]\n}"
    },
    {
      "name": "INVALID_REQUEST_METHOD",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/Accounts/{{account_id}}",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "Accounts",
            "{{account_id}}"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Mon, 03 May 2021 11:28:39 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": "AUTHENTICATION_FAILURE",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/Accounts/4150868000004395059",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "Accounts",
            "4150868000004395059"
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Mon, 03 May 2021 11:29:27 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": "OAUTH_SCOPE_MISMATCH",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/Accounts/4150868000004395059",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "Accounts",
            "4150868000004395059"
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Mon, 03 May 2021 11:30:20 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "113"
        },
        {
          "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\": \"OAUTH_SCOPE_MISMATCH\",\n    \"details\": {},\n    \"message\": \"invalid oauth scope to access this URL\",\n    \"status\": \"error\"\n}"
    }
  ]
}