1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "operation": "validate",
10 "fileUrl": "https://api.apify.com/v2/key-value-stores/DsZ5HTNC4PojX3A8a/records/facturx-sample-invoice.pdf",
11 "invoiceData": {
12 "numero": "FA-2026-0001",
13 "date_emission": "2026-08-26",
14 "type_code": "380",
15 "devise": "EUR",
16 "vendeur": {
17 "nom": "Ma Société SAS",
18 "siren_siret": "12345678900012",
19 "tva_intracom": "FR12345678900",
20 "adresse": {
21 "ligne1": "1 rue Exemple",
22 "code_postal": "75001",
23 "ville": "Paris",
24 "pays": "FR",
25 },
26 },
27 "acheteur": {
28 "nom": "Client SARL",
29 "siren_siret": "98765432100019",
30 "adresse": {
31 "ligne1": "2 avenue Client",
32 "code_postal": "69001",
33 "ville": "Lyon",
34 "pays": "FR",
35 },
36 },
37 "lignes": [{
38 "designation": "Prestation de conseil",
39 "quantite": 1,
40 "prix_unitaire_ht": 1000,
41 "taux_tva": 20,
42 "categorie_tva": "S",
43 }],
44 "totaux": {
45 "total_ht": 1000,
46 "total_tva": 200,
47 "total_ttc": 1200,
48 },
49 },
50}
51
52
53run = client.actor("comall-agency/facturx-validator-generator").call(run_input=run_input)
54
55
56print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
57for item in client.dataset(run.default_dataset_id).iterate_items():
58 print(item)
59
60