{
  "name": "CrateAPI - Validate a UBL invoice (free)",
  "nodes": [
    {
      "parameters": {},
      "id": "e9754fbf-467a-4211-8eba-3c43a99c448d",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.crateapi.com/v1/validate/ubl",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/xml"
            },
            {
              "name": "X-CrateAPI-Source",
              "value": "n8n"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/xml",
        "body": "<?xml version='1.0' encoding='UTF-8'?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>\n  <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>\n  <cbc:ID>INV-2026-1001</cbc:ID>\n  <cbc:IssueDate>2026-07-28</cbc:IssueDate>\n  <cbc:DueDate>2026-08-27</cbc:DueDate>\n  <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n  <cbc:Note>Fictitious sample invoice generated by the CrateAPI e-invoicing engine.</cbc:Note>\n  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>\n  <cbc:BuyerReference>PO-4711</cbc:BuyerReference>\n  <cac:AccountingSupplierParty>\n    <cac:Party>\n      <cbc:EndpointID schemeID=\"0088\">9482348239847239874</cbc:EndpointID>\n      <cac:PostalAddress>\n        <cbc:StreetName>Main Street 1</cbc:StreetName>\n        <cbc:CityName>London</cbc:CityName>\n        <cbc:PostalZone>W1A 1AA</cbc:PostalZone>\n        <cac:Country>\n          <cbc:IdentificationCode>GB</cbc:IdentificationCode>\n        </cac:Country>\n      </cac:PostalAddress>\n      <cac:PartyTaxScheme>\n        <cbc:CompanyID>GB123243456</cbc:CompanyID>\n        <cac:TaxScheme>\n          <cbc:ID>VAT</cbc:ID>\n        </cac:TaxScheme>\n      </cac:PartyTaxScheme>\n      <cac:PartyLegalEntity>\n        <cbc:RegistrationName>Acme Supplies Ltd</cbc:RegistrationName>\n      </cac:PartyLegalEntity>\n      <cac:Contact>\n        <cbc:Name>Jane Smith</cbc:Name>\n        <cbc:Telephone>+44 20 1234 5678</cbc:Telephone>\n        <cbc:ElectronicMail>billing@acme.example</cbc:ElectronicMail>\n      </cac:Contact>\n    </cac:Party>\n  </cac:AccountingSupplierParty>\n  <cac:AccountingCustomerParty>\n    <cac:Party>\n      <cbc:EndpointID schemeID=\"0002\">FR23342</cbc:EndpointID>\n      <cac:PostalAddress>\n        <cbc:StreetName>Storgatan 12</cbc:StreetName>\n        <cbc:CityName>Stockholm</cbc:CityName>\n        <cbc:PostalZone>11122</cbc:PostalZone>\n        <cac:Country>\n          <cbc:IdentificationCode>SE</cbc:IdentificationCode>\n        </cac:Country>\n      </cac:PostalAddress>\n      <cac:PartyTaxScheme>\n        <cbc:CompanyID>SE459837593701</cbc:CompanyID>\n        <cac:TaxScheme>\n          <cbc:ID>VAT</cbc:ID>\n        </cac:TaxScheme>\n      </cac:PartyTaxScheme>\n      <cac:PartyLegalEntity>\n        <cbc:RegistrationName>Nordic Retail AB</cbc:RegistrationName>\n      </cac:PartyLegalEntity>\n    </cac:Party>\n  </cac:AccountingCustomerParty>\n  <cac:PaymentMeans>\n    <cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>\n    <cbc:PaymentID>INV-2026-1001</cbc:PaymentID>\n    <cac:PayeeFinancialAccount>\n      <cbc:ID>GB33BUKB20201555555555</cbc:ID>\n      <cac:FinancialInstitutionBranch>\n        <cbc:ID>BUKBGB22</cbc:ID>\n      </cac:FinancialInstitutionBranch>\n    </cac:PayeeFinancialAccount>\n  </cac:PaymentMeans>\n  <cac:PaymentTerms>\n    <cbc:Note>Net 30</cbc:Note>\n  </cac:PaymentTerms>\n  <cac:TaxTotal>\n    <cbc:TaxAmount currencyID=\"EUR\">218.75</cbc:TaxAmount>\n    <cac:TaxSubtotal>\n      <cbc:TaxableAmount currencyID=\"EUR\">875.00</cbc:TaxableAmount>\n      <cbc:TaxAmount currencyID=\"EUR\">218.75</cbc:TaxAmount>\n      <cac:TaxCategory>\n        <cbc:ID>S</cbc:ID>\n        <cbc:Percent>25.00</cbc:Percent>\n        <cac:TaxScheme>\n          <cbc:ID>VAT</cbc:ID>\n        </cac:TaxScheme>\n      </cac:TaxCategory>\n    </cac:TaxSubtotal>\n  </cac:TaxTotal>\n  <cac:LegalMonetaryTotal>\n    <cbc:LineExtensionAmount currencyID=\"EUR\">875.00</cbc:LineExtensionAmount>\n    <cbc:TaxExclusiveAmount currencyID=\"EUR\">875.00</cbc:TaxExclusiveAmount>\n    <cbc:TaxInclusiveAmount currencyID=\"EUR\">1093.75</cbc:TaxInclusiveAmount>\n    <cbc:PayableAmount currencyID=\"EUR\">1093.75</cbc:PayableAmount>\n  </cac:LegalMonetaryTotal>\n  <cac:InvoiceLine>\n    <cbc:ID>1</cbc:ID>\n    <cbc:InvoicedQuantity unitCode=\"C62\">10</cbc:InvoicedQuantity>\n    <cbc:LineExtensionAmount currencyID=\"EUR\">455.00</cbc:LineExtensionAmount>\n    <cac:Item>\n      <cbc:Description>Industrial widget, class A</cbc:Description>\n      <cbc:Name>Widget Pro</cbc:Name>\n      <cac:ClassifiedTaxCategory>\n        <cbc:ID>S</cbc:ID>\n        <cbc:Percent>25.00</cbc:Percent>\n        <cac:TaxScheme>\n          <cbc:ID>VAT</cbc:ID>\n        </cac:TaxScheme>\n      </cac:ClassifiedTaxCategory>\n    </cac:Item>\n    <cac:Price>\n      <cbc:PriceAmount currencyID=\"EUR\">45.50</cbc:PriceAmount>\n    </cac:Price>\n  </cac:InvoiceLine>\n  <cac:InvoiceLine>\n    <cbc:ID>2</cbc:ID>\n    <cbc:InvoicedQuantity unitCode=\"HUR\">3.5</cbc:InvoicedQuantity>\n    <cbc:LineExtensionAmount currencyID=\"EUR\">420.00</cbc:LineExtensionAmount>\n    <cac:Item>\n      <cbc:Name>Installation service</cbc:Name>\n      <cac:ClassifiedTaxCategory>\n        <cbc:ID>S</cbc:ID>\n        <cbc:Percent>25.00</cbc:Percent>\n        <cac:TaxScheme>\n          <cbc:ID>VAT</cbc:ID>\n        </cac:TaxScheme>\n      </cac:ClassifiedTaxCategory>\n    </cac:Item>\n    <cac:Price>\n      <cbc:PriceAmount currencyID=\"EUR\">120.00</cbc:PriceAmount>\n    </cac:Price>\n  </cac:InvoiceLine>\n</Invoice>\n",
        "options": {}
      },
      "id": "0568dcbc-1057-45c1-90b4-207895b56af7",
      "name": "Call CrateAPI",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        460,
        300
      ]
    }
  ],
  "connections": {
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Call CrateAPI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "instanceId": "crateapi-template"
  }
}
