1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "invoice": {
9 "invoice_number": "INV-2026-0001",
10 "issue_date": "2026-07-29",
11 "due_date": "2026-08-28",
12 "delivery_date": "2026-07-29",
13 "currency": "PLN",
14 "invoice_type_code": "380",
15 "buyer_reference": "BUYER-REF-1001",
16 "purchase_order_reference": "PO-2026-1001",
17 "seller": {
18 "name": "Przykladowy Sprzedawca Sp. z o.o.",
19 "address": {
20 "line1": "ul. Prosta 1",
21 "city": "Warszawa",
22 "postal_code": "00-001",
23 "country_code": "PL",
24 },
25 "vat_id": "PL5265877635",
26 "tax_id": "5265877635",
27 },
28 "buyer": {
29 "name": "Przykladowy Nabywca Sp. z o.o.",
30 "address": {
31 "line1": "ul. Dluga 2",
32 "city": "Krakow",
33 "postal_code": "30-001",
34 "country_code": "PL",
35 },
36 "vat_id": "PL1234563218",
37 "tax_id": "1234563218",
38 },
39 "lines": [{
40 "id": "1",
41 "description": "Usluga doradcza",
42 "quantity": "2",
43 "unit_code": "HUR",
44 "unit_price": "500.00",
45 "tax_rate": "23",
46 "tax_category": "S",
47 }],
48 "payment": {
49 "means_code": "30",
50 "reference": "INV-2026-0001",
51 "iban": "PL61109010140000071219812874",
52 },
53 "notes": [],
54 "extensions": { "ksef": {
55 "jst": False,
56 "gv": False,
57 } },
58 } }
59
60
61run = client.actor("kamerozkan/ksef-fa-invoice-generator").call(run_input=run_input)
62
63
64print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
65for item in client.dataset(run.default_dataset_id).iterate_items():
66 print(item)
67
68