{"openapi":"3.1.0","info":{"title":"European E-Invoicing API","version":"1.0.0","description":"Validate, parse and convert European electronic invoices (XRechnung 3.0, EN 16931 UBL/CII, ZUGFeRD/Factur-X container). Validation uses the official KoSIT validator with the official EN 16931 and XRechnung rule sets. Technical validation does not establish legal validity."},"servers":[{"url":"https://einvoiceengine.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key: einv_test_… (sandbox) or einv_live_…"},"mcpOAuth":{"type":"oauth2","description":"OAuth 2.1 access tokens for the MCP endpoint only (authorization code with PKCE S256). Discovery: /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server. See /docs/mcp.","flows":{"authorizationCode":{"authorizationUrl":"https://einvoiceengine.com/oauth/authorize","tokenUrl":"https://einvoiceengine.com/oauth/token","refreshUrl":"https://einvoiceengine.com/oauth/token","scopes":{"mcp":"Use the MCP endpoint","validate":"Validate invoices","parse":"Parse invoices","convert":"Convert, create and repair invoices","invoices:read":"Read stored invoices"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"details":{},"requestId":{"type":"string"},"docs":{"type":"string"}},"required":["code","message","status","requestId","docs"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Finding":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning","info"]},"ruleId":{"type":"string","description":"Official rule id (e.g. BR-CO-16, BR-DE-15), 'XSD' for schema errors, EINV-* for input checks"},"message":{"type":"string","description":"Official rule text, verbatim"},"messageTranslation":{"description":"Unofficial translation of message; only in responses requested in another language (Accept-Language or ?lang=)","type":"string"},"explanation":{"type":"string","description":"Plain-language explanation, in the requested language (English by default)"},"suggestion":{"type":"string"},"location":{"type":"object","properties":{"path":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["path"],"additionalProperties":false},"businessTerms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"additionalProperties":false},"step":{"type":"string","enum":["input","xml","schema","en16931","xrechnung","peppol","facturx","facturae","ksef","pdfa","other"]},"fields":{"description":"Canonical-model JSON fields involved (documents created from JSON)","type":"array","items":{"type":"string"}}},"required":["severity","ruleId","message","explanation","suggestion","businessTerms","source","step"],"additionalProperties":false},"Validation":{"type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","unsupported"]},"valid":{"type":"boolean"},"detected":{"type":"object","properties":{"format":{"type":"string"},"syntax":{"type":"string","enum":["ubl","cii","facturae","ksef"]},"documentType":{"type":"string"},"profile":{"type":"string"},"version":{"type":"string"},"specificationId":{"type":"string"},"container":{"type":"object","properties":{"type":{"type":"string","enum":["pdf"]},"embeddedFile":{"type":"string"},"attachments":{"type":"array","items":{"type":"string"}}},"required":["type","embeddedFile","attachments"],"additionalProperties":false}},"additionalProperties":false},"summary":{"type":"object","properties":{"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warnings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"infos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["errors","warnings","infos"],"additionalProperties":false},"findings":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning","info"]},"ruleId":{"type":"string","description":"Official rule id (e.g. BR-CO-16, BR-DE-15), 'XSD' for schema errors, EINV-* for input checks"},"message":{"type":"string","description":"Official rule text, verbatim"},"messageTranslation":{"description":"Unofficial translation of message; only in responses requested in another language (Accept-Language or ?lang=)","type":"string"},"explanation":{"type":"string","description":"Plain-language explanation, in the requested language (English by default)"},"suggestion":{"type":"string"},"location":{"type":"object","properties":{"path":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["path"],"additionalProperties":false},"businessTerms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"additionalProperties":false},"step":{"type":"string","enum":["input","xml","schema","en16931","xrechnung","peppol","facturx","facturae","ksef","pdfa","other"]},"fields":{"description":"Canonical-model JSON fields involved (documents created from JSON)","type":"array","items":{"type":"string"}}},"required":["severity","ruleId","message","explanation","suggestion","businessTerms","source","step"],"additionalProperties":false}},"ruleset":{"type":"object","properties":{"engine":{"type":"string"},"scenario":{"type":"string"},"configuration":{"type":"string"},"version":{"type":"string","description":"Rule-set bundle id; pin it with ?rules="}},"required":["configuration","version"],"additionalProperties":false},"coverage":{"type":"object","properties":{"checked":{"type":"array","items":{"type":"string"}},"notChecked":{"type":"array","items":{"type":"string"}}},"required":["checked","notChecked"],"additionalProperties":false},"disclaimer":{"type":"string"},"documentSha256":{"type":"string"},"durationMs":{"type":"number"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["validation"]},"invoiceId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"livemode":{"type":"boolean"},"stored":{"type":"boolean"}},"required":["status","valid","detected","summary","findings","coverage","disclaimer","documentSha256","durationMs","id","object","invoiceId","livemode","stored"],"additionalProperties":false},"ParsedInvoice":{"type":"object","properties":{"object":{"type":"string","enum":["parsed_invoice"]},"invoiceId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"livemode":{"type":"boolean"},"stored":{"type":"boolean"},"detected":{"type":"object","properties":{"format":{"type":"string"},"syntax":{"type":"string","enum":["ubl","cii","facturae","ksef"]},"documentType":{"type":"string"},"profile":{"type":"string"},"version":{"type":"string"},"specificationId":{"type":"string"},"container":{"type":"object","properties":{"type":{"type":"string","enum":["pdf"]},"embeddedFile":{"type":"string"},"attachments":{"type":"array","items":{"type":"string"}}},"required":["type","embeddedFile","attachments"],"additionalProperties":false}},"additionalProperties":false},"invoice":{"type":"object","additionalProperties":{},"description":"Canonical EN 16931 invoice (see components.schemas.Invoice)"},"schemaConformant":{"type":"boolean"},"lossless":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["unmapped_element","model_constraint","syntax_only_dropped","derived_value"]},"message":{"type":"string"},"path":{"type":"string"},"line":{"type":"number"},"value":{"type":"string"}},"required":["code","message","path"],"additionalProperties":false}},"documentSha256":{"type":"string"}},"required":["object","invoiceId","livemode","stored","detected","invoice","schemaConformant","lossless","warnings","documentSha256"],"additionalProperties":false},"Conversion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["conversion"]},"invoiceId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"livemode":{"type":"boolean"},"stored":{"type":"boolean"},"target":{"type":"object","properties":{"format":{"type":"string"},"syntax":{"type":"string","enum":["ubl","cii","pdf","facturae","ksef"]},"mediaType":{"type":"string"},"encoding":{"type":"string","enum":["base64"]},"profile":{"description":"ZUGFeRD / Factur-X profile of a PDF","type":"string","enum":["EN 16931","EXTENDED","XRECHNUNG"]}},"required":["format","syntax","mediaType"],"additionalProperties":false},"document":{"type":"string","description":"Converted document: XML text, or base64 when target.encoding is base64 (PDF)"},"validation":{"type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","unsupported"]},"valid":{"type":"boolean"},"detected":{"type":"object","properties":{"format":{"type":"string"},"syntax":{"type":"string","enum":["ubl","cii","facturae","ksef"]},"documentType":{"type":"string"},"profile":{"type":"string"},"version":{"type":"string"},"specificationId":{"type":"string"},"container":{"type":"object","properties":{"type":{"type":"string","enum":["pdf"]},"embeddedFile":{"type":"string"},"attachments":{"type":"array","items":{"type":"string"}}},"required":["type","embeddedFile","attachments"],"additionalProperties":false}},"additionalProperties":false},"summary":{"type":"object","properties":{"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warnings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"infos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["errors","warnings","infos"],"additionalProperties":false},"findings":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning","info"]},"ruleId":{"type":"string","description":"Official rule id (e.g. BR-CO-16, BR-DE-15), 'XSD' for schema errors, EINV-* for input checks"},"message":{"type":"string","description":"Official rule text, verbatim"},"messageTranslation":{"description":"Unofficial translation of message; only in responses requested in another language (Accept-Language or ?lang=)","type":"string"},"explanation":{"type":"string","description":"Plain-language explanation, in the requested language (English by default)"},"suggestion":{"type":"string"},"location":{"type":"object","properties":{"path":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["path"],"additionalProperties":false},"businessTerms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"additionalProperties":false},"step":{"type":"string","enum":["input","xml","schema","en16931","xrechnung","peppol","facturx","facturae","ksef","pdfa","other"]},"fields":{"description":"Canonical-model JSON fields involved (documents created from JSON)","type":"array","items":{"type":"string"}}},"required":["severity","ruleId","message","explanation","suggestion","businessTerms","source","step"],"additionalProperties":false}},"ruleset":{"type":"object","properties":{"engine":{"type":"string"},"scenario":{"type":"string"},"configuration":{"type":"string"},"version":{"type":"string","description":"Rule-set bundle id; pin it with ?rules="}},"required":["configuration","version"],"additionalProperties":false},"coverage":{"type":"object","properties":{"checked":{"type":"array","items":{"type":"string"}},"notChecked":{"type":"array","items":{"type":"string"}}},"required":["checked","notChecked"],"additionalProperties":false},"disclaimer":{"type":"string"},"documentSha256":{"type":"string"},"durationMs":{"type":"number"}},"required":["status","valid","detected","summary","findings","coverage","disclaimer","documentSha256","durationMs"],"additionalProperties":false},"sourceValidation":{"type":"object","properties":{"status":{"type":"string"},"summary":{"type":"object","properties":{"errors":{"type":"number"},"warnings":{"type":"number"},"infos":{"type":"number"}},"required":["errors","warnings","infos"],"additionalProperties":false}},"required":["status","summary"],"additionalProperties":false},"dataLoss":{"type":"object","properties":{"lossless":{"type":"boolean"},"unsupportedFields":{"type":"array","items":{}},"differences":{"type":"array","items":{}},"targetLimitations":{"type":"array","items":{}}},"required":["lossless","unsupportedFields","differences","targetLimitations"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"loss":{"type":"boolean"},"derived":{"type":"boolean"}},"required":["code","message"],"additionalProperties":false}},"metadata":{"type":"object","additionalProperties":{}}},"required":["id","object","invoiceId","livemode","stored","target","document","validation","sourceValidation","dataLoss","warnings","metadata"],"additionalProperties":false},"GeneratedInvoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["generated_invoice"]},"invoiceId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"livemode":{"type":"boolean"},"stored":{"type":"boolean"},"target":{"type":"object","properties":{"format":{"type":"string"},"syntax":{"type":"string","enum":["ubl","cii","pdf"]},"mediaType":{"type":"string"},"encoding":{"type":"string","enum":["base64"]},"profile":{"type":"string"}},"required":["format","syntax","mediaType"],"additionalProperties":false},"document":{"type":"string","description":"Created document: XML text, or base64 when encoding is base64 (PDF)"},"validation":{"type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","unsupported"]},"valid":{"type":"boolean"},"detected":{"type":"object","properties":{"format":{"type":"string"},"syntax":{"type":"string","enum":["ubl","cii","facturae","ksef"]},"documentType":{"type":"string"},"profile":{"type":"string"},"version":{"type":"string"},"specificationId":{"type":"string"},"container":{"type":"object","properties":{"type":{"type":"string","enum":["pdf"]},"embeddedFile":{"type":"string"},"attachments":{"type":"array","items":{"type":"string"}}},"required":["type","embeddedFile","attachments"],"additionalProperties":false}},"additionalProperties":false},"summary":{"type":"object","properties":{"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warnings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"infos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["errors","warnings","infos"],"additionalProperties":false},"findings":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning","info"]},"ruleId":{"type":"string","description":"Official rule id (e.g. BR-CO-16, BR-DE-15), 'XSD' for schema errors, EINV-* for input checks"},"message":{"type":"string","description":"Official rule text, verbatim"},"messageTranslation":{"description":"Unofficial translation of message; only in responses requested in another language (Accept-Language or ?lang=)","type":"string"},"explanation":{"type":"string","description":"Plain-language explanation, in the requested language (English by default)"},"suggestion":{"type":"string"},"location":{"type":"object","properties":{"path":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["path"],"additionalProperties":false},"businessTerms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"additionalProperties":false},"step":{"type":"string","enum":["input","xml","schema","en16931","xrechnung","peppol","facturx","facturae","ksef","pdfa","other"]},"fields":{"description":"Canonical-model JSON fields involved (documents created from JSON)","type":"array","items":{"type":"string"}}},"required":["severity","ruleId","message","explanation","suggestion","businessTerms","source","step"],"additionalProperties":false}},"ruleset":{"type":"object","properties":{"engine":{"type":"string"},"scenario":{"type":"string"},"configuration":{"type":"string"},"version":{"type":"string","description":"Rule-set bundle id; pin it with ?rules="}},"required":["configuration","version"],"additionalProperties":false},"coverage":{"type":"object","properties":{"checked":{"type":"array","items":{"type":"string"}},"notChecked":{"type":"array","items":{"type":"string"}}},"required":["checked","notChecked"],"additionalProperties":false},"disclaimer":{"type":"string"},"documentSha256":{"type":"string"},"durationMs":{"type":"number"}},"required":["status","valid","detected","summary","findings","coverage","disclaimer","documentSha256","durationMs"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"loss":{"type":"boolean"},"derived":{"type":"boolean"}},"required":["code","message"],"additionalProperties":false}},"metadata":{"type":"object","additionalProperties":{}}},"required":["id","object","invoiceId","livemode","stored","target","document","validation","warnings","metadata"],"additionalProperties":false},"InvoiceSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["invoice"]},"livemode":{"type":"boolean"},"format":{"nullable":true,"type":"string"},"syntax":{"nullable":true,"type":"string"},"invoiceNumber":{"nullable":true,"type":"string"},"sellerName":{"nullable":true,"type":"string"},"buyerName":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"payableAmount":{"nullable":true,"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"}},"required":["id","object","livemode","format","syntax","invoiceNumber","sellerName","buyerName","currency","payableAmount","status","source","createdAt","expiresAt"],"additionalProperties":false},"InvoiceList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["invoice"]},"livemode":{"type":"boolean"},"format":{"nullable":true,"type":"string"},"syntax":{"nullable":true,"type":"string"},"invoiceNumber":{"nullable":true,"type":"string"},"sellerName":{"nullable":true,"type":"string"},"buyerName":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"payableAmount":{"nullable":true,"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"}},"required":["id","object","livemode","format","syntax","invoiceNumber","sellerName","buyerName","currency","payableAmount","status","source","createdAt","expiresAt"],"additionalProperties":false}},"hasMore":{"type":"boolean"},"nextCursor":{"nullable":true,"type":"string"}},"required":["object","data","hasMore","nextCursor"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["job"]},"type":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"createdAt":{"type":"string"},"statusUrl":{"type":"string"}},"required":["id","object","type","status"],"additionalProperties":false},"ApiKeyCreated":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"prefix":{"type":"string"},"livemode":{"type":"boolean"},"scopes":{"type":"array","items":{"type":"string"}},"secret":{"type":"string","description":"Shown only once"},"createdAt":{"type":"string"}},"required":["id","name","prefix","livemode","scopes","secret","createdAt"],"additionalProperties":false},"Usage":{"type":"object","properties":{"object":{"type":"string","enum":["usage"]},"livemode":{"type":"boolean"},"period":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"],"additionalProperties":false},"plan":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"includedDocuments":{"type":"number"},"sandboxDocuments":{"type":"number"},"overageCentsPerDocument":{"nullable":true,"type":"number"}},"required":["id","name","includedDocuments","sandboxDocuments","overageCentsPerDocument"],"additionalProperties":false},"live":{"type":"object","properties":{"billableDocuments":{"type":"number"},"remaining":{"type":"number"},"overage":{"type":"number"}},"required":["billableDocuments","remaining","overage"],"additionalProperties":false},"sandbox":{"type":"object","properties":{"documents":{"type":"number"},"remaining":{"type":"number"}},"required":["documents","remaining"],"additionalProperties":false},"byOperation":{"type":"array","items":{}}},"required":["object","livemode","period","plan","live","sandbox","byOperation"],"additionalProperties":false},"TestSet":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["test_set"]},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string"},"mediaType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"source":{"type":"string","enum":["upload","generated"]},"generatedCase":{"nullable":true,"type":"string"},"expected":{"nullable":true,"description":"Expected outcome; null = not set yet","type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","unsupported"]},"rules":{"type":"array","items":{"type":"string"},"description":"For invalid: the exact rule ids expected to fail; empty = any failure"}},"required":["status","rules"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","filename","mediaType","sizeBytes","sha256","source","generatedCase","expected","createdAt"],"additionalProperties":false}},"lastRun":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"passed":{"type":"boolean"},"createdAt":{"type":"string"},"summary":{}},"required":["id","passed","createdAt","summary"],"additionalProperties":false},"limits":{"type":"object","properties":{"documents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["documents"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","object","name","description","documents","lastRun","limits","createdAt","updatedAt"],"additionalProperties":false},"TestSetRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["test_set_run"]},"testSetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"testSetName":{"type":"string"},"previousRunId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string"},"livemode":{"type":"boolean"},"rules":{"type":"string"},"compareRules":{"nullable":true,"type":"string"},"ruleset":{"nullable":true,"type":"string"},"passed":{"type":"boolean","description":"true when no document failed its expectation"},"summary":{"type":"object","properties":{"documents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"passed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"noExpectation":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"diff":{"type":"object","properties":{"previousRunId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fixed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unchanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newDocuments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"removedDocuments":{"type":"array","items":{"type":"string"}}},"required":["previousRunId","newFailures","fixed","changed","unchanged","newDocuments","removedDocuments"],"additionalProperties":false},"ruleSetChanges":{"nullable":true,"description":"Documents whose result differs with compareRules; null without compareRules","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["documents","passed","failed","noExpectation","errors","diff","ruleSetChanges"],"additionalProperties":false},"results":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string"},"expected":{"nullable":true,"description":"Expected outcome; null = not set yet","type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","unsupported"]},"rules":{"type":"array","items":{"type":"string"},"description":"For invalid: the exact rule ids expected to fail; empty = any failure"}},"required":["status","rules"],"additionalProperties":false},"actual":{"type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","unsupported","error"]},"rules":{"type":"array","items":{"type":"string"},"description":"Failing rule ids (errors)"},"warnings":{"type":"array","items":{"type":"string"}},"findings":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string"},"ruleId":{"type":"string"},"message":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"path":{"type":"string"}},"required":["severity","ruleId","message"],"additionalProperties":false}},"ruleset":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["status","rules","warnings","findings"],"additionalProperties":false},"outcome":{"type":"string","enum":["passed","failed","no_expectation"]},"missing":{"type":"array","items":{"type":"string"},"description":"Expected rule ids that did not fail"},"unexpected":{"type":"array","items":{"type":"string"},"description":"Failing rule ids that were not expected"},"diff":{"type":"object","properties":{"change":{"type":"string","enum":["new_document","new_failures","fixed","changed","unchanged"]},"newFailures":{"type":"array","items":{"type":"string"}},"fixed":{"type":"array","items":{"type":"string"}},"previousStatus":{"nullable":true,"type":"string"}},"required":["change","newFailures","fixed","previousStatus"],"additionalProperties":false},"compare":{"type":"object","properties":{"rules":{"type":"string"},"status":{"type":"string"},"failing":{"type":"array","items":{"type":"string"}},"changed":{"type":"boolean"}},"required":["rules","status","failing","changed"],"additionalProperties":false}},"required":["documentId","filename","expected","actual","outcome","missing","unexpected","diff"],"additionalProperties":false}},"createdAt":{"type":"string"}},"required":["id","object","testSetId","testSetName","previousRunId","channel","livemode","rules","compareRules","ruleset","passed","summary","results","createdAt"],"additionalProperties":false},"InboundCheck":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["inbound_check"]},"livemode":{"type":"boolean"},"invoiceId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"stored":{"type":"boolean"},"createdAt":{"type":"string"},"invoice":{"nullable":true,"type":"object","properties":{"number":{"type":"string"},"documentKind":{"type":"string"},"issueDate":{"type":"string"},"seller":{"type":"object","properties":{"name":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"}},"required":["name","vatId"],"additionalProperties":false},"buyer":{"type":"object","properties":{"name":{"nullable":true,"type":"string"}},"required":["name"],"additionalProperties":false},"currency":{"type":"string"},"netAmount":{"nullable":true,"type":"string"},"grossAmount":{"nullable":true,"type":"string"},"payableAmount":{"nullable":true,"type":"string"},"orderReference":{"nullable":true,"type":"string"},"buyerReference":{"nullable":true,"type":"string"},"lines":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["number","documentKind","issueDate","seller","buyer","currency","netAmount","grossAmount","payableAmount","orderReference","buyerReference","lines"],"additionalProperties":false},"validation":{"type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","unsupported"]},"valid":{"type":"boolean"},"detected":{"type":"object","properties":{"format":{"type":"string"},"syntax":{"type":"string","enum":["ubl","cii","facturae","ksef"]},"documentType":{"type":"string"},"profile":{"type":"string"},"version":{"type":"string"},"specificationId":{"type":"string"},"container":{"type":"object","properties":{"type":{"type":"string","enum":["pdf"]},"embeddedFile":{"type":"string"},"attachments":{"type":"array","items":{"type":"string"}}},"required":["type","embeddedFile","attachments"],"additionalProperties":false}},"additionalProperties":false},"summary":{"type":"object","properties":{"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warnings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"infos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["errors","warnings","infos"],"additionalProperties":false},"findings":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning","info"]},"ruleId":{"type":"string","description":"Official rule id (e.g. BR-CO-16, BR-DE-15), 'XSD' for schema errors, EINV-* for input checks"},"message":{"type":"string","description":"Official rule text, verbatim"},"messageTranslation":{"description":"Unofficial translation of message; only in responses requested in another language (Accept-Language or ?lang=)","type":"string"},"explanation":{"type":"string","description":"Plain-language explanation, in the requested language (English by default)"},"suggestion":{"type":"string"},"location":{"type":"object","properties":{"path":{"type":"string"},"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"column":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["path"],"additionalProperties":false},"businessTerms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"source":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"],"additionalProperties":false},"step":{"type":"string","enum":["input","xml","schema","en16931","xrechnung","peppol","facturx","facturae","ksef","pdfa","other"]},"fields":{"description":"Canonical-model JSON fields involved (documents created from JSON)","type":"array","items":{"type":"string"}}},"required":["severity","ruleId","message","explanation","suggestion","businessTerms","source","step"],"additionalProperties":false}},"ruleset":{"type":"object","properties":{"engine":{"type":"string"},"scenario":{"type":"string"},"configuration":{"type":"string"},"version":{"type":"string","description":"Rule-set bundle id; pin it with ?rules="}},"required":["configuration","version"],"additionalProperties":false},"coverage":{"type":"object","properties":{"checked":{"type":"array","items":{"type":"string"}},"notChecked":{"type":"array","items":{"type":"string"}}},"required":["checked","notChecked"],"additionalProperties":false},"disclaimer":{"type":"string"},"documentSha256":{"type":"string"},"durationMs":{"type":"number"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["validation"]},"invoiceId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"livemode":{"type":"boolean"},"stored":{"type":"boolean"}},"required":["status","valid","detected","summary","findings","coverage","disclaimer","documentSha256","durationMs","id","object","invoiceId","livemode","stored"],"additionalProperties":false,"description":"The official validation, unchanged by the business checks"},"checks":{"type":"object","properties":{"status":{"type":"string","enum":["passed","review","failed","not_checked"],"description":"failed: at least one error; review: warnings only"},"summary":{"type":"object","properties":{"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warnings":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"infos":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["errors","warnings","infos"],"additionalProperties":false},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"duplicate, possible_duplicate, resubmission, order_reference_missing, order_not_found, order_closed, order_supplier_mismatch, order_supplier_unverified, order_currency_mismatch, order_amount_exceeded, order_buyer_reference_mismatch, order_line_not_found, order_line_quantity_exceeded, order_line_price_exceeded, not_parsed"},"severity":{"type":"string","enum":["error","warning","info"]},"message":{"type":"string","description":"English text; the code is the stable value"},"details":{"type":"object","additionalProperties":{}}},"required":["code","severity","message"],"additionalProperties":false}},"duplicates":{"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"invoiceId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"checkedAt":{"type":"string"},"validationStatus":{"type":"string"},"match":{"type":"string","enum":["number","amount"]}},"required":["checkId","invoiceId","checkedAt","validationStatus","match"],"additionalProperties":false}},"order":{"nullable":true,"description":"The matched purchase order","type":"object","additionalProperties":{}},"tolerance":{"type":"object","properties":{"percent":{"type":"string"},"amount":{"type":"string"}},"required":["percent","amount"],"additionalProperties":false},"remembered":{"type":"boolean","description":"Kept as keyed hashes for later duplicate checks"}},"required":["status","summary","findings","duplicates","order","tolerance","remembered"],"additionalProperties":false},"supplierReport":{"type":"object","properties":{"object":{"type":"string","enum":["supplier_report"]},"lang":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"buyer":{"type":"string"},"invoiceNumber":{"nullable":true,"type":"string"},"sellerName":{"nullable":true,"type":"string"},"validationStatus":{"type":"string"},"summary":{"type":"object","properties":{"mustFix":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shouldCheck":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["mustFix","shouldCheck"],"additionalProperties":false},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Headings in the report language (title, intro, official, business, mustFix, shouldCheck, howToFix, officialText, where, from, footer)"},"items":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["official","business"]},"id":{"type":"string","description":"Official rule id or business finding code"},"severity":{"type":"string","enum":["error","warning"]},"what":{"type":"string","description":"Plain-language text in the report language"},"howToFix":{"nullable":true,"type":"string"},"officialMessage":{"nullable":true,"description":"Official rule text, verbatim","type":"string"},"officialMessageTranslation":{"nullable":true,"type":"string"},"where":{"nullable":true,"type":"string"}},"required":["source","id","severity","what","howToFix","officialMessage","officialMessageTranslation","where"],"additionalProperties":false}},"text":{"type":"string","description":"The whole report as plain text, ready to paste into an e-mail"},"link":{"description":"No-login link (share=true), valid 30 days","type":"string"},"expiresAt":{"type":"string"}},"required":["object","lang","buyer","invoiceNumber","sellerName","validationStatus","summary","labels","items","text"],"additionalProperties":false},"disclaimer":{"type":"string"}},"required":["id","object","livemode","invoiceId","stored","createdAt","invoice","validation","checks","disclaimer"],"additionalProperties":false},"SupplierReport":{"type":"object","properties":{"object":{"type":"string","enum":["supplier_report"]},"lang":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"buyer":{"type":"string"},"invoiceNumber":{"nullable":true,"type":"string"},"sellerName":{"nullable":true,"type":"string"},"validationStatus":{"type":"string"},"summary":{"type":"object","properties":{"mustFix":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shouldCheck":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["mustFix","shouldCheck"],"additionalProperties":false},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Headings in the report language (title, intro, official, business, mustFix, shouldCheck, howToFix, officialText, where, from, footer)"},"items":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["official","business"]},"id":{"type":"string","description":"Official rule id or business finding code"},"severity":{"type":"string","enum":["error","warning"]},"what":{"type":"string","description":"Plain-language text in the report language"},"howToFix":{"nullable":true,"type":"string"},"officialMessage":{"nullable":true,"description":"Official rule text, verbatim","type":"string"},"officialMessageTranslation":{"nullable":true,"type":"string"},"where":{"nullable":true,"type":"string"}},"required":["source","id","severity","what","howToFix","officialMessage","officialMessageTranslation","where"],"additionalProperties":false}},"text":{"type":"string","description":"The whole report as plain text, ready to paste into an e-mail"},"link":{"description":"No-login link (share=true), valid 30 days","type":"string"},"expiresAt":{"type":"string"}},"required":["object","lang","buyer","invoiceNumber","sellerName","validationStatus","summary","labels","items","text"],"additionalProperties":false},"PurchaseOrder":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["purchase_order"]},"livemode":{"type":"boolean"},"orderNumber":{"type":"string"},"buyerReference":{"nullable":true,"type":"string"},"supplierVatId":{"nullable":true,"type":"string"},"supplierName":{"nullable":true,"type":"string"},"currency":{"type":"string"},"netAmount":{"nullable":true,"type":"string"},"grossAmount":{"nullable":true,"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"type":"string"},"itemId":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"string"},"unitPrice":{"type":"string"},"unitCode":{"type":"string"}},"required":["quantity"],"additionalProperties":false}},"status":{"type":"string","enum":["open","closed"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","object","livemode","orderNumber","buyerReference","supplierVatId","supplierName","currency","netAmount","grossAmount","lines","status","createdAt","updatedAt"],"additionalProperties":false},"Invoice":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentKind":{"type":"string","enum":["invoice","creditNote"],"description":"Invoice or credit note"},"id":{"type":"string","description":"BT-1 Invoice number"},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"BT-2 Invoice issue date"},"typeCode":{"type":"string","description":"BT-3 Invoice type code (UNTDID 1001)"},"currency":{"type":"string","description":"BT-5 Invoice currency code"},"taxCurrency":{"description":"BT-6 VAT accounting currency code","type":"string"},"taxPointDate":{"description":"BT-7 Value added tax point date","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"taxPointDateCode":{"description":"BT-8 Value added tax point date code (UNTDID 2005)","type":"string"},"dueDate":{"description":"BT-9 Payment due date","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"buyerReference":{"description":"BT-10 Buyer reference (Leitweg-ID in XRechnung)","type":"string"},"projectReference":{"description":"BT-11","type":"string"},"contractReference":{"description":"BT-12","type":"string"},"purchaseOrderReference":{"description":"BT-13","type":"string"},"salesOrderReference":{"description":"BT-14","type":"string"},"receivingAdviceReference":{"description":"BT-15","type":"string"},"despatchAdviceReference":{"description":"BT-16","type":"string"},"tenderReference":{"description":"BT-17 Tender or lot reference","type":"string"},"invoicedObject":{"description":"BT-18 Invoiced object identifier","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"buyerAccountingReference":{"description":"BT-19","type":"string"},"paymentTerms":{"description":"BT-20 Payment terms (whitespace preserved: XRechnung Skonto lines are line-based)","type":"string"},"notes":{"default":[],"description":"BG-1","type":"array","items":{"type":"object","properties":{"subjectCode":{"description":"BT-21","type":"string"},"text":{"type":"string","description":"BT-22"}},"required":["text"],"additionalProperties":false}},"businessProcess":{"description":"BT-23 Business process type","type":"string"},"specificationId":{"type":"string","description":"BT-24 Specification identifier (CustomizationID / Guideline)"},"precedingInvoices":{"default":[],"description":"BG-3","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"BT-25"},"issueDate":{"description":"BT-26","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["id"],"additionalProperties":false}},"seller":{"type":"object","properties":{"name":{"description":"BT-27/44 Name","type":"string"},"tradingName":{"description":"BT-28/45 Trading name","type":"string"},"identifiers":{"default":[],"description":"BT-29/46 Identifiers","type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false}},"legalRegistration":{"description":"BT-30/47 Legal registration identifier","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"vatId":{"description":"BT-31/48 VAT identifier","type":"string"},"taxRegistrationId":{"description":"BT-32 Seller tax registration identifier","type":"string"},"legalInfo":{"description":"BT-33 Seller additional legal information","type":"string"},"electronicAddress":{"description":"BT-34/49 Electronic address (scheme = EAS code)","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"address":{"description":"BG-5/BG-8 Postal address","type":"object","properties":{"line1":{"description":"BT-35/50/64/75 Address line 1","type":"string"},"line2":{"description":"BT-36/51/65/76 Address line 2","type":"string"},"line3":{"description":"BT-162/163/164/165 Address line 3","type":"string"},"city":{"description":"BT-37/52/66/77 City","type":"string"},"postcode":{"description":"BT-38/53/67/78 Post code","type":"string"},"subdivision":{"description":"BT-39/54/68/79 Country subdivision","type":"string"},"countryCode":{"description":"BT-40/55/69/80 Country code (ISO 3166-1 alpha-2)","type":"string"}},"additionalProperties":false},"contact":{"description":"BG-6/BG-9 Contact","type":"object","properties":{"name":{"description":"BT-41/56 Contact point","type":"string"},"phone":{"description":"BT-42/57 Contact telephone","type":"string"},"email":{"description":"BT-43/58 Contact email","type":"string"}},"additionalProperties":false}},"required":["identifiers"],"additionalProperties":false,"description":"BG-4 Seller"},"buyer":{"type":"object","properties":{"name":{"description":"BT-27/44 Name","type":"string"},"tradingName":{"description":"BT-28/45 Trading name","type":"string"},"identifiers":{"default":[],"description":"BT-29/46 Identifiers","type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false}},"legalRegistration":{"description":"BT-30/47 Legal registration identifier","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"vatId":{"description":"BT-31/48 VAT identifier","type":"string"},"taxRegistrationId":{"description":"BT-32 Seller tax registration identifier","type":"string"},"legalInfo":{"description":"BT-33 Seller additional legal information","type":"string"},"electronicAddress":{"description":"BT-34/49 Electronic address (scheme = EAS code)","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"address":{"description":"BG-5/BG-8 Postal address","type":"object","properties":{"line1":{"description":"BT-35/50/64/75 Address line 1","type":"string"},"line2":{"description":"BT-36/51/65/76 Address line 2","type":"string"},"line3":{"description":"BT-162/163/164/165 Address line 3","type":"string"},"city":{"description":"BT-37/52/66/77 City","type":"string"},"postcode":{"description":"BT-38/53/67/78 Post code","type":"string"},"subdivision":{"description":"BT-39/54/68/79 Country subdivision","type":"string"},"countryCode":{"description":"BT-40/55/69/80 Country code (ISO 3166-1 alpha-2)","type":"string"}},"additionalProperties":false},"contact":{"description":"BG-6/BG-9 Contact","type":"object","properties":{"name":{"description":"BT-41/56 Contact point","type":"string"},"phone":{"description":"BT-42/57 Contact telephone","type":"string"},"email":{"description":"BT-43/58 Contact email","type":"string"}},"additionalProperties":false}},"required":["identifiers"],"additionalProperties":false,"description":"BG-7 Buyer"},"payee":{"description":"BG-10","type":"object","properties":{"name":{"description":"BT-59 Payee name","type":"string"},"identifier":{"description":"BT-60 Payee identifier","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"legalRegistration":{"description":"BT-61 Payee legal registration identifier","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false}},"additionalProperties":false},"taxRepresentative":{"description":"BG-11","type":"object","properties":{"name":{"description":"BT-62","type":"string"},"vatId":{"description":"BT-63","type":"string"},"address":{"description":"BG-12","type":"object","properties":{"line1":{"description":"BT-35/50/64/75 Address line 1","type":"string"},"line2":{"description":"BT-36/51/65/76 Address line 2","type":"string"},"line3":{"description":"BT-162/163/164/165 Address line 3","type":"string"},"city":{"description":"BT-37/52/66/77 City","type":"string"},"postcode":{"description":"BT-38/53/67/78 Post code","type":"string"},"subdivision":{"description":"BT-39/54/68/79 Country subdivision","type":"string"},"countryCode":{"description":"BT-40/55/69/80 Country code (ISO 3166-1 alpha-2)","type":"string"}},"additionalProperties":false}},"additionalProperties":false},"delivery":{"description":"BG-13","type":"object","properties":{"name":{"description":"BT-70 Deliver to party name","type":"string"},"locationId":{"description":"BT-71 Deliver to location identifier","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"date":{"description":"BT-72 Actual delivery date","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"address":{"description":"BG-15 Deliver to address","type":"object","properties":{"line1":{"description":"BT-35/50/64/75 Address line 1","type":"string"},"line2":{"description":"BT-36/51/65/76 Address line 2","type":"string"},"line3":{"description":"BT-162/163/164/165 Address line 3","type":"string"},"city":{"description":"BT-37/52/66/77 City","type":"string"},"postcode":{"description":"BT-38/53/67/78 Post code","type":"string"},"subdivision":{"description":"BT-39/54/68/79 Country subdivision","type":"string"},"countryCode":{"description":"BT-40/55/69/80 Country code (ISO 3166-1 alpha-2)","type":"string"}},"additionalProperties":false}},"additionalProperties":false},"invoicingPeriod":{"description":"BG-14","type":"object","properties":{"start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"payment":{"description":"BG-16","type":"object","properties":{"meansCode":{"description":"BT-81 Payment means type code (UNTDID 4461)","type":"string"},"meansText":{"description":"BT-82 Payment means text","type":"string"},"remittanceInfo":{"description":"BT-83 Remittance information","type":"string"},"creditTransfers":{"default":[],"description":"BG-17","type":"array","items":{"type":"object","properties":{"accountId":{"description":"BT-84 Payment account identifier (IBAN or proprietary)","type":"string"},"accountName":{"description":"BT-85 Payment account name","type":"string"},"bic":{"description":"BT-86 Payment service provider identifier","type":"string"}},"additionalProperties":false}},"card":{"description":"BG-18","type":"object","properties":{"pan":{"description":"BT-87 Payment card primary account number","type":"string"},"holder":{"description":"BT-88 Payment card holder name","type":"string"}},"additionalProperties":false},"directDebit":{"description":"BG-19","type":"object","properties":{"mandateRef":{"description":"BT-89 Mandate reference identifier","type":"string"},"creditorId":{"description":"BT-90 Bank assigned creditor identifier","type":"string"},"debitedAccount":{"description":"BT-91 Debited account identifier","type":"string"}},"additionalProperties":false}},"required":["creditTransfers"],"additionalProperties":false},"allowanceCharges":{"default":[],"description":"BG-20/BG-21","type":"array","items":{"type":"object","properties":{"isCharge":{"type":"boolean","description":"false = allowance (BG-20/27), true = charge (BG-21/28)"},"amount":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-92/99/136/141"},"baseAmount":{"description":"BT-93/100/137/142","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"percent":{"description":"BT-94/101/138/143","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"taxCategory":{"description":"BT-95/102 VAT category code (document level only)","type":"string"},"taxRate":{"description":"BT-96/103 VAT rate (document level only)","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"reason":{"description":"BT-97/104/139/144","type":"string"},"reasonCode":{"description":"BT-98/105/140/145","type":"string"}},"required":["isCharge","amount"],"additionalProperties":false}},"totals":{"type":"object","properties":{"lineNet":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-106"},"allowances":{"description":"BT-107","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"charges":{"description":"BT-108","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"taxExclusive":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-109"},"tax":{"description":"BT-110","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"taxInAccountingCurrency":{"description":"BT-111","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"taxInclusive":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-112"},"prepaid":{"description":"BT-113","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"rounding":{"description":"BT-114","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"payable":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-115"}},"required":["lineNet","taxExclusive","taxInclusive","payable"],"additionalProperties":false,"description":"BG-22"},"vatBreakdown":{"default":[],"description":"BG-23","type":"array","items":{"type":"object","properties":{"taxableAmount":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-116"},"taxAmount":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-117"},"category":{"type":"string","description":"BT-118 VAT category code (UNTDID 5305 subset)"},"rate":{"description":"BT-119","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"exemptionReason":{"description":"BT-120","type":"string"},"exemptionReasonCode":{"description":"BT-121 (VATEX)","type":"string"}},"required":["taxableAmount","taxAmount","category"],"additionalProperties":false}},"attachments":{"default":[],"description":"BG-24","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"BT-122 Supporting document reference"},"description":{"description":"BT-123","type":"string"},"uri":{"description":"BT-124 External document location","type":"string"},"content":{"description":"BT-125 Attached document","type":"object","properties":{"mimeCode":{"type":"string"},"filename":{"type":"string"},"base64":{"type":"string"}},"required":["mimeCode","base64"],"additionalProperties":false}},"required":["id"],"additionalProperties":false}},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"BT-126 Invoice line identifier"},"note":{"description":"BT-127","type":"string"},"objectId":{"description":"BT-128 Invoice line object identifier","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"quantity":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-129 Invoiced quantity"},"unitCode":{"type":"string","description":"BT-130 Unit of measure (UN/ECE Rec 20/21)"},"netAmount":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-131 Invoice line net amount"},"orderLineRef":{"description":"BT-132","type":"string"},"accountingRef":{"description":"BT-133","type":"string"},"period":{"description":"BG-26","type":"object","properties":{"start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"allowanceCharges":{"default":[],"description":"BG-27/BG-28","type":"array","items":{"type":"object","properties":{"isCharge":{"type":"boolean","description":"false = allowance (BG-20/27), true = charge (BG-21/28)"},"amount":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-92/99/136/141"},"baseAmount":{"description":"BT-93/100/137/142","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"percent":{"description":"BT-94/101/138/143","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"taxCategory":{"description":"BT-95/102 VAT category code (document level only)","type":"string"},"taxRate":{"description":"BT-96/103 VAT rate (document level only)","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"reason":{"description":"BT-97/104/139/144","type":"string"},"reasonCode":{"description":"BT-98/105/140/145","type":"string"}},"required":["isCharge","amount"],"additionalProperties":false}},"price":{"type":"object","properties":{"net":{"type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$","description":"BT-146 Item net price"},"discount":{"description":"BT-147 Item price discount","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"gross":{"description":"BT-148 Item gross price","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"baseQuantity":{"description":"BT-149","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"},"baseUnitCode":{"description":"BT-150","type":"string"}},"required":["net"],"additionalProperties":false,"description":"BG-29"},"vat":{"type":"object","properties":{"category":{"type":"string","description":"BT-151"},"rate":{"description":"BT-152","type":"string","pattern":"^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$"}},"required":["category"],"additionalProperties":false,"description":"BG-30"},"item":{"type":"object","properties":{"name":{"type":"string","description":"BT-153"},"description":{"description":"BT-154","type":"string"},"sellerId":{"description":"BT-155","type":"string"},"buyerId":{"description":"BT-156","type":"string"},"standardId":{"description":"BT-157","type":"object","properties":{"value":{"type":"string"},"scheme":{"type":"string"}},"required":["value"],"additionalProperties":false},"classifications":{"default":[],"description":"BT-158","type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"listId":{"type":"string"},"listVersion":{"type":"string"}},"required":["value"],"additionalProperties":false}},"originCountry":{"description":"BT-159","type":"string"},"attributes":{"default":[],"description":"BG-32","type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}}},"required":["name","classifications","attributes"],"additionalProperties":false,"description":"BG-31"}},"required":["id","quantity","unitCode","netAmount","allowanceCharges","price","vat","item"],"additionalProperties":false},"description":"BG-25"}},"required":["documentKind","id","issueDate","typeCode","currency","notes","specificationId","precedingInvoices","seller","buyer","allowanceCharges","totals","vatBreakdown","attachments","lines"],"additionalProperties":false}}},"paths":{"/v1/invoices/validate":{"post":{"operationId":"validateInvoice","summary":"Validate an invoice","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"store","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"revocationCheck","in":"query","required":false,"schema":{"type":"boolean"},"description":"Signed Facturae files: false skips the OCSP / CRL request for the signing certificate (it discloses the certificate serial number to the certificate authority). The trusted-list check still runs. Also off when the organization switched revocation checks off. Also accepted as a JSON body field."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","required":["document"],"properties":{"document":{"type":"string","description":"XML text, or base64 (PDF/binary)"},"encoding":{"type":"string","enum":["utf8","base64"],"description":"Auto-detected when omitted"},"store":{"type":"boolean","description":"Override the organization default for storing the document"},"async":{"type":"boolean","description":"Process as a background job (202). Automatic for documents above 2 MB."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Validation"}}}},"202":{"description":"Accepted as background job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/parse":{"post":{"operationId":"parseInvoice","summary":"Parse to canonical EN 16931 JSON","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"store","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","required":["document"],"properties":{"document":{"type":"string","description":"XML text, or base64 (PDF/binary)"},"encoding":{"type":"string","enum":["utf8","base64"],"description":"Auto-detected when omitted"},"store":{"type":"boolean","description":"Override the organization default for storing the document"},"async":{"type":"boolean","description":"Process as a background job (202). Automatic for documents above 2 MB."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParsedInvoice"}}}},"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/compare":{"post":{"operationId":"compareInvoices","summary":"Compare two invoices at business level","description":"Both documents are parsed into the EN 16931 model and compared field by field: syntax (UBL or CII), element order and number formatting do not count as differences. Amounts, tax data and bank/party identifiers are marked sensitive. Recorded but not billed; nothing is stored. Scope: parse.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["a","b"],"properties":{"a":{"type":"object","required":["document"],"properties":{"document":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]}}},"b":{"type":"object","required":["document"],"properties":{"document":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]}}}}}}}},"responses":{"200":{"description":"equal, differences [{ path, kind: changed|added|removed, a, b, sensitive }], parse warnings"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/convert":{"post":{"operationId":"convertInvoice","summary":"Convert between formats: UBL <-> CII, to Peppol BIS, to Factur-X / ZUGFeRD PDF (EN 16931, EXTENDED, XRECHNUNG), to Facturae 3.2.2 and KSeF FA(3), Facturae / KSeF to EN 16931 (validated, round-trip checked)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"store","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"async","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"target","in":"query","required":true,"schema":{"type":"string","enum":["ubl","cii","xrechnung-ubl","xrechnung-cii","en16931-ubl","en16931-cii","peppol-bis-billing","zugferd-facturx","facturae","ksef"]}},{"name":"allowDataLoss","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"profile","in":"query","required":false,"schema":{"type":"string","enum":["EN 16931","EXTENDED","XRECHNUNG"]},"description":"ZUGFeRD / Factur-X profile (target zugferd-facturx). Default: XRECHNUNG for XRechnung sources, else EN 16931."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","required":["document"],"properties":{"document":{"type":"string","description":"XML text, or base64 (PDF/binary)"},"encoding":{"type":"string","enum":["utf8","base64"],"description":"Auto-detected when omitted"},"store":{"type":"boolean","description":"Override the organization default for storing the document"},"async":{"type":"boolean","description":"Process as a background job (202). Automatic for documents above 2 MB."},"target":{"type":"string","enum":["ubl","cii","xrechnung-ubl","xrechnung-cii","en16931-ubl","en16931-cii","peppol-bis-billing","zugferd-facturx","facturae","ksef"],"description":"Alternative to the target query parameter"},"allowDataLoss":{"type":"boolean"},"profile":{"type":"string","enum":["EN 16931","EXTENDED","XRECHNUNG"],"description":"ZUGFeRD / Factur-X profile (target zugferd-facturx)"},"facturae":{"type":"object","description":"Required for target facturae: data Facturae needs and EN 16931 does not carry. Never guessed; missing values fail with target_data_required.","required":["seller","buyer","language"],"additionalProperties":false,"properties":{"seller":{"type":"object","required":["personType","residenceType"],"additionalProperties":false,"properties":{"personType":{"type":"string","enum":["F","J"],"description":"F natural person, J legal entity"},"residenceType":{"type":"string","enum":["R","U","E"],"description":"R resident in Spain, U in another EU member state, E outside the EU"},"taxId":{"type":"string","minLength":3,"maxLength":30,"description":"TaxIdentificationNumber when the party has no VAT identifier"},"individual":{"type":"object","required":["name","firstSurname"],"properties":{"name":{"type":"string"},"firstSurname":{"type":"string"},"secondSurname":{"type":"string"}},"description":"Natural persons: name parts; joined with spaces they must equal the party name"},"province":{"type":"string","maxLength":20,"description":"Province when the address has no country subdivision"},"administrativeCentres":{"type":"array","description":"FACe DIR3 administrative centres (oficina contable 01, órgano gestor 02, unidad tramitadora 03, ...)","items":{"type":"object","required":["code","role","address"],"properties":{"code":{"type":"string","maxLength":10},"role":{"type":"string","enum":["01","02","03","04","05","06","07","08","09"]},"name":{"type":"string","maxLength":40},"address":{"type":"object","required":["line1","postcode","city","province","countryCode"],"properties":{"line1":{"type":"string"},"postcode":{"type":"string"},"city":{"type":"string"},"province":{"type":"string"},"countryCode":{"type":"string","minLength":2,"maxLength":2}}},"description":{"type":"string"}}}}}},"buyer":{"type":"object","required":["personType","residenceType"],"additionalProperties":false,"properties":{"personType":{"type":"string","enum":["F","J"],"description":"F natural person, J legal entity"},"residenceType":{"type":"string","enum":["R","U","E"],"description":"R resident in Spain, U in another EU member state, E outside the EU"},"taxId":{"type":"string","minLength":3,"maxLength":30,"description":"TaxIdentificationNumber when the party has no VAT identifier"},"individual":{"type":"object","required":["name","firstSurname"],"properties":{"name":{"type":"string"},"firstSurname":{"type":"string"},"secondSurname":{"type":"string"}},"description":"Natural persons: name parts; joined with spaces they must equal the party name"},"province":{"type":"string","maxLength":20,"description":"Province when the address has no country subdivision"},"administrativeCentres":{"type":"array","description":"FACe DIR3 administrative centres (oficina contable 01, órgano gestor 02, unidad tramitadora 03, ...)","items":{"type":"object","required":["code","role","address"],"properties":{"code":{"type":"string","maxLength":10},"role":{"type":"string","enum":["01","02","03","04","05","06","07","08","09"]},"name":{"type":"string","maxLength":40},"address":{"type":"object","required":["line1","postcode","city","province","countryCode"],"properties":{"line1":{"type":"string"},"postcode":{"type":"string"},"city":{"type":"string"},"province":{"type":"string"},"countryCode":{"type":"string","minLength":2,"maxLength":2}}},"description":{"type":"string"}}}}}},"language":{"type":"string","description":"LanguageName, e.g. es, en, ca"}}},"ksef":{"type":"object","description":"Required for target ksef: Polish data FA(3) needs and EN 16931 does not carry. Never guessed; missing values fail with target_data_required.","required":["annotations","buyer"],"additionalProperties":false,"properties":{"annotations":{"type":"object","required":["cashAccounting","splitPayment","simplifiedTriangular","marginScheme","newMeansOfTransport"],"properties":{"cashAccounting":{"type":"boolean","description":"P_16 metoda kasowa"},"splitPayment":{"type":"boolean","description":"P_18A mechanizm podzielonej płatności"},"simplifiedTriangular":{"type":"boolean","description":"P_23 procedura uproszczona"},"marginScheme":{"type":"boolean","enum":[false],"description":"Margin schemes are not supported"},"newMeansOfTransport":{"type":"boolean","enum":[false],"description":"New means of transport are not supported"}}},"buyer":{"type":"object","required":["jst","vatGroup"],"properties":{"jst":{"type":"boolean","description":"JST subordinate unit"},"vatGroup":{"type":"boolean","description":"GV VAT group member"}}},"notSubjectToVat":{"type":"string","enum":["np I","np II"],"description":"P_12 code for VAT category O"},"placeOfIssue":{"type":"string","description":"P_1M"},"paymentDate":{"type":"string","format":"date","description":"DataZaplaty when the invoice is fully paid"}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversion"}}}},"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/generate/csv":{"post":{"operationId":"generateInvoicesFromCsv","summary":"Create invoices from a CSV, Excel (.xlsx) or fixed-width export with a column mapping (one invoice per invoice number; billed per created invoice)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["mapping","target"],"description":"Send exactly one of csv, xlsx or fixedWidth.","properties":{"csv":{"type":"string","description":"CSV file content (max 5 MB)"},"xlsx":{"type":"string","format":"byte","description":"Excel workbook (.xlsx) as base64 (max 5 MB); mapping.sheet and mapping.headerRow choose the sheet and header row"},"fixedWidth":{"type":"string","description":"Fixed-width text; mapping.columns gives name, start and length of each column"},"mapping":{"type":"object","description":"See /docs/csv-mapping"},"target":{"type":"string"},"profile":{"type":"string"},"store":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Per invoice: created, skipped (unreadable values) or failed (with findings)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/generate/xml":{"post":{"operationId":"generateInvoicesFromXml","summary":"Create invoices from a custom XML export with a path mapping (one invoice per invoice element; billed per created invoice)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["xml","mapping","target"],"properties":{"xml":{"type":"string","description":"XML file content (max 5 MB; no DTD or entities)"},"mapping":{"type":"object","description":"namespaces, invoice, lines, fields with path expressions. See /docs/csv-mapping"},"target":{"type":"string"},"profile":{"type":"string"},"store":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Per invoice: created, skipped (unreadable values) or failed (with findings)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/fix/analyze":{"post":{"operationId":"analyzeRejection","summary":"Explain a rejection: validation, rule ids from the pasted message, fields to change (counts as one validation)","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["document"],"properties":{"document":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]},"message":{"type":"string"}}}}}},"responses":{"200":{"description":"Analysis"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/fix":{"post":{"operationId":"fixInvoice","summary":"Apply field changes or accepted proposals to a rejected invoice and return the same format, validated, with a change log (amounts and tax only with confirmAmounts)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"store","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["document"],"properties":{"document":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]},"changes":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{}}}},"accept":{"type":"array","items":{"type":"string"},"description":"Proposal ids from /v1/invoices/fix/analyze"},"applySafe":{"type":"boolean","description":"Apply every proposal of category safe"},"confirmAmounts":{"type":"boolean"},"allowDataLoss":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Fixed document in its own format (UBL, CII, ZUGFeRD / Factur-X PDF, Facturae 3.2.2, KSeF FA(3)) with validation, change log and warnings (a repaired Facturae file is unsigned and must be signed again)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/generate":{"post":{"operationId":"generateInvoice","summary":"Create an XRechnung, EN 16931, Peppol BIS or ZUGFeRD / Factur-X PDF invoice from JSON (validated before it is returned)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"store","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"target","in":"query","required":true,"schema":{"type":"string","enum":["xrechnung-ubl","xrechnung-cii","en16931-ubl","en16931-cii","peppol-bis-billing","zugferd-facturx"]}},{"name":"profile","in":"query","required":false,"schema":{"type":"string","enum":["EN 16931","XRECHNUNG"],"default":"EN 16931"},"description":"ZUGFeRD / Factur-X profile"},{"name":"rules","in":"query","required":false,"schema":{"type":"string","default":"latest"},"description":"Pin the rule-set bundle (see ruleset.version)"},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice"],"properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedInvoice"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices":{"get":{"operationId":"listInvoices","summary":"List stored invoices (key's mode only)","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["valid","invalid","parsed","converted"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}":{"get":{"operationId":"getInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Invoice with versions and canonical JSON"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted (documents removed from storage)"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}/validation":{"get":{"operationId":"getInvoiceValidation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Validation"}}}},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routes":{"get":{"operationId":"listRoutes","responses":{"200":{"description":"Routes"}}},"post":{"operationId":"createRoute","summary":"Route to your own https endpoint (secret returned once; scope keys:write)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"name":{"type":"string"},"url":{"type":"string"},"formats":{"type":"array","items":{"type":"string"}},"requireValid":{"type":"boolean"},"convertTo":{"type":"string"},"priority":{"type":"integer"}}}}}},"responses":{"201":{"description":"Route with secret"}}}},"/v1/routes/{id}":{"patch":{"operationId":"updateRoute","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Route"}}},"delete":{"operationId":"deleteRoute","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"}}}},"/v1/invoices/route":{"post":{"operationId":"routeInvoice","summary":"Validate, route, convert and queue delivery to your endpoint (billed as one document)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","required":["document"],"properties":{"document":{"type":"string","description":"XML text, or base64 (PDF/binary)"},"encoding":{"type":"string","enum":["utf8","base64"],"description":"Auto-detected when omitted"},"store":{"type":"boolean","description":"Override the organization default for storing the document"},"async":{"type":"boolean","description":"Process as a background job (202). Automatic for documents above 2 MB."}}}}}},"responses":{"200":{"description":"Rejected (invalid, no_route, conversion_failed)"},"202":{"description":"Queued"}}}},"/v1/invoices/inbound":{"post":{"operationId":"checkInboundInvoice","summary":"Check an incoming invoice: official validation plus duplicate and purchase-order checks (billed as one validated document)","description":"Business checks against your own data are reported in `checks` and never change `validation.status`. Options (query or JSON body): store, remember (default true: keep keyed hashes for later duplicate checks), tolerance { percent, amount } for order amounts, supplierReport (true, a language code or { lang, share }). Scope: validate. See /docs/inbound.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"store","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"remember","in":"query","required":false,"schema":{"type":"boolean","default":true}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","required":["document"],"properties":{"document":{"type":"string","description":"XML text, or base64 (PDF/binary)"},"encoding":{"type":"string","enum":["utf8","base64"],"description":"Auto-detected when omitted"},"store":{"type":"boolean","description":"Override the organization default for storing the document"},"async":{"type":"boolean","description":"Process as a background job (202). Automatic for documents above 2 MB."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundCheck"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbound-checks":{"get":{"operationId":"listInboundChecks","summary":"Recent inbound checks of the key's mode (scope invoices:read)","responses":{"200":{"description":"List of checks with status and codes"}}}},"/v1/inbound-checks/{id}":{"get":{"operationId":"getInboundCheck","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Check summary; result only when the document was stored"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteInboundCheck","summary":"Forget a check: its duplicate hashes, order amounts and shared reports (scope invoices:delete)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbound-checks/{id}/supplier-report":{"post":{"operationId":"createSupplierReport","summary":"What the supplier must change, in the supplier's language; share=true adds a no-login link (needs a stored result)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","text"]}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"share":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierReport"}}}},"409":{"description":"The check result was not stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbound/settings":{"get":{"operationId":"getInboundSettings","responses":{"200":{"description":"amountTolerancePercent, amountToleranceAmount, requireOrderReference, duplicateWindowDays"}}},"patch":{"operationId":"updateInboundSettings","summary":"Tolerance, order reference requirement and duplicate window (scope keys:write)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountTolerancePercent":{"type":"string"},"amountToleranceAmount":{"type":"string"},"requireOrderReference":{"type":"boolean"},"duplicateWindowDays":{"type":"integer","minimum":1,"maximum":3650}}}}}},"responses":{"200":{"description":"Settings"}}}},"/v1/purchase-orders":{"get":{"operationId":"listPurchaseOrders","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["open","closed"]}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":200}}],"responses":{"200":{"description":"List of purchase orders"}}},"post":{"operationId":"createPurchaseOrder","summary":"Create a purchase order (scope validate); replace=true overwrites one with the same number","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}}},"responses":{"200":{"description":"Replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}}},"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}}},"409":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/purchase-orders/import":{"post":{"operationId":"importPurchaseOrders","summary":"Import purchase orders from CSV (upsert by order number; one row per order or per order line)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["csv"],"properties":{"csv":{"type":"string"}}}}}},"responses":{"200":{"description":"orders, created, updated, skipped [{ orderNumber, rows, error }]"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/purchase-orders/{id}":{"get":{"operationId":"getPurchaseOrder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Purchase order with amounts invoiced so far"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePurchaseOrder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routed":{"get":{"operationId":"listRouted","responses":{"200":{"description":"Routed documents"}}}},"/v1/routed/{id}":{"get":{"operationId":"getRouted","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Status, attempts, receipt, history"}}}},"/v1/routed/{id}/retry":{"post":{"operationId":"retryRouted","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Queued again"},"409":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/failures":{"get":{"operationId":"listFailures","summary":"Jobs and webhook deliveries that failed for good in the last 30 days","responses":{"200":{"description":"jobs (with retryableUntil), webhookDeliveries"}}}},"/v1/jobs/{id}/retry":{"post":{"operationId":"retryJob","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"409":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook-deliveries/{id}/retry":{"post":{"operationId":"retryWebhookDelivery","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"{ queued }"}}}},"/v1/webhook-deliveries/retry":{"post":{"operationId":"retryAllWebhookDeliveries","responses":{"200":{"description":"{ queued }"}}}},"/v1/integrations/health":{"get":{"operationId":"getIntegrationHealth","summary":"Health and recommendations per API key and connection","responses":{"200":{"description":"integrations [{ kind, id, name, status, formats, last30Days, lastValidAt, ciChecks, topRules, recommendations }]"}}}},"/v1/compliance/changes":{"get":{"operationId":"listComplianceChanges","summary":"Register of rule and mandate changes, with sources and verification status","parameters":[{"name":"country","in":"query","schema":{"type":"string"}},{"name":"format","in":"query","schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string","format":"date"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of title, summary, technical impact, required actions and milestones (overrides Accept-Language). Sources and dates are not translated."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of the change texts: de, fr, es, it, pl, nl or pt; English otherwise."}],"responses":{"200":{"description":"Changes"}}}},"/v1/compliance/impact":{"get":{"operationId":"getComplianceImpact","summary":"Changes that concern formats your organization sent in the last 90 days, by API key","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of title, summary, technical impact, required actions and milestones (overrides Accept-Language). Sources and dates are not translated."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of the change texts: de, fr, es, it, pl, nl or pt; English otherwise."}],"responses":{"200":{"description":"formatsUsed, impacts"}}}},"/v1/testdata":{"post":{"operationId":"generateTestData","summary":"Synthetic test invoices (valid and invalid cases), each checked with the official rules; not billed","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target"],"properties":{"target":{"type":"string","enum":["xrechnung-ubl","xrechnung-cii","en16931-ubl","en16931-cii","peppol-bis-billing","zugferd-facturx"]},"cases":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"test_set with cases [{ name, filename, document, expected, actual, matches }]"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/test-sets":{"get":{"operationId":"listTestSets","summary":"Stored test-document sets with their last run (scope validate)","responses":{"200":{"description":"List of sets with document count and last run"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTestSet","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSet"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/test-sets/{id}":{"get":{"operationId":"getTestSet","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSet"}}}},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateTestSet","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSet"}}}},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteTestSet","summary":"Deletes the set, its documents (from storage) and runs","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/test-sets/{id}/documents":{"post":{"operationId":"addTestSetDocuments","summary":"Upload documents with an expected outcome each, or add synthetic invoices from the test-data generator (expectation = official result at generation)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","maxItems":50,"items":{"type":"object","required":["document"],"properties":{"filename":{"type":"string"},"document":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]},"expected":{"description":"{ status, rules } | \"valid\" | \"unsupported\" | [rule ids expected to fail] | null"}}}},"generate":{"type":"object","required":["target"],"properties":{"target":{"type":"string","enum":["xrechnung-ubl","xrechnung-cii","en16931-ubl","en16931-cii","peppol-bis-billing","zugferd-facturx"]},"cases":{"type":"array","items":{"type":"string"}}}}}}}}},"responses":{"201":{"description":"{ added, documentIds, set }"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/test-sets/{id}/documents/{documentId}":{"patch":{"operationId":"setTestSetExpectation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected":{}}}}}},"responses":{"200":{"description":"Document with the new expectation"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removeTestSetDocument","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Removed (and deleted from storage)"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/test-sets/{id}/documents/{documentId}/download":{"get":{"operationId":"downloadTestSetDocument","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The stored document"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/test-sets/{id}/expectations/accept":{"post":{"operationId":"acceptTestSetResults","summary":"Set the expectations from a run's results (default: the latest run; documentIds limits it)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid"},"documentIds":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}},"responses":{"200":{"description":"{ updated, runId, set }"},"409":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/test-sets/{id}/runs":{"post":{"operationId":"runTestSet","summary":"Validate every document, compare with its expectation and with the previous run; billed like validating the documents one by one with the same key (twice with compareRules)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"string","description":"Rule set to pin (default latest)"},"compareRules":{"type":"string","description":"Also validate with this rule set and report documents whose result changes"}}}}}},"responses":{"201":{"description":"Run with per-document results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSetRun"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listTestSetRuns","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Runs without per-document results, newest first"}}}},"/v1/test-sets/{id}/runs/{runId}":{"get":{"operationId":"getTestSetRun","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","markdown"]},"description":"markdown: a summary for CI job pages and pull-request comments"},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"responses":{"200":{"description":"Run (JSON) or Markdown summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSetRun"}},"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/testdata/cases":{"get":{"operationId":"listTestCases","responses":{"200":{"description":"Available cases and targets"}}}},"/v1/widget/sessions":{"post":{"operationId":"createWidgetSession","summary":"Short-lived session for the embedded validation widget (call from your server; only the returned url goes to the browser)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["origin"],"properties":{"origin":{"type":"string"},"maxDocuments":{"type":"integer","minimum":1,"maximum":100},"ttlMinutes":{"type":"integer","minimum":1,"maximum":60},"lang":{"type":"string"},"accent":{"type":"string"},"theme":{"type":"string","enum":["light","dark","auto"]}}}}}},"responses":{"201":{"description":"token, url, origin, maxDocuments, expiresAt"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/customers":{"post":{"operationId":"partnerCreateCustomer","summary":"Create a customer account (partner key, scope partner)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"externalRef":{"type":"string"},"monthlyDocumentLimit":{"type":["integer","null"]}}}}}},"responses":{"201":{"description":"Customer"},"409":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"partnerListCustomers","summary":"Customers with this month's documents","responses":{"200":{"description":"List"}}}},"/v1/partner/customers/{id}":{"get":{"operationId":"partnerGetCustomer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Customer"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"partnerUpdateCustomer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Customer"}}},"delete":{"operationId":"partnerCloseCustomer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Closed; keys revoked"}}}},"/v1/partner/customers/{id}/keys":{"post":{"operationId":"partnerCreateCustomerKey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Key, secret returned once"}}},"get":{"operationId":"partnerListCustomerKeys","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Keys"}}}},"/v1/partner/customers/{id}/keys/{keyId}":{"delete":{"operationId":"partnerRevokeCustomerKey","summary":"Revoke an API key of a customer; it stops working at once","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Revoked"},"404":{"description":"Customer or active key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/usage":{"get":{"operationId":"partnerUsage","summary":"Documents per customer for a month (JSON or CSV)","parameters":[{"name":"period","in":"query","schema":{"type":"string"}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"Usage per customer"}}}},"/v1/partner/customers/{id}/members":{"post":{"operationId":"partnerAddCustomerMember","summary":"Let a person sign in to a customer account (on your domain or ours)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer"]}}}}}},"responses":{"201":{"description":"Member"}}},"get":{"operationId":"partnerListCustomerMembers","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Members"}}}},"/v1/partner/customers/{id}/members/{userId}":{"delete":{"operationId":"partnerRemoveCustomerMember","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Removed; the person's sessions in this account end"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/domain":{"get":{"operationId":"partnerGetDomain","summary":"Your own domain for the dashboard, client request pages and widget","responses":{"200":{"description":"{ domain } or { domain: null }"}}},"put":{"operationId":"partnerSetDomain","summary":"Claim a hostname; the result lists the CNAME and TXT records to create","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["hostname"],"properties":{"hostname":{"type":"string","example":"invoices.example.com"}}}}}},"responses":{"200":{"description":"{ domain }"},"400":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Hostname in use by another organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"partnerRemoveDomain","responses":{"204":{"description":"Removed"}}}},"/v1/partner/domain/verify":{"post":{"operationId":"partnerVerifyDomain","summary":"Check DNS, then activation (certificate); at most 12 checks per hour","responses":{"200":{"description":"{ domain } with status pending, verified or active and lastError"},"429":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/monitoring":{"get":{"operationId":"getQualityReport","summary":"Validation quality: failure rate against the previous period, by day, format, API key and rule","parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":180,"default":30}}],"responses":{"200":{"description":"current, baseline, daily, formats, rules (isNew), integrations, latencyMs"}}}},"/v1/invoices/{id}/repairs":{"get":{"operationId":"listRepairs","summary":"Change log of repairs on a stored invoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"field, ruleId, from, to, category, confidence, approval, resultStatus, createdAt"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}/evidence":{"get":{"operationId":"getValidationEvidence","summary":"Signed record of the latest stored validation","description":"SHA-256 of the stored document, detected format, rule set versions, time and result (counts and rule ids), signed with HMAC-SHA256. No invoice content. Anyone can check a record with POST /public/evidence/verify; changing any field breaks the signature.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Validation evidence"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices/{id}/download":{"get":{"operationId":"downloadInvoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"query","schema":{"type":"string","enum":["original","converted"],"default":"original"}}],"responses":{"200":{"description":"Document","content":{"application/xml":{},"application/pdf":{}}},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/evidence/verify":{"post":{"operationId":"verifyValidationEvidence","summary":"Check a validation evidence record (no API key)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The record exactly as returned by /v1/invoices/{id}/evidence"}}}},"responses":{"200":{"description":"{ object: evidence_verification, valid, reason? }"}}}},"/v1/formats":{"get":{"operationId":"listFormats","responses":{"200":{"description":"Supported and planned formats"}}}},"/v1/formats/{format}/versions":{"get":{"operationId":"listFormatVersions","parameters":[{"name":"format","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Versions"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rules":{"get":{"operationId":"listRules","parameters":[{"name":"prefix","in":"query","schema":{"type":"string"}},{"name":"source","in":"query","schema":{"type":"string","enum":["EN16931","XRechnung"]}}],"responses":{"200":{"description":"Rules"}}}},"/v1/rules/{id}":{"get":{"operationId":"explainRule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Rule with explanation"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jobs/{id}":{"get":{"operationId":"getJob","summary":"Status and result of a background job or batch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","fr","es","it","pl","nl","pt"]},"description":"Language of explanations and suggestions in findings (overrides Accept-Language). Works on every endpoint that returns findings."},{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"},"description":"Language of explanations and suggestions in findings: de, fr, es, it, pl, nl or pt; English otherwise."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches":{"post":{"operationId":"createBatch","summary":"Validate up to 50 documents in one background job (Growth plan)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Retries with the same key return the stored response and are never metered twice (24 h)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["operation","documents"],"properties":{"operation":{"type":"string","enum":["validate"]},"documents":{"type":"array","maxItems":50,"items":{"type":"object","required":["document"],"properties":{"document":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]},"filename":{"type":"string"}}}}}}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"operationId":"getUsage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account":{"get":{"operationId":"getAccount","responses":{"200":{"description":"Organization, key and plan limits"}}}},"/v1/api_keys":{"get":{"operationId":"listApiKeys","responses":{"200":{"description":"Keys (no secrets)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createApiKey","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"livemode":{"type":"boolean"},"scopes":{"type":"array","items":{"type":"string"}},"expiresInDays":{"type":"integer"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan quota exceeded or plan required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Document too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Document cannot be processed (unsupported format, semantic loss, invalid source, …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Validation engine unavailable — retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api_keys/{id}":{"delete":{"operationId":"revokeApiKey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Revoked"},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api_keys/{id}/rotate":{"post":{"operationId":"rotateApiKey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"404":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp":{"post":{"operationId":"mcp","summary":"MCP Streamable HTTP endpoint (JSON-RPC; protocol 2026-07-28 and 2025 revisions). Auth: an API key with the mcp scope, or an OAuth access token. See /docs/mcp.","security":[{"bearerAuth":[]},{"mcpOAuth":["mcp"]}],"responses":{"200":{"description":"JSON-RPC response"},"401":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}