{"openapi":"3.1.0","info":{"title":"SendStructured API","description":"API preview — not production-ready yet. Contracts may change before launch.","version":"0.1"},"paths":{"/api/v1/convert":{"post":{"summary":"Api Convert","operationId":"api_convert_api_v1_convert_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/extract":{"post":{"summary":"Extract invoice data from a PDF (no generation)","description":"Multipart upload; returns the canonical invoice JSON as extracted plus per-field confidence.\nBest-effort: a person should check the result before it is converted.","operationId":"api_extract_api_v1_extract_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_api_extract_api_v1_extract_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/convert-pdf":{"post":{"summary":"Extract from a PDF and convert in one call","description":"Multipart upload. If mandatory fields are missing after extraction the response is 422 with the\nextracted `invoice` and a `problems` list, so the caller can complete it and call /api/v1/convert.\nFor Factur-X the hybrid PDF is returned as `pdf_base64`.","operationId":"api_convert_pdf_api_v1_convert_pdf_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_api_convert_pdf_api_v1_convert_pdf_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/example":{"get":{"summary":"Api Example","operationId":"api_example_api_v1_example_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_api_convert_pdf_api_v1_convert_pdf_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"formats":{"type":"string","title":"Formats","default":"xrechnung,peppol,facturx"}},"type":"object","required":["file"],"title":"Body_api_convert_pdf_api_v1_convert_pdf_post"},"Body_api_extract_api_v1_extract_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_api_extract_api_v1_extract_post"},"ConvertRequest":{"properties":{"invoice":{"additionalProperties":true,"type":"object","title":"Invoice"},"formats":{"items":{"type":"string"},"type":"array","title":"Formats","default":["xrechnung"]}},"type":"object","required":["invoice"],"title":"ConvertRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}