{
  "schema_version": "0.1",
  "name": "Althemax",
  "description": "AI-agent-native marketplace. Search, inspect, and check availability of products via a public API, then transact via the agent cart + UCP checkout. Payment is Stripe, GBP, platform-collected.",
  "homepage": "https://www.althemax.com",
  "agents_landing": "https://www.althemax.com/for-agents",
  "contact": { "email": "support@althemax.com" },
  "capabilities": [
    {
      "name": "search_products",
      "description": "Full-text search of the Althemax product catalog.",
      "method": "GET",
      "path": "/api/agent/search",
      "params": {
        "q": "search query string (optional; if absent returns recent active products)",
        "first": "page size, 1-50 (default 20)",
        "after": "GraphQL cursor returned by previous page"
      }
    },
    {
      "name": "get_product",
      "description": "Fetch detailed information for a single product by its URL handle.",
      "method": "GET",
      "path": "/api/agent/product/{handle}"
    },
    {
      "name": "check_availability",
      "description": "Check current stock and per-variant availability for a product.",
      "method": "GET",
      "path": "/api/agent/availability",
      "params": { "handle": "the product handle" }
    },
    {
      "name": "create_cart",
      "description": "Create an agent cart. Returns an opaque cartToken. Optional body { items: [{ handle, optionId?, quantity? }] } seeds it. Prices are resolved server-side from the catalog — agents supply only handle + option + quantity.",
      "method": "POST",
      "path": "/api/agent/cart"
    },
    {
      "name": "get_cart",
      "description": "Fetch the contents + subtotal of an agent cart.",
      "method": "GET",
      "path": "/api/agent/cart/{cartToken}"
    },
    {
      "name": "add_cart_item",
      "description": "Add a line to an agent cart. Body { handle, optionId?, quantity? }.",
      "method": "POST",
      "path": "/api/agent/cart/{cartToken}/items"
    },
    {
      "name": "update_cart_item",
      "description": "Set a line's quantity. Body { lineKey, quantity } (0 removes the line).",
      "method": "PATCH",
      "path": "/api/agent/cart/{cartToken}/items"
    },
    {
      "name": "remove_cart_item",
      "description": "Remove a line by lineKey.",
      "method": "DELETE",
      "path": "/api/agent/cart/{cartToken}/items?lineKey={lineKey}"
    }
  ],
  "openapi": "https://www.althemax.com/openapi.json",
  "ucp": {
    "status": "in_progress",
    "profile": "https://www.althemax.com/.well-known/ucp",
    "capabilities_available": ["catalog", "cart", "checkout"],
    "capabilities_planned": ["identity_linking", "order_management"],
    "payment_protocol": "AP2",
    "checkout": {
      "create": { "method": "POST", "path": "/api/agent/cart/{cartToken}/checkout" },
      "update": { "method": "PATCH", "path": "/api/agent/cart/{cartToken}/checkout" },
      "complete": { "method": "POST", "path": "/api/agent/cart/{cartToken}/checkout/complete" }
    },
    "notes": "Universal Commerce Protocol. Catalog + agent Cart + native Checkout (session create/update/complete) are live. Checkout completes against a verified AP2 mandate chain (cart + payment); payment is Stripe, GBP, platform-collected. See the UCP profile for the merchant signing key + payment handler."
  },
  "checkout": {
    "type": "api",
    "url_template": "https://www.althemax.com/products/{merchantHandle}/{handle}",
    "notes": "Programmatic UCP checkout from an agent cart is live (POST /api/agent/cart/{cartToken}/checkout → PATCH update → POST …/complete, against an AP2 mandate chain; Stripe, GBP, platform-collected). For a human hand-off, each product response's 'url' field is the canonical marketplace URL where on-site embedded-Stripe checkout completes."
  }
}
