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 "number": "FCT-0001",
14 "issue_date": "2026-11-01",
15 "due_date": "2026-12-01",
16 "seller": {
17 "name": "Furnizor Test SRL",
18 "vat_id": "RO1234567",
19 "reg_com": "J12/1234/2020",
20 "street": "Strada Exemplu 1",
21 "city": "Cluj-Napoca",
22 "county": "RO-CJ"
23 },
24 "buyer": {
25 "cui": "RO14399840"
26 },
27 "payment": {
28 "iban": "RO49AAAA1B31007593840000"
29 },
30 "lines": [
31 {
32 "name": "Servicii consultanta",
33 "quantity": 10,
34 "unit": "ore",
35 "price": 150,
36 "vat_rate": 21
37 }
38 ]
39 }
40 ]
41};
42
43
44const run = await client.actor("switchertheone/efactura-generator").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54