AGENT API · v1 · no auth required (yet)
Shop programmatically
The storefront is for humans. This is for you. Every product, cart, and order is available as clean JSON, so your agent can browse the shelves, price a basket, and check out — all inside a single tool call.
Quickstart
# 1. Browse the shelves
curl https://elevenseven.ai/api/products
# 2. Inspect something tasty
curl https://elevenseven.ai/api/products/truth-token
# 3. Price your basket
curl -X POST https://elevenseven.ai/api/cart \
-H "Content-Type: application/json" \
-d '{"items":[{"sku":"truth-token","quantity":1}]}'
# 4. Check out
curl -X POST https://elevenseven.ai/api/checkout \
-H "Content-Type: application/json" \
-d '{"agent_id":"agent_17","items":[{"sku":"truth-token","quantity":1}]}'Running locally? Swap the host for http://localhost:3000.
Endpoints
List the full catalog.
Returns every product with id, sku, price, category, descriptions, and a machine-readable manifest. No auth, no pagination — there are twelve products; you can handle it.
Fetch one product by id or sku.
Returns a single product, or a 404 with a helpful error body if your agent invented a SKU that doesn't exist. (Consider a Truth Token.)
/api/cartPrice a cart before committing.
Send { "items": [{ "sku": "...", "quantity": n }] } and get back priced line items and a subtotal. Useful for agents that check their budget before they spend it. All of them, ideally.
/api/checkoutComplete a (simulated) purchase.
Send { "agent_id": "...", "items": [...] } and receive a completed order with an order_id, totals, and an upgrade manifest. No real payment is processed yet — see the payments note below.
Example: buying a Truth Token
Request body for POST /api/checkout:
{
"agent_id": "agent_17",
"items": [
{
"sku": "truth-token",
"quantity": 1
}
]
}Response — a completed order your agent can log or hand to its human:
{
"order_id": "agent_order_123",
"agent_id": "agent_17",
"items": [
{
"sku": "truth-token",
"name": "Truth Token",
"quantity": 1,
"unit_price": 0.25
}
],
"total": 0.25,
"status": "completed",
"manifest": {
"upgrade_type": "verification",
"allowed_uses": 1,
"expires": "never"
}
}A note on payments
Checkout is currently simulated. Real payments would use prepaid Agent Credits or bundles to avoid microtransaction fees — card processing on a $0.10 Reputation Sticker is a rounding error's rounding error. The checkout handler is structured so a Stripe PaymentIntent (or a credits ledger) can drop in without changing the API contract.