SET API · Accounting
The connected ledger and its sync counts
GET/v1/accounting/connections
Reads your business's connected ledger (QuickBooks Online or Xero), its state and how many journal entries SET has posted, failed or skipped. With nothing connected it answers connected: false.
Notes
- Accounting connections are switched on per deployment; when off, the call answers 403
accounting_connectors_off. CheckGET /v1/capabilities(features.*). - Needs a key with the
readscope. - Accounting connections are for a business account: a platform key gets 403
accounting_merchant_only. - Before anything is connected the answer is
{ "object": "accounting_connection", "connected": false, "counts": {} }. stateisactiveorreauthorize: the ledger refused SET's access, so connect again.countsare entry posts by state (posted,failed,skipped); when a post fails,lastErrorpoints toGET /v1/accounting/entries?state=failed.companyIdis the QuickBooks company (realm) id, or the Xero tenant id.- The example was made with a sandbox key, right after the connection was approved and before any sync.
- This example is a recorded run of SET's own code (wallet release
e9b03447) with a sandbox key; ids and times are that run's.
Errors
403 accounting_connectors_off403 accounting_merchant_only