1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "transactions": [
12 {
13 "shopifyOrderName": "#1001",
14 "shippingCountry": "US",
15 "shippedAt": "2026-04-15",
16 "amount": 100,
17 "currency": "USD",
18 "amountJpy": 15042,
19 "exemptionReason": "export",
20 "documents": [
21 "customs_export_declaration",
22 "ems_dispatch_note"
23 ],
24 "retentionUntil": "2033-04-15",
25 "evidenceDocsHashChain": "0ce5b547d33c9309922fe47560c9b643b1fe1e45cfd1a8cbd1c78d5a90acf323"
26 },
27 {
28 "shopifyOrderName": "#1002-domestic-error-case",
29 "shippingCountry": "JP",
30 "shippedAt": "2026-04-17",
31 "amount": 5000,
32 "currency": "JPY",
33 "amountJpy": 5000,
34 "exemptionReason": "export",
35 "documents": [
36 "customs_export_declaration"
37 ],
38 "retentionUntil": "2033-04-17"
39 }
40 ],
41 "qualifiedInvoiceNumber": "T7000012050002"
42};
43
44
45const run = await client.actor("aulvem/japan-vat-export-validator").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55