1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "invoices": [
12 {
13 "invoiceNumber": "2026-0001",
14 "issueDate": "2026-11-01",
15 "dueDate": "2026-12-01",
16 "buyerReference": "PO-1",
17 "seller": {
18 "name": "Example BV",
19 "vatNumber": "BE0403170701",
20 "companyId": "0403.170.701",
21 "iban": "BE68539007547034",
22 "address": {
23 "street": "Kouter 1",
24 "city": "Gent",
25 "postalCode": "9000",
26 "country": "BE"
27 }
28 },
29 "buyer": {
30 "name": "Customer NV",
31 "vatNumber": "BE0202239951",
32 "companyId": "0202.239.951",
33 "address": {
34 "street": "Markt 1",
35 "city": "Roeselare",
36 "postalCode": "8800",
37 "country": "BE"
38 }
39 },
40 "lines": [
41 {
42 "description": "Consulting",
43 "quantity": 8,
44 "unitCode": "HUR",
45 "unitPrice": 95,
46 "vatRate": 21
47 }
48 ]
49 }
50 ]
51};
52
53
54const run = await client.actor("ulyssevandamme/peppol-invoice-tools").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64