Add Attachments
Purpose
To add attachments to a particular record. It will be listed under the Attachments tab of the record. The attachment files should first be uploaded to ZFS.
Request URL
https://fsm.zoho.com/fsm/v1/<module_api_name>/<record_id>/Attachments
module_api_name - The API name of the module to whose record you want to add the attachments
record_id - The ID of the record to which you want to attach a file
Request Method
POST
Scope
scope=ZohoFSM.modules.<module_name>.CREATE
Mandatory Parameters
| Name | Description | Type |
| File_Id | The file_id you obtain after uploading the file to ZFS | String |
| File_Name | A display name for the file | String |
Supported Modules
| Module Name | API Name |
|---|---|
| Requests | Requests |
| WorkOrders | Work_Orders |
| Estimates | Estimates |
| ServiceAppointments | Service_Appointments |
| Contacts | Contacts |
| Companies | Companies |
| Assets | Assets |
| Service_And_Parts | Service_And_Parts |
Sample Request
Copiedcurl --request POST 'https://fsm.zoho.com/fsm/v1/Service_Appointments/1003000002206029/Attachments' \
--header 'Authorization: Zoho-oauthtoken 1000.26xxxxxxxxxx.xxxxxxxxxx0' \
--header 'content-type: application/json' \
--data "@attachments.json"Sample Input
Copied{
"data": [
{
"File_Id": "17346XXXXXXQg94H",
"File_Name": "file1.png"
},
{
"File_Id": "17346XXXXXXkXn6N",
"File_Name": "file2.png"
}
]
}Sample Response
Copied{
"data": [
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2024-12-20T15:27:50+05:30",
"Modified_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
},
"Created_Time": "2024-12-20T15:27:50+05:30",
"id": "1003000002259063",
"Created_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
}
},
"message": "attachment uploaded successfully",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2024-12-20T15:27:50+05:30",
"Modified_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
},
"Created_Time": "2024-12-20T15:27:50+05:30",
"id": "1003000002259065",
"Created_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
}
},
"message": "attachment uploaded successfully",
"status": "success"
}
]
}