# E-Invoice Check (`eloquent_mountain/einvoice-check`) Actor

Peppol UBL invoices built and checked against the official EN 16931 and Peppol rules, with the failing rules named.

- **URL**: https://apify.com/eloquent_mountain/einvoice-check.md
- **Developed by:** [Paco](https://apify.com/eloquent_mountain) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## E-Invoice Check

Peppol UBL invoices built and checked against the official EN 16931 and Peppol rules, with the failing rules named.

### Who it's for

Bookkeepers and finance admins of small businesses in Belgium (structured e-invoices over Peppol are compulsory for domestic B2B since 2026) and Dutch suppliers invoicing government. Use it for your own sales invoices, which you issue yourself, and to check structured invoices you receive.

### What you get

Two tools. Validate takes up to 20 UBL invoice files and runs each through the UBL 2.1 schema, the EN 16931 rules and the Peppol BIS Billing 3.0 rules, all as published and not re-written. Each file gets a verdict (valid, invalid, not verified, not parsed), the failing rules in the rule's own words, where they fail, and which input to change. A batch summary shows the most common failing rules, so you fix your template once.

Build takes up to 5 invoices as fields (your assistant reads them from your PDF or accounting export), computes the VAT and totals, writes the Peppol UBL file and checks its own output against the same rules before returning it. A file that fails comes back with its failures and the inputs still needed, never as valid.

### Limits

Produces and checks files; it does not send them through a Peppol access point and does not state legal compliance. Rules version is echoed in every result. Invoices (not credit notes) are built, with VAT categories S, Z, E, AE, K, G, O; no document-level discounts. Files above 200 KB are not parsed. Nothing is stored.

### How to use

- **Run it** in Apify Console or through the API: choose what to do, fill in the fields for that tool and start. The result is one item in the run's dataset.
- **From an AI assistant** through Apify's MCP server (mcp.apify.com), which finds and runs this Actor with the same fields. What each choice does:
  - `validate_einvoices`: Check 1-20 UBL 2.1 invoices or credit notes (XML text) against the UBL schema, the EN 16931 rules and the Peppol BIS Billing 3.0 rules.
  - `build_einvoices`: Build 1-5 Peppol BIS Billing 3.0 UBL invoices from fields read off the issuer's own sales invoices (number, dates, seller, buyer, payment, lines with VAT), compute the totals, then run each result through the official rules before returning it.

### Pricing

- E-invoice validated (EN 16931 + Peppol): $0.036
- Peppol UBL invoice built and verified: $0.3

Failed calls are never charged.

# Actor input Schema

## `tool` (type: `string`):

validate_einvoices: Check 1-20 UBL 2.1 invoices or credit notes (XML text) against the UBL schema, the EN 16931 rules and the Peppol BIS Billing 3.0 rules. build_einvoices: Build 1-5 Peppol BIS Billing 3.0 UBL invoices from fields read off the issuer's own sales invoices (number, dates, seller, buyer, payment, lines with VAT), compute the totals, then run each result through the official rules before returning it.

## `documents` (type: `array`):

1-20 UBL invoice XML texts. Used by: validate_einvoices.

## `invoices` (type: `array`):

1-5 invoices as fields. Used by: build_einvoices.

## Actor input object example

```json
{
  "tool": "build_einvoices",
  "invoices": [
    {
      "number": "2026-0042",
      "issue_date": "2026-10-01",
      "due_date": "2026-10-31",
      "buyer_reference": "PO-778",
      "seller": {
        "name": "Bakkerij De Gouden Korst BV",
        "country": "BE",
        "street": "Korenmarkt 12",
        "city": "Gent",
        "postal_code": "9000",
        "vat_id": "BE0123456749",
        "company_id": "0123456749",
        "company_id_scheme": "0208"
      },
      "buyer": {
        "name": "Gemeente Utrecht",
        "country": "NL",
        "street": "Stadsplateau 1",
        "city": "Utrecht",
        "postal_code": "3521 AZ",
        "vat_id": "NL001234567B01"
      },
      "payment": {
        "iban": "BE68539007547034",
        "bic": "BBRUBEBB"
      },
      "lines": [
        {
          "description": "Brood",
          "quantity": "10",
          "unit_price": "2.50",
          "vat_rate": "6"
        },
        {
          "description": "Taart",
          "quantity": "2",
          "unit_price": "15",
          "vat_rate": "21"
        }
      ]
    }
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

The tool result as a dataset item, shown in the overview view.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "invoices": [
        {
            "number": "2026-0042",
            "issue_date": "2026-10-01",
            "due_date": "2026-10-31",
            "buyer_reference": "PO-778",
            "seller": {
                "name": "Bakkerij De Gouden Korst BV",
                "country": "BE",
                "street": "Korenmarkt 12",
                "city": "Gent",
                "postal_code": "9000",
                "vat_id": "BE0123456749",
                "company_id": "0123456749",
                "company_id_scheme": "0208"
            },
            "buyer": {
                "name": "Gemeente Utrecht",
                "country": "NL",
                "street": "Stadsplateau 1",
                "city": "Utrecht",
                "postal_code": "3521 AZ",
                "vat_id": "NL001234567B01"
            },
            "payment": {
                "iban": "BE68539007547034",
                "bic": "BBRUBEBB"
            },
            "lines": [
                {
                    "description": "Brood",
                    "quantity": "10",
                    "unit_price": "2.50",
                    "vat_rate": "6"
                },
                {
                    "description": "Taart",
                    "quantity": "2",
                    "unit_price": "15",
                    "vat_rate": "21"
                }
            ]
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eloquent_mountain/einvoice-check").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "invoices": [{
            "number": "2026-0042",
            "issue_date": "2026-10-01",
            "due_date": "2026-10-31",
            "buyer_reference": "PO-778",
            "seller": {
                "name": "Bakkerij De Gouden Korst BV",
                "country": "BE",
                "street": "Korenmarkt 12",
                "city": "Gent",
                "postal_code": "9000",
                "vat_id": "BE0123456749",
                "company_id": "0123456749",
                "company_id_scheme": "0208",
            },
            "buyer": {
                "name": "Gemeente Utrecht",
                "country": "NL",
                "street": "Stadsplateau 1",
                "city": "Utrecht",
                "postal_code": "3521 AZ",
                "vat_id": "NL001234567B01",
            },
            "payment": {
                "iban": "BE68539007547034",
                "bic": "BBRUBEBB",
            },
            "lines": [
                {
                    "description": "Brood",
                    "quantity": "10",
                    "unit_price": "2.50",
                    "vat_rate": "6",
                },
                {
                    "description": "Taart",
                    "quantity": "2",
                    "unit_price": "15",
                    "vat_rate": "21",
                },
            ],
        }] }

# Run the Actor and wait for it to finish
run = client.actor("eloquent_mountain/einvoice-check").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "invoices": [
    {
      "number": "2026-0042",
      "issue_date": "2026-10-01",
      "due_date": "2026-10-31",
      "buyer_reference": "PO-778",
      "seller": {
        "name": "Bakkerij De Gouden Korst BV",
        "country": "BE",
        "street": "Korenmarkt 12",
        "city": "Gent",
        "postal_code": "9000",
        "vat_id": "BE0123456749",
        "company_id": "0123456749",
        "company_id_scheme": "0208"
      },
      "buyer": {
        "name": "Gemeente Utrecht",
        "country": "NL",
        "street": "Stadsplateau 1",
        "city": "Utrecht",
        "postal_code": "3521 AZ",
        "vat_id": "NL001234567B01"
      },
      "payment": {
        "iban": "BE68539007547034",
        "bic": "BBRUBEBB"
      },
      "lines": [
        {
          "description": "Brood",
          "quantity": "10",
          "unit_price": "2.50",
          "vat_rate": "6"
        },
        {
          "description": "Taart",
          "quantity": "2",
          "unit_price": "15",
          "vat_rate": "21"
        }
      ]
    }
  ]
}' |
apify call eloquent_mountain/einvoice-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eloquent_mountain/einvoice-check"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/muW66tLbZvf2YwLre/builds/4MEmLSZICgAODKaCd/openapi.json
