Developers › API reference › Workflow
GET /api/v1/workflow/my-work
What waits on you, what you requested, what you watch.
- Scope
workflow:read - operationId
workflowMyWork
The token needs the scope workflow:read, and the person or service account behind it needs the matching privileges and account permissions, exactly as on the screens. See Scopes.
Request
GET /api/v1/workflow/my-work
Headers
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer <token>: an OAuth access token (vat_…) or a personal access token (vpt_…). Get a token |
Examples
Keep the token in an environment variable (VESTORIS_TOKEN), never in the script.
curl
curl "https://vestoris.com/api/v1/workflow/my-work" \
-H "Authorization: Bearer $VESTORIS_TOKEN"
Python (requests)
import os, requests
r = requests.get(
"https://vestoris.com/api/v1/workflow/my-work",
headers={
"Authorization": f"Bearer {os.environ['VESTORIS_TOKEN']}",
},
timeout=30,
)
r.raise_for_status() # errors are application/problem+json with a stable "code"
print(r.json())
JavaScript (fetch)
const res = await fetch("https://vestoris.com/api/v1/workflow/my-work", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.VESTORIS_TOKEN}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.code}: ${data.detail}`); // problem+json
console.log(data);
Response
200 OK, application/json: MyWork. Rate-limit headers: RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset.
Response fields
| Field | Type | Description |
|---|---|---|
waiting | list of WorkflowItem | Items waiting on you. |
waiting[].id | id (string) | The record's id (a string of digits). |
waiting[].type | string | order, override, rule, violation, batch, feed_run, access_review or exception. |
waiting[].item_id | id (string) | The id of the underlying record (order, override, rule…). |
waiting[].title | string | A short title. |
waiting[].status | string | open or closed. |
waiting[].outcome | string or null | How it ended. |
waiting[].stage | string | The workflow stage. |
waiting[].stage_label | string | The stage as screens show it. |
waiting[].priority | integer | 1 (urgent) to 4 (low); for rules, lower numbers are evaluated first. |
waiting[].owner_id | id (string) or null | The owner (null: in a queue). |
waiting[].owner | string | The owner's name ("" in a queue). |
waiting[].desk_id | id (string) or null | The desk's id. |
waiting[].desk | string | The desk's name. |
waiting[].requester_id | id (string) or null | Who requested the item (never its approver). |
waiting[].accounts | list | Account codes the item touches (only those you may see). |
waiting[].symbol | string or null | The security, for orders. |
waiting[].notional | decimal string or null | Value of the item (shares x price). |
waiting[].origin | string | Where the item came from: "manual" or "ai" (proposed through the pipeline or a command). |
waiting[].age_seconds | integer | How long the item has been in flight, in seconds. |
waiting[].in_stage_seconds | integer | Seconds in the current stage. |
waiting[].sla | string | SLA status: green, amber, red or escalated. |
waiting[].sla_minutes | integer or null | The SLA of the current stage, in minutes. |
waiting[].sla_due_at | date-time or null | When the SLA is breached. |
waiting[].escalation_level | integer | How many times it has been escalated. |
waiting[].blocking | string or null | What keeps the item from moving on, in plain words (null: nothing). |
waiting[].next_action | string or null | What should happen next, and by whom. |
waiting[].can | object | What you may do with the item now (claim, release, reassign, escalate, comment…). |
waiting[].why | string | Why it is stuck, from facts. |
waiting[].decision | object | "approve" or "reject". |
waiting[].progress | any | Progress of a long operation. |
waiting[].your_approval_counts | boolean | Whether your approval would count (four eyes). |
waiting[].stages | list | Each stage with its result. |
waiting[].comments | list | Comments on the item, oldest first. |
waiting[].watching | boolean | Items you watch, or whether you watch this one. |
waiting[].note | string | A note in plain words. |
requested | list of WorkflowItem | Items you requested. |
requested[].id | id (string) | The record's id (a string of digits). |
requested[].type | string | order, override, rule, violation, batch, feed_run, access_review or exception. |
requested[].item_id | id (string) | The id of the underlying record (order, override, rule…). |
requested[].title | string | A short title. |
requested[].status | string | open or closed. |
requested[].outcome | string or null | How it ended. |
requested[].stage | string | The workflow stage. |
requested[].stage_label | string | The stage as screens show it. |
requested[].priority | integer | 1 (urgent) to 4 (low); for rules, lower numbers are evaluated first. |
requested[].owner_id | id (string) or null | The owner (null: in a queue). |
requested[].owner | string | The owner's name ("" in a queue). |
requested[].desk_id | id (string) or null | The desk's id. |
requested[].desk | string | The desk's name. |
requested[].requester_id | id (string) or null | Who requested the item (never its approver). |
requested[].accounts | list | Account codes the item touches (only those you may see). |
requested[].symbol | string or null | The security, for orders. |
requested[].notional | decimal string or null | Value of the item (shares x price). |
requested[].origin | string | Where the item came from: "manual" or "ai" (proposed through the pipeline or a command). |
requested[].age_seconds | integer | How long the item has been in flight, in seconds. |
requested[].in_stage_seconds | integer | Seconds in the current stage. |
requested[].sla | string | SLA status: green, amber, red or escalated. |
requested[].sla_minutes | integer or null | The SLA of the current stage, in minutes. |
requested[].sla_due_at | date-time or null | When the SLA is breached. |
requested[].escalation_level | integer | How many times it has been escalated. |
requested[].blocking | string or null | What keeps the item from moving on, in plain words (null: nothing). |
requested[].next_action | string or null | What should happen next, and by whom. |
requested[].can | object | What you may do with the item now (claim, release, reassign, escalate, comment…). |
requested[].why | string | Why it is stuck, from facts. |
requested[].decision | object | "approve" or "reject". |
requested[].progress | any | Progress of a long operation. |
requested[].your_approval_counts | boolean | Whether your approval would count (four eyes). |
requested[].stages | list | Each stage with its result. |
requested[].comments | list | Comments on the item, oldest first. |
requested[].watching | boolean | Items you watch, or whether you watch this one. |
requested[].note | string | A note in plain words. |
watching | list of WorkflowItem | Items you watch, or whether you watch this one. |
watching[].id | id (string) | The record's id (a string of digits). |
watching[].type | string | order, override, rule, violation, batch, feed_run, access_review or exception. |
watching[].item_id | id (string) | The id of the underlying record (order, override, rule…). |
watching[].title | string | A short title. |
watching[].status | string | open or closed. |
watching[].outcome | string or null | How it ended. |
watching[].stage | string | The workflow stage. |
watching[].stage_label | string | The stage as screens show it. |
watching[].priority | integer | 1 (urgent) to 4 (low); for rules, lower numbers are evaluated first. |
watching[].owner_id | id (string) or null | The owner (null: in a queue). |
watching[].owner | string | The owner's name ("" in a queue). |
watching[].desk_id | id (string) or null | The desk's id. |
watching[].desk | string | The desk's name. |
watching[].requester_id | id (string) or null | Who requested the item (never its approver). |
watching[].accounts | list | Account codes the item touches (only those you may see). |
watching[].symbol | string or null | The security, for orders. |
watching[].notional | decimal string or null | Value of the item (shares x price). |
watching[].origin | string | Where the item came from: "manual" or "ai" (proposed through the pipeline or a command). |
watching[].age_seconds | integer | How long the item has been in flight, in seconds. |
watching[].in_stage_seconds | integer | Seconds in the current stage. |
watching[].sla | string | SLA status: green, amber, red or escalated. |
watching[].sla_minutes | integer or null | The SLA of the current stage, in minutes. |
watching[].sla_due_at | date-time or null | When the SLA is breached. |
watching[].escalation_level | integer | How many times it has been escalated. |
watching[].blocking | string or null | What keeps the item from moving on, in plain words (null: nothing). |
watching[].next_action | string or null | What should happen next, and by whom. |
watching[].can | object | What you may do with the item now (claim, release, reassign, escalate, comment…). |
watching[].why | string | Why it is stuck, from facts. |
watching[].decision | object | "approve" or "reject". |
watching[].progress | any | Progress of a long operation. |
watching[].your_approval_counts | boolean | Whether your approval would count (four eyes). |
watching[].stages | list | Each stage with its result. |
watching[].comments | list | Comments on the item, oldest first. |
watching[].watching | boolean | Items you watch, or whether you watch this one. |
watching[].note | string | A note in plain words. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json
{
"waiting": [
{
"id": "1042",
"type": "order",
"item_id": "5301",
"title": "Buy 1,800 AAPL (block, 2 accounts)",
"status": "open",
"outcome": null,
"stage": "approval",
"stage_label": "Waiting for approval",
"priority": 2,
"owner_id": "7",
"owner": "Taylor Brooks",
"desk_id": "3",
"desk": "Equity desk",
"requester_id": "7",
"accounts": [
"GRW-A",
"GRW-B"
],
"symbol": "AAPL",
"notional": "1250000.00",
"origin": "manual",
"age_seconds": 1260,
"in_stage_seconds": 600,
"sla": "green",
"sla_minutes": 30,
"sla_due_at": null,
"escalation_level": 0,
"blocking": "Waiting for an approver with \"approve\" on Growth Fund A",
"next_action": "Approve (Portfolio Manager or Compliance)",
"can": {
"claim": true,
"reassign": false,
"escalate": true,
"comment": true
},
"why": "No approver with \"approve\" on GRW-B is on desk.",
"decision": "approve",
"progress": null,
"your_approval_counts": false,
"stages": [],
"comments": [],
"watching": false,
"note": ""
}
],
"requested": [
{
"id": "1042",
"type": "order",
"item_id": "5301",
"title": "Buy 1,800 AAPL (block, 2 accounts)",
"status": "open",
"outcome": null,
"stage": "approval",
"stage_label": "Waiting for approval",
"priority": 2,
"owner_id": "7",
"owner": "Taylor Brooks",
"desk_id": "3",
"desk": "Equity desk",
"requester_id": "7",
"accounts": [
"GRW-A",
"GRW-B"
],
"symbol": "AAPL",
"notional": "1250000.00",
"origin": "manual",
"age_seconds": 1260,
"in_stage_seconds": 600,
"sla": "green",
"sla_minutes": 30,
"sla_due_at": null,
"escalation_level": 0,
"blocking": "Waiting for an approver with \"approve\" on Growth Fund A",
"next_action": "Approve (Portfolio Manager or Compliance)",
"can": {
"claim": true,
"reassign": false,
"escalate": true,
"comment": true
},
"why": "No approver with \"approve\" on GRW-B is on desk.",
"decision": "approve",
"progress": null,
"your_approval_counts": false,
"stages": [],
"comments": [],
"watching": false,
"note": ""
}
],
"watching": [
{
"id": "1042",
"type": "order",
"item_id": "5301",
"title": "Buy 1,800 AAPL (block, 2 accounts)",
"status": "open",
"outcome": null,
"stage": "approval",
"stage_label": "Waiting for approval",
"priority": 2,
"owner_id": "7",
"owner": "Taylor Brooks",
"desk_id": "3",
"desk": "Equity desk",
"requester_id": "7",
"accounts": [
"GRW-A",
"GRW-B"
],
"symbol": "AAPL",
"notional": "1250000.00",
"origin": "manual",
"age_seconds": 1260,
"in_stage_seconds": 600,
"sla": "green",
"sla_minutes": 30,
"sla_due_at": null,
"escalation_level": 0,
"blocking": "Waiting for an approver with \"approve\" on Growth Fund A",
"next_action": "Approve (Portfolio Manager or Compliance)",
"can": {
"claim": true,
"reassign": false,
"escalate": true,
"comment": true
},
"why": "No approver with \"approve\" on GRW-B is on desk.",
"decision": "approve",
"progress": null,
"your_approval_counts": false,
"stages": [],
"comments": [],
"watching": false,
"note": ""
}
]
}
Example values. Your values depend on your firm's data; prices, orders and fills are simulated.
Status codes and errors
Errors are application/problem+json (RFC 9457) with a stable code to program against; the detail says what to fix. See Errors.
| Status | When | Problem codes |
|---|---|---|
| 200 | Success | |
| 400 | The request is malformed | invalid_request |
| 401 | No token, or it is invalid or expired | invalid_token |
| 403 | The token lacks the scope, or the person or service account behind it lacks the privilege or account permission | insufficient_scope forbidden ip_not_allowed |
| 429 | Rate limited: wait for Retry-After seconds | rate_limited |
{
"type": "https://vestoris.com/developers/errors#validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "Quantity must be greater than zero.",
"code": "validation_failed",
"instance": "/api/v1/workflow/my-work"
}
On the screens
The same thing in the app is explained in: