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 "vendor": "Northwind Supply Co.",
14 "invoiceNumber": "NW-20841",
15 "invoiceDate": "2026-09-30",
16 "currency": "USD",
17 "subtotal": 520,
18 "tax": 41.6,
19 "total": 601.6,
20 "lines": [
21 {
22 "description": "Shop towels",
23 "amount": 185
24 },
25 {
26 "description": "Nitrile gloves",
27 "amount": 295
28 },
29 {
30 "description": "Delivery",
31 "amount": 40
32 }
33 ]
34 }
35 ],
36 "options": {
37 "poRequired": false,
38 "priorInvoices": []
39 }
40};
41
42
43const run = await client.actor("pycasdesign/docpipe-verify").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53