Workflow API
Items in flight, actions on them, my work, workflow rules, desks and SLAs.
Objects
- Workflow item: anything in flight that waits on a person: an order (compliance, approval, trader assignment, working, allocation), an override, a rule sign-off, a violation, a held batch or feed file, an access review, an exception. It has a stage, owner or desk queue, priority (1 urgent to 4 low), an SLA with its due time and escalation level, what blocks it and the next action.
cansays what you may do with it now. - Workflow rule: conditions → actions (approvals, queue, assignment, priority, SLA, notifications), signed off like compliance rules. Desk, SLA, monitor view.
Actions on an item
POST /workflow/items/{id}/actions with action: claim, release, reassign (user_id), escalate (why), priority (priority), move (desk_id), comment (body), watch, unwatch. None approves: approvals happen on the item's own endpoint (/orders/{id}/approve, /overrides/{id}/decision, /compliance/rules/{id}/sign-off).
Workflow rule life cycle
draft → (test bench) → pending → active → superseded | retired. Draft from a structure or from a sentence ({"text": "…"}); the test bench replays recent items. Sign-off is by a person: an Admin always ("as": "admin"), and Compliance too ("as": "compliance") when the change weakens an approval or the Admin asked for it; still_needed says who is missing.
Typical use
GET /workflow/my-work for a person's inbox; GET /workflow/items?sla=red for a dashboard; the webhooks workflow.item.updated and workflow.sla_breached to react.
Endpoints
| Call | What it does | Scope |
|---|---|---|
GET/workflow/items | Items in flight you can see (the monitor's board) | workflow:read |
GET/workflow/items/{id} | One item with history, comments and approvals | workflow:read |
POST/workflow/items/{id}/actions | Claim, release, reassign, escalate, set the priority, move to a desk, comment, watch (never approve) | workflow:act |
GET/workflow/my-work | What waits on you, what you requested, what you watch | workflow:read |
GET/workflow/rules | Workflow rules (every version) | workflow:read |
GET/workflow/rules/{id} | One workflow rule | workflow:read |
POST/workflow/rules | Draft a rule from a structure, or from a sentence ("text"); replayed on the test bench | workflow:rules:write |
POST/workflow/rules/{id}/test-bench | Replay the last days of items (202: a job) | workflow:rules:write |
POST/workflow/rules/{id}/submit | Submit for sign-off | workflow:rules:write |
GET/workflow/rules/{id}/sign-off | What you would sign off, with a confirmation token | workflow:rules:approve |
POST/workflow/rules/{id}/sign-off | Sign off as Admin or Compliance (a person; X-Vestoris-Confirm) | workflow:rules:approve |
GET/workflow/desks | Desks, members and assignment modes | workflow:read |
GET/workflow/slas | SLA minutes and escalations per stage | workflow:read |
GET/workflow/views | Saved monitor views | workflow:read |