1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "invoice": {
12 "number": "INV-2026-0042",
13 "issueDate": "2026-08-08",
14 "dueDate": "2026-09-07",
15 "currency": "EUR",
16 "note": "Thank you for your business.",
17 "seller": {
18 "name": "Atelier Lumière SARL",
19 "street": "12 Rue de la Paix",
20 "city": "Paris",
21 "zip": "75002",
22 "countryCode": "FR",
23 "vatId": "FR40303265045",
24 "registrationId": "30326504500014",
25 "contactName": "Marie Dupont",
26 "contactEmail": "billing@atelier-lumiere.example",
27 "electronicAddress": "billing@atelier-lumiere.example"
28 },
29 "buyer": {
30 "name": "Bau & Technik GmbH",
31 "street": "Torstrasse 1",
32 "city": "Berlin",
33 "zip": "10115",
34 "countryCode": "DE",
35 "vatId": "DE123456789"
36 },
37 "payment": {
38 "iban": "FR7630006000011234567890189",
39 "bic": "AGRIFRPP",
40 "terms": "Payable within 30 days."
41 },
42 "lines": [
43 {
44 "name": "UX design sprint",
45 "quantity": 3,
46 "unitCode": "DAY",
47 "unitPrice": 850,
48 "vatRate": 20
49 },
50 {
51 "name": "Design system licence",
52 "quantity": 1,
53 "unitPrice": 490,
54 "vatRate": 20
55 }
56 ]
57 }
58};
59
60
61const run = await client.actor("josefbednar/factur-x-zugferd-e-invoice").call(input);
62
63
64console.log('Results from dataset');
65console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
66const { items } = await client.dataset(run.defaultDatasetId).listItems();
67items.forEach((item) => {
68 console.dir(item);
69});
70
71