Create Bulk Write Job
Purpose
To create a bulk write job.
Request URL
https://recruit.zoho.com/recruit/bulk/v2/write
Request Method
POST
Scope
scope=ZohoRecruit.bulk.CREATE
(or)
ZohoRecruit.bulk.ALL
(and)
scope=ZohoRecruit.modules.ALL
(or)
Scope=ZohoRecruit.modules.{module_name}.{operation_type}
Possible module names | Possible operation types |
---|---|
candidate, jobopening, client, interview, contact, department, custommodule | ALL - Full access to the record CREATE - Create a bulk write job |
Request JSON
Attribute | Data Type | Mandatory | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
character_encoding | String | No | Represents the charset of the uploaded file. It is usually auto-detected. But if specified, then it will be used to read the file. | ||||||||||||||||||||||||||||||||||||||||||||||||
operation | String | Yes | Represents the type of operation you want to perform on the bulk write job. Values are
| ||||||||||||||||||||||||||||||||||||||||||||||||
callback Show properties | JSON Object | No | A valid URL that should allow the HTTP POST method. The Bulk Write Job's details are posted to this URL upon successful completion of the job or upon the failure of the job. Sample - "callback" : { "url": "https://sampledomain.com/getzohoresponse", "method": "post" } | ||||||||||||||||||||||||||||||||||||||||||||||||
callback Properties
| |||||||||||||||||||||||||||||||||||||||||||||||||||
resourceShow properties | JSON Array | No | A JSON array of objects containing the API names of modules that you want to import, their field mappings, and the corresponding file IDs obtained from Upload API. | ||||||||||||||||||||||||||||||||||||||||||||||||
resource Properties
|
Response Structure
Attribute | Data Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
status | String | Specifies the status of the API call. Sample - "status": "success". | ||||||||||
message | String | Specifies the pre-defined comments for the job. Useful in case any errors occur. | ||||||||||
details Show properties | JSON Object | Please refer the below table for information on the "details" JSON object. | ||||||||||
details Properties
|
Possible Errors
HTTP Status | Error Code | Message | Reason |
---|---|---|---|
400 | MANDATORY_FIELDS_NOT_MAPPED | All mandatory fields are not mapped | All mandatory fields in the module are not mapped |
400 | MANDATORY_NOT_FOUND | Mandatory key is not available | Mandatory key or value is not specified in the request body. Example: "message": "Required key find_by is not available". |
400 | INVALID_FIELD | invalid mapping. invalid api_name {{api_name}} | The field API name is invalid |
400 | INVALID_FORMAT | invalid mapping. invalid format Invalid format for sysref - {field_api_name} | Date is entered in the wrong format |
400 | INVALID_FILE_ID | invalid file_id {{file_id}} | The file ID specified is invalid |
400 | HEADER_LIMIT_EXCEEDED | Import file does not exceed 200 columns | The number of fields mapped has exceeded the maximum limit of 200 |
400 | COLUMN_INDEX_NOT_FOUND | Invalid column index mapped. Index is invalid for sysref {field_api_name}. | Index is mapped with negative values |
400 | MODULE_NOT_AVAILABLE | Requested module {module_api_name} is not available | The module name specified is invalid |
Sample Request
Copiedcurl "https://recruit.zoho.com/recruit/bulk/v2/write"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@inputData.json"
In the request, @inputData.json contains the sample input data.
Sample Input for Bulk Insert
Copied{
"operation": "insert",
"resource": [
{
"type": "data",
"module": "Candidates",
"file_id": "17774000000857001",
"field_mappings": [
{
"api_name": "First_Name",
"index": 1
},
{
"api_name": "Last_Name",
"index": 2
},
{
"api_name": "Email",
"index": 4
},
{
"api_name": "Current_Company",
"index": 27
},
{
"api_name": "Candidate_Status",
"index": 33
}
]
}
]
}
Sample Input for Bulk Update
Copied{
"operation": "update",
"resource": [
{
"type": "data",
"module": "Contacts",
"file_id": "111111000000541958",
"field_mappings": [
{
"api_name": "Last_Name",
"index": 0
},
{
"api_name": "Id",
"index": 1
}
],
"find_by": "Id"
}
],
"callBack": {
"url": "http://requestbin.fullcontact.com/1bvgfh61",
"method": "post"
}
}
Sample Response
Copied{
"status": "success",
"code": "SUCCESS",
"message": "success",
"details": {
"id": "111111000000541958",
"created_by": {
"id": "111111000000035795",
"name": "Patricia Boyle "
}
}
}