Ask the buyer agent to buy something
The agent proposes a product from the catalog; the mandate check (budget, per item cap, store, category) decides. An allowed purchase writes a signed mandate receipt linked to the order id.
Authorization
consoleSession csrfToken Set by GET /console/api/session. HttpOnly, SameSite=Strict, 8 hours.
In: cookie
The csrf value from GET /console/api/session, an HMAC of the session id. Required on every POST.
In: header
Request Body
application/json
What the owner asked the buyer agent to buy.
The body of buy: what the owner asked the buyer agent for.
What the owner asked the buyer agent for, in plain printable characters.
^[\x20-\x7e]+$1 <= length <= 200Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/console/api/buy" \ -H "Content-Type: application/json" \ -d '{ "request": "a pack of three A5 notebooks" }'{ "at": "2026-11-11T05:13:51Z", "request": "a pack of three A5 notebooks", "model": "scripted, not AI", "proposed": "notebook-a5", "note": "", "allowed": true, "reason": "Inside the mandate.", "checks": { "merchant allowed": true, "category allowed": true, "currency matches": true, "under per item cap": true, "inside remaining budget": true }, "product": { "id": "notebook-a5", "name": "A5 dot grid notebook", "category": "stationery", "price_minor": 900 }, "price_minor": 900, "spent_before_minor": 1800, "label": "local run data"}Measured numbers for the console header GET
The few measured numbers built from the run files in data/runs/, each with the file it came from. An empty list when site/data/totals.json is absent.
Run one case through the merchant agent POST
Runs case `c`, `d`, `e`, `f`, `g`, `i`, `j`, `k`, `l`, `m`, `n` or `o` (titles in `State.cases`). The agent proposes, the policy file decides, code checks every amount and cited id, and a separate checker reads the provider record afterwards.