Chilkat Online Tools

C / Zoho CRM REST APIs / Leads

Back to Collection Items

#include <C_CkHttp.h>
#include <C_CkStringBuilder.h>
#include <C_CkJsonObject.h>

void ChilkatSample(void)
    {
    HCkHttp http;
    BOOL success;
    HCkStringBuilder sbResponseBody;
    HCkJsonObject jResp;
    int respStatusCode;
    BOOL global_search_supported;
    BOOL kanban_view;
    BOOL deletable;
    const char *description;
    BOOL creatable;
    BOOL filter_status;
    BOOL inventory_template_supported;
    const char *modified_time;
    const char *plural_label;
    BOOL presence_sub_menu;
    BOOL triggers_supported;
    const char *id;
    BOOL isBlueprintSupported;
    const char *Sort_by;
    const char *Sort_order;
    int per_page;
    BOOL visible;
    int visibility;
    BOOL convertable;
    BOOL editable;
    BOOL emailTemplate_support;
    BOOL filter_supported;
    const char *display_field;
    BOOL kanban_view_supported;
    BOOL show_as_tab;
    const char *web_link;
    int sequence_number;
    const char *singular_label;
    BOOL viewable;
    BOOL api_supported;
    const char *api_name;
    BOOL quick_create;
    const char *Name;
    const char *Id;
    const char *generated_type;
    BOOL feeds_required;
    BOOL scoring_supported;
    BOOL webform_supported;
    const char *module_name;
    int business_card_field_limit;
    const char *Display_value;
    const char *Access_type;
    const char *Criteria;
    const char *System_name;
    const char *custom_viewSort_by;
    const char *Created_byName;
    const char *Created_byId;
    BOOL Default;
    const char *Modified_time;
    const char *custom_viewName;
    BOOL System_defined;
    const char *Modified_byName;
    const char *Modified_byId;
    const char *custom_viewId;
    const char *Category;
    const char *Last_accessed_time;
    const char *custom_viewSort_order;
    const char *Favorite;
    int j;
    int count_j;
    const char *strVal;
    const char *name;
    const char *v_type;
    const char *subordinates;
    int i;
    int count_i;

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

    http = CkHttp_Create();

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

    sbResponseBody = CkStringBuilder_Create();
    success = CkHttp_QuickGetSb(http,"https://domain.com/crm/v2.1/settings/modules/Leads",sbResponseBody);
    if (success == FALSE) {
        printf("%s\n",CkHttp_lastErrorText(http));
        CkHttp_Dispose(http);
        CkStringBuilder_Dispose(sbResponseBody);
        return;
    }

    jResp = CkJsonObject_Create();
    CkJsonObject_LoadSb(jResp,sbResponseBody);
    CkJsonObject_putEmitCompact(jResp,FALSE);

    printf("Response Body:\n");
    printf("%s\n",CkJsonObject_emit(jResp));

    respStatusCode = CkHttp_getLastStatus(http);
    printf("Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        printf("Response Header:\n");
        printf("%s\n",CkHttp_lastHeader(http));
        printf("Failed.\n");
        CkHttp_Dispose(http);
        CkStringBuilder_Dispose(sbResponseBody);
        CkJsonObject_Dispose(jResp);
        return;
    }

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

    // {
    //   "modules": [
    //     {
    //       "global_search_supported": true,
    //       "kanban_view": false,
    //       "deletable": true,
    //       "description": null,
    //       "creatable": true,
    //       "filter_status": true,
    //       "inventory_template_supported": false,
    //       "modified_time": "2021-04-04T08:54:55+05:30",
    //       "plural_label": "Leads",
    //       "presence_sub_menu": true,
    //       "triggers_supported": true,
    //       "id": "4150868000000002175",
    //       "isBlueprintSupported": true,
    //       "related_list_properties": {
    //         "sort_by": null,
    //         "fields": [
    //           "Full_Name",
    //           "Company",
    //           "Email",
    //           "Lead_Source",
    //           "Lead_Status",
    //           "Phone"
    //         ],
    //         "sort_order": null
    //       },
    //       "per_page": 100,
    //       "$properties": [
    //         "$converted",
    //         "$approved",
    //         "$approval_state",
    //         "$state",
    //         "$converted_detail",
    //         "$currency_symbol",
    //         "$review",
    //         "$review_process",
    //         "$approval",
    //         "$in_merge",
    //         "$followed",
    //         "$followers",
    //         "$process_flow",
    //         "$orchestration",
    //         "$stop_processing",
    //         "$data_source_details",
    //         "$has_more"
    //       ],
    //       "visible": true,
    //       "visibility": 1,
    //       "convertable": true,
    //       "editable": true,
    //       "emailTemplate_support": true,
    //       "profiles": [
    //         {
    //           "name": "Administrator",
    //           "id": "4150868000000026011"
    //         },
    //         {
    //           "name": "Standard",
    //           "id": "4150868000000026014"
    //         },
    //         {
    //           "name": "sample",
    //           "id": "4150868000001623001"
    //         }
    //       ],
    //       "filter_supported": true,
    //       "$on_demand_properties": [
    //         "$blocked_reason"
    //       ],
    //       "display_field": "Full_Name",
    //       "search_layout_fields": [
    //         "Owner",
    //         "Company",
    //         "Full_Name",
    //         "Email",
    //         "Phone",
    //         "Lead_Source"
    //       ],
    //       "kanban_view_supported": true,
    //       "show_as_tab": true,
    //       "web_link": null,
    //       "sequence_number": 23,
    //       "singular_label": "Lead",
    //       "viewable": true,
    //       "api_supported": true,
    //       "api_name": "Leads",
    //       "quick_create": true,
    //       "modified_by": {
    //         "name": "Patricia Boyle",
    //         "id": "4150868000000225013"
    //       },
    //       "generated_type": "default",
    //       "feeds_required": true,
    //       "scoring_supported": true,
    //       "webform_supported": true,
    //       "arguments": [
    //       ],
    //       "module_name": "Leads",
    //       "business_card_field_limit": 5,
    //       "custom_view": {
    //         "display_value": "Sample View",
    //         "access_type": "shared",
    //         "criteria": null,
    //         "system_name": null,
    //         "sort_by": null,
    //         "created_by": {
    //           "name": "Patricia Boyle",
    //           "id": "4150868000000225013"
    //         },
    //         "shared_to": [
    //           {
    //             "name": "Group1",
    //             "id": "4150868000000231952",
    //             "type": "groups",
    //             "subordinates": null
    //           },
    //           {
    //             "name": "User 3",
    //             "id": "4150868000001199001",
    //             "type": "users",
    //             "subordinates": null
    //           },
    //           {
    //             "name": "User 2",
    //             "id": "4150868000001248015",
    //             "type": "users",
    //             "subordinates": null
    //           }
    //         ],
    //         "default": true,
    //         "modified_time": "2021-03-04T00:54:53+05:30",
    //         "name": "Sample View",
    //         "system_defined": false,
    //         "modified_by": {
    //           "name": "Patricia Boyle",
    //           "id": "4150868000000225013"
    //         },
    //         "id": "4150868000004520004",
    //         "fields": [
    //           {
    //             "api_name": "Full_Name",
    //             "id": "4150868000000002631"
    //           },
    //           {
    //             "api_name": "Company",
    //             "id": "4150868000000002591"
    //           },
    //           {
    //             "api_name": "Email",
    //             "id": "4150868000000002599"
    //           },
    //           {
    //             "api_name": "Phone",
    //             "id": "4150868000000002601"
    //           },
    //           {
    //             "api_name": "Lead_Source",
    //             "id": "4150868000000002609"
    //           },
    //           {
    //             "api_name": "Owner",
    //             "id": "4150868000000002589"
    //           }
    //         ],
    //         "category": "created_by_me",
    //         "last_accessed_time": "2021-05-04T17:11:45+05:30",
    //         "sort_order": null,
    //         "favorite": null
    //       },
    //       "parent_module": {}
    //     }
    //   ]
    // }

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

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

    i = 0;
    count_i = CkJsonObject_SizeOfArray(jResp,"modules");
    while (i < count_i) {
        CkJsonObject_putI(jResp,i);
        global_search_supported = CkJsonObject_BoolOf(jResp,"modules[i].global_search_supported");
        kanban_view = CkJsonObject_BoolOf(jResp,"modules[i].kanban_view");
        deletable = CkJsonObject_BoolOf(jResp,"modules[i].deletable");
        description = CkJsonObject_stringOf(jResp,"modules[i].description");
        creatable = CkJsonObject_BoolOf(jResp,"modules[i].creatable");
        filter_status = CkJsonObject_BoolOf(jResp,"modules[i].filter_status");
        inventory_template_supported = CkJsonObject_BoolOf(jResp,"modules[i].inventory_template_supported");
        modified_time = CkJsonObject_stringOf(jResp,"modules[i].modified_time");
        plural_label = CkJsonObject_stringOf(jResp,"modules[i].plural_label");
        presence_sub_menu = CkJsonObject_BoolOf(jResp,"modules[i].presence_sub_menu");
        triggers_supported = CkJsonObject_BoolOf(jResp,"modules[i].triggers_supported");
        id = CkJsonObject_stringOf(jResp,"modules[i].id");
        isBlueprintSupported = CkJsonObject_BoolOf(jResp,"modules[i].isBlueprintSupported");
        Sort_by = CkJsonObject_stringOf(jResp,"modules[i].related_list_properties.sort_by");
        Sort_order = CkJsonObject_stringOf(jResp,"modules[i].related_list_properties.sort_order");
        per_page = CkJsonObject_IntOf(jResp,"modules[i].per_page");
        visible = CkJsonObject_BoolOf(jResp,"modules[i].visible");
        visibility = CkJsonObject_IntOf(jResp,"modules[i].visibility");
        convertable = CkJsonObject_BoolOf(jResp,"modules[i].convertable");
        editable = CkJsonObject_BoolOf(jResp,"modules[i].editable");
        emailTemplate_support = CkJsonObject_BoolOf(jResp,"modules[i].emailTemplate_support");
        filter_supported = CkJsonObject_BoolOf(jResp,"modules[i].filter_supported");
        display_field = CkJsonObject_stringOf(jResp,"modules[i].display_field");
        kanban_view_supported = CkJsonObject_BoolOf(jResp,"modules[i].kanban_view_supported");
        show_as_tab = CkJsonObject_BoolOf(jResp,"modules[i].show_as_tab");
        web_link = CkJsonObject_stringOf(jResp,"modules[i].web_link");
        sequence_number = CkJsonObject_IntOf(jResp,"modules[i].sequence_number");
        singular_label = CkJsonObject_stringOf(jResp,"modules[i].singular_label");
        viewable = CkJsonObject_BoolOf(jResp,"modules[i].viewable");
        api_supported = CkJsonObject_BoolOf(jResp,"modules[i].api_supported");
        api_name = CkJsonObject_stringOf(jResp,"modules[i].api_name");
        quick_create = CkJsonObject_BoolOf(jResp,"modules[i].quick_create");
        Name = CkJsonObject_stringOf(jResp,"modules[i].modified_by.name");
        Id = CkJsonObject_stringOf(jResp,"modules[i].modified_by.id");
        generated_type = CkJsonObject_stringOf(jResp,"modules[i].generated_type");
        feeds_required = CkJsonObject_BoolOf(jResp,"modules[i].feeds_required");
        scoring_supported = CkJsonObject_BoolOf(jResp,"modules[i].scoring_supported");
        webform_supported = CkJsonObject_BoolOf(jResp,"modules[i].webform_supported");
        module_name = CkJsonObject_stringOf(jResp,"modules[i].module_name");
        business_card_field_limit = CkJsonObject_IntOf(jResp,"modules[i].business_card_field_limit");
        Display_value = CkJsonObject_stringOf(jResp,"modules[i].custom_view.display_value");
        Access_type = CkJsonObject_stringOf(jResp,"modules[i].custom_view.access_type");
        Criteria = CkJsonObject_stringOf(jResp,"modules[i].custom_view.criteria");
        System_name = CkJsonObject_stringOf(jResp,"modules[i].custom_view.system_name");
        custom_viewSort_by = CkJsonObject_stringOf(jResp,"modules[i].custom_view.sort_by");
        Created_byName = CkJsonObject_stringOf(jResp,"modules[i].custom_view.created_by.name");
        Created_byId = CkJsonObject_stringOf(jResp,"modules[i].custom_view.created_by.id");
        Default = CkJsonObject_BoolOf(jResp,"modules[i].custom_view.default");
        Modified_time = CkJsonObject_stringOf(jResp,"modules[i].custom_view.modified_time");
        custom_viewName = CkJsonObject_stringOf(jResp,"modules[i].custom_view.name");
        System_defined = CkJsonObject_BoolOf(jResp,"modules[i].custom_view.system_defined");
        Modified_byName = CkJsonObject_stringOf(jResp,"modules[i].custom_view.modified_by.name");
        Modified_byId = CkJsonObject_stringOf(jResp,"modules[i].custom_view.modified_by.id");
        custom_viewId = CkJsonObject_stringOf(jResp,"modules[i].custom_view.id");
        Category = CkJsonObject_stringOf(jResp,"modules[i].custom_view.category");
        Last_accessed_time = CkJsonObject_stringOf(jResp,"modules[i].custom_view.last_accessed_time");
        custom_viewSort_order = CkJsonObject_stringOf(jResp,"modules[i].custom_view.sort_order");
        Favorite = CkJsonObject_stringOf(jResp,"modules[i].custom_view.favorite");
        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"modules[i].related_list_properties.fields");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"modules[i].related_list_properties.fields[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"modules[i].$properties");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"modules[i].$properties[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"modules[i].profiles");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            name = CkJsonObject_stringOf(jResp,"modules[i].profiles[j].name");
            id = CkJsonObject_stringOf(jResp,"modules[i].profiles[j].id");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"modules[i].$on_demand_properties");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"modules[i].$on_demand_properties[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"modules[i].search_layout_fields");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"modules[i].search_layout_fields[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"modules[i].arguments");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"modules[i].custom_view.shared_to");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            name = CkJsonObject_stringOf(jResp,"modules[i].custom_view.shared_to[j].name");
            id = CkJsonObject_stringOf(jResp,"modules[i].custom_view.shared_to[j].id");
            v_type = CkJsonObject_stringOf(jResp,"modules[i].custom_view.shared_to[j].type");
            subordinates = CkJsonObject_stringOf(jResp,"modules[i].custom_view.shared_to[j].subordinates");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"modules[i].custom_view.fields");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            api_name = CkJsonObject_stringOf(jResp,"modules[i].custom_view.fields[j].api_name");
            id = CkJsonObject_stringOf(jResp,"modules[i].custom_view.fields[j].id");
            j = j + 1;
        }

        i = i + 1;
    }



    CkHttp_Dispose(http);
    CkStringBuilder_Dispose(sbResponseBody);
    CkJsonObject_Dispose(jResp);

    }

Curl Command

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

Postman Collection Item JSON

{
  "name": "Leads",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{api-domain}}/crm/v2.1/settings/modules/Leads",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2.1",
        "settings",
        "modules",
        "Leads"
      ]
    },
    "description": "To get the metadata of the Leads Module."
  },
  "response": [
    {
      "name": "SUCCESS RESPONSE",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/modules/Leads",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "modules",
            "Leads"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Wed, 05 May 2021 06:05:59 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-05T12:33:08+05:30"
        },
        {
          "key": "clientVersion",
          "value": "4002155"
        },
        {
          "key": "clientsubVersion",
          "value": "bfb2326744b42e5c869a705645ac0006"
        },
        {
          "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    \"modules\": [\n        {\n            \"global_search_supported\": true,\n            \"kanban_view\": false,\n            \"deletable\": true,\n            \"description\": null,\n            \"creatable\": true,\n            \"filter_status\": true,\n            \"inventory_template_supported\": false,\n            \"modified_time\": \"2021-04-04T08:54:55+05:30\",\n            \"plural_label\": \"Leads\",\n            \"presence_sub_menu\": true,\n            \"triggers_supported\": true,\n            \"id\": \"4150868000000002175\",\n            \"isBlueprintSupported\": true,\n            \"related_list_properties\": {\n                \"sort_by\": null,\n                \"fields\": [\n                    \"Full_Name\",\n                    \"Company\",\n                    \"Email\",\n                    \"Lead_Source\",\n                    \"Lead_Status\",\n                    \"Phone\"\n                ],\n                \"sort_order\": null\n            },\n            \"per_page\": 100,\n            \"$properties\": [\n                \"$converted\",\n                \"$approved\",\n                \"$approval_state\",\n                \"$state\",\n                \"$converted_detail\",\n                \"$currency_symbol\",\n                \"$review\",\n                \"$review_process\",\n                \"$approval\",\n                \"$in_merge\",\n                \"$followed\",\n                \"$followers\",\n                \"$process_flow\",\n                \"$orchestration\",\n                \"$stop_processing\",\n                \"$data_source_details\",\n                \"$has_more\"\n            ],\n            \"visible\": true,\n            \"visibility\": 1,\n            \"convertable\": true,\n            \"editable\": true,\n            \"emailTemplate_support\": true,\n            \"profiles\": [\n                {\n                    \"name\": \"Administrator\",\n                    \"id\": \"4150868000000026011\"\n                },\n                {\n                    \"name\": \"Standard\",\n                    \"id\": \"4150868000000026014\"\n                },\n                {\n                    \"name\": \"sample\",\n                    \"id\": \"4150868000001623001\"\n                }\n            ],\n            \"filter_supported\": true,\n            \"$on_demand_properties\": [\n                \"$blocked_reason\"\n            ],\n            \"display_field\": \"Full_Name\",\n            \"search_layout_fields\": [\n                \"Owner\",\n                \"Company\",\n                \"Full_Name\",\n                \"Email\",\n                \"Phone\",\n                \"Lead_Source\"\n            ],\n            \"kanban_view_supported\": true,\n            \"show_as_tab\": true,\n            \"web_link\": null,\n            \"sequence_number\": 23,\n            \"singular_label\": \"Lead\",\n            \"viewable\": true,\n            \"api_supported\": true,\n            \"api_name\": \"Leads\",\n            \"quick_create\": true,\n            \"modified_by\": {\n                \"name\": \"Patricia Boyle\",\n                \"id\": \"4150868000000225013\"\n            },\n            \"generated_type\": \"default\",\n            \"feeds_required\": true,\n            \"scoring_supported\": true,\n            \"webform_supported\": true,\n            \"arguments\": [],\n            \"module_name\": \"Leads\",\n            \"business_card_field_limit\": 5,\n            \"custom_view\": {\n                \"display_value\": \"Sample View\",\n                \"access_type\": \"shared\",\n                \"criteria\": null,\n                \"system_name\": null,\n                \"sort_by\": null,\n                \"created_by\": {\n                    \"name\": \"Patricia Boyle\",\n                    \"id\": \"4150868000000225013\"\n                },\n                \"shared_to\": [\n                    {\n                        \"name\": \"Group1\",\n                        \"id\": \"4150868000000231952\",\n                        \"type\": \"groups\",\n                        \"subordinates\": null\n                    },\n                    {\n                        \"name\": \"User 3\",\n                        \"id\": \"4150868000001199001\",\n                        \"type\": \"users\",\n                        \"subordinates\": null\n                    },\n                    {\n                        \"name\": \"User 2\",\n                        \"id\": \"4150868000001248015\",\n                        \"type\": \"users\",\n                        \"subordinates\": null\n                    }\n                ],\n                \"default\": true,\n                \"modified_time\": \"2021-03-04T00:54:53+05:30\",\n                \"name\": \"Sample View\",\n                \"system_defined\": false,\n                \"modified_by\": {\n                    \"name\": \"Patricia Boyle\",\n                    \"id\": \"4150868000000225013\"\n                },\n                \"id\": \"4150868000004520004\",\n                \"fields\": [\n                    {\n                        \"api_name\": \"Full_Name\",\n                        \"id\": \"4150868000000002631\"\n                    },\n                    {\n                        \"api_name\": \"Company\",\n                        \"id\": \"4150868000000002591\"\n                    },\n                    {\n                        \"api_name\": \"Email\",\n                        \"id\": \"4150868000000002599\"\n                    },\n                    {\n                        \"api_name\": \"Phone\",\n                        \"id\": \"4150868000000002601\"\n                    },\n                    {\n                        \"api_name\": \"Lead_Source\",\n                        \"id\": \"4150868000000002609\"\n                    },\n                    {\n                        \"api_name\": \"Owner\",\n                        \"id\": \"4150868000000002589\"\n                    }\n                ],\n                \"category\": \"created_by_me\",\n                \"last_accessed_time\": \"2021-05-04T17:11:45+05:30\",\n                \"sort_order\": null,\n                \"favorite\": null\n            },\n            \"parent_module\": {}\n        }\n    ]\n}"
    },
    {
      "name": "INVALID_MODULE",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/modules/Lead",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "modules",
            "Lead"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Wed, 05 May 2021 06:07:15 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "133"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-05T12:33:08+05:30"
        },
        {
          "key": "clientVersion",
          "value": "4002155"
        },
        {
          "key": "clientsubVersion",
          "value": "bfb2326744b42e5c869a705645ac0006"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"INVALID_MODULE\",\n    \"details\": {\n        \"resource_path_index\": 2\n    },\n    \"message\": \"the module name given seems to be invalid\",\n    \"status\": \"error\"\n}"
    },
    {
      "name": "INVALID_URL_PATTERN",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/modulesLeads",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "modulesLeads"
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Wed, 05 May 2021 06:07:28 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "131"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-05T12:33:08+05:30"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"INVALID_URL_PATTERN\",\n    \"details\": {},\n    \"message\": \"Please check if the URL trying to access is a correct one\",\n    \"status\": \"error\"\n}"
    },
    {
      "name": "AUTHENTICATION_FAILURE",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/modules/Leads",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "modules",
            "Leads"
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Wed, 05 May 2021 06:07:47 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": "POST",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/modules/Leads",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "modules",
            "Leads"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Wed, 05 May 2021 06:08:06 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": "OAUTH_SCOPE_MISMATCH",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/modules/Leads",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "modules",
            "Leads"
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Wed, 05 May 2021 07:30:26 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}"
    }
  ]
}