Connect an accounting system
1
See what the system needs
GET /v1/integration-providers lists the accounting systems Watchdog supports, and for each one
the credentials you need to connect it.2
Save the connection
3
Test it
POST /v1/integrations/{id}/test signs in and reads a few invoices. If something is wrong,
result is failed and steps shows where it went wrong. An integration must pass its test
before it can sync.Choose what to import
By default an integration reads every invoice. To read fewer, set itsscope with
PATCH /v1/integrations/{id}, for example to only include certain suppliers.
GET /v1/integrations/{id}/suppliers lists the suppliers in the accounting system to choose from.
Watchdog fetches that list from the accounting system when you ask it to, with
POST /v1/integrations/{id}/suppliers/refresh.
Import invoices
Turn onauto_sync and Watchdog syncs every night. To sync now, or to import older invoices, start
a sync for a period:
id is also a workflow run ID, so you can follow its
progress, see which invoices failed, and cancel it there. If a sync stops before it has read
everything, POST /v1/workflow-runs/{id}/retry picks up where it left off.
A key with Write access can start syncs too, but only for named suppliers: the saved scope, or
the scope in the request, must list them.
Only one sync runs per integration at a time. While one is running, starting another returns 409
with the running sync’s ID.
Change the credentials
Send new credentials withPATCH /v1/integrations/{id}, then test again. Saved secrets are never
returned. Send the ETag from your last read as If-Match so you don’t overwrite someone else’s
change.