Chilkat Online Tools

unicodeCpp / Zoho CRM REST APIs / Custom

Back to Collection Items

#include <CkHttpW.h>
#include <CkJsonObjectW.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;

    CkJsonObjectW queryParams;
    queryParams.UpdateString(L"module",L"{{Custom_module_API_name}}");

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

    CkHttpResponseW *resp = http.QuickRequestParams(L"GET",L"https://domain.com/crm/v2.1/settings/custom_views",queryParams);
    if (http.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    wprintf(L"%d\n",resp->get_StatusCode());
    wprintf(L"%s\n",resp->bodyStr());
    delete resp;
    }

Curl Command

curl -G -d "module=%7B%7BCustom_module_API_name%7D%7D"
	-H "Authorization: Bearer <access_token>"
https://domain.com/crm/v2.1/settings/custom_views

Postman Collection Item JSON

{
  "name": "Custom",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{api-domain}}/crm/v2.1/settings/custom_views?module={{Custom_module_API_name}}",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2.1",
        "settings",
        "custom_views"
      ],
      "query": [
        {
          "key": "module",
          "value": "{{Custom_module_API_name}}"
        }
      ]
    },
    "description": "To get the metadata of the custom module."
  },
  "response": [
  ]
}