1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "quotes": [
12 {
13 "supplier": "Northstar Office Supplies",
14 "items": [
15 {
16 "description": "Dell Latitude 7450",
17 "quantity": 10,
18 "unit_price": 1150
19 },
20 {
21 "description": "USB-C Dock",
22 "quantity": 10,
23 "unit_price": 180
24 }
25 ],
26 "total": 13300
27 },
28 {
29 "supplier": "Westbridge Technology",
30 "items": [
31 {
32 "description": "Latitude 7450 Laptop",
33 "quantity": 10,
34 "unit_price": 1095
35 },
36 {
37 "description": "USB C docking station",
38 "quantity": 8,
39 "unit_price": 195
40 }
41 ],
42 "total": 12510
43 }
44 ]
45};
46
47
48const run = await client.actor("vic0419/quotecheck-mvp").call(input);
49
50
51console.log('Results from dataset');
52console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58