Chilkat Online Tools

Node.js / Zoho CRM REST APIs / Create Bulk Write Job

Back to Collection Items

var os = require('os');
if (os.platform() == 'win32') {  
    if (os.arch() == 'ia32') {
        var chilkat = require('@chilkat/ck-node21-win-ia32');
    } else {
        var chilkat = require('@chilkat/ck-node21-win64'); 
    }
} else if (os.platform() == 'linux') {
    if (os.arch() == 'arm') {
        var chilkat = require('@chilkat/ck-node21-arm');
    } else if (os.arch() == 'x86') {
        var chilkat = require('@chilkat/ck-node21-linux32');
    } else {
        var chilkat = require('@chilkat/ck-node21-linux64');
    }
} else if (os.platform() == 'darwin') {
    if (os.arch() == 'arm64') {
        var chilkat = require('@chilkat/ck-node21-mac-m1');
    } else {
        var chilkat = require('@chilkat/ck-node21-macosx');
    }
}


function chilkatExample() {

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

    var http = new chilkat.Http();
    var success;

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "operation": "insert",
    //   "ignore_empty": true,
    //   "callback": {
    //     "url": "http://requestbin.fullcontact.com/1fcimk51",
    //     "method": "post"
    //   },
    //   "resource": [
    //     {
    //       "type": "data",
    //       "module": {
    //         "api_name": "Leads",
    //         "id": "4150868000000002175"
    //       },
    //       "file_id": "4150868000005364001",
    //       "field_mappings": [
    //         {
    //           "api_name": "Last_Name",
    //           "index": 0
    //         },
    //         {
    //           "api_name": "Mobile",
    //           "index": 1
    //         },
    //         {
    //           "api_name": "Owner",
    //           "index": 2
    //         }
    //       ]
    //     }
    //   ]
    // }

    var json = new chilkat.JsonObject();
    json.UpdateString("operation","insert");
    json.UpdateBool("ignore_empty",true);
    json.UpdateString("callback.url","http://requestbin.fullcontact.com/1fcimk51");
    json.UpdateString("callback.method","post");
    json.UpdateString("resource[0].type","data");
    json.UpdateString("resource[0].module.api_name","Leads");
    json.UpdateString("resource[0].module.id","4150868000000002175");
    json.UpdateString("resource[0].file_id","4150868000005364001");
    json.UpdateString("resource[0].field_mappings[0].api_name","Last_Name");
    json.UpdateInt("resource[0].field_mappings[0].index",0);
    json.UpdateString("resource[0].field_mappings[1].api_name","Mobile");
    json.UpdateInt("resource[0].field_mappings[1].index",1);
    json.UpdateString("resource[0].field_mappings[2].api_name","Owner");
    json.UpdateInt("resource[0].field_mappings[2].index",2);

    // Adds the "Authorization: Bearer <access_token>" header.
    http.AuthToken = "<access_token>";

    // resp: HttpResponse
    var resp = http.PostJson3("https://domain.com/crm/bulk/v2.1/write","application/json",json);
    if (http.LastMethodSuccess == false) {
        console.log(http.LastErrorText);
        return;
    }

    var sbResponseBody = new chilkat.StringBuilder();
    resp.GetBodySb(sbResponseBody);

    var jResp = new chilkat.JsonObject();
    jResp.LoadSb(sbResponseBody);
    jResp.EmitCompact = false;

    console.log("Response Body:");
    console.log(jResp.Emit());

    var respStatusCode = resp.StatusCode;
    console.log("Response Status Code = " + respStatusCode);
    if (respStatusCode >= 400) {
        console.log("Response Header:");
        console.log(resp.Header);
        console.log("Failed.");

        return;
    }

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

    // {
    //   "status": "success",
    //   "code": "SUCCESS",
    //   "message": "success",
    //   "details": {
    //     "id": "4150868000005350003",
    //     "created_by": {
    //       "id": "4150868000000225013",
    //       "name": "Patricia Boyle"
    //     }
    //   }
    // }

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

    var status = jResp.StringOf("status");
    var code = jResp.StringOf("code");
    var message = jResp.StringOf("message");
    var Id = jResp.StringOf("details.id");
    var Created_byId = jResp.StringOf("details.created_by.id");
    var Name = jResp.StringOf("details.created_by.name");

}

chilkatExample();

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-d '{
    "operation": "insert",
    "ignore_empty": true,
    "callback": {
        "url": "http://requestbin.fullcontact.com/1fcimk51",
        "method": "post"
    },
    "resource": [
        {
            "type": "data",
            "module": {
                "api_name": "Leads",
                "id": "4150868000000002175"
            },
            "file_id": "4150868000005364001",
            "field_mappings": [
                {
                    "api_name": "Last_Name",
                    "index": 0
                },
                {
                    "api_name": "Mobile",
                    "index": 1
                },
                 {
                    "api_name": "Owner",
                    "index": 2
                }
            ]
        }
    ]
}'
https://domain.com/crm/bulk/v2.1/write

Postman Collection Item JSON

{
  "name": "Create Bulk Write Job",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"operation\": \"insert\",\n    \"ignore_empty\": true,\n    \"callback\": {\n        \"url\": \"http://requestbin.fullcontact.com/1fcimk51\",\n        \"method\": \"post\"\n    },\n    \"resource\": [\n        {\n            \"type\": \"data\",\n            \"module\": {\n                \"api_name\": \"Leads\",\n                \"id\": \"4150868000000002175\"\n            },\n            \"file_id\": \"4150868000005364001\",\n            \"field_mappings\": [\n                {\n                    \"api_name\": \"Last_Name\",\n                    \"index\": 0\n                },\n                {\n                    \"api_name\": \"Mobile\",\n                    \"index\": 1\n                },\n                 {\n                    \"api_name\": \"Owner\",\n                    \"index\": 2\n                }\n            ]\n        }\n    ]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{api-domain}}/crm/bulk/v2.1/write",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "bulk",
        "v2.1",
        "write"
      ]
    },
    "description": "To create a bulk write job to import records into CRM."
  },
  "response": [
    {
      "name": "SUCCESS RESPONSE",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"operation\": \"insert\",\n    \"ignore_empty\": true,\n    \"callback\": {\n        \"url\": \"https://www.zoho.com/\",\n        \"method\": \"post\"\n    },\n    \"resource\": [\n        {\n            \"type\": \"data\",\n            \"module\": {\n                \"api_name\": \"Leads\",\n                \"id\": \"4150868000000002175\"\n            },\n            \"file_id\": \"4150868000005364001\",\n            \"field_mappings\": [\n                {\n                    \"api_name\": \"Last_Name\",\n                    \"index\": 0\n                },\n                {\n                    \"api_name\": \"Mobile\",\n                    \"index\": 1\n                },\n                 {\n                    \"api_name\": \"Owner\",\n                    \"index\": 2\n                }\n            ]\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/bulk/v2.1/write",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "bulk",
            "v2.1",
            "write"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:08:29 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        },
        {
          "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-11T12:57:31+05:30"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"status\": \"success\",\n    \"code\": \"SUCCESS\",\n    \"message\": \"success\",\n    \"details\": {\n        \"id\": \"4150868000005350003\",\n        \"created_by\": {\n            \"id\": \"4150868000000225013\",\n            \"name\": \"Patricia Boyle\"\n        }\n    }\n}"
    },
    {
      "name": "MANDATORY_FIELDS_NOT_MAPPED",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"operation\": \"insert\",\n    \"ignore_empty\": true,\n    \"callback\": {\n        \"url\": \"http://requestbin.fullcontact.com/1fcimk51\",\n        \"method\": \"post\"\n    },\n    \"resource\": [\n        {\n            \"type\": \"data\",\n            \"module\": {\n                \"api_name\": \"Leads\",\n                \"id\": \"4150868000000002175\"\n            },\n            \"file_id\": \"4150868000005362001\",\n            \"field_mappings\": [\n                {\n                    \"api_name\": \"Last_Name\",\n                    \"index\": 0\n                },\n                {\n                    \"api_name\": \"Mobile\",\n                    \"index\": 1\n                }\n            ]\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/bulk/v2.1/write",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "bulk",
            "v2.1",
            "write"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:05:12 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        },
        {
          "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-11T12:57:31+05:30"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"status\": \"error\",\n    \"code\": \"MANDATORY_FIELDS_NOT_MAPPED\",\n    \"message\": \"All mandatory fields are not mapped for the layout [Owner]\",\n    \"details\": {}\n}"
    },
    {
      "name": "INVALID_CALLBACK_URL",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"operation\": \"insert\",\n    \"ignore_empty\": true,\n    \"callback\": {\n        \"url\": \"http://requestbin.fullcontact.com\",\n        \"method\": \"post\"\n    },\n    \"resource\": [\n        {\n            \"type\": \"data\",\n            \"module\": {\n                \"api_name\": \"Leads\",\n                \"id\": \"4150868000000002175\"\n            },\n            \"file_id\": \"4150868000005364001\",\n            \"field_mappings\": [\n                {\n                    \"api_name\": \"Last_Name\",\n                    \"index\": 0\n                },\n                {\n                    \"api_name\": \"Mobile\",\n                    \"index\": 1\n                },\n                 {\n                    \"api_name\": \"Owner\",\n                    \"index\": 2\n                }\n            ]\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/bulk/v2.1/write",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "bulk",
            "v2.1",
            "write"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:07:49 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        },
        {
          "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-11T12:57:31+05:30"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"status\": \"error\",\n    \"code\": \"INVALID_CALLBACK_URL\",\n    \"message\": \"Invalid URL 'http://requestbin.fullcontact.com' for callback.\",\n    \"details\": {\n        \"reason\": \"possible ssrf attempt\"\n    }\n}"
    },
    {
      "name": "FILE_NOT_SUPPORTED",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"operation\": \"insert\",\n    \"ignore_empty\": true,\n    \"resource\": [\n        {\n            \"type\": \"data\",\n            \"module\": {\n                \"api_name\": \"Leads\",\n                \"id\": \"4150868000000002175\"\n            },\n            \"file_id\": \"4150868000005364001\",\n            \"field_mappings\": [\n                {\n                    \"api_name\": \"Last_Name\",\n                    \"index\": 0\n                },\n                {\n                    \"api_name\": \"Mobile\",\n                    \"index\": 1\n                },\n                {\n                    \"api_name\": \"Owner\",\n                    \"index\": 2\n                }\n            ]\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/bulk/v2.1/write",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "bulk",
            "v2.1",
            "write"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:09:03 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        },
        {
          "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-11T12:57:31+05:30"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"status\": \"error\",\n    \"code\": \"FILE_NOT_SUPPORTED\",\n    \"message\": \"File not supported for bulk write\",\n    \"details\": {}\n}"
    },
    {
      "name": "INVALID_DATA",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \n    \"ignore_empty\": true,\n     \"callback\": {\n        \"url\": \"https://www.zoho.com/\",\n        \"method\": \"post\"\n    },\n    \"resource\": [\n        {\n            \"type\": \"data\",\n            \"module\": {\n                \"api_name\": \"Leads\",\n                \"id\": \"4150868000000002175\"\n            },\n            \"file_id\": \"4150868000005364001\",\n            \"field_mappings\": [\n                {\n                    \"api_name\": \"Last_Name\",\n                    \"index\": 0\n                },\n                {\n                    \"api_name\": \"Mobile\",\n                    \"index\": 1\n                },\n                {\n                    \"api_name\": \"Owner\",\n                    \"index\": 2\n                }\n            ]\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/bulk/v2.1/write",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "bulk",
            "v2.1",
            "write"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:09:26 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        },
        {
          "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-11T12:57:31+05:30"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"status\": \"error\",\n    \"code\": \"INVALID_DATA\",\n    \"message\": \"Invalid data\",\n    \"details\": {}\n}"
    },
    {
      "name": "MISSING_REQUIRED_KEY",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"operation\": \"insert\",\n    \"ignore_empty\": true,\n    \"callback\": {\n        \"url\": \"https://www.zoho.com/\",\n        \"method\": \"post\"\n    },\n    \"resource\": [\n        {\n            \"type\": \"data\",\n            \"file_id\": \"4150868000005364001\",\n            \"field_mappings\": [\n                {\n                    \"api_name\": \"Last_Name\",\n                    \"index\": 0\n                },\n                {\n                    \"api_name\": \"Mobile\",\n                    \"index\": 1\n                },\n                {\n                    \"api_name\": \"Owner\",\n                    \"index\": 2\n                }\n            ]\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/bulk/v2.1/write",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "bulk",
            "v2.1",
            "write"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:10:08 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        },
        {
          "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-11T12:57:31+05:30"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"status\": \"error\",\n    \"code\": \"MISSING_REQUIRED_KEY\",\n    \"message\": \"required key module is not found in request body.\",\n    \"details\": {}\n}"
    },
    {
      "name": "INVALID_FIELD_NAME",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"operation\": \"insert\",\n    \"ignore_empty\": true,\n    \"callback\": {\n        \"url\": \"https://www.zoho.com/\",\n        \"method\": \"post\"\n    },\n    \"resource\": [\n        {\n            \"type\": \"data\",\n            \"module\": {\n                \"api_name\": \"Leads\",\n                \"id\": \"4150868000000002175\"\n            },\n            \"file_id\": \"4150868000005364001\",\n            \"field_mappings\": [\n                {\n                    \"api_name\": \"Last Name\",\n                    \"index\": 0\n                },\n                {\n                    \"api_name\": \"Mobile\",\n                    \"index\": 1\n                },\n                {\n                    \"api_name\": \"Owner\",\n                    \"index\": 2\n                }\n            ]\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{api-domain}}/crm/bulk/v2.1/write",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "bulk",
            "v2.1",
            "write"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Tue, 11 May 2021 07:11:18 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        },
        {
          "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-11T12:57:31+05:30"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"status\": \"error\",\n    \"code\": \"INVALID_FIELD_NAME\",\n    \"message\": \"invalid mapping. invalid api_name Last Name.\",\n    \"details\": {}\n}"
    }
  ]
}