Upload File
Purpose
To upload a CSV file in ZIP format for bulk write API. The response contains the file_id. Use this ID while making the bulk write request.
Request URL
https://upload.zoho.com/recruit/v2/upload
Request Method
POST
Scope
scope=ZohoFiles.files.ALL
Request Headers
Header Name | Value | Description |
---|---|---|
Authorization | Zoho-oauthtoken 1000.avsxxxxxxxxxxxxxdf | A token that is sent to the resource server to access the protected resources of the user |
feature | bulk-write | To indicate that this a bulk write operation |
X-RECRUIT-ORG | zgid | The unique ID (zgid) of your organization obtained through the Organization API |
Parameters
Parameter Name | Data Type | Description |
---|---|---|
file (mandatory) | file | Choose the zip file you want to upload |
Possible Errors
HTTP Status | Error | Message | Reason |
---|---|---|---|
200 | INVALID_FILE_FORMAT | invalid file format. only zip format is supported | The file you uploaded is not in the zip format. |
200 | FILE_TOO_LARGE | File size too large to process | The file size is greater than 25MB |
404 | INVALID_URL_PATTERN | Please check if the URL you are trying to access is correct | The request URL specified is incorrect. Specify a valid request URL |
404 | OAUTH_SCOPE_MISMATCH | Unauthorized | Client does not have ZohoFiles.files.ALL. Create a new client with valid scope. |
403 | NO_PERMISSION | Permission denied to create | The user does not have permission to upload files. Contact your system administrator |
500 | INTERNAL_ERROR | Internal server error | Unexpected and unhandled exception in Server. Contact support team. |
400 | INVALID_REQUEST_METHOD | The http request method type is not a valid one | You have specified an invalid HTTP method to access the API URL. Specify a valid request method |
400 | AUTHORIZATION_FAILED | User does not have sufficient privilege to create | The user does not have permission to upload files. Contact your system administrator |
Note:
Refer Limitations to know the CSV file limits.
Sample Request
Copiedcurl "https://upload.zoho.com/recruit/v2/upload"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-H "X-RECRUIT-ORG: 56xxxx47"
-H "feature: bulk-write"
-F "file=@file.csv.zip"
In the input, "@file.csv.zip" contains the CSV file in ZIP format.
Sample Response
Copied{
"code": "FILE_UPLOAD_SUCCESS",
"details": {
"created_time": "2021-02-09T12:17:05+05:30",
"file_id": "17774000000816001"
},
"message": "file uploaded.",
"status": "success"
}