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

HeaderRequiredValue
AuthorizationyesBearer <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
FieldTypeDescription
waitinglist of WorkflowItemItems waiting on you.
waiting[].idid (string)The record's id (a string of digits).
waiting[].typestringorder, override, rule, violation, batch, feed_run, access_review or exception.
waiting[].item_idid (string)The id of the underlying record (order, override, rule…).
waiting[].titlestringA short title.
waiting[].statusstringopen or closed.
waiting[].outcomestring or nullHow it ended.
waiting[].stagestringThe workflow stage.
waiting[].stage_labelstringThe stage as screens show it.
waiting[].priorityinteger1 (urgent) to 4 (low); for rules, lower numbers are evaluated first.
waiting[].owner_idid (string) or nullThe owner (null: in a queue).
waiting[].ownerstringThe owner's name ("" in a queue).
waiting[].desk_idid (string) or nullThe desk's id.
waiting[].deskstringThe desk's name.
waiting[].requester_idid (string) or nullWho requested the item (never its approver).
waiting[].accountslistAccount codes the item touches (only those you may see).
waiting[].symbolstring or nullThe security, for orders.
waiting[].notionaldecimal string or nullValue of the item (shares x price).
waiting[].originstringWhere the item came from: "manual" or "ai" (proposed through the pipeline or a command).
waiting[].age_secondsintegerHow long the item has been in flight, in seconds.
waiting[].in_stage_secondsintegerSeconds in the current stage.
waiting[].slastringSLA status: green, amber, red or escalated.
waiting[].sla_minutesinteger or nullThe SLA of the current stage, in minutes.
waiting[].sla_due_atdate-time or nullWhen the SLA is breached.
waiting[].escalation_levelintegerHow many times it has been escalated.
waiting[].blockingstring or nullWhat keeps the item from moving on, in plain words (null: nothing).
waiting[].next_actionstring or nullWhat should happen next, and by whom.
waiting[].canobjectWhat you may do with the item now (claim, release, reassign, escalate, comment…).
waiting[].whystringWhy it is stuck, from facts.
waiting[].decisionobject"approve" or "reject".
waiting[].progressanyProgress of a long operation.
waiting[].your_approval_countsbooleanWhether your approval would count (four eyes).
waiting[].stageslistEach stage with its result.
waiting[].commentslistComments on the item, oldest first.
waiting[].watchingbooleanItems you watch, or whether you watch this one.
waiting[].notestringA note in plain words.
requestedlist of WorkflowItemItems you requested.
requested[].idid (string)The record's id (a string of digits).
requested[].typestringorder, override, rule, violation, batch, feed_run, access_review or exception.
requested[].item_idid (string)The id of the underlying record (order, override, rule…).
requested[].titlestringA short title.
requested[].statusstringopen or closed.
requested[].outcomestring or nullHow it ended.
requested[].stagestringThe workflow stage.
requested[].stage_labelstringThe stage as screens show it.
requested[].priorityinteger1 (urgent) to 4 (low); for rules, lower numbers are evaluated first.
requested[].owner_idid (string) or nullThe owner (null: in a queue).
requested[].ownerstringThe owner's name ("" in a queue).
requested[].desk_idid (string) or nullThe desk's id.
requested[].deskstringThe desk's name.
requested[].requester_idid (string) or nullWho requested the item (never its approver).
requested[].accountslistAccount codes the item touches (only those you may see).
requested[].symbolstring or nullThe security, for orders.
requested[].notionaldecimal string or nullValue of the item (shares x price).
requested[].originstringWhere the item came from: "manual" or "ai" (proposed through the pipeline or a command).
requested[].age_secondsintegerHow long the item has been in flight, in seconds.
requested[].in_stage_secondsintegerSeconds in the current stage.
requested[].slastringSLA status: green, amber, red or escalated.
requested[].sla_minutesinteger or nullThe SLA of the current stage, in minutes.
requested[].sla_due_atdate-time or nullWhen the SLA is breached.
requested[].escalation_levelintegerHow many times it has been escalated.
requested[].blockingstring or nullWhat keeps the item from moving on, in plain words (null: nothing).
requested[].next_actionstring or nullWhat should happen next, and by whom.
requested[].canobjectWhat you may do with the item now (claim, release, reassign, escalate, comment…).
requested[].whystringWhy it is stuck, from facts.
requested[].decisionobject"approve" or "reject".
requested[].progressanyProgress of a long operation.
requested[].your_approval_countsbooleanWhether your approval would count (four eyes).
requested[].stageslistEach stage with its result.
requested[].commentslistComments on the item, oldest first.
requested[].watchingbooleanItems you watch, or whether you watch this one.
requested[].notestringA note in plain words.
watchinglist of WorkflowItemItems you watch, or whether you watch this one.
watching[].idid (string)The record's id (a string of digits).
watching[].typestringorder, override, rule, violation, batch, feed_run, access_review or exception.
watching[].item_idid (string)The id of the underlying record (order, override, rule…).
watching[].titlestringA short title.
watching[].statusstringopen or closed.
watching[].outcomestring or nullHow it ended.
watching[].stagestringThe workflow stage.
watching[].stage_labelstringThe stage as screens show it.
watching[].priorityinteger1 (urgent) to 4 (low); for rules, lower numbers are evaluated first.
watching[].owner_idid (string) or nullThe owner (null: in a queue).
watching[].ownerstringThe owner's name ("" in a queue).
watching[].desk_idid (string) or nullThe desk's id.
watching[].deskstringThe desk's name.
watching[].requester_idid (string) or nullWho requested the item (never its approver).
watching[].accountslistAccount codes the item touches (only those you may see).
watching[].symbolstring or nullThe security, for orders.
watching[].notionaldecimal string or nullValue of the item (shares x price).
watching[].originstringWhere the item came from: "manual" or "ai" (proposed through the pipeline or a command).
watching[].age_secondsintegerHow long the item has been in flight, in seconds.
watching[].in_stage_secondsintegerSeconds in the current stage.
watching[].slastringSLA status: green, amber, red or escalated.
watching[].sla_minutesinteger or nullThe SLA of the current stage, in minutes.
watching[].sla_due_atdate-time or nullWhen the SLA is breached.
watching[].escalation_levelintegerHow many times it has been escalated.
watching[].blockingstring or nullWhat keeps the item from moving on, in plain words (null: nothing).
watching[].next_actionstring or nullWhat should happen next, and by whom.
watching[].canobjectWhat you may do with the item now (claim, release, reassign, escalate, comment…).
watching[].whystringWhy it is stuck, from facts.
watching[].decisionobject"approve" or "reject".
watching[].progressanyProgress of a long operation.
watching[].your_approval_countsbooleanWhether your approval would count (four eyes).
watching[].stageslistEach stage with its result.
watching[].commentslistComments on the item, oldest first.
watching[].watchingbooleanItems you watch, or whether you watch this one.
watching[].notestringA 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.

StatusWhenProblem codes
200Success
400The request is malformedinvalid_request
401No token, or it is invalid or expiredinvalid_token
403The token lacks the scope, or the person or service account behind it lacks the privilege or account permissioninsufficient_scope forbidden ip_not_allowed
429Rate limited: wait for Retry-After secondsrate_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: