The Xero export integration connects a Xero organization to fileAI so you can send extracted financial data straight into Xero. Once connected, you can export purchase invoices and sales invoices to Xero, and download bank statement data as a Xero-compatible CSV for manual import.
Xero export is an app feature. There is no public API to connect Xero or trigger an export yet. Through the API you can read a file’s latest integration export result, and write one from your own system. See Check export status.

What you can export

Exports use the accounts, tax codes and tracking categories you have configured for the integration, so the same mapping is applied every time. The app shows each export’s status and the reason when an export fails.

How it works

Connect your Xero account

fileAI connects through Xero’s own OAuth2 sign-in. You sign in on Xero’s site, and fileAI never sees or stores your Xero password.
1

Open Xero from Export Integrations

In Drive (your file repository), open the integration menu and select Xero under Export Integrations.
Xero in the Export Integrations menu
2

Sign in through Xero

You are redirected to Xero’s sign-in page. Sign in with your Xero account.
Xero sign-in page
3

Choose your organization and allow access

Pick the Xero organization to connect, review the permissions Xero lists, and select Allow access.
Xero consent screen with Allow access
4

Confirm the connection

Back in fileAI, the Xero export icon now appears in the action bar.
Xero connected in the fileAI action bar

Download a bank statement for Xero

1

Open the file

Select the bank statement and open its AI Schema tab to review the extracted data.
2

Download as XERO_CSV

Open the Download dropdown at the upper right and choose XERO_CSV. The file is saved to your downloads folder when the progress bar finishes.
3

Import into Xero

Upload the CSV to Xero manually.
XERO_CSV only works for bank statements. Choosing it for any other kind of file shows an error. Use XLSX, XLS, CSV, JSON or PDF for other files.

Check export status

Every file returned by GET /v1/files includes an exportInfo object once it has been exported through an integration:

Report an export from your own system

If you export files from fileAI to another system yourself, write the outcome back with PATCH /v1/files/{fileId}. fileAI stores it in the file’s exportInfo, sets integrationExportUpdatedAt, and adds an entry to the file’s activity in the app.
integrationExportStatus is required and must be one of the four values above; integrationExportMessages is optional. The response returns the fileId and the new exportInfo. FILEAI_BASE_URL is https://api.orion.file.ai/prod/v1, or your regional host.

Multi-page financial report

Upload a file, wait for processing and read its values end to end.

AI Schemas

Define the invoice fields you extract before exporting.

Incremental loading

Read files, including exportInfo, into your own systems.

Notifications

Email the right people when a file meets your conditions.