Add Task Attachment
Add an attachment to a task in Last Mile Intelligence.
Operation
Section titled “Operation”addTaskAttachment
Resource
Section titled “Resource”task
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Task ID | string | Yes | - | The ID of the task to attach to |
| Attachment | binary | Yes | - | File to attach |
Response
Section titled “Response”Success
Section titled “Success”{ "success": true, "taskId": "task_abc123", "attachment": { "id": "att_new123", "name": "maintenance_photo.jpg", "mimeType": "image/jpeg", "size": 245000, "url": "https://storage.lmi.com/attachments/att_new123.jpg", "createdAt": "2024-06-21T09:00:00Z" }}{ "success": false, "error": "Task not found", "taskId": "invalid_id"}Error Handling
Section titled “Error Handling”- Missing API Token: LMI credential is missing API token
- Task Not Found: Task with specified ID does not exist
- File Too Large: Attachment exceeds maximum file size
- Invalid File Type: File type not allowed
- Permission Denied: API token lacks permission for this operation