Back to Collection Items
<?php
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$http = new CkHttp();
// Use this online tool to generate code from sample JSON: Generate Code to Create JSON
// The following JSON is sent in the request body.
// {
// "users": [
// {
// "id": "{{user_id}}",
// "phone": "123456789",
// "email": "newtocrm@zoho.com",
// "dob": "1990-12-31"
// }
// ]
// }
$json = new CkJsonObject();
$json->UpdateString('users[0].id','{{user_id}}');
$json->UpdateString('users[0].phone','123456789');
$json->UpdateString('users[0].email','newtocrm@zoho.com');
$json->UpdateString('users[0].dob','1990-12-31');
// Adds the "Authorization: Bearer <access_token>" header.
$http->put_AuthToken('<access_token>');
$http->SetRequestHeader('Content-Type','application/json');
$sbRequestBody = new CkStringBuilder();
$json->EmitSb($sbRequestBody);
// resp is a CkHttpResponse
$resp = $http->PTextSb('PUT','https://domain.com/crm/v2.1/users',$sbRequestBody,'utf-8','application/json',false,false);
if ($http->get_LastMethodSuccess() == false) {
print $http->lastErrorText() . "\n";
exit;
}
$sbResponseBody = new CkStringBuilder();
$resp->GetBodySb($sbResponseBody);
$jResp = new CkJsonObject();
$jResp->LoadSb($sbResponseBody);
$jResp->put_EmitCompact(false);
print 'Response Body:' . "\n";
print $jResp->emit() . "\n";
$respStatusCode = $resp->get_StatusCode();
print 'Response Status Code = ' . $respStatusCode . "\n";
if ($respStatusCode >= 400) {
print 'Response Header:' . "\n";
print $resp->header() . "\n";
print 'Failed.' . "\n";
exit;
}
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "users": [
// {
// "code": "SUCCESS",
// "details": {
// "id": "738964000002112147"
// },
// "message": "User updated",
// "status": "success"
// }
// ]
// }
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
$i = 0;
$count_i = $jResp->SizeOfArray('users');
while ($i < $count_i) {
$jResp->put_I($i);
$code = $jResp->stringOf('users[i].code');
$Id = $jResp->stringOf('users[i].details.id');
$message = $jResp->stringOf('users[i].message');
$status = $jResp->stringOf('users[i].status');
$i = $i + 1;
}
?>
Curl Command
curl -X PUT
-H "Authorization: Bearer <access_token>"
-H "Content-Type: application/json"
-d '{
"users": [
{
"id": "{{user_id}}",
"phone": "123456789",
"email": "newtocrm@zoho.com",
"dob": "1990-12-31"
}
]
}'
https://domain.com/crm/v2.1/users
Postman Collection Item JSON
{
"name": "Update User",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access-token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"{{user_id}}\",\n \"phone\": \"123456789\",\n \"email\": \"newtocrm@zoho.com\",\n \"dob\": \"1990-12-31\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
},
"description": "To update the details of a user of your organization."
},
"response": [
{
"name": "SUCCESS RESPONSE",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000002112147\",\n \"phone\": \"123456789\",\n \"email\": \"newtocrm@zoho.com\",\n \"dob\": \"1990-12-31\"\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:06:34 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "112"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"SUCCESS\",\n \"details\": {\n \"id\": \"738964000002112147\"\n },\n \"message\": \"User updated\",\n \"status\": \"success\"\n }\n ]\n}"
},
{
"name": "INVALID_DATA",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000002112147\",\n \"phone\": \"123456789\",\n \"email\": \"newtocrm@zoho.com\",\n \"dob\": \"1990-12-31\",\n \"time_zone\": \"Asia/Kolkata\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:07:27 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "178"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"INVALID_DATA\",\n \"details\": {\n \"api_name\": \"time_zone\",\n \"json_path\": \"$.users[0].time_zone\"\n },\n \"message\": \"Cannot update the time_zone of another User\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "AUTHENTICATION_FAILURE",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000002112147\",\n \"phone\": \"123456789\",\n \"email\": \"newtocrm@zoho.com\",\n \"dob\": \"1990-12-31\",\n \"time_zone\": \"Asia/Kolkata\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:07:43 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": "CANNOT_UPDATE_DELETED_USER",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000002006002\",\n \"phone\": \"123456789\",\n \"email\": \"newtocrm@zoho.com\",\n \"dob\": \"1990-12-31\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:08:53 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "122"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"CANNOT_UPDATE_DELETED_USER\",\n \"details\": {},\n \"message\": \"Deleted user cannot be updated\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "EMAIL_UPDATE_NOT_ALLOWED",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000000291009\",\n \"phone\": \"123456789\",\n \"email\": \"patricia@zylker.com\",\n \"dob\": \"1990-12-31\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:10:22 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "181"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"EMAIL_UPDATE_NOT_ALOWED\",\n \"details\": {\n \"api_name\": \"email\",\n \"json_path\": \"$.users[0].email\"\n },\n \"message\": \"Cannot update email of a confirmed CRM User\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "DUPLICATE_DATA",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000002058003\",\n \"phone\": \"123456789\",\n \"email\": \"sneha.ss@zohocorp.com\",\n \"dob\": \"1990-12-31\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:11:45 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "175"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"DUPLICATE_DATA\",\n \"details\": {\n \"api_name\": \"email\",\n \"json_path\": \"$.users[0].email\",\n \"id\": \"738964000000291009\"\n },\n \"message\": \"Email already exists\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "ID_ALREADY_DEACTIVATED",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000002058003\",\n \"phone\": \"123456789\",\n \"dob\": \"1990-12-31\",\n \"status\": \"inactive\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:12:41 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "115"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"ID_ALREADY_DEACTIVATED\",\n \"details\": {},\n \"message\": \"User is already deactivated\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "ID_ALREADY_ACTIVE",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000002058003\",\n \"phone\": \"123456789\",\n \"dob\": \"1990-12-31\",\n \"status\": \"active\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:13:05 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "105"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"ID_ALREADY_ACTIVE\",\n \"details\": {},\n \"message\": \"User is already active\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "INVALID_REQUEST",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000000291009\",\n \"phone\": \"123456789\",\n \"dob\": \"1990-12-31\",\n \"status\": \"inactive\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:13:42 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "118"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"INVALID_REQUEST\",\n \"details\": {},\n \"message\": \"Primary Contact cannot be deactivated\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "INVALID_REQUEST_METHOD",
"originalRequest": {
"method": "COPY",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"738964000000291009\",\n \"phone\": \"123456789\",\n \"dob\": \"1990-12-31\",\n \"status\": \"inactive\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:14:20 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": "MANDATORY_NOT_FOUND",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"phone\": \"123456789\",\n \"dob\": \"1990-12-31\",\n \"status\": \"inactive\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:14:42 GMT"
},
{
"key": "Content-Type",
"value": "application/json;charset=utf-8"
},
{
"key": "Content-Length",
"value": "152"
},
{
"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-04T13:49:35+00:00"
},
{
"key": "clientVersion",
"value": "4004813"
},
{
"key": "clientsubVersion",
"value": "fb33599b767b94d06d2bd2529079b386"
},
{
"key": "Content-Disposition",
"value": "attachment; filename=response.json"
},
{
"key": "Content-Language",
"value": "en-US"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15768000"
}
],
"cookie": [
],
"body": "{\n \"users\": [\n {\n \"code\": \"MANDATORY_NOT_FOUND\",\n \"details\": {\n \"api_name\": \"id\",\n \"json_path\": \"$.users[0].id\"\n },\n \"message\": \"required field not found\",\n \"status\": \"error\"\n }\n ]\n}"
},
{
"name": "OAUTH_SCOPE_MISMATCH",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"users\": [\n {\n \"id\": \"{{user_id}}\",\n \"phone\": \"123456789\",\n \"email\": \"newtocrm@zoho.com\",\n \"dob\": \"1990-12-31\"\n }\n ]\n}"
},
"url": {
"raw": "{{api-domain}}/crm/v2.1/users",
"host": [
"{{api-domain}}"
],
"path": [
"crm",
"v2.1",
"users"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Server",
"value": "ZGS"
},
{
"key": "Date",
"value": "Tue, 04 May 2021 13:38:00 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}"
}
]
}