{"openapi":"3.1.0","info":{"title":"Cangrejo.com.ve Store API","version":"1.0.0","description":"Catálogo público de cangrejo venezolano y arranque de pago USD Stripe o VEF Ubii. Lectura sin autenticación (scope catalog:read). Checkout usa cookie de carrito y scope checkout:write."},"servers":[{"url":"https://cangrejo.com.ve","description":"Storefront origin"}],"tags":[{"name":"catalog","description":"Product listing"},{"name":"checkout","description":"Cart and payment rails"},{"name":"mcp","description":"Model Context Protocol"}],"paths":{"/api/productos":{"get":{"operationId":"listProducts","tags":["catalog"],"summary":"List Venezuelan crab products","description":"Public catalog from the live Medusa Store API. No API key. Amounts are USD list prices; VEF is converted at checkout on the Ubii rail.","security":[{"oauth2":["catalog:read"]},{}],"responses":{"200":{"description":"Product list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductList"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/carrito":{"post":{"operationId":"addToCart","tags":["checkout"],"summary":"Add a variant to the cart","description":"Form or JSON with variant_id. Sets cart_id cookie.","security":[{"oauth2":["checkout:write"]}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["variant_id"],"properties":{"variant_id":{"type":"string","description":"Medusa variant id"},"handle":{"type":"string","description":"Product handle for redirect"}}}}}},"responses":{"302":{"description":"Redirect to product or cart"},"400":{"description":"Missing variant","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/pago":{"post":{"operationId":"startPaymentSession","tags":["checkout"],"summary":"Start Stripe USD or Ubii VEF payment session","description":"rail=stripe charges USD through Stripe. rail=ubii charges VEF through Ubii Pagos. Rails are not interchangeable.","security":[{"oauth2":["checkout:write"]}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["rail"],"properties":{"rail":{"type":"string","enum":["stripe","ubii"]}}}}}},"responses":{"302":{"description":"Redirect to /pago with session ids"},"400":{"description":"Invalid rail or empty cart","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/mcp":{"post":{"operationId":"mcpJsonRpc","tags":["mcp"],"summary":"MCP Streamable HTTP JSON-RPC","description":"initialize, tools/list, tools/call, resources/list, resources/read. No auth for catalog tools.","security":[{"oauth2":["catalog:read"]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"JSON-RPC result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}}}}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","description":"Catalog reads are public. Checkout write uses authorization code + PKCE S256.","flows":{"authorizationCode":{"authorizationUrl":"https://cangrejo.com.ve/oauth/authorize","tokenUrl":"https://cangrejo.com.ve/oauth/token","scopes":{"catalog:read":"List products and read public catalog resources","checkout:write":"Add to cart and start Stripe USD or Ubii VEF payment"}}}}},"schemas":{"Problem":{"type":"object","description":"RFC 9457 problem details","required":["type","title","status","detail"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}}},"Product":{"type":"object","description":"Store product with origin-labeled species metadata","properties":{"id":{"type":"string"},"title":{"type":"string"},"handle":{"type":"string"},"subtitle":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"variants":{"type":"array","items":{"type":"object"}}}},"ProductList":{"type":"object","required":["products"],"properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}},"JsonRpcRequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"number"}]},"method":{"type":"string"},"params":{"type":"object"}}},"JsonRpcResponse":{"type":"object","required":["jsonrpc"],"properties":{"jsonrpc":{"type":"string"},"id":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"null"}]},"result":{"type":"object"},"error":{"type":"object"}}}}}}