Connect an ERP to sync vendors and vendor bills/purchase invoices into a company (ADMIN+, requires an active subscription)
const url = 'https://api.invogi.com/v1/erp-connections';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"provider":"BUSINESS_CENTRAL","config":{"tenantId":"example","environmentName":"example","companyId":"example","clientId":"example","bankAccountEndpoint":"https://example.com","bankAccountVendorIdField":"example","bankAccountIbanField":"example"},"client_secret":"example","company_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.invogi.com/v1/erp-connections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "provider": "BUSINESS_CENTRAL", "config": { "tenantId": "example", "environmentName": "example", "companyId": "example", "clientId": "example", "bankAccountEndpoint": "https://example.com", "bankAccountVendorIdField": "example", "bankAccountIbanField": "example" }, "client_secret": "example", "company_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'provider selects the request shape (discriminated union). Credentials
(client_secret/api_key) are write-only and never returned. Business
Central and Odoo take static credentials directly; Xero and QuickBooks
Online instead use POST /erp-connections/oauth/start and are never
created directly through this endpoint (docs/20_ERP_CONNECTORS.md
“OAuth (authorization-code) connectors”).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Microsoft Entra ID tenant ID
Business Central environment name, e.g. “production”
Business Central company ID within that environment
Entra app registration client ID
Optional HTTPS Business Central custom API page URL for vendor IBANs; supports a {companyId} placeholder
Entra app registration client secret
Invogi company this connection imports into; defaults to the default company
object
object
HTTPS base URL of the Odoo instance, e.g. https://mycompany.odoo.com (no /xmlrpc suffix)
Odoo API key (Settings > Users > the connecting user > API Keys)
Invogi company this connection imports into; defaults to the default company
Responses
Section titled “Responses”Connection saved as PENDING; syncs hourly and on demand
object
Bills the first sync left out and an owner has not analyzed yet; null when none
object
Most the overage could add
Provider-specific, non-secret config as stored (credentials are never included)
object
SCAN_ONLY: connected on the free tier for a one-shot historical scan; never syncs until activated
SCAN_ONLY: fallback revocation time if the grant was not revoked when the scan finished
object
Of the imported invoices
Set when this run was a historical scan rather than a sync
Example
{ "provider": "BUSINESS_CENTRAL", "status": "PENDING", "mode": "SYNC", "recentRuns": [ { "status": "RUNNING" } ]}Invalid request
Missing or invalid API key
API key lacks required scope/role