attachment
Upload, download, list, and delete file attachments for InvenTree objects such as parts, stock items, orders, and companies.
Instructions
File attachment management for any InvenTree object.
Operations: Read: list, download Write: upload, upload_link Delete: delete
Args: operation: One of the operations listed above. model_type: Object type (part, stockitem, build, purchaseorder, salesorder, company). model_id: Object ID for list/upload/upload_link. attachment_id: Attachment ID for download/delete. file_path: Local file path for upload. link: URL for upload_link. comment: Optional comment for uploads. destination: File path to save downloaded attachment to.
Returns: JSON string with attachment data or {"error": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| model_type | No | ||
| model_id | No | ||
| attachment_id | No | ||
| file_path | No | ||
| link | No | ||
| comment | No | ||
| destination | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |