DownloadPDF
Downloads a specified document in PDF format from Xero. It's useful for obtaining physical copies of invoices, quotes, or other reports.
Input
| Name | Type | Required | Description |
| Table | String | True | The name of the table containing the document to be downloaded. This specifies the source location where the document resides, such as 'Invoices', 'Orders', or 'Contracts', helping to identify the correct document to retrieve.
The allowed values are Invoices, CreditNotes, Quotes. |
| ObjectId | String | True | The unique identifier of the item (such as an invoice, order, or contract) to download as a PDF. This ID ensures that the correct document is retrieved and converted into PDF format. |
| DownloadPath | String | False | The full file path where the downloaded PDF document will be saved. This field must specify a complete path, including the directory and filename, to properly store the PDF on the file system. |
| TenantId | String | False | The unique identifier of the tenant. This ensures the query is performed for a specific tenant's data, useful in multi-tenant systems to isolate the data for a particular organization or account. |
Result Set Columns
| Name | Type | Description |
| Success | String | A boolean indicating whether the operation was successful. 'True' means the document was successfully downloaded and converted into PDF format, while 'false' indicates an error occurred during the process. |
| FileData | String | Contains the base64-encoded content of the document. This is populated when neither 'DownloadPath' nor 'FileStream' is provided, allowing the document to be transferred or stored in Base64-encoded format instead of as a file. |