Skip to main content
GET
Get Accounting Queue Status
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Get Accounting Queue Status Check the status of accounting recalculation jobs. Can query a specific job by ID or get overall queue status. Method: GET Authorization:
  • Required role: admin or higher
Query Parameters: Without jobId: Returns queue overview and recent jobs With jobId: Returns detailed status for that specific job Polling and job retention: The accounting queue removes a job record as soon as the job finishes (removeOnComplete / removeOnFail), which frees the stable job ID for the next legitimate re-run. A poller must therefore expect the record to disappear the moment the work is done — that is the normal end of a successful run, not an error. Two fields on the single-job response make this unambiguous: When retained is false the response also carries a human-readable note. A job that exhausted its retries is reported as state: failed with failedReason, resolved from the accounting dead-letter queue, which does retain records. Known limitation: because both completed and failed records are removed, “ran and completed” and “this job ID never existed” are indistinguishable. A well-formed job ID belonging to the caller’s own tenant that never ran is reported as completed with retained: false. A job ID that is not a valid accounting job ID returns 404; one belonging to another tenant returns 403.

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Query Parameters

jobId
string

Specific job ID to check status for

Response

Queue status retrieved successfully

jobId
string
Example:

"job-uuid-123"

state
enum<string>
Available options:
waiting,
active,
completed,
failed,
delayed
Example:

"active"

terminal
boolean

True once the job has reached a final state (completed or failed). Clients should stop polling.

Example:

false

retained
boolean

True if this answer was read from a live queue record. False if the record had already been removed on completion and the state was inferred from the retention policy (and, for failures, the accounting dead-letter queue).

Example:

true

note
string

Human-readable explanation, present only when retained is false.

Example:

"Job record was removed on completion (removeOnComplete). Treat as finished and stop polling."

failedReason
string

Failure reason from the dead-letter record. Present only when state is failed.

progress
number<float>

Progress percentage (0-100)

Example:

45.5

data
object
timestamps
object