ListAttachments
Retrieves a list of attachments that have been uploaded to documents in Xero, allowing you to track and access supporting documents linked to financial records.
Input
| Name | Type | Required | Description |
| Table | String | True | The name of the table containing the document from which a list of attachments will be retrieved. This identifies the database table that holds the document data and its associated attachments.
The allowed values are Invoices, Receipts, CreditNotes, BankTransactions, BankTransfers, Contacts, Accounts, ManualJournals. |
| ObjectId | String | False | The unique identifier of the document for which the list of attachments will be retrieved. This links the attachments to a specific document in the database, ensuring that only relevant attachments are returned. |
| TenantId | String | False | The unique identifier of the tenant. This ensures the query is scoped to the correct tenant in multi-tenant environments, ensuring proper isolation of data and retrieving attachments for the right organization. |
Result Set Columns
| Name | Type | Description |
| AttachmentId | String | The unique identifier for each attachment. This value allows each attachment to be individually referenced and accessed from the document. |
| FileName | String | The name of the attachment file. This field provides the name of the file for each attachment, which is useful for identifying and managing the attached documents. |
| URL | String | The URL where the attachment is located. This field provides a direct link to the attachment, allowing users to access or download the file. |
| MimeType | String | The Internet media type (MIME type) of the attachment. This field specifies the format of the attached file (for example, 'application/pdf', 'image/jpeg'), helping systems and users understand how to handle the file. |
| ContentLength | String | The size of the attachment in bytes. This field indicates the size of the file, providing information that can be used for validating file size limits or managing storage. |