{"openapi":"3.1.1","info":{"title":"KLAIM Amsterdam read-only agent API","version":"1.0.0","description":"Free public catalog API with optional scoped keys, a disconnected sandbox and MCP resources. No commerce mutations or private data."},"servers":[{"url":"https://klaim-agent-api.still-wind-6f53.workers.dev"}],"security":[],"paths":{"/v1/products/{handle}":{"get":{"operationId":"getLiveKlaimProduct","summary":"Read a live catalog product","description":"Read current public KLAIM product data, EUR prices and availability. Does not reserve stock or create a purchase.","parameters":[{"name":"handle","in":"path","required":true,"description":"Product handle; demo-hoodie in sandbox.","schema":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}],"security":[{},{"ReadOnlyKey":[]}],"x-required-key-scope":"catalog:read","responses":{"200":{"description":"Public product in EUR; monetary integers are cents.","content":{"application/json":{"schema":{"type":"object","required":["environment","currency","product"],"properties":{"environment":{"type":"string","enum":["live","sandbox"]},"currency":{"type":"string","const":"EUR"},"product":{"type":"object","required":["id","title","handle","price","available","variants"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"handle":{"type":"string"},"price":{"type":"integer","description":"EUR cents; 9900 is EUR 99.00."},"available":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object","required":["id","title","price","available"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"price":{"type":"integer"},"available":{"type":"boolean"}},"additionalProperties":true}}},"additionalProperties":true}}}}}},"401":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/sandbox/v1/products/{handle}":{"get":{"operationId":"getSandboxKlaimProduct","summary":"Read a sandbox catalog product","description":"Read fictional sample data. Only demo-hoodie is available. Never connects to shopping or payment services.","parameters":[{"name":"handle","in":"path","required":true,"description":"Product handle; demo-hoodie in sandbox.","schema":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}],"security":[{},{"ReadOnlyKey":[]}],"x-required-key-scope":"catalog:read","responses":{"200":{"description":"Public product in EUR; monetary integers are cents.","content":{"application/json":{"schema":{"type":"object","required":["environment","currency","product"],"properties":{"environment":{"type":"string","enum":["live","sandbox"]},"currency":{"type":"string","const":"EUR"},"product":{"type":"object","required":["id","title","handle","price","available","variants"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"handle":{"type":"string"},"price":{"type":"integer","description":"EUR cents; 9900 is EUR 99.00."},"available":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object","required":["id","title","price","available"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"price":{"type":"integer"},"available":{"type":"boolean"}},"additionalProperties":true}}},"additionalProperties":true}}}}}},"401":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/keys":{"post":{"operationId":"createKlaimReadOnlyKey","summary":"Generate a free scoped read-only API key","description":"Self-service, no account or payment required. The key is shown once, stored only as a SHA-256 hash, expires after 90 days, and grants only the selected read scopes in one environment. Never grants customer, order, cart or payment access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["environment","scopes"],"additionalProperties":false,"properties":{"environment":{"type":"string","enum":["live","sandbox"]},"scopes":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["catalog:read","resources:read"]}}}}}}},"responses":{"201":{"description":"Save the key now; it cannot be retrieved later.","content":{"application/json":{"schema":{"type":"object","required":["key","environment","scopes","expires_at"],"properties":{"key":{"type":"string"},"environment":{"type":"string","enum":["live","sandbox"]},"scopes":{"type":"array","items":{"type":"string","enum":["catalog:read","resources:read"]}},"expires_at":{"type":"integer","description":"Unix seconds."}}}}}},"400":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/keys/current":{"get":{"operationId":"inspectKlaimReadOnlyKey","description":"Inspect only the supplied key metadata. The secret value is never returned.","security":[{"ReadOnlyKey":[]}],"responses":{"200":{"description":"Environment, scopes and expiry.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"revokeKlaimReadOnlyKey","description":"Revoke only the supplied key. This cannot affect any store credentials, customer data or other keys.","security":[{"ReadOnlyKey":[]}],"responses":{"200":{"description":"Key revoked.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/mcp":{"post":{"operationId":"callKlaimReadOnlyMcp","description":"MCP Streamable HTTP: initialize, notifications/initialized, tools/list, tools/call, resources/list, resources/read and ping. Only get_product is exposed. No purchase tools exist. Supply Accept: application/json, text/event-stream. Sandbox keys select fictional data; anonymous calls use live reads.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","integer"]},"method":{"type":"string","enum":["initialize","notifications/initialized","tools/list","tools/call","resources/list","resources/read","ping"]},"params":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"JSON-RPC result or error; inspect error even when HTTP status is 200.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"202":{"description":"Notification accepted; no body."},"400":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Structured error with a code and resolution.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"securitySchemes":{"ReadOnlyKey":{"type":"http","scheme":"bearer","description":"Optional self-service key from POST /v1/keys. Public reads are also available anonymously. A supplied key is restricted to its environment and read scopes.","x-scopes":{"catalog:read":"Read public catalog data.","resources:read":"Read public documentation resources."}}},"schemas":{"Problem":{"type":"object","required":["type","title","status","detail","code","resolution"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"code":{"type":"string"},"resolution":{"type":"string"}}}}}}