1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "invoice_data": {
12 "invoice_number": "RE-2026-1001",
13 "issue_date": "2026-10-25",
14 "due_date": "2026-11-24",
15 "buyer_reference": "991-12345-56",
16 "currency": "EUR",
17 "seller": {
18 "name": "Muster GmbH",
19 "street": "Hauptstraße 1",
20 "city": "Berlin",
21 "zip_code": "10115",
22 "country": "DE",
23 "vat_id": "DE123456789",
24 "iban": "DE89370400440532013000",
25 "bic": "COBADEFFXXX",
26 "email": "rechnung@muster-gmbh.de",
27 "contact_name": "Max Mustermann",
28 "phone": "+49 30 12345678"
29 },
30 "buyer": {
31 "name": "Kunden AG",
32 "street": "Industriestraße 42",
33 "city": "München",
34 "zip_code": "80331",
35 "country": "DE",
36 "vat_id": "DE987654321",
37 "email": "rechnungseingang@kunden-ag.de"
38 },
39 "line_items": [
40 {
41 "description": "Software-Entwicklung & Beratung",
42 "quantity": 10,
43 "unit_code": "HUR",
44 "unit_price": 120,
45 "tax_rate_percent": 19
46 },
47 {
48 "description": "Hosting & Wartung (Monat)",
49 "quantity": 1,
50 "unit_code": "C62",
51 "unit_price": 49,
52 "tax_rate_percent": 19
53 }
54 ]
55 }
56};
57
58
59const run = await client.actor("agrunert/german-e-invoice-zugferd-xrechnung-suite").call(input);
60
61
62console.log('Results from dataset');
63console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
64const { items } = await client.dataset(run.defaultDatasetId).listItems();
65items.forEach((item) => {
66 console.dir(item);
67});
68
69