@accounty/exact-online
v2.1.7
Published
<img src="https://cdn.jsdelivr.net/npm/@accounty/exact-online/banner.png" alt="Accounty — Many providers. One interface." />
Readme
@accounty/exact-online
Accounts and receivables from Exact Online.
Installation
yarn add @accounty/exact-onlineUsage
Authentication: OAuth 2.0.
import ExactOnline from '@accounty/exact-online'
const provider = new ExactOnline({})
await provider.setCredentials({ accessToken: '<access-token>' })
const [administration] = await provider.getAdministrations()
if (!administration) {
throw new Error('No administration available')
}
await provider.setSettings(administration)
const { data: invoices } = await provider.fetchInvoices()Select the administration your user intends to access; the example uses the first.
For OAuth authorization and token refresh, pass clientId, clientSecret, and redirectUri
to the constructor. Persist credentials returned by getOauthToken() or
setCredentials(). See the OAuth guide.
Supported behavior
getAdministrations()lists available divisions; pass the selected administration tosetSettings()before fetching data.fetchCompanies(),fetchInvoices(), andfetchInvoicesWithCompany()return normalized records.downloadInvoice(remoteId)retrieves an invoice attachment.- Set the constructor option
apiDomainusing the exportedExactOnlineApiDomainenum; the default is the Netherlands endpoint. useIdMigrationDatedefaults tofalse. Enabling it retains invoice-number IDs for invoices dated on or before 2026-08-31 and uses receivable IDs after that date.
Fetch methods return { data, version? }. Amounts are integer cents, dates are
Date objects, and remoteData preserves provider records. Filter support varies
by provider.
