UploadAttachment
Uploads an attachment to an item in Xero, such as invoices, receipts, or contracts, for record-keeping and easy access.
Input
| Name | Type | Required | Description |
| Table | String | True | The table containing the document to attach a file to.
The allowed values are Invoices, Receipts, CreditNotes, BankTransactions, BankTransfers, Contacts, Accounts, ManualJournals. |
| ObjectId | String | True | The unique ID of the item (for example, invoice or receipt) to attach the document to. |
| FilePath | String | False | The file path where the attachment is located on the file system. This is required unless FileData is provided. |
| FileData | String | False | Base-64 encoded data representing the file content. Required if FilePath is not provided. |
| Filename | String | False | The name of the file being attached. This is required unless FilePath is defined. |
| ContentType | String | False | The content type of the file being attached. |
| IncludeOnline | String | False | Determines if the attachment should be included with the document when viewed online. Defaults to false. |
| TenantId | String | False | The ID of the tenant to query for data, if different from the connection tenant. |
Result Set Columns
| Name | Type | Description |
| Success | String | A boolean indicating whether the attachment operation was successful. |
| AttachmentId | String | The unique identifier for the attached document. |
| FileName | String | The name of the attached file. |
| URL | String | The URL where the attachment can be accessed. |
| MimeType | String | The MIME type of the attached file. |
| ContentLength | String | The size of the attached file in bytes. |
| IncludeOnline | String | A boolean indicating whether the attachment will be included when the document is viewed online. |