Files Data Model
The CData Excel Add-In for Xero models the Xero Files API as an easy-to-use SQL database. There are three parts to the data model: tables, views, and stored procedures.
Tables
API limitations and requirements are documented in this section; you can use the SupportEnhancedSQL feature, set by default, to circumvent most of these limitations.
The tables include:
| Table | Description |
| Associations | Manages the associations of files within Xero, including how files are linked to other entities (such as contacts, invoices, or projects). It allows for querying, inserting, and deleting associations between files and records. |
| Files | Stores and manages files in Xero. It allows you to query, update, and delete files, such as invoices, receipts, and contracts. It provides functionality for managing digital documents attached to various records. |
| Folders | Manages folders within Xero's file storage system. It allows for the organization and management of files into categories. |
| Tenants | Queries the list of organizations (tenants) connected to your Xero account. Each tenant corresponds to a specific Xero organization, enabling access to their data for file management. |
API limitations and requirements are documented in each table.
Stored Procedures
Stored Procedures are actions that are invoked via SQL queries. They perform tasks beyond standard create, read, update, delete (CRUD) operations, including managing file uploads and downloads, and OAuth tokens.