{"openapi":"3.1.0","info":{"title":"Invoqk API","version":"1.0.0","description":"E-invoice validation and conversion, and invoice calculators. Get a key in Settings."},"servers":[{"url":"https://www.invoqk.com"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/api/v1/einvoice/validate":{"post":{"operationId":"validate_einvoice","summary":"Validate an e-invoice (XRechnung, Peppol BIS, EN 16931 UBL or CII XML, or the XML inside a ZUGFeRD PDF) against the official rules. Returns a verdict, errors, warnings and the parsed invoice. Nothing is stored.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"xml":{"description":"The e-invoice XML (XRechnung, UBL or CII) as text.","type":"string"},"pdfBase64":{"description":"A ZUGFeRD / Factur-X PDF, base64-encoded.","type":"string"}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/v1/einvoice/convert":{"post":{"operationId":"convert_to_einvoice","summary":"Turn invoice details into an XRechnung or Peppol BIS e-invoice XML. Plain text is read by rules (any plan). A PDF is read by AI and needs a Pro plan; it uses the same AI quota as the app. The result lists missing fields and validates the XML.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"description":"Invoice details as plain text, for example an email or a note.","type":"string"},"pdfBase64":{"description":"A PDF or scanned invoice, base64-encoded. Needs a Pro plan.","type":"string"},"profile":{"default":"xrechnung","type":"string","enum":["xrechnung","peppol"]}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/v1/calc/vat":{"post":{"operationId":"calculate_vat","summary":"Add or remove VAT, or apply reverse charge. Returns net, VAT and gross.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"amount":{"type":"number","minimum":0},"ratePercent":{"type":"number","minimum":0,"description":"VAT rate in percent, for example 19."},"mode":{"default":"net-to-gross","type":"string","enum":["net-to-gross","gross-to-net","reverse-charge"]}},"required":["amount","ratePercent"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/v1/calc/late-fee":{"post":{"operationId":"calculate_late_fee","summary":"Late payment fee on an overdue invoice, by a stated monthly percentage or the statutory rule (UK / EU directive).","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0},"currency":{"type":"string","enum":["USD","GBP","EUR"]},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"mode":{"type":"string","enum":["monthly","statutory"]},"monthlyPercent":{"description":"Monthly mode: your stated fee, percent per 30-day month.","type":"number","minimum":0},"basePercent":{"description":"Statutory mode: the reference base rate in percent.","type":"number","minimum":0},"marginPercent":{"description":"Statutory mode: margin over the base rate, 8 by default.","type":"number","minimum":0}},"required":["amount","currency","dueDate","asOf","mode"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/v1/calc/hourly":{"post":{"operationId":"calculate_hourly","summary":"Invoice total from hours, rate, expenses, discount and tax.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hours":{"type":"number","minimum":0},"rate":{"type":"number","minimum":0},"expenses":{"type":"number","minimum":0},"taxPercent":{"type":"number","minimum":0},"discountPercent":{"type":"number","minimum":0,"maximum":100}},"required":["hours","rate"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/v1/calc/markup":{"post":{"operationId":"calculate_markup","summary":"Markup and margin from cost and price, or the price from cost and markup percent.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"cost":{"type":"number","exclusiveMinimum":0},"price":{"type":"number","exclusiveMinimum":0},"markupPercent":{"type":"number","minimum":0}},"required":["cost"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/v1/calc/sales-tax":{"post":{"operationId":"calculate_sales_tax","summary":"Add or remove sales tax at a given rate. Returns net, tax and gross.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"amount":{"type":"number","minimum":0},"ratePercent":{"type":"number","minimum":0},"mode":{"default":"net-to-gross","type":"string","enum":["net-to-gross","gross-to-net"]}},"required":["amount","ratePercent"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}