1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "oldFeeSchedule": [
10 {
11 "sku": "MUG-BLUE-12",
12 "fulfillmentFee": 3.22,
13 "sizeTier": "Standard",
14 "lengthIn": 5,
15 "widthIn": 4,
16 "heightIn": 4,
17 "weightLb": 0.9,
18 },
19 {
20 "sku": "YOGA-MAT-6",
21 "fulfillmentFee": 5.4,
22 "sizeTier": "Standard",
23 "lengthIn": 24,
24 "widthIn": 6,
25 "heightIn": 6,
26 "weightLb": 2.4,
27 },
28 {
29 "sku": "LAMP-DESK-1",
30 "fulfillmentFee": 6.1,
31 "sizeTier": "Large",
32 "lengthIn": 18,
33 "widthIn": 10,
34 "heightIn": 8,
35 "weightLb": 3.1,
36 },
37 ],
38 "newFeeSchedule": [
39 {
40 "sku": "MUG-BLUE-12",
41 "fulfillmentFee": 3.4,
42 "sizeTier": "Standard",
43 "lengthIn": 5,
44 "widthIn": 4,
45 "heightIn": 4,
46 "weightLb": 0.9,
47 },
48 {
49 "sku": "YOGA-MAT-6",
50 "fulfillmentFee": 6.25,
51 "sizeTier": "Large",
52 "lengthIn": 26,
53 "widthIn": 7,
54 "heightIn": 7,
55 "weightLb": 2.4,
56 },
57 {
58 "sku": "LAMP-DESK-1",
59 "fulfillmentFee": 6.1,
60 "sizeTier": "Large",
61 "lengthIn": 18,
62 "widthIn": 10,
63 "heightIn": 8,
64 "weightLb": 3.1,
65 },
66 ],
67 "products": [
68 {
69 "sku": "MUG-BLUE-12",
70 "price": 18.99,
71 "unitCost": 4.1,
72 "monthlyUnits": 300,
73 "lengthIn": 5,
74 "widthIn": 4,
75 "heightIn": 4,
76 "weightLb": 0.9,
77 },
78 {
79 "sku": "YOGA-MAT-6",
80 "price": 24.99,
81 "unitCost": 8.5,
82 "otherCostPerUnit": 0.6,
83 "monthlyUnits": 120,
84 "lengthIn": 24,
85 "widthIn": 6,
86 "heightIn": 6,
87 "weightLb": 2.4,
88 },
89 {
90 "sku": "LAMP-DESK-1",
91 "price": 29.99,
92 "unitCost": 11,
93 "monthlyUnits": 80,
94 "lengthIn": 18,
95 "widthIn": 10,
96 "heightIn": 8,
97 "weightLb": 3.1,
98 },
99 {
100 "sku": "NO-FEE-SKU",
101 "price": 15,
102 "unitCost": 5,
103 },
104 ],
105}
106
107
108run = client.actor("practical_ai_lab_jp/pal-amazon-fulfillment-fee-change-impact-audit").call(run_input=run_input)
109
110
111print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
112for item in client.dataset(run.default_dataset_id).iterate_items():
113 print(item)
114
115