Back to Collection Items
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
-- Important: Do not use nvarchar(max). See the warning about using nvarchar(max).
DECLARE @sTmp0 nvarchar(4000)
-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.
DECLARE @http int
-- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
-- Adds the "Authorization: Bearer <access_token>" header.
EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'
DECLARE @sbResponseBody int
-- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT
EXEC sp_OAMethod @http, 'QuickGetSb', @success OUT, 'https://domain.com/crm/v2/settings/modules/Leads', @sbResponseBody
IF @success = 0
BEGIN
EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @sbResponseBody
RETURN
END
DECLARE @jResp int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT
EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
EXEC sp_OASetProperty @jResp, 'EmitCompact', 0
PRINT 'Response Body:'
EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
PRINT @sTmp0
DECLARE @respStatusCode int
EXEC sp_OAGetProperty @http, 'LastStatus', @respStatusCode OUT
PRINT 'Response Status Code = ' + @respStatusCode
IF @respStatusCode >= 400
BEGIN
PRINT 'Response Header:'
EXEC sp_OAGetProperty @http, 'LastHeader', @sTmp0 OUT
PRINT @sTmp0
PRINT 'Failed.'
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
RETURN
END
-- 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-05-06T06:41:05+00:00",
-- "plural_label": "Leads",
-- "presence_sub_menu": true,
-- "triggers_supported": true,
-- "id": "738964000000000125",
-- "isBlueprintSupported": true,
-- "related_list_properties": {
-- "sort_by": null,
-- "fields": [
-- "Full_Name",
-- "Company",
-- "Email",
-- "Lead_Source",
-- "Lead_Status",
-- "Phone"
-- ],
-- "sort_order": null
-- },
-- "per_page": 10,
-- "$properties": [
-- "$converted",
-- "$approved",
-- "$approval_state",
-- "$state",
-- "$converted_detail",
-- "$currency_symbol",
-- "$review",
-- "$review_process",
-- "$approval",
-- "$in_merge",
-- "$process_flow",
-- "$orchestration",
-- "$stop_processing",
-- "$data_source_details"
-- ],
-- "visibility": 1,
-- "convertable": true,
-- "editable": true,
-- "emailTemplate_support": true,
-- "profiles": [
-- {
-- "name": "Administrator",
-- "id": "738964000000015972"
-- },
-- {
-- "name": "Standard",
-- "id": "738964000000015975"
-- },
-- {
-- "name": "Sample",
-- "id": "738964000001348001"
-- }
-- ],
-- "filter_supported": true,
-- "display_field": "Full_Name",
-- "search_layout_fields": [
-- "Owner",
-- "Company",
-- "Email",
-- "Full_Name",
-- "Phone",
-- "Lead_Source"
-- ],
-- "kanban_view_supported": true,
-- "show_as_tab": true,
-- "web_link": null,
-- "sequence_number": 2,
-- "singular_label": "Lead",
-- "viewable": true,
-- "api_supported": true,
-- "api_name": "Leads",
-- "quick_create": true,
-- "modified_by": {
-- "name": "Patricia Boyle",
-- "id": "738964000000291009"
-- },
-- "generated_type": "default",
-- "feeds_required": false,
-- "scoring_supported": true,
-- "webform_supported": true,
-- "arguments": [
-- ],
-- "module_name": "Leads",
-- "business_card_field_limit": 5,
-- "custom_view": {
-- "display_value": "My Leads",
-- "shared_type": "all",
-- "criteria": {
-- "group_operator": "and",
-- "group": [
-- {
-- "comparator": "equal",
-- "field": "Owner",
-- "value": "${CURRENTUSER}"
-- },
-- {
-- "comparator": "equal",
-- "field": "$converted",
-- "value": false
-- }
-- ]
-- },
-- "system_name": "MYVIEWS",
-- "shared_details": null,
-- "sort_by": null,
-- "offline": true,
-- "default": true,
-- "system_defined": true,
-- "name": "My Leads",
-- "id": "738964000000091563",
-- "category": "shared_with_me",
-- "fields": [
-- "Full_Name",
-- "Company",
-- "Email",
-- "Phone",
-- "Lead_Source"
-- ],
-- "favorite": null,
-- "sort_order": 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
DECLARE @global_search_supported int
DECLARE @kanban_view int
DECLARE @deletable int
DECLARE @description nvarchar(4000)
DECLARE @creatable int
DECLARE @filter_status int
DECLARE @inventory_template_supported int
DECLARE @modified_time nvarchar(4000)
DECLARE @plural_label nvarchar(4000)
DECLARE @presence_sub_menu int
DECLARE @triggers_supported int
DECLARE @id nvarchar(4000)
DECLARE @isBlueprintSupported int
DECLARE @Sort_by nvarchar(4000)
DECLARE @Sort_order nvarchar(4000)
DECLARE @per_page int
DECLARE @visibility int
DECLARE @convertable int
DECLARE @editable int
DECLARE @emailTemplate_support int
DECLARE @filter_supported int
DECLARE @display_field nvarchar(4000)
DECLARE @kanban_view_supported int
DECLARE @show_as_tab int
DECLARE @web_link nvarchar(4000)
DECLARE @sequence_number int
DECLARE @singular_label nvarchar(4000)
DECLARE @viewable int
DECLARE @api_supported int
DECLARE @api_name nvarchar(4000)
DECLARE @quick_create int
DECLARE @Name nvarchar(4000)
DECLARE @Id nvarchar(4000)
DECLARE @generated_type nvarchar(4000)
DECLARE @feeds_required int
DECLARE @scoring_supported int
DECLARE @webform_supported int
DECLARE @module_name nvarchar(4000)
DECLARE @business_card_field_limit int
DECLARE @Display_value nvarchar(4000)
DECLARE @Shared_type nvarchar(4000)
DECLARE @Group_operator nvarchar(4000)
DECLARE @System_name nvarchar(4000)
DECLARE @Shared_details nvarchar(4000)
DECLARE @custom_viewSort_by nvarchar(4000)
DECLARE @Offline int
DECLARE @Default int
DECLARE @System_defined int
DECLARE @custom_viewName nvarchar(4000)
DECLARE @custom_viewId nvarchar(4000)
DECLARE @Category nvarchar(4000)
DECLARE @Favorite nvarchar(4000)
DECLARE @custom_viewSort_order nvarchar(4000)
DECLARE @j int
DECLARE @count_j int
DECLARE @strVal nvarchar(4000)
DECLARE @name nvarchar(4000)
DECLARE @comparator nvarchar(4000)
DECLARE @field nvarchar(4000)
DECLARE @value nvarchar(4000)
DECLARE @i int
SELECT @i = 0
DECLARE @count_i int
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'modules'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'BoolOf', @global_search_supported OUT, 'modules[i].global_search_supported'
EXEC sp_OAMethod @jResp, 'BoolOf', @kanban_view OUT, 'modules[i].kanban_view'
EXEC sp_OAMethod @jResp, 'BoolOf', @deletable OUT, 'modules[i].deletable'
EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'modules[i].description'
EXEC sp_OAMethod @jResp, 'BoolOf', @creatable OUT, 'modules[i].creatable'
EXEC sp_OAMethod @jResp, 'BoolOf', @filter_status OUT, 'modules[i].filter_status'
EXEC sp_OAMethod @jResp, 'BoolOf', @inventory_template_supported OUT, 'modules[i].inventory_template_supported'
EXEC sp_OAMethod @jResp, 'StringOf', @modified_time OUT, 'modules[i].modified_time'
EXEC sp_OAMethod @jResp, 'StringOf', @plural_label OUT, 'modules[i].plural_label'
EXEC sp_OAMethod @jResp, 'BoolOf', @presence_sub_menu OUT, 'modules[i].presence_sub_menu'
EXEC sp_OAMethod @jResp, 'BoolOf', @triggers_supported OUT, 'modules[i].triggers_supported'
EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'modules[i].id'
EXEC sp_OAMethod @jResp, 'BoolOf', @isBlueprintSupported OUT, 'modules[i].isBlueprintSupported'
EXEC sp_OAMethod @jResp, 'StringOf', @Sort_by OUT, 'modules[i].related_list_properties.sort_by'
EXEC sp_OAMethod @jResp, 'StringOf', @Sort_order OUT, 'modules[i].related_list_properties.sort_order'
EXEC sp_OAMethod @jResp, 'IntOf', @per_page OUT, 'modules[i].per_page'
EXEC sp_OAMethod @jResp, 'IntOf', @visibility OUT, 'modules[i].visibility'
EXEC sp_OAMethod @jResp, 'BoolOf', @convertable OUT, 'modules[i].convertable'
EXEC sp_OAMethod @jResp, 'BoolOf', @editable OUT, 'modules[i].editable'
EXEC sp_OAMethod @jResp, 'BoolOf', @emailTemplate_support OUT, 'modules[i].emailTemplate_support'
EXEC sp_OAMethod @jResp, 'BoolOf', @filter_supported OUT, 'modules[i].filter_supported'
EXEC sp_OAMethod @jResp, 'StringOf', @display_field OUT, 'modules[i].display_field'
EXEC sp_OAMethod @jResp, 'BoolOf', @kanban_view_supported OUT, 'modules[i].kanban_view_supported'
EXEC sp_OAMethod @jResp, 'BoolOf', @show_as_tab OUT, 'modules[i].show_as_tab'
EXEC sp_OAMethod @jResp, 'StringOf', @web_link OUT, 'modules[i].web_link'
EXEC sp_OAMethod @jResp, 'IntOf', @sequence_number OUT, 'modules[i].sequence_number'
EXEC sp_OAMethod @jResp, 'StringOf', @singular_label OUT, 'modules[i].singular_label'
EXEC sp_OAMethod @jResp, 'BoolOf', @viewable OUT, 'modules[i].viewable'
EXEC sp_OAMethod @jResp, 'BoolOf', @api_supported OUT, 'modules[i].api_supported'
EXEC sp_OAMethod @jResp, 'StringOf', @api_name OUT, 'modules[i].api_name'
EXEC sp_OAMethod @jResp, 'BoolOf', @quick_create OUT, 'modules[i].quick_create'
EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'modules[i].modified_by.name'
EXEC sp_OAMethod @jResp, 'StringOf', @Id OUT, 'modules[i].modified_by.id'
EXEC sp_OAMethod @jResp, 'StringOf', @generated_type OUT, 'modules[i].generated_type'
EXEC sp_OAMethod @jResp, 'BoolOf', @feeds_required OUT, 'modules[i].feeds_required'
EXEC sp_OAMethod @jResp, 'BoolOf', @scoring_supported OUT, 'modules[i].scoring_supported'
EXEC sp_OAMethod @jResp, 'BoolOf', @webform_supported OUT, 'modules[i].webform_supported'
EXEC sp_OAMethod @jResp, 'StringOf', @module_name OUT, 'modules[i].module_name'
EXEC sp_OAMethod @jResp, 'IntOf', @business_card_field_limit OUT, 'modules[i].business_card_field_limit'
EXEC sp_OAMethod @jResp, 'StringOf', @Display_value OUT, 'modules[i].custom_view.display_value'
EXEC sp_OAMethod @jResp, 'StringOf', @Shared_type OUT, 'modules[i].custom_view.shared_type'
EXEC sp_OAMethod @jResp, 'StringOf', @Group_operator OUT, 'modules[i].custom_view.criteria.group_operator'
EXEC sp_OAMethod @jResp, 'StringOf', @System_name OUT, 'modules[i].custom_view.system_name'
EXEC sp_OAMethod @jResp, 'StringOf', @Shared_details OUT, 'modules[i].custom_view.shared_details'
EXEC sp_OAMethod @jResp, 'StringOf', @custom_viewSort_by OUT, 'modules[i].custom_view.sort_by'
EXEC sp_OAMethod @jResp, 'BoolOf', @Offline OUT, 'modules[i].custom_view.offline'
EXEC sp_OAMethod @jResp, 'BoolOf', @Default OUT, 'modules[i].custom_view.default'
EXEC sp_OAMethod @jResp, 'BoolOf', @System_defined OUT, 'modules[i].custom_view.system_defined'
EXEC sp_OAMethod @jResp, 'StringOf', @custom_viewName OUT, 'modules[i].custom_view.name'
EXEC sp_OAMethod @jResp, 'StringOf', @custom_viewId OUT, 'modules[i].custom_view.id'
EXEC sp_OAMethod @jResp, 'StringOf', @Category OUT, 'modules[i].custom_view.category'
EXEC sp_OAMethod @jResp, 'StringOf', @Favorite OUT, 'modules[i].custom_view.favorite'
EXEC sp_OAMethod @jResp, 'StringOf', @custom_viewSort_order OUT, 'modules[i].custom_view.sort_order'
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'modules[i].related_list_properties.fields'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'modules[i].related_list_properties.fields[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'modules[i].$properties'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'modules[i].$properties[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'modules[i].profiles'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'modules[i].profiles[j].name'
EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'modules[i].profiles[j].id'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'modules[i].search_layout_fields'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'modules[i].search_layout_fields[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'modules[i].arguments'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'modules[i].custom_view.criteria.group'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @comparator OUT, 'modules[i].custom_view.criteria.group[j].comparator'
EXEC sp_OAMethod @jResp, 'StringOf', @field OUT, 'modules[i].custom_view.criteria.group[j].field'
EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'modules[i].custom_view.criteria.group[j].value'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'modules[i].custom_view.fields'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'modules[i].custom_view.fields[j]'
SELECT @j = @j + 1
END
SELECT @i = @i + 1
END
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
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}"
}
]
}