CData Python Connector for Xero

Build 25.0.9454

DownloadFile

Used to download a file from Xero's file storage service.

Procedure-Specific Information

There are two different ways to download a file. If you provide a DownloadPath, then the file is downloaded and its contents are stored at that location:
EXECUTE DownloadFile @FileID = '...', @DownloadPath = 'c:/my/xero/files/form.docx'

If you do not provide a DownloadPath, then the contents of the file are base64 encoded and returned in the FileData output:

EXECUTE DownloadFile @FileID = '...'

Input

Name Type Required Description
FileId String True The unique identifier of the file to be downloaded.
DownloadPath String False The file system path where the downloaded file will be saved.
TenantId String False The ID of the tenant for which the query should be executed, overriding the connection tenant.

Result Set Columns

Name Type Description
FileData String The base64-encoded content of the file, returned if neither DownloadPath nor FileStream is specified.
Success String Indicates whether the file download operation was successful.

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