# Validate a sample UBL invoice

**Use case:** 

Run a ready-to-use sample UBL invoice through the validator and inspect the validation result.

## Input

```json
{
  "invoice_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n         xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n         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-001</cbc:ID>\n  <cbc:IssueDate>2026-09-22</cbc:IssueDate>\n  <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>\n  <cbc:BuyerReference>BUYER-1</cbc:BuyerReference>\n\n  <cac:AccountingSupplierParty>\n    <cac:Party>\n      <cbc:EndpointID schemeID=\"0088\">5790000000001</cbc:EndpointID>\n      <cac:PartyName>\n        <cbc:Name>Supplier Example</cbc:Name>\n      </cac:PartyName>\n      <cac:PostalAddress>\n        <cbc:StreetName>Supplier Street 1</cbc:StreetName>\n        <cbc:CityName>Brussels</cbc:CityName>\n        <cbc:PostalZone>1000</cbc:PostalZone>\n        <cac:Country>\n          <cbc:IdentificationCode>BE</cbc:IdentificationCode>\n        </cac:Country>\n      </cac:PostalAddress>\n      <cac:PartyTaxScheme>\n        <cbc:CompanyID>BE0123456789</cbc:CompanyID>\n        <cac:TaxScheme>\n          <cbc:ID>VAT</cbc:ID>\n        </cac:TaxScheme>\n      </cac:PartyTaxScheme>\n    </cac:Party>\n  </cac:AccountingSupplierParty>\n\n  <cac:AccountingCustomerParty>\n    <cac:Party>\n      <cbc:EndpointID schemeID=\"0088\">5790000000002</cbc:EndpointID>\n      <cac:PartyName>\n        <cbc:Name>Customer Example</cbc:Name>\n      </cac:PartyName>\n      <cac:PostalAddress>\n        <cbc:StreetName>Customer Street 2</cbc:StreetName>\n        <cbc:CityName>Brussels</cbc:CityName>\n        <cbc:PostalZone>1001</cbc:PostalZone>\n        <cac:Country>\n          <cbc:IdentificationCode>BE</cbc:IdentificationCode>\n        </cac:Country>\n      </cac:PostalAddress>\n      <cac:PartyTaxScheme>\n        <cbc:CompanyID>BE9876543210</cbc:CompanyID>\n        <cac:TaxScheme>\n          <cbc:ID>VAT</cbc:ID>\n        </cac:TaxScheme>\n      </cac:PartyTaxScheme>\n    </cac:Party>\n  </cac:AccountingCustomerParty>\n\n  <cac:TaxTotal>\n    <cbc:TaxAmount currencyID=\"EUR\">21.00</cbc:TaxAmount>\n    <cac:TaxSubtotal>\n      <cbc:TaxableAmount currencyID=\"EUR\">100.00</cbc:TaxableAmount>\n      <cbc:TaxAmount currencyID=\"EUR\">21.00</cbc:TaxAmount>\n      <cac:TaxCategory>\n        <cbc:ID>S</cbc:ID>\n        <cbc:Percent>21</cbc:Percent>\n        <cac:TaxScheme>\n          <cbc:ID>VAT</cbc:ID>\n        </cac:TaxScheme>\n      </cac:TaxCategory>\n    </cac:TaxSubtotal>\n  </cac:TaxTotal>\n\n  <cac:LegalMonetaryTotal>\n    <cbc:LineExtensionAmount currencyID=\"EUR\">100.00</cbc:LineExtensionAmount>\n    <cbc:TaxExclusiveAmount currencyID=\"EUR\">100.00</cbc:TaxExclusiveAmount>\n    <cbc:TaxInclusiveAmount currencyID=\"EUR\">121.00</cbc:TaxInclusiveAmount>\n    <cbc:PayableAmount currencyID=\"EUR\">121.00</cbc:PayableAmount>\n  </cac:LegalMonetaryTotal>\n\n  <cac:InvoiceLine>\n    <cbc:ID>1</cbc:ID>\n    <cbc:InvoicedQuantity unitCode=\"C62\">1</cbc:InvoicedQuantity>\n    <cbc:LineExtensionAmount currencyID=\"EUR\">100.00</cbc:LineExtensionAmount>\n    <cac:Item>\n      <cbc:Name>Example service</cbc:Name>\n    </cac:Item>\n    <cac:Price>\n      <cbc:PriceAmount currencyID=\"EUR\">100.00</cbc:PriceAmount>\n      <cbc:BaseQuantity unitCode=\"C62\">1</cbc:BaseQuantity>\n    </cac:Price>\n  </cac:InvoiceLine>\n</Invoice>",
  "reference": "sample-valid-invoice"
}
```

## Output

```json
{
  "reference": {
    "label": "Reference"
  },
  "document_type": {
    "label": "Document type"
  },
  "status": {
    "label": "Status"
  },
  "valid": {
    "label": "Valid"
  },
  "standard": {
    "label": "Standard"
  },
  "errors": {
    "label": "Errors"
  },
  "warnings": {
    "label": "Warnings"
  },
  "summary": {
    "label": "Summary"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The UBL Invoice Pre-Check for Peppol Actor is ready to run with the inputs already set for "Validate a sample UBL invoice". [Sign up or log in](https://console.apify.com/create-task-from-example/AX3f3O8lduwowm3hg) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Validate a sample UBL invoice" task

The UBL Invoice Pre-Check for Peppol Actor will start running based on the input automatically. You can also change all the input fields, like invoice xml and reference, to match your specific use case.

### 3. Receive the "Validate a sample UBL invoice" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as reference, document type, status, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Validate a sample UBL invoice" task via API](https://apify.com/al31si/peppol-bis-invoice-validator-staging.md).

## About this Actor

This example demonstrates how to use [UBL Invoice Pre-Check for Peppol](https://apify.com/al31si/peppol-bis-invoice-validator-staging.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/al31si/peppol-bis-invoice-validator-staging.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/al31si/peppol-bis-invoice-validator-staging.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
