1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "watchId": "customer-watch-1",
12 "mode": "snapshot",
13 "sourceStatus": "complete",
14 "rightsAttestation": {
15 "customerControlsOrIsAuthorizedToUseData": true,
16 "noCredentialsOrSecretsSubmitted": true,
17 "unfetchedReferencePolicyAccepted": true,
18 "attestedAt": "2026-08-09T09:00:00Z",
19 "attestorId": "customer-operator-1"
20 },
21 "containers": [
22 {
23 "containerNumber": "MSCU1234566",
24 "carrier": "customer-declared-carrier",
25 "billOfLading": null,
26 "bookingNumber": null,
27 "promisedEta": "2026-08-12T12:00:00Z",
28 "freeTimeEnd": "2026-08-15T12:00:00Z",
29 "originUnlocode": "NLRTM",
30 "destinationUnlocode": "USLAX"
31 }
32 ],
33 "events": [
34 {
35 "eventId": "customer-event-1",
36 "containerNumber": "MSCU1234566",
37 "eventType": "gate_in",
38 "eventTime": "2026-08-08T09:00:00Z",
39 "receivedAt": "2026-08-08T09:05:00Z",
40 "locationUnlocode": "NLRTM",
41 "plannedLocationUnlocode": null,
42 "plannedTime": null,
43 "source": "customer-system",
44 "reference": "ref:customer-evidence-1"
45 }
46 ],
47 "tariffAssumptions": {
48 "currency": "USD",
49 "demurragePerDay": 0,
50 "detentionPerDay": 0
51 }
52};
53
54
55const run = await client.actor("zinin/container-exception-evidence").call(input);
56
57
58console.log('Results from dataset');
59console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
60const { items } = await client.dataset(run.defaultDatasetId).listItems();
61items.forEach((item) => {
62 console.dir(item);
63});
64
65