{"openapi":"3.1.0","info":{"title":"e-Fatura API","version":"1.0.0","description":"Parses Turkish e-invoices (GİB UBL-TR XML) into JSON with consistency checks. $0.01 per successfully parsed invoice."},"servers":[{"url":"https://efaturaoku.site"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer"}}},"paths":{"/v1/parse":{"post":{"operationId":"parseEfatura","summary":"Parse and check one Turkish e-invoice (paid)","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object","properties":{"xml":{"type":"string","description":"Invoice XML as text"},"xmlBase64":{"type":"string","description":"Invoice XML file as base64"}}}}}},"responses":{"200":{"description":"Parsed invoice and checks","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"type":"object"},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"ok":{"type":"boolean"},"severity":{"type":"string","enum":["error","warning","info"],"description":"How serious a failure of this check is"},"message":{"type":"string"},"expected":{},"actual":{}}}},"allChecksPassed":{"type":"boolean","description":"No error- or warning-level check failed"},"issues":{"type":"object","description":"Failed checks by severity","properties":{"error":{"type":"integer"},"warning":{"type":"integer"},"info":{"type":"integer"}}}}}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"Out of credits, or x402 payment required"},"413":{"description":"Invoice larger than 2 MB"},"422":{"description":"Not a UBL-TR invoice (not charged)"}}}},"/v1/demo":{"get":{"operationId":"efaturaDemo","summary":"Sample output for a fictional invoice (free)","responses":{"200":{"description":"Parsed invoice and checks","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"type":"object"},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"ok":{"type":"boolean"},"severity":{"type":"string","enum":["error","warning","info"],"description":"How serious a failure of this check is"},"message":{"type":"string"},"expected":{},"actual":{}}}},"allChecksPassed":{"type":"boolean","description":"No error- or warning-level check failed"},"issues":{"type":"object","description":"Failed checks by severity","properties":{"error":{"type":"integer"},"warning":{"type":"integer"},"info":{"type":"integer"}}}}}}}}}}}}}