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": "Supplier A",
14 "currency": "GBP",
15 "items": [
16 {
17 "description": "Dell Latitude 7450",
18 "quantity": 10,
19 "unit_price": 1150
20 }
21 ]
22 },
23 {
24 "supplier": "Supplier B",
25 "currency": "GBP",
26 "items": [
27 {
28 "description": "Dell Latitude 7450",
29 "quantity": 10,
30 "unit_price": 1095
31 }
32 ]
33 }
34 ]
35};
36
37
38const run = await client.actor("vic0419/supplier-quote-comparison-pdf-json-quotecheck").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48