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 "issuer": {
14 "name": "株式会社サンプル商事",
15 "registration_number": "T7123456789012"
16 },
17 "date": "2026-10-28",
18 "buyer": {
19 "name": "株式会社テスト"
20 },
21 "price_basis": "exclusive",
22 "items": [
23 {
24 "description": "コピー用紙",
25 "amount": 1999,
26 "rate": 10
27 },
28 {
29 "description": "※ お茶",
30 "amount": 1234,
31 "rate": 8,
32 "reduced": true
33 }
34 ],
35 "totals": [
36 {
37 "rate": 10,
38 "amount": 1999,
39 "tax": 199
40 },
41 {
42 "rate": 8,
43 "amount": 1234,
44 "tax": 98
45 }
46 ]
47 }
48 ]
49};
50
51
52const run = await client.actor("nexus-tools/jp-invoice-check-apify").call(input);
53
54
55console.log('Results from dataset');
56console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
57const { items } = await client.dataset(run.defaultDatasetId).listItems();
58items.forEach((item) => {
59 console.dir(item);
60});
61
62