Skip to content

Xero Accounting ​

Reads one Xero organisation: invoices, payments, bank transactions, contacts, and accounts. Use a Xero OAuth 2.0 app with a refresh token. The tenant id is the organisation Skipprd should read.

Before you begin ​

  1. Create an app at Xero developer and complete OAuth.
  2. Copy the tenant id (organisation) from the Xero connection list.
  3. Export client id, secret, and refresh token.
bash
export XERO_CLIENT_ID="..."
export XERO_CLIENT_SECRET="..."
export XERO_REFRESH_TOKEN="..."

Configure ​

python
from skippr import Config, DataSourceXeroAccounting, EnvRef, Pipeline

cfg = Config.discover()
src = cfg.data_source(
    "xero",
    DataSourceXeroAccounting(
        tenant_id="00000000-0000-0000-0000-000000000000",
        start_date="2024-01-01",
        oauth_client_id="${XERO_CLIENT_ID}",
        oauth_client_secret=EnvRef("XERO_CLIENT_SECRET"),
        oauth_refresh_token=EnvRef("XERO_REFRESH_TOKEN"),
        stream_profile="full",
    ),
)
cfg.pipeline("accounting", Pipeline(data_source=src, data_sink=cfg.get_data_sink("lake")))
cfg.save()
bash
skipprd connect data-source xero-accounting \
  --pipeline accounting \
  --name xero \
  --tenant-id 00000000-0000-0000-0000-000000000000 \
  --start-date 2024-01-01 \
  --oauth-client-id '${XERO_CLIENT_ID}' \
  --oauth-client-secret '${XERO_CLIENT_SECRET}' \
  --oauth-refresh-token '${XERO_REFRESH_TOKEN}' \
  --stream-profile full
yaml
data_sources:
  xero:
    XeroAccounting:
      tenant_id: "00000000-0000-0000-0000-000000000000"
      start_date: "2024-01-01"
      stream_profile: full
      lookback_days: 90
      oauth_client_id: ${XERO_CLIENT_ID}
      oauth_client_secret: ${XERO_CLIENT_SECRET}
      oauth_refresh_token: ${XERO_REFRESH_TOKEN}

Options ​

KeyTypeRequired/DefaultDescription
tenant_idstringRequiredXero organisation tenant id
start_datestringRequiredFirst date (YYYY-MM-DD)
lookback_daysinteger90Modified-since window
page_sizeinteger100API page size (1–100)
stream_profilestringfullminimal, standard, or full
streamslistProfile setExact stream list
min_query_interval_msinteger350Delay between API calls
oauth_token_urlURLXero defaultToken endpoint
oauth_client_idstringNot setApp client id
oauth_client_secretsecretNot setApp secret
oauth_refresh_tokensecretNot setRefresh token
access_tokensecretNot setStatic bearer (skips refresh)
privacyobjectNot setField redaction

What gets synced ​

Accounting entities in the selected profile. Each run re-reads rows modified in lookback_days.

Troubleshooting ​

SymptomFix
401Re-consent the Xero app; refresh tokens rotate
403Confirm the tenant is connected to this app
Wrong organisationtenant_id is per organisation, not the user

Next steps ​