{
  "service": "colesbot",
  "docs": "manages a personal Coles account — see CLAUDE.md",
  "auth": "all endpoints except `/` require ?token= or Authorization: Bearer <API_TOKEN>",
  "endpoints": {
    "POST /session": "seed/refresh the Coles session (body: `agent-browser cookies get --json` output)",
    "GET /session": "session metadata (age, cookie count, storeId)",
    "GET /auth": "coles session health: { authenticated }",
    "GET /profile": "account profile",
    "GET /orders?status=past|active": "order history (default past)",
    "GET /trolley?store=": "current trolley (read-only)",
    "POST /trolley/add?product=<id>&qty=<n>": "add a product to the trolley",
    "POST /trolley/set?product=<id>&qty=<n>": "set a product quantity (qty 0 removes)",
    "POST /trolley/remove?product=<id>": "remove a product from the trolley",
    "GET /boughtbefore": "products you have purchased before",
    "GET /search?q=<term>": "product search (GraphQL; needs a fresh browser-harvested session)",
    "POST /graphql": "raw GraphQL passthrough (body: { query, variables })",
    "GET /lists": "saved shopping lists",
    "GET /addresses": "saved addresses",
    "GET /credit": "store credit balance",
    "GET /colesplus": "Coles Plus subscription",
    "GET /product/:id": "product detail (used by the monitor)",
    "GET /run": "run the availability monitor now",
    "GET /db/:key?": "inspect KV"
  }
}