{
  "openapi": "3.1.0",
  "info": {
    "title": "E-Invoice Checker API",
    "version": "1.0.0",
    "summary": "Detect, parse, validate, render and fix EU and international e-invoices.",
    "description": "One API for structured invoices: XRechnung (UBL/CII), ZUGFeRD 2.x / Factur-X (PDF or XML), Peppol BIS 3.0, EN 16931 UBL/CII, Polish KSeF FA(3), Croatian eRačun (HR CIUS 2025), Spanish Facturae 3.2.x and VERI*FACTU records / AEAT responses / QR URLs, Malaysian MyInvois (XML or UBL JSON). Validation uses the official rule sets (CEN EN 16931 schematron, KoSIT, OpenPeppol, Porezna uprava HR-CIUS, Facturae and AEAT XSD, LHDN SDK rules, KSeF FA(3)). Every error carries a rule id, message, XPath and a help link. Files are processed in memory and never stored.",
    "contact": {
      "name": "E-Invoice Checker support",
      "email": "support@einvoicechecker.com",
      "url": "https://einvoicechecker.com/contact/"
    },
    "termsOfService": "https://einvoicechecker.com/terms/"
  },
  "servers": [
    {
      "url": "https://einvoicechecker.com"
    }
  ],
  "externalDocs": {
    "description": "Developer documentation",
    "url": "https://einvoicechecker.com/developers/"
  },
  "security": [
    {
      "bearer": []
    },
    {
      "apiKey": []
    },
    {}
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key from /developers/ (free plan available)"
      },
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "paths": {
    "/v1/detect": {
      "post": {
        "operationId": "detectInvoice",
        "summary": "Detect format",
        "description": "Identify family, syntax, standard, profile and country of an e-invoice. Cheap first step.",
        "requestBody": {
          "required": true,
          "description": "The invoice: multipart field \"file\" (XML, PDF, JSON), the raw file as the request body, or JSON {\"xml\": \"...\"}. A MyInvois UBL JSON document can be posted as application/json directly; a VERI*FACTU QR URL as text/plain.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            },
            "application/xml": {
              "schema": {
                "type": "string"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "title": "Invoice as a string",
                    "properties": {
                      "xml": {
                        "type": "string",
                        "description": "The invoice XML (or a VERI*FACTU QR URL) as a string"
                      }
                    },
                    "required": [
                      "xml"
                    ]
                  },
                  {
                    "type": "object",
                    "title": "MyInvois UBL JSON document",
                    "description": "A Malaysian MyInvois invoice in UBL JSON syntax (with _D, _A, _B and Invoice)",
                    "properties": {
                      "_D": {
                        "type": "string"
                      },
                      "Invoice": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    },
                    "required": [
                      "_D",
                      "Invoice"
                    ]
                  }
                ]
              },
              "examples": {
                "peppol": {
                  "summary": "Peppol BIS 3.0 invoice with errors",
                  "value": {
                    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n    xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n    xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"><cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID><cbc:ID>Snippet1</cbc:ID><cbc:IssueDate>2017-11-13</cbc:IssueDate><cbc:DueDate>2017-12-01</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode><cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:AccountingCost>4025:123:4343</cbc:AccountingCost><cbc:BuyerReference>0150abc</cbc:BuyerReference><cac:AccountingSupplierParty><cac:Party><cbc:EndpointID schemeID=\"0088\">9482348239847239874</cbc:EndpointID><cac:PartyIdentification><cbc:ID>99887766</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>SupplierTradingName Ltd.</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Main street 1</cbc:StreetName><cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName><cbc:CityName>London</cbc:CityName><cbc:PostalZone>GB 123 EW</cbc:PostalZone><cac:Country><cbc:IdentificationCode>GB</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>GB1232434</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName><cbc:CompanyID>GB983294</cbc:CompanyID></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty><cac:AccountingCustomerParty><cac:Party><cbc:EndpointID schemeID=\"0002\">FR23342</cbc:EndpointID><cac:PartyIdentification><cbc:ID schemeID=\"0002\">FR23342</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>BuyerTradingName AS</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Hovedgatan 32</cbc:StreetName><cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>456 34</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>SE4598375937</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName><cbc:CompanyID schemeID=\"0183\">39937423947</cbc:CompanyID></cac:PartyLegalEntity><cac:Contact><cbc:Name>Lisa Johnson</cbc:Name><cbc:Telephone>23434234</cbc:Telephone><cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail></cac:Contact></cac:Party></cac:AccountingCustomerParty><cac:Delivery><cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate><cac:DeliveryLocation><cbc:ID schemeID=\"0088\">9483759475923478</cbc:ID><cac:Address><cbc:StreetName>Delivery street 2</cbc:StreetName><cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>21234</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:Address></cac:DeliveryLocation><cac:DeliveryParty><cac:PartyName><cbc:Name>Delivery party Name</cbc:Name></cac:PartyName></cac:DeliveryParty></cac:Delivery><cac:PaymentMeans><cbc:PaymentMeansCode name=\"Credit transfer\">30</cbc:PaymentMeansCode><cbc:PaymentID>Snippet1</cbc:PaymentID><cac:PayeeFinancialAccount><cbc:ID>IBAN32423940</cbc:ID><cbc:Name>AccountName</cbc:Name><cac:FinancialInstitutionBranch><cbc:ID>BIC324098</cbc:ID></cac:FinancialInstitutionBranch></cac:PayeeFinancialAccount></cac:PaymentMeans><cac:PaymentTerms><cbc:Note>Payment within 10 days, 2% discount</cbc:Note></cac:PaymentTerms><cac:AllowanceCharge><cbc:ChargeIndicator>true</cbc:ChargeIndicator><cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason><cbc:Amount currencyID=\"EUR\">25</cbc:Amount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:AllowanceCharge><cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">1325</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal></cac:TaxTotal><cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">1300</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">1325</cbc:TaxExclusiveAmount><cbc:TaxInclusiveAmount currencyID=\"EUR\">1666.25</cbc:TaxInclusiveAmount><cbc:ChargeTotalAmount currencyID=\"EUR\">25</cbc:ChargeTotalAmount><cbc:PayableAmount currencyID=\"EUR\">1666.25</cbc:PayableAmount></cac:LegalMonetaryTotal><cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:InvoicedQuantity unitCode=\"Tage\">7</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID= \"EUR\">2800</cbc:LineExtensionAmount><cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description of item</cbc:Description><cbc:Name>item name</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">400</cbc:PriceAmount></cac:Price></cac:InvoiceLine><cac:InvoiceLine><cbc:ID>2</cbc:ID><cbc:InvoicedQuantity unitCode=\"DAY\">-3</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID=\"EUR\">-1500</cbc:LineExtensionAmount><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description 2</cbc:Description><cbc:Name>item name 2</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">500</cbc:PriceAmount></cac:Price></cac:InvoiceLine></Invoice>"
                  }
                }
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "family": {
                          "type": "string",
                          "example": "en16931"
                        },
                        "syntax": {
                          "type": "string",
                          "example": "ubl"
                        },
                        "standard": {
                          "type": "string",
                          "example": "XRechnung"
                        },
                        "profile": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string",
                          "example": "DE"
                        },
                        "version": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string"
                        },
                        "embeddedFile": {
                          "type": "string"
                        },
                        "filename": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Not a recognised e-invoice, or a PDF without embedded XML",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or monthly quota reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/parse": {
      "post": {
        "operationId": "parseInvoice",
        "summary": "Parse to JSON",
        "description": "Normalise any supported invoice into one JSON model: parties, lines, VAT breakdown, totals, payment.",
        "requestBody": {
          "required": true,
          "description": "The invoice: multipart field \"file\" (XML, PDF, JSON), the raw file as the request body, or JSON {\"xml\": \"...\"}. A MyInvois UBL JSON document can be posted as application/json directly; a VERI*FACTU QR URL as text/plain.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            },
            "application/xml": {
              "schema": {
                "type": "string"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "title": "Invoice as a string",
                    "properties": {
                      "xml": {
                        "type": "string",
                        "description": "The invoice XML (or a VERI*FACTU QR URL) as a string"
                      }
                    },
                    "required": [
                      "xml"
                    ]
                  },
                  {
                    "type": "object",
                    "title": "MyInvois UBL JSON document",
                    "description": "A Malaysian MyInvois invoice in UBL JSON syntax (with _D, _A, _B and Invoice)",
                    "properties": {
                      "_D": {
                        "type": "string"
                      },
                      "Invoice": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    },
                    "required": [
                      "_D",
                      "Invoice"
                    ]
                  }
                ]
              },
              "examples": {
                "peppol": {
                  "summary": "Peppol BIS 3.0 invoice with errors",
                  "value": {
                    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n    xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n    xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"><cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID><cbc:ID>Snippet1</cbc:ID><cbc:IssueDate>2017-11-13</cbc:IssueDate><cbc:DueDate>2017-12-01</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode><cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:AccountingCost>4025:123:4343</cbc:AccountingCost><cbc:BuyerReference>0150abc</cbc:BuyerReference><cac:AccountingSupplierParty><cac:Party><cbc:EndpointID schemeID=\"0088\">9482348239847239874</cbc:EndpointID><cac:PartyIdentification><cbc:ID>99887766</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>SupplierTradingName Ltd.</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Main street 1</cbc:StreetName><cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName><cbc:CityName>London</cbc:CityName><cbc:PostalZone>GB 123 EW</cbc:PostalZone><cac:Country><cbc:IdentificationCode>GB</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>GB1232434</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName><cbc:CompanyID>GB983294</cbc:CompanyID></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty><cac:AccountingCustomerParty><cac:Party><cbc:EndpointID schemeID=\"0002\">FR23342</cbc:EndpointID><cac:PartyIdentification><cbc:ID schemeID=\"0002\">FR23342</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>BuyerTradingName AS</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Hovedgatan 32</cbc:StreetName><cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>456 34</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>SE4598375937</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName><cbc:CompanyID schemeID=\"0183\">39937423947</cbc:CompanyID></cac:PartyLegalEntity><cac:Contact><cbc:Name>Lisa Johnson</cbc:Name><cbc:Telephone>23434234</cbc:Telephone><cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail></cac:Contact></cac:Party></cac:AccountingCustomerParty><cac:Delivery><cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate><cac:DeliveryLocation><cbc:ID schemeID=\"0088\">9483759475923478</cbc:ID><cac:Address><cbc:StreetName>Delivery street 2</cbc:StreetName><cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>21234</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:Address></cac:DeliveryLocation><cac:DeliveryParty><cac:PartyName><cbc:Name>Delivery party Name</cbc:Name></cac:PartyName></cac:DeliveryParty></cac:Delivery><cac:PaymentMeans><cbc:PaymentMeansCode name=\"Credit transfer\">30</cbc:PaymentMeansCode><cbc:PaymentID>Snippet1</cbc:PaymentID><cac:PayeeFinancialAccount><cbc:ID>IBAN32423940</cbc:ID><cbc:Name>AccountName</cbc:Name><cac:FinancialInstitutionBranch><cbc:ID>BIC324098</cbc:ID></cac:FinancialInstitutionBranch></cac:PayeeFinancialAccount></cac:PaymentMeans><cac:PaymentTerms><cbc:Note>Payment within 10 days, 2% discount</cbc:Note></cac:PaymentTerms><cac:AllowanceCharge><cbc:ChargeIndicator>true</cbc:ChargeIndicator><cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason><cbc:Amount currencyID=\"EUR\">25</cbc:Amount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:AllowanceCharge><cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">1325</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal></cac:TaxTotal><cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">1300</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">1325</cbc:TaxExclusiveAmount><cbc:TaxInclusiveAmount currencyID=\"EUR\">1666.25</cbc:TaxInclusiveAmount><cbc:ChargeTotalAmount currencyID=\"EUR\">25</cbc:ChargeTotalAmount><cbc:PayableAmount currencyID=\"EUR\">1666.25</cbc:PayableAmount></cac:LegalMonetaryTotal><cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:InvoicedQuantity unitCode=\"Tage\">7</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID= \"EUR\">2800</cbc:LineExtensionAmount><cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description of item</cbc:Description><cbc:Name>item name</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">400</cbc:PriceAmount></cac:Price></cac:InvoiceLine><cac:InvoiceLine><cbc:ID>2</cbc:ID><cbc:InvoicedQuantity unitCode=\"DAY\">-3</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID=\"EUR\">-1500</cbc:LineExtensionAmount><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description 2</cbc:Description><cbc:Name>item name 2</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">500</cbc:PriceAmount></cac:Price></cac:InvoiceLine></Invoice>"
                  }
                }
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "format": {
                      "type": "object",
                      "properties": {
                        "family": {
                          "type": "string",
                          "example": "en16931"
                        },
                        "syntax": {
                          "type": "string",
                          "example": "ubl"
                        },
                        "standard": {
                          "type": "string",
                          "example": "XRechnung"
                        },
                        "profile": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string",
                          "example": "DE"
                        },
                        "version": {
                          "type": "string"
                        }
                      }
                    },
                    "invoice": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Not a recognised e-invoice, or a PDF without embedded XML",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or monthly quota reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/validate": {
      "post": {
        "operationId": "validateInvoice",
        "summary": "Validate",
        "description": "Run every rule set that applies to the detected format and return one merged report.",
        "requestBody": {
          "required": true,
          "description": "The invoice: multipart field \"file\" (XML, PDF, JSON), the raw file as the request body, or JSON {\"xml\": \"...\"}. A MyInvois UBL JSON document can be posted as application/json directly; a VERI*FACTU QR URL as text/plain.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            },
            "application/xml": {
              "schema": {
                "type": "string"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "title": "Invoice as a string",
                    "properties": {
                      "xml": {
                        "type": "string",
                        "description": "The invoice XML (or a VERI*FACTU QR URL) as a string"
                      }
                    },
                    "required": [
                      "xml"
                    ]
                  },
                  {
                    "type": "object",
                    "title": "MyInvois UBL JSON document",
                    "description": "A Malaysian MyInvois invoice in UBL JSON syntax (with _D, _A, _B and Invoice)",
                    "properties": {
                      "_D": {
                        "type": "string"
                      },
                      "Invoice": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    },
                    "required": [
                      "_D",
                      "Invoice"
                    ]
                  }
                ]
              },
              "examples": {
                "peppol": {
                  "summary": "Peppol BIS 3.0 invoice with errors",
                  "value": {
                    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n    xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n    xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"><cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID><cbc:ID>Snippet1</cbc:ID><cbc:IssueDate>2017-11-13</cbc:IssueDate><cbc:DueDate>2017-12-01</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode><cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:AccountingCost>4025:123:4343</cbc:AccountingCost><cbc:BuyerReference>0150abc</cbc:BuyerReference><cac:AccountingSupplierParty><cac:Party><cbc:EndpointID schemeID=\"0088\">9482348239847239874</cbc:EndpointID><cac:PartyIdentification><cbc:ID>99887766</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>SupplierTradingName Ltd.</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Main street 1</cbc:StreetName><cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName><cbc:CityName>London</cbc:CityName><cbc:PostalZone>GB 123 EW</cbc:PostalZone><cac:Country><cbc:IdentificationCode>GB</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>GB1232434</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName><cbc:CompanyID>GB983294</cbc:CompanyID></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty><cac:AccountingCustomerParty><cac:Party><cbc:EndpointID schemeID=\"0002\">FR23342</cbc:EndpointID><cac:PartyIdentification><cbc:ID schemeID=\"0002\">FR23342</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>BuyerTradingName AS</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Hovedgatan 32</cbc:StreetName><cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>456 34</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>SE4598375937</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName><cbc:CompanyID schemeID=\"0183\">39937423947</cbc:CompanyID></cac:PartyLegalEntity><cac:Contact><cbc:Name>Lisa Johnson</cbc:Name><cbc:Telephone>23434234</cbc:Telephone><cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail></cac:Contact></cac:Party></cac:AccountingCustomerParty><cac:Delivery><cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate><cac:DeliveryLocation><cbc:ID schemeID=\"0088\">9483759475923478</cbc:ID><cac:Address><cbc:StreetName>Delivery street 2</cbc:StreetName><cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>21234</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:Address></cac:DeliveryLocation><cac:DeliveryParty><cac:PartyName><cbc:Name>Delivery party Name</cbc:Name></cac:PartyName></cac:DeliveryParty></cac:Delivery><cac:PaymentMeans><cbc:PaymentMeansCode name=\"Credit transfer\">30</cbc:PaymentMeansCode><cbc:PaymentID>Snippet1</cbc:PaymentID><cac:PayeeFinancialAccount><cbc:ID>IBAN32423940</cbc:ID><cbc:Name>AccountName</cbc:Name><cac:FinancialInstitutionBranch><cbc:ID>BIC324098</cbc:ID></cac:FinancialInstitutionBranch></cac:PayeeFinancialAccount></cac:PaymentMeans><cac:PaymentTerms><cbc:Note>Payment within 10 days, 2% discount</cbc:Note></cac:PaymentTerms><cac:AllowanceCharge><cbc:ChargeIndicator>true</cbc:ChargeIndicator><cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason><cbc:Amount currencyID=\"EUR\">25</cbc:Amount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:AllowanceCharge><cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">1325</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal></cac:TaxTotal><cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">1300</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">1325</cbc:TaxExclusiveAmount><cbc:TaxInclusiveAmount currencyID=\"EUR\">1666.25</cbc:TaxInclusiveAmount><cbc:ChargeTotalAmount currencyID=\"EUR\">25</cbc:ChargeTotalAmount><cbc:PayableAmount currencyID=\"EUR\">1666.25</cbc:PayableAmount></cac:LegalMonetaryTotal><cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:InvoicedQuantity unitCode=\"Tage\">7</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID= \"EUR\">2800</cbc:LineExtensionAmount><cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description of item</cbc:Description><cbc:Name>item name</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">400</cbc:PriceAmount></cac:Price></cac:InvoiceLine><cac:InvoiceLine><cbc:ID>2</cbc:ID><cbc:InvoicedQuantity unitCode=\"DAY\">-3</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID=\"EUR\">-1500</cbc:LineExtensionAmount><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description 2</cbc:Description><cbc:Name>item name 2</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">500</cbc:PriceAmount></cac:Price></cac:InvoiceLine></Invoice>"
                  }
                }
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "format": {
                      "type": "object",
                      "properties": {
                        "family": {
                          "type": "string",
                          "example": "en16931"
                        },
                        "syntax": {
                          "type": "string",
                          "example": "ubl"
                        },
                        "standard": {
                          "type": "string",
                          "example": "XRechnung"
                        },
                        "profile": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string",
                          "example": "DE"
                        },
                        "version": {
                          "type": "string"
                        }
                      }
                    },
                    "valid": {
                      "type": "boolean"
                    },
                    "checks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "engine": {
                            "type": "string"
                          },
                          "valid": {
                            "type": "boolean"
                          },
                          "errors": {
                            "type": "integer"
                          },
                          "skipped": {
                            "type": "boolean"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string"
                          },
                          "rule": {
                            "type": "string",
                            "example": "BR-DE-15"
                          },
                          "message": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "help": {
                            "type": "string",
                            "format": "uri",
                            "description": "Page explaining the rule and how to fix it"
                          }
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string"
                          },
                          "rule": {
                            "type": "string",
                            "example": "BR-DE-15"
                          },
                          "message": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "help": {
                            "type": "string",
                            "format": "uri",
                            "description": "Page explaining the rule and how to fix it"
                          }
                        }
                      }
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "xml",
                        "pdf",
                        "json",
                        "url"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Not a recognised e-invoice, or a PDF without embedded XML",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or monthly quota reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "kosit",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "Run the KoSIT validator for XRechnung/ZUGFeRD/Factur-X"
          }
        ]
      }
    },
    "/v1/render": {
      "post": {
        "operationId": "renderInvoice",
        "summary": "Render HTML or PDF",
        "description": "Human-readable invoice. format=pdf costs 2 units.",
        "requestBody": {
          "required": true,
          "description": "The invoice: multipart field \"file\" (XML, PDF, JSON), the raw file as the request body, or JSON {\"xml\": \"...\"}. A MyInvois UBL JSON document can be posted as application/json directly; a VERI*FACTU QR URL as text/plain.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            },
            "application/xml": {
              "schema": {
                "type": "string"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "title": "Invoice as a string",
                    "properties": {
                      "xml": {
                        "type": "string",
                        "description": "The invoice XML (or a VERI*FACTU QR URL) as a string"
                      }
                    },
                    "required": [
                      "xml"
                    ]
                  },
                  {
                    "type": "object",
                    "title": "MyInvois UBL JSON document",
                    "description": "A Malaysian MyInvois invoice in UBL JSON syntax (with _D, _A, _B and Invoice)",
                    "properties": {
                      "_D": {
                        "type": "string"
                      },
                      "Invoice": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    },
                    "required": [
                      "_D",
                      "Invoice"
                    ]
                  }
                ]
              },
              "examples": {
                "peppol": {
                  "summary": "Peppol BIS 3.0 invoice with errors",
                  "value": {
                    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n    xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n    xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"><cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID><cbc:ID>Snippet1</cbc:ID><cbc:IssueDate>2017-11-13</cbc:IssueDate><cbc:DueDate>2017-12-01</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode><cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:AccountingCost>4025:123:4343</cbc:AccountingCost><cbc:BuyerReference>0150abc</cbc:BuyerReference><cac:AccountingSupplierParty><cac:Party><cbc:EndpointID schemeID=\"0088\">9482348239847239874</cbc:EndpointID><cac:PartyIdentification><cbc:ID>99887766</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>SupplierTradingName Ltd.</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Main street 1</cbc:StreetName><cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName><cbc:CityName>London</cbc:CityName><cbc:PostalZone>GB 123 EW</cbc:PostalZone><cac:Country><cbc:IdentificationCode>GB</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>GB1232434</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName><cbc:CompanyID>GB983294</cbc:CompanyID></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty><cac:AccountingCustomerParty><cac:Party><cbc:EndpointID schemeID=\"0002\">FR23342</cbc:EndpointID><cac:PartyIdentification><cbc:ID schemeID=\"0002\">FR23342</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>BuyerTradingName AS</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Hovedgatan 32</cbc:StreetName><cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>456 34</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>SE4598375937</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName><cbc:CompanyID schemeID=\"0183\">39937423947</cbc:CompanyID></cac:PartyLegalEntity><cac:Contact><cbc:Name>Lisa Johnson</cbc:Name><cbc:Telephone>23434234</cbc:Telephone><cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail></cac:Contact></cac:Party></cac:AccountingCustomerParty><cac:Delivery><cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate><cac:DeliveryLocation><cbc:ID schemeID=\"0088\">9483759475923478</cbc:ID><cac:Address><cbc:StreetName>Delivery street 2</cbc:StreetName><cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>21234</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:Address></cac:DeliveryLocation><cac:DeliveryParty><cac:PartyName><cbc:Name>Delivery party Name</cbc:Name></cac:PartyName></cac:DeliveryParty></cac:Delivery><cac:PaymentMeans><cbc:PaymentMeansCode name=\"Credit transfer\">30</cbc:PaymentMeansCode><cbc:PaymentID>Snippet1</cbc:PaymentID><cac:PayeeFinancialAccount><cbc:ID>IBAN32423940</cbc:ID><cbc:Name>AccountName</cbc:Name><cac:FinancialInstitutionBranch><cbc:ID>BIC324098</cbc:ID></cac:FinancialInstitutionBranch></cac:PayeeFinancialAccount></cac:PaymentMeans><cac:PaymentTerms><cbc:Note>Payment within 10 days, 2% discount</cbc:Note></cac:PaymentTerms><cac:AllowanceCharge><cbc:ChargeIndicator>true</cbc:ChargeIndicator><cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason><cbc:Amount currencyID=\"EUR\">25</cbc:Amount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:AllowanceCharge><cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">1325</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal></cac:TaxTotal><cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">1300</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">1325</cbc:TaxExclusiveAmount><cbc:TaxInclusiveAmount currencyID=\"EUR\">1666.25</cbc:TaxInclusiveAmount><cbc:ChargeTotalAmount currencyID=\"EUR\">25</cbc:ChargeTotalAmount><cbc:PayableAmount currencyID=\"EUR\">1666.25</cbc:PayableAmount></cac:LegalMonetaryTotal><cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:InvoicedQuantity unitCode=\"Tage\">7</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID= \"EUR\">2800</cbc:LineExtensionAmount><cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description of item</cbc:Description><cbc:Name>item name</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">400</cbc:PriceAmount></cac:Price></cac:InvoiceLine><cac:InvoiceLine><cbc:ID>2</cbc:ID><cbc:InvoicedQuantity unitCode=\"DAY\">-3</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID=\"EUR\">-1500</cbc:LineExtensionAmount><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description 2</cbc:Description><cbc:Name>item name 2</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">500</cbc:PriceAmount></cac:Price></cac:InvoiceLine></Invoice>"
                  }
                }
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rendered invoice",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "pl",
                "nl",
                "hr",
                "es"
              ],
              "default": "en"
            },
            "description": "Label language of the rendered invoice"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "html",
                "pdf"
              ],
              "default": "html"
            }
          }
        ]
      }
    },
    "/v1/inspect": {
      "post": {
        "operationId": "inspectInvoice",
        "summary": "Inspect (parse + validate + render)",
        "description": "Everything the web tool shows in one call: format, parsed invoice, validation report and HTML.",
        "requestBody": {
          "required": true,
          "description": "The invoice: multipart field \"file\" (XML, PDF, JSON), the raw file as the request body, or JSON {\"xml\": \"...\"}. A MyInvois UBL JSON document can be posted as application/json directly; a VERI*FACTU QR URL as text/plain.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            },
            "application/xml": {
              "schema": {
                "type": "string"
              }
            },
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "title": "Invoice as a string",
                    "properties": {
                      "xml": {
                        "type": "string",
                        "description": "The invoice XML (or a VERI*FACTU QR URL) as a string"
                      }
                    },
                    "required": [
                      "xml"
                    ]
                  },
                  {
                    "type": "object",
                    "title": "MyInvois UBL JSON document",
                    "description": "A Malaysian MyInvois invoice in UBL JSON syntax (with _D, _A, _B and Invoice)",
                    "properties": {
                      "_D": {
                        "type": "string"
                      },
                      "Invoice": {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    },
                    "required": [
                      "_D",
                      "Invoice"
                    ]
                  }
                ]
              },
              "examples": {
                "peppol": {
                  "summary": "Peppol BIS 3.0 invoice with errors",
                  "value": {
                    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n    xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n    xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"><cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID><cbc:ID>Snippet1</cbc:ID><cbc:IssueDate>2017-11-13</cbc:IssueDate><cbc:DueDate>2017-12-01</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode><cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:AccountingCost>4025:123:4343</cbc:AccountingCost><cbc:BuyerReference>0150abc</cbc:BuyerReference><cac:AccountingSupplierParty><cac:Party><cbc:EndpointID schemeID=\"0088\">9482348239847239874</cbc:EndpointID><cac:PartyIdentification><cbc:ID>99887766</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>SupplierTradingName Ltd.</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Main street 1</cbc:StreetName><cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName><cbc:CityName>London</cbc:CityName><cbc:PostalZone>GB 123 EW</cbc:PostalZone><cac:Country><cbc:IdentificationCode>GB</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>GB1232434</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName><cbc:CompanyID>GB983294</cbc:CompanyID></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty><cac:AccountingCustomerParty><cac:Party><cbc:EndpointID schemeID=\"0002\">FR23342</cbc:EndpointID><cac:PartyIdentification><cbc:ID schemeID=\"0002\">FR23342</cbc:ID></cac:PartyIdentification><cac:PartyName><cbc:Name>BuyerTradingName AS</cbc:Name></cac:PartyName><cac:PostalAddress><cbc:StreetName>Hovedgatan 32</cbc:StreetName><cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>456 34</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:PostalAddress><cac:PartyTaxScheme><cbc:CompanyID>SE4598375937</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme><cac:PartyLegalEntity><cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName><cbc:CompanyID schemeID=\"0183\">39937423947</cbc:CompanyID></cac:PartyLegalEntity><cac:Contact><cbc:Name>Lisa Johnson</cbc:Name><cbc:Telephone>23434234</cbc:Telephone><cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail></cac:Contact></cac:Party></cac:AccountingCustomerParty><cac:Delivery><cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate><cac:DeliveryLocation><cbc:ID schemeID=\"0088\">9483759475923478</cbc:ID><cac:Address><cbc:StreetName>Delivery street 2</cbc:StreetName><cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName><cbc:CityName>Stockholm</cbc:CityName><cbc:PostalZone>21234</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SE</cbc:IdentificationCode></cac:Country></cac:Address></cac:DeliveryLocation><cac:DeliveryParty><cac:PartyName><cbc:Name>Delivery party Name</cbc:Name></cac:PartyName></cac:DeliveryParty></cac:Delivery><cac:PaymentMeans><cbc:PaymentMeansCode name=\"Credit transfer\">30</cbc:PaymentMeansCode><cbc:PaymentID>Snippet1</cbc:PaymentID><cac:PayeeFinancialAccount><cbc:ID>IBAN32423940</cbc:ID><cbc:Name>AccountName</cbc:Name><cac:FinancialInstitutionBranch><cbc:ID>BIC324098</cbc:ID></cac:FinancialInstitutionBranch></cac:PayeeFinancialAccount></cac:PaymentMeans><cac:PaymentTerms><cbc:Note>Payment within 10 days, 2% discount</cbc:Note></cac:PaymentTerms><cac:AllowanceCharge><cbc:ChargeIndicator>true</cbc:ChargeIndicator><cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason><cbc:Amount currencyID=\"EUR\">25</cbc:Amount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:AllowanceCharge><cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">1325</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">331.25</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal></cac:TaxTotal><cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">1300</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">1325</cbc:TaxExclusiveAmount><cbc:TaxInclusiveAmount currencyID=\"EUR\">1666.25</cbc:TaxInclusiveAmount><cbc:ChargeTotalAmount currencyID=\"EUR\">25</cbc:ChargeTotalAmount><cbc:PayableAmount currencyID=\"EUR\">1666.25</cbc:PayableAmount></cac:LegalMonetaryTotal><cac:InvoiceLine><cbc:ID>1</cbc:ID><cbc:InvoicedQuantity unitCode=\"Tage\">7</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID= \"EUR\">2800</cbc:LineExtensionAmount><cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description of item</cbc:Description><cbc:Name>item name</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">400</cbc:PriceAmount></cac:Price></cac:InvoiceLine><cac:InvoiceLine><cbc:ID>2</cbc:ID><cbc:InvoicedQuantity unitCode=\"DAY\">-3</cbc:InvoicedQuantity><cbc:LineExtensionAmount currencyID=\"EUR\">-1500</cbc:LineExtensionAmount><cac:OrderLineReference><cbc:LineID>123</cbc:LineID></cac:OrderLineReference><cac:Item><cbc:Description>Description 2</cbc:Description><cbc:Name>item name 2</cbc:Name><cac:StandardItemIdentification><cbc:ID schemeID=\"0088\">21382183120983</cbc:ID></cac:StandardItemIdentification><cac:OriginCountry><cbc:IdentificationCode>NO</cbc:IdentificationCode></cac:OriginCountry><cac:CommodityClassification><cbc:ItemClassificationCode listID=\"SRV\">09348023</cbc:ItemClassificationCode></cac:CommodityClassification><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>25.0</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item><cac:Price><cbc:PriceAmount currencyID=\"EUR\">500</cbc:PriceAmount></cac:Price></cac:InvoiceLine></Invoice>"
                  }
                }
              }
            },
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "format": {
                      "type": "object",
                      "properties": {
                        "family": {
                          "type": "string",
                          "example": "en16931"
                        },
                        "syntax": {
                          "type": "string",
                          "example": "ubl"
                        },
                        "standard": {
                          "type": "string",
                          "example": "XRechnung"
                        },
                        "profile": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string",
                          "example": "DE"
                        },
                        "version": {
                          "type": "string"
                        }
                      }
                    },
                    "invoice": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "validation": {
                      "type": "object",
                      "properties": {
                        "format": {
                          "type": "object",
                          "properties": {
                            "family": {
                              "type": "string",
                              "example": "en16931"
                            },
                            "syntax": {
                              "type": "string",
                              "example": "ubl"
                            },
                            "standard": {
                              "type": "string",
                              "example": "XRechnung"
                            },
                            "profile": {
                              "type": "string"
                            },
                            "country": {
                              "type": "string",
                              "example": "DE"
                            },
                            "version": {
                              "type": "string"
                            }
                          }
                        },
                        "valid": {
                          "type": "boolean"
                        },
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "engine": {
                                "type": "string"
                              },
                              "valid": {
                                "type": "boolean"
                              },
                              "errors": {
                                "type": "integer"
                              },
                              "skipped": {
                                "type": "boolean"
                              },
                              "reason": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string"
                              },
                              "rule": {
                                "type": "string",
                                "example": "BR-DE-15"
                              },
                              "message": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              },
                              "help": {
                                "type": "string",
                                "format": "uri",
                                "description": "Page explaining the rule and how to fix it"
                              }
                            }
                          }
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string"
                              },
                              "rule": {
                                "type": "string",
                                "example": "BR-DE-15"
                              },
                              "message": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              },
                              "help": {
                                "type": "string",
                                "format": "uri",
                                "description": "Page explaining the rule and how to fix it"
                              }
                            }
                          }
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "xml",
                            "pdf",
                            "json",
                            "url"
                          ]
                        }
                      }
                    },
                    "html": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Not a recognised e-invoice, or a PDF without embedded XML",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or monthly quota reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "pl",
                "nl",
                "hr",
                "es"
              ],
              "default": "en"
            },
            "description": "Label language of the rendered invoice"
          }
        ]
      }
    },
    "/v1/fix": {
      "post": {
        "operationId": "fixInvoice",
        "summary": "Auto-fix (EN 16931)",
        "description": "Correct fixable errors of an EN 16931 invoice. dry_run=1 lists the proposed changes (1 unit); applying costs 2 units.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "xml": {
                    "type": "string"
                  },
                  "values": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "totals": {
                        "type": "boolean"
                      }
                    }
                  }
                },
                "required": [
                  "xml"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid_before": {
                      "type": "boolean"
                    },
                    "valid_after": {
                      "type": "boolean"
                    },
                    "applied": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "remaining_errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string"
                          },
                          "rule": {
                            "type": "string",
                            "example": "BR-DE-15"
                          },
                          "message": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "help": {
                            "type": "string",
                            "format": "uri",
                            "description": "Page explaining the rule and how to fix it"
                          }
                        }
                      }
                    },
                    "xml": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Not a recognised e-invoice, or a PDF without embedded XML",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or monthly quota reached",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "dry_run",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "getUsage",
        "summary": "Plan and usage of the API key",
        "security": [
          {
            "bearer": []
          },
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "plan": {
                      "type": "string"
                    },
                    "monthly_quota": {
                      "type": "integer"
                    },
                    "used_this_month": {
                      "type": "integer"
                    },
                    "remaining": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}