Back to Collection Items
var
begin
CkHttp_putAuthToken(http,'<access_token>');success := CkHttp_QuickGetSb(http,'https://domain.com/crm/v2/settings/modules/Leads',sbResponseBody);CkJsonObject_LoadSb(jResp,sbResponseBody);CkJsonObject_putEmitCompact(jResp,False);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');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');Shared_type := CkJsonObject__stringOf(jResp,'modules[i].custom_view.shared_type');Group_operator := CkJsonObject__stringOf(jResp,'modules[i].custom_view.criteria.group_operator');System_name := CkJsonObject__stringOf(jResp,'modules[i].custom_view.system_name');Shared_details := CkJsonObject__stringOf(jResp,'modules[i].custom_view.shared_details');custom_viewSort_by := CkJsonObject__stringOf(jResp,'modules[i].custom_view.sort_by');Offline := CkJsonObject_BoolOf(jResp,'modules[i].custom_view.offline');Default := CkJsonObject_BoolOf(jResp,'modules[i].custom_view.default');System_defined := CkJsonObject_BoolOf(jResp,'modules[i].custom_view.system_defined');custom_viewName := CkJsonObject__stringOf(jResp,'modules[i].custom_view.name');custom_viewId := CkJsonObject__stringOf(jResp,'modules[i].custom_view.id');Category := CkJsonObject__stringOf(jResp,'modules[i].custom_view.category');Favorite := CkJsonObject__stringOf(jResp,'modules[i].custom_view.favorite');custom_viewSort_order := CkJsonObject__stringOf(jResp,'modules[i].custom_view.sort_order');j := 0;count_j := CkJsonObject_SizeOfArray(jResp,'modules[i].related_list_properties.fields');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');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');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].search_layout_fields');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');CkJsonObject_putJ(jResp,j);j := j + 1;j := 0;count_j := CkJsonObject_SizeOfArray(jResp,'modules[i].custom_view.criteria.group');CkJsonObject_putJ(jResp,j);comparator := CkJsonObject__stringOf(jResp,'modules[i].custom_view.criteria.group[j].comparator');field := CkJsonObject__stringOf(jResp,'modules[i].custom_view.criteria.group[j].field');value := CkJsonObject__stringOf(jResp,'modules[i].custom_view.criteria.group[j].value');j := j + 1;j := 0;count_j := CkJsonObject_SizeOfArray(jResp,'modules[i].custom_view.fields');CkJsonObject_putJ(jResp,j);strVal := CkJsonObject__stringOf(jResp,'modules[i].custom_view.fields[j]');j := j + 1;i := i + 1;
Curl Command
curl -X GET
-H "Authorization: Bearer <access_token>"
https://domain.com/crm/v2/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/settings/modules/Leads",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2",
"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/settings/modules/Leads",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2",
"settings",
"modules",
"Leads"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 11 May 2021 12:22:04 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-store, no-cache, must-revalidate, private"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-ACCESSTOKEN-RESET",
"value": "2021-05-11T12:57:36+00:00"
},
{
"key": "clientVersion",
"value": "4023320"
},
{
"key": "clientsubVersion",
"value": "4d8b6ee4f7d1d284c930a4e807480c5c"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "vary",
"value": "accept-encoding"
},
{
"key": "Content-Encoding",
"value": "gzip"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"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-05-06T06:41:05+00:00\",\n \"plural_label\": \"Leads\",\n \"presence_sub_menu\": true,\n \"triggers_supported\": true,\n \"id\": \"738964000000000125\",\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\": 10,\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 \"$process_flow\",\n \"$orchestration\",\n \"$stop_processing\",\n \"$data_source_details\"\n ],\n \"visibility\": 1,\n \"convertable\": true,\n \"editable\": true,\n \"emailTemplate_support\": true,\n \"profiles\": [\n {\n \"name\": \"Administrator\",\n \"id\": \"738964000000015972\"\n },\n {\n \"name\": \"Standard\",\n \"id\": \"738964000000015975\"\n },\n {\n \"name\": \"Sample\",\n \"id\": \"738964000001348001\"\n }\n ],\n \"filter_supported\": true,\n \"display_field\": \"Full_Name\",\n \"search_layout_fields\": [\n \"Owner\",\n \"Company\",\n \"Email\",\n \"Full_Name\",\n \"Phone\",\n \"Lead_Source\"\n ],\n \"kanban_view_supported\": true,\n \"show_as_tab\": true,\n \"web_link\": null,\n \"sequence_number\": 2,\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\": \"738964000000291009\"\n },\n \"generated_type\": \"default\",\n \"feeds_required\": false,\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\": \"My Leads\",\n \"shared_type\": \"all\",\n \"criteria\": {\n \"group_operator\": \"and\",\n \"group\": [\n {\n \"comparator\": \"equal\",\n \"field\": \"Owner\",\n \"value\": \"${CURRENTUSER}\"\n },\n {\n \"comparator\": \"equal\",\n \"field\": \"$converted\",\n \"value\": false\n }\n ]\n },\n \"system_name\": \"MYVIEWS\",\n \"shared_details\": null,\n \"sort_by\": null,\n \"offline\": true,\n \"default\": true,\n \"system_defined\": true,\n \"name\": \"My Leads\",\n \"id\": \"738964000000091563\",\n \"category\": \"shared_with_me\",\n \"fields\": [\n \"Full_Name\",\n \"Company\",\n \"Email\",\n \"Phone\",\n \"Lead_Source\"\n ],\n \"favorite\": null,\n \"sort_order\": null\n },\n \"parent_module\": {}\n }\n ]\n}"
},
{
"name": "INVALID_MODULE",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{api-domain}}/crm/v2/settings/modules/Lead",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2",
"settings",
"modules",
"Lead"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 11 May 2021 12:22:27 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "110"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-store, no-cache, must-revalidate, private"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-ACCESSTOKEN-RESET",
"value": "2021-05-11T12:57:36+00:00"
},
{
"key": "clientVersion",
"value": "4023320"
},
{
"key": "clientsubVersion",
"value": "4d8b6ee4f7d1d284c930a4e807480c5c"
},
{
"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 \"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/settings/module/Leads",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2",
"settings",
"module",
"Leads"
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 11 May 2021 12:22:42 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-store, no-cache, must-revalidate, private"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-ACCESSTOKEN-RESET",
"value": "2021-05-11T12:57:36+00:00"
},
{
"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/settings/modules/Leads",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2",
"settings",
"modules",
"Leads"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 11 May 2021 12:22:56 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "98"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "Referrer-Policy",
"value": "strict-origin"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "X-Download-Options",
"value": "noopen"
}
],
"cookie": [
],
"body": "{\n \"code\": \"AUTHENTICATION_FAILURE\",\n \"details\": {},\n \"message\": \"Authentication failed\",\n \"status\": \"error\"\n}"
},
{
"name": "INVALID_REQUEST_METHOD",
"originalRequest": {
"method": "COPY",
"header": [
],
"url": {
"raw": "{{api-domain}}/crm/v2/settings/modules/Leads",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2",
"settings",
"modules",
"Leads"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 11 May 2021 12:23:19 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/settings/modules/Leads",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2",
"settings",
"modules",
"Leads"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Thu, 13 May 2021 08:28:57 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}"
}
]
}