{
 "openapi": "3.1.0",
 "info": {"title": "Decent Espresso API", "version": "1.0",
  "x-guidance": "Decent Espresso sells espresso machines (DE1PRO, DE1XL, DE1XXL, Bengle), accessories and spare parts. Find products with GET /api/products?q= (free), one product with GET /api/products/{sku}, price a cart for a country with GET /api/cart/quote?s=NUMBER+QUANTITY&country=CC (free). To buy for a person without their login, POST /support/api/buy with the cart, the person's email, name and shipping address: it answers 402 with an MPP challenge (method stripe, intent charge) for the exact total; pay with a Stripe Shared Payment Token and send the same body again with Authorization: Payment <credential>. The order is placed and paid; the person gets the confirmation email. Without a payment token, give the person the quote's checkout_url instead. The same tools over MCP: https://es.decentespresso.com/mcp.",
  "contact": {"name": "Decent Espresso", "email": "sales@decentespresso.com", "url": "https://es.decentespresso.com/support/submit"},
  "description": "Product data for Decent Espresso machines, accessories and spare parts, cart quotes with shipping and import tax, and buying with MPP. The logged-in customer area is described at https://es.decentespresso.com/support/api/. Rate limit: 120 requests per minute per IP.",
  "license": {"name": "CC BY 4.0 (Decent Espresso's own content)", "url": "https://creativecommons.org/licenses/by/4.0/"}},
 "x-service-info": {"categories": ["shopping", "ecommerce", "coffee", "hardware"],
  "docs": {"homepage": "https://es.decentespresso.com/", "apiReference": "https://es.decentespresso.com/api/", "llms": "https://es.decentespresso.com/llms.txt"}},
 "servers": [{"url": "https://es.decentespresso.com"}],
 "paths": {
  "/api/products": {"get": {"security": [], "summary": "Product summaries (paginated, at most 100)", "parameters": [
    {"name":"q","in":"query","example":"tamper","schema":{"type":"string","minLength":2},"description":"text search in name, SKU, page and materials"},
    {"name":"category","in":"query","schema":{"type":"string"},"description":"a category id from /api/categories"},
    {"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},
    {"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}], "responses": {"200":{"description":"JSON object; every response includes a license block"},"404":{"description":"not found"},"429":{"description":"rate limited"}}}},
  "/api/products/{sku}": {"get": {"security": [], "summary": "One product in full: description, specifications, prices in six currencies, photos, cart link and related products", "parameters": [
    {"name":"sku","in":"path","required":true,"example":"DE-304TAMPERV61ALUH-75830","schema":{"type":"string"}}], "responses": {"200":{"description":"JSON object; every response includes a license block"},"404":{"description":"not found"},"429":{"description":"rate limited"}}}},
  "/api/categories": {"get": {"security": [], "summary": "Product categories with product counts", "responses": {"200":{"description":"JSON object; every response includes a license block"},"404":{"description":"not found"},"429":{"description":"rate limited"}}}},
  "/api/cart/quote": {"get": {"security": [], "summary": "Price a cart for a country: prices, discount, shipping, import tax, total and the website checkout link", "parameters": [
    {"name":"s","in":"query","required":true,"example":"75830+1","schema":{"type":"string"},"description":"NUMBER+QUANTITY pairs using each product's cart_number"},
    {"name":"country","in":"query","required":true,"example":"US","schema":{"type":"string","pattern":"^[A-Z]{2}$"}},
    {"name":"currency","in":"query","schema":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","HKD"]}},
    {"name":"shipping","in":"query","schema":{"type":"string","enum":["standard","expedited"]}}], "responses": {"200":{"description":"JSON object; every response includes a license block"},"404":{"description":"not found"},"429":{"description":"rate limited"}}}},
  "/support/api/buy": {"post": {"security": [], "summary": "Buy for a person with no login, paying by MPP: answers 402 with a challenge for the cart's exact total (the price depends on the cart and the country); pay with a Stripe Shared Payment Token and repeat the same request with Authorization: Payment <credential>. The order is placed, paid and confirmed to the person's email (an account is made for a new email).",
    "x-payment-info": {"price": {"mode": "dynamic", "currency": "USD", "min": "0.50", "max": "20000.00"}, "protocols": [{"mpp": {"method": "stripe", "intent": "charge", "currency": "usd"}}]},
    "requestBody": {"required": true, "content": {"application/json": {
     "schema": {"type": "object", "required": ["email", "name", "address"], "properties": {
      "items": {"type": "array", "items": {"type": "object", "required": ["product"], "properties": {"product": {"type": "string", "description": "SKU or 5-digit cart number"}, "quantity": {"type": "integer", "minimum": 1}}}},
      "cart": {"type": "string", "description": "instead of items: NUMBER+QUANTITY pairs, e.g. 75830+2"},
      "email": {"type": "string", "format": "email"}, "name": {"type": "string"},
      "address": {"type": "object", "required": ["phone", "address_line_1", "city", "country"], "properties": {
       "full_name": {"type": "string"}, "phone": {"type": "string"}, "address_line_1": {"type": "string"}, "address_line_2": {"type": "string"},
       "city": {"type": "string"}, "state": {"type": "string", "description": "required for the US"}, "postal_code": {"type": "string"},
       "country": {"type": "string", "pattern": "^[A-Z]{2}$"}, "billing": {"type": "object"}}},
      "currency": {"type": "string", "enum": ["USD","EUR","GBP","CAD","AUD","HKD"]}, "shipping": {"type": "string", "enum": ["standard","expedited"]}, "notes": {"type": "string"}}},
     "example": {"items": [{"product": "75830", "quantity": 1}], "email": "jane@example.com", "name": "Jane Doe",
      "address": {"phone": "+1 206 555 0100", "address_line_1": "100 Pine St", "city": "Seattle", "state": "WA", "postal_code": "98101", "country": "US"}}}}},
    "responses": {"200": {"description": "paid: the order number and Stripe reference (Payment-Receipt header too)", "content": {"application/json": {"schema": {"type": "object", "required": ["ok", "status", "order_number", "receipt"], "properties": {"ok": {"type": "boolean"}, "status": {"type": "string", "enum": ["paid"]}, "order_number": {"type": "string"}, "receipt": {"type": "string", "description": "Stripe PaymentIntent id"}, "message": {"type": "string"}}}}}},
     "402": {"description": "Payment Required: WWW-Authenticate: Payment challenge (MPP, method stripe, intent charge) for the exact total; the body has the quote"},
     "400": {"description": "bad request (cart, email or address)"}, "409": {"description": "can't be bought this way (e.g. a machine order that needs Decent's review): buy on the website"}}}}
 }
}