Sign spending rules
With only text, the rules reader (the configured model, or the offline reader) turns the
sentence into a policy and Mandate signs it. With policy, the rules the user reviewed are
validated and signed. Rate limited when the model is called.
Request Body
application/json
The rules in plain English
length <= 2000The signed rules. Money is in minor units (cents).
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/mandates" \ -H "Content-Type: application/json" \ -d '{ "text": "Household basics, up to $80 a month, nothing over $25, never more than 10% above market price, verified sellers only" }'{ "id": "string", "userId": "string", "status": "active", "rawText": "string", "createdAt": "2019-08-24T14:15:22Z", "policy": { "categories": [ "string" ], "currency": "string", "maxItemMinor": 0, "budget": { "amountMinor": 0, "period": "week" }, "sellers": { "verifiedOnly": true, "blocked": [ "string" ] }, "overLimit": "ask", "maxPremiumPct": 0, "marketUnavailable": "ask", "expires": "2019-08-24" }}The demo user's mandates GET
Every mandate the demo user has signed, with its rules and status (active, paused or revoked).
Let the shopping agent carry out a task under a mandate POST
The agent can only search, read and propose. Each proposal goes through the policy gate, which pays, asks the user, or blocks. With `stream: true` the response is NDJSON, one step per line.