{"openapi":"3.1.0","info":{"title":"cek-qris AI Lookup API","version":"1.0.0","description":"Read-only deterministic QRIS/EMVCo lookup for AI agents. MVP access requires no registration or API key. Request bodies are limited to 8,192 bytes, payloads to 4,096 characters, and each privacy-safe client signal is limited to 30 requests per 60 seconds. Rate limiting is bounded in-memory per application process."},"paths":{"/api/ai/lookup":{"post":{"operationId":"lookupQrisPayload","summary":"Analyze one raw QRIS/EMVCo payload","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["payload"],"properties":{"payload":{"type":"string","minLength":1,"maxLength":4096,"description":"Raw QRIS/EMVCo payload as decoded from the QR symbol."}}}}}},"responses":{"200":{"description":"Normalized deterministic QRIS analysis.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisResponse"}}}},"400":{"description":"Malformed JSON, wrong content type, or missing/empty payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"JSON body exceeds 8,192 bytes or payload exceeds 4,096 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Includes a Retry-After header in seconds.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"AI lookup service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"AnalysisResponse":{"title":"cek-qris AI lookup analysis","type":"object","additionalProperties":false,"required":["ok","schemaVersion","analysis","community","interpretation"],"properties":{"ok":{"const":true},"schemaVersion":{"const":"1.0"},"analysis":{"type":"object","additionalProperties":false,"required":["fields","crc","errors","warnings","nss","transaction"],"properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/Field"}},"crc":{"type":"object","additionalProperties":false,"required":["status","expected","actual"],"properties":{"status":{"type":"string","enum":["valid","invalid","missing","not-applicable"]},"expected":{"type":["string","null"]},"actual":{"type":["string","null"]}}},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"nss":{"oneOf":[{"$ref":"#/components/schemas/NssMatch"},{"type":"null"}]},"transaction":{"$ref":"#/components/schemas/Transaction"}}},"community":{"$ref":"#/components/schemas/CommunityReport"},"interpretation":{"type":"object","additionalProperties":false,"required":["merchantLegitimacyVerified","paymentSafetyVerified"],"properties":{"merchantLegitimacyVerified":{"const":false},"paymentSafetyVerified":{"const":false}}}}},"Field":{"type":"object","additionalProperties":false,"required":["tag","label","length","value","start","valueStart","valueEnd"],"properties":{"tag":{"type":"string","pattern":"^\\d{2}$"},"label":{"type":"string"},"length":{"type":"integer","minimum":0},"value":{"type":"string"},"start":{"type":"integer","minimum":0},"valueStart":{"type":"integer","minimum":0},"valueEnd":{"type":"integer","minimum":0},"error":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/Field"}}}},"NssMatch":{"type":"object","additionalProperties":false,"required":["code","known","name","product"],"properties":{"code":{"type":"string","pattern":"^\\d{8}$"},"known":{"type":"boolean"},"name":{"type":["string","null"]},"product":{"type":["string","null"]}}},"Transaction":{"type":"object","additionalProperties":false,"required":["amount","currency","countryCode","merchantName","merchantCity","postalCode","referenceLabel","billNumber"],"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"countryCode":{"type":["string","null"]},"merchantName":{"type":["string","null"]},"merchantCity":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"referenceLabel":{"type":["string","null"]},"billNumber":{"type":["string","null"]}}},"CommunityReport":{"type":"object","additionalProperties":false,"required":["status","badVotes","goodVotes","totalVotes","totalLikes","commentsTruncated","comments"],"properties":{"status":{"type":"string","enum":["available","unavailable"]},"badVotes":{"type":"integer","minimum":0},"goodVotes":{"type":"integer","minimum":0},"totalVotes":{"type":"integer","minimum":0},"totalLikes":{"type":"integer","minimum":0,"description":"Sum of likes for the returned comment window; not a global total when commentsTruncated is true."},"commentsTruncated":{"type":"boolean"},"comments":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["id","message","likes","createdAt"],"properties":{"id":{"type":"integer","minimum":0},"message":{"type":"string"},"likes":{"type":"integer","minimum":0},"createdAt":{"type":["string","null"],"format":"date-time"}}}}}},"Error":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"string"}}}}}}