Developers › API reference

Pipeline API

The Intent Pipeline: a request in plain English, checked in stages, before any order exists.

Objects

A pipeline run is one request in plain English, processed in visible stages. Its intent is the structured interpretation (action, accounts, changes, constraints), its stages the outcome of each stage.

Life cycle

StageCallWhat happens
0 InterpretPOST /pipeline/runs {"text": "…"}The AI (or the built-in parser) turns the text into an intent. Status interpreted. Check intent before going on.
1–3 RunPOST /pipeline/runs/{id}/runEntitlements (accounts where the identity has propose), proposals (the optimizer), compliance pre-check (every trade against every active rule). Status checked.
4 OrdersPOST /pipeline/runs/{id}/ordersThe orders are created and checked again; same-direction trades across accounts become one block order. Status orders_created. Nothing is executed.

{"text": "…", "run": true} interprets and runs stages 1–3 in one call (it still stops before creating orders).

Typical sequence

RUN=$(curl -s -X POST https://vestoris.com/api/v1/pipeline/runs -H "Authorization: Bearer $VESTORIS_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
  -d '{"text":"Rebalance growth accounts without realizing gains over $25k"}' | jq -r .id)
curl -s -X POST https://vestoris.com/api/v1/pipeline/runs/$RUN/run -H "Authorization: Bearer $VESTORIS_TOKEN" -H "Idempotency-Key: $(uuidgen)"
# read stages: entitlements, proposals, compliance; then, if a person agrees:
curl -s -X POST https://vestoris.com/api/v1/pipeline/runs/$RUN/orders -H "Authorization: Bearer $VESTORIS_TOKEN" -H "Idempotency-Key: $(uuidgen)"

Orders then follow the order life cycle: approval when above the thresholds, release by someone with trade. Every AI interpretation is in the AI log with the client it came through.

Endpoints

CallWhat it doesScope
GET/pipeline/runsYour intent-pipeline requestspipeline:read
GET/pipeline/runs/{id}A request with its stagespipeline:read
POST/pipeline/runsInterpret a request in plain English (stage 0; the AI may be used)pipeline:write
POST/pipeline/runs/{id}/runRun the stages: entitlements, proposals, compliance pre-checkpipeline:write
POST/pipeline/runs/{id}/ordersCreate the orders (each checked again; nothing is executed)pipeline:write