Follow a run
Imports and checks return aworkflow_run_id, and a sync’s id is its run ID. Read the run every
few seconds until its status is no longer queued or running:
progress counts the items in each state. While Watchdog is still finding work, for example
during a sync, progress.total is null.
A finished run ends in one of these states:
completed: everything succeeded. A run with nothing to do also ends here.completed_with_errors: some items succeeded and some didn’t.failed: nothing succeeded, or the run itself failed.failuresays why.cancelled: someone stopped it. Items that had already finished keep their results.
200), with the failure in the body.
See the results
GET /v1/workflow-runs/{id}/items lists the items with their results. Each item’s result is
available as soon as that item finishes, even if the rest of the run is still going. Filter with
statuses=failed to see only what went wrong.
Find runs
GET /v1/workflow-runs lists runs, newest first. Filter by status, type or the record a run belongs
to.
Cancel or retry
- Cancel with
POST /v1/workflow-runs/{id}/cancel. Work that hasn’t finished stops; finished items keep their results. A run that has already finished can’t be cancelled. - Retry a failed invoice import, invoice check or accounting sync with
POST /v1/workflow-runs/{id}/retry. An import or check retry starts a new run, linked to the old one throughretry_of_run_id. A sync retry picks up the same run where it stopped.