Attach File
Purpose
To attach a file to the specified record using Widget API.
Request Format
ZOHO.RECRUIT.API.attachFile({
Entity: "{module_api_name}",
recordID: "{record_id}",
Category: "{attachment_category}",
File: {file}
});
Parameters
module_api_name - The API name of the module
record_id - The unique ID of the record
attachment_category - Label of the attachment category
file - The file you wish to attach. (Size Limit: 20 MB | Supported Formats: All formats except .exe)
Sample Request
CopiedZOHO.RECRUIT.API.attachFile({
Entity: "Candidates",
recordID: "14501000002013098",
Category: "Resume",
File: {
Name: "file to attach",
Content: file
}
}).then(function(successResponse) {
}, function(failureResponse) {
});
Sample Response
Copied{
"data": [
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2022-08-16T09:38:24+05:30",
"Modified_By": {
"name": "Patricia Boyle",
"id": "14501000002214265"
},
"filename": "resume.pdf",
"Created_Time": "2022-08-16T09:38:24+05:30",
"id": "14501000000194005",
"Created_By": {
"name": "Patricia Boyle",
"id": "14501000002214265"
}
},
"message": "attachment uploaded successfully",
"status": "success"
}
]
}
Show full
Show less