Skip to main content
An integration connects Watchdog to your accounting system, such as Tripletex or Visma, so invoices come in on their own. A sync is one run that reads invoices from it. Setting up an integration needs an API key with Admin access.

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

Saving doesn’t contact the accounting system yet.
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.
Some systems, such as Fortnox, ask you to sign in on their own website instead of sharing credentials. Connect those on the Integrations page in the Watchdog app.

Choose what to import

By default an integration reads every invoice. To read fewer, set its scope 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 on auto_sync and Watchdog syncs every night. To sync now, or to import older invoices, start a sync for a period:
Without dates, it reads the last month. Imported invoices are matched and checked automatically. The sync’s 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 with PATCH /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.