vsmsconnect — API — background-runs

← all endpoints

GET/api/v1/businesses/:businessId/background-runs/:runId auth: jwt (administrator | view_invoices | submit_invoices)

Status of a background run started by a re-sync or Sync Now endpoint. Poll until `status` is no longer `running`: `done` carries `result` (the body the start endpoint used to return synchronously), `failed` carries `errorCode`, and `interrupted` means the backend stopped before the run finished (safe to start again). A run of another business, or one older than its retention (15 min after finishing), returns 404.

handlers: BackgroundRunsController.getById

Inputs

namerequireddefaultdescription
businessId path
uuid
yes—Target business UUID.
runId path
uuid
yes—The `runId` from the start endpoint's 202 (or 409) reply.

Outputs

200
APIResponseDataObject<BackgroundRunDTO>
`runId`, `kind`, `params`, `status` (running | done | failed | interrupted), `startedAt`, and `finishedAt` / `result` / `errorCode` once finished.
404
APIError
BACKGROUND_RUN_NOT_FOUND — unknown, expired, or another business's run.