Chilkat Online Tools

Go / Zoho CRM REST APIs / Get Territories Assigned

Back to Collection Items

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

    http := chilkat.NewHttp()
    var success bool

    // Adds the "Authorization: Bearer <access_token>" header.
    http.SetAuthToken("<access_token>")

    sbResponseBody := chilkat.NewStringBuilder()
    success = http.QuickGetSb("https://domain.com/crm/v2.1/Accounts/4150868000004395059",sbResponseBody)
    if success == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        sbResponseBody.DisposeStringBuilder()
        return
    }

    jResp := chilkat.NewJsonObject()
    jResp.LoadSb(sbResponseBody)
    jResp.SetEmitCompact(false)

    fmt.Println("Response Body:")
    fmt.Println(*jResp.Emit())

    respStatusCode := http.LastStatus()
    fmt.Println("Response Status Code = ", respStatusCode)
    if respStatusCode >= 400 {
        fmt.Println("Response Header:")
        fmt.Println(http.LastHeader())
        fmt.Println("Failed.")
        http.DisposeHttp()
        sbResponseBody.DisposeStringBuilder()
        jResp.DisposeJsonObject()
        return
    }

    // 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

    var Name *string = new(string)
    var Id *string = new(string)
    var v_Email_Ref.html">Email *string = new(string)
    var Scurrency_symbol *string = new(string)
    var Account_Type *string = new(string)
    var SIC_Code *string = new(string)
    var Ssharing_permission *string = new(string)
    var Last_Activity_Time *string = new(string)
    var Industry *string = new(string)
    var Account_Site *string = new(string)
    var Sstate *string = new(string)
    var Sprocess_flow bool
    var Exchange_Rate int
    var v_Currency *string = new(string)
    var Billing_Country *string = new(string)
    var id *string = new(string)
    var Sapproved bool
    var Delegate bool
    var Approve bool
    var Reject bool
    var Resubmit bool
    var Billing_Street *string = new(string)
    var Created_Time *string = new(string)
    var Seditable bool
    var Billing_Code *string = new(string)
    var Shipping_City *string = new(string)
    var Shipping_Country *string = new(string)
    var Shipping_Code *string = new(string)
    var Billing_City *string = new(string)
    var Created_ByName *string = new(string)
    var Created_ById *string = new(string)
    var Created_ByEmail *string = new(string)
    var Annual_Revenue *string = new(string)
    var Shipping_Street *string = new(string)
    var Ownership *string = new(string)
    var Description *string = new(string)
    var Rating *string = new(string)
    var Shipping_State *string = new(string)
    var Sreview_processApprove bool
    var Sreview_processReject bool
    var Sreview_processResubmit bool
    var Website *string = new(string)
    var Employees *string = new(string)
    var Scanvas_id *string = new(string)
    var Record_Image *string = new(string)
Modified_By    var Name *string = new(string)
    var Modified_ById *string = new(string)
    var Modified_ByEmail *string = new(string)
    var Sreview *string = new(string)
    var Phone *string = new(string)
Account_    var Name *string = new(string)
    var Account_Number *string = new(string)
    var Ticker_Symbol *string = new(string)
    var Modified_Time *string = new(string)
    var Sorchestration bool
    var Parent_Account *string = new(string)
    var Contacts *string = new(string)
Layout    var Name *string = new(string)
    var LayoutId *string = new(string)
    var Sin_merge bool
    var Total *string = new(string)
    var Billing_State *string = new(string)
    var Fax *string = new(string)
    var Sapproval_state *string = new(string)
    var Multiuserlookup bool
    var j int
    var count_j int
    var Sassigned *string = new(string)
    var Sassigned_time *string = new(string)
    var Sassigned_by *string = new(string)
Sassigned_by    var Name *string = new(string)
    var Sassigned_byId *string = new(string)

    i := 0
    count_i := jResp.SizeOfArray("data")
    for i < count_i {
        jResp.SetI(i)
        Name = jResp.StringOf("data[i].Owner.name")
        Id = jResp.StringOf("data[i].Owner.id")
        v_Email_Ref.html">Email = jResp.StringOf("data[i].Owner.email")
        Scurrency_symbol = jResp.StringOf("data[i].$currency_symbol")
        Account_Type = jResp.StringOf("data[i].Account_Type")
        SIC_Code = jResp.StringOf("data[i].SIC_Code")
        Ssharing_permission = jResp.StringOf("data[i].$sharing_permission")
        Last_Activity_Time = jResp.StringOf("data[i].Last_Activity_Time")
        Industry = jResp.StringOf("data[i].Industry")
        Account_Site = jResp.StringOf("data[i].Account_Site")
        Sstate = jResp.StringOf("data[i].$state")
        Sprocess_flow = jResp.BoolOf("data[i].$process_flow")
        Exchange_Rate = jResp.IntOf("data[i].Exchange_Rate")
        v_Currency = jResp.StringOf("data[i].Currency")
        Billing_Country = jResp.StringOf("data[i].Billing_Country")
        id = jResp.StringOf("data[i].id")
        Sapproved = jResp.BoolOf("data[i].$approved")
        Delegate = jResp.BoolOf("data[i].$approval.delegate")
        Approve = jResp.BoolOf("data[i].$approval.approve")
        Reject = jResp.BoolOf("data[i].$approval.reject")
        Resubmit = jResp.BoolOf("data[i].$approval.resubmit")
        Billing_Street = jResp.StringOf("data[i].Billing_Street")
        Created_Time = jResp.StringOf("data[i].Created_Time")
        Seditable = jResp.BoolOf("data[i].$editable")
        Billing_Code = jResp.StringOf("data[i].Billing_Code")
        Shipping_City = jResp.StringOf("data[i].Shipping_City")
        Shipping_Country = jResp.StringOf("data[i].Shipping_Country")
        Shipping_Code = jResp.StringOf("data[i].Shipping_Code")
        Billing_City = jResp.StringOf("data[i].Billing_City")
        Created_ByName = jResp.StringOf("data[i].Created_By.name")
        Created_ById = jResp.StringOf("data[i].Created_By.id")
        Created_ByEmail = jResp.StringOf("data[i].Created_By.email")
        Annual_Revenue = jResp.StringOf("data[i].Annual_Revenue")
        Shipping_Street = jResp.StringOf("data[i].Shipping_Street")
        Ownership = jResp.StringOf("data[i].Ownership")
        Description = jResp.StringOf("data[i].Description")
        Rating = jResp.StringOf("data[i].Rating")
        Shipping_State = jResp.StringOf("data[i].Shipping_State")
        Sreview_processApprove = jResp.BoolOf("data[i].$review_process.approve")
        Sreview_processReject = jResp.BoolOf("data[i].$review_process.reject")
        Sreview_processResubmit = jResp.BoolOf("data[i].$review_process.resubmit")
        Website = jResp.StringOf("data[i].Website")
        Employees = jResp.StringOf("data[i].Employees")
        Scanvas_id = jResp.StringOf("data[i].$canvas_id")
        Record_Image = jResp.StringOf("data[i].Record_Image")
        Modified_ByName = jResp.StringOf("data[i].Modified_By.name")
        Modified_ById = jResp.StringOf("data[i].Modified_By.id")
        Modified_ByEmail = jResp.StringOf("data[i].Modified_By.email")
        Sreview = jResp.StringOf("data[i].$review")
        Phone = jResp.StringOf("data[i].Phone")
        Account_Name = jResp.StringOf("data[i].Account_Name")
        Account_Number = jResp.StringOf("data[i].Account_Number")
        Ticker_Symbol = jResp.StringOf("data[i].Ticker_Symbol")
        Modified_Time = jResp.StringOf("data[i].Modified_Time")
        Sorchestration = jResp.BoolOf("data[i].$orchestration")
        Parent_Account = jResp.StringOf("data[i].Parent_Account")
        Contacts = jResp.StringOf("data[i].Contacts")
        LayoutName = jResp.StringOf("data[i].Layout.name")
        LayoutId = jResp.StringOf("data[i].Layout.id")
        Sin_merge = jResp.BoolOf("data[i].$in_merge")
        Total = jResp.StringOf("data[i].Total")
        Billing_State = jResp.StringOf("data[i].Billing_State")
        Fax = jResp.StringOf("data[i].Fax")
        Sapproval_state = jResp.StringOf("data[i].$approval_state")
        Multiuserlookup = jResp.BoolOf("data[i].$has_more.multiuserlookup")
        j = 0
        count_j = jResp.SizeOfArray("data[i].Stakeholders")
        for j < count_j {
            jResp.SetJ(j)
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("data[i].multiuserlookup")
        for j < count_j {
            jResp.SetJ(j)
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("data[i].Territories")
        for j < count_j {
            jResp.SetJ(j)
            Sassigned = jResp.StringOf("data[i].Territories[j].$assigned")
            Sassigned_time = jResp.StringOf("data[i].Territories[j].$assigned_time")
            id = jResp.StringOf("data[i].Territories[j].id")
            Sassigned_by = jResp.StringOf("data[i].Territories[j].$assigned_by")
            Name = jResp.StringOf("data[i].Territories[j].Name")
            Sassigned_byName = jResp.StringOf("data[i].Territories[j].$assigned_by.name")
            Sassigned_byId = jResp.StringOf("data[i].Territories[j].$assigned_by.id")
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("data[i].Contact_Details")
        for j < count_j {
            jResp.SetJ(j)
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("data[i].Tag")
        for j < count_j {
            jResp.SetJ(j)
            j = j + 1
        }

        i = i + 1
    }


    http.DisposeHttp()
    sbResponseBody.DisposeStringBuilder()
    jResp.DisposeJsonObject()

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}"
    }
  ]
}