Power BI Connector for Xero

Build 25.0.9454

DownloadAttachment

Retrieves an attachment from a specified document in Xero. Attachments can include scanned invoices, receipts, or any other related documents.

Input

Name Type Required Description
Table String True The name of the table containing the document that the attachment is associated with. This field specifies where the attachment resides within the database (for example, 'Invoices' and 'Contacts').

The allowed values are Invoices, Receipts, CreditNotes, BankTransactions, BankTransfers, Contacts, Accounts, ManualJournals.

ObjectId String True The unique identifier of the item (such as an invoice, contact, or document) from which the attachment should be retrieved. This ID links the attachment to a specific record in the specified table.
Filename String True The name of the attachment to retrieve. This is the specific filename (including extension) of the document or file being requested, allowing for precise identification of the file to fetch.
DownloadPath String False The full file path where the retrieved attachment will be saved. This must be a valid path that includes the filename and directory location, ensuring the file can be stored correctly on the file system.
TenantId String False The unique identifier of the tenant. This allows the query to access data specific to a particular tenant, ensuring that the operation is performed within the correct organizational context in a multi-tenant environment.

Result Set Columns

Name Type Description
Success String A boolean indicating whether the operation was successful. 'True' means the attachment was successfully retrieved and processed, while 'false' indicates an error occurred during the retrieval process.
FileData String Contains the Base64-encoded content of the attachment file. This field is populated if neither 'DownloadPath' nor 'FileStream' is provided, allowing the file to be returned in a Base64-encoded format for transfer or storage.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454