1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "wooText": """ID,Type,SKU,Name,Parent,In stock?,Stock,Backorders allowed?
10101,variable,MUG,Stoneware Mug,,1,,0
11102,variation,MUG-WHT,Stoneware Mug - White,MUG,1,12,0
12103,variation,MUG-BLK,Stoneware Mug - Black,MUG,1,8,0
13104,variation,MUG-GRN,Stoneware Mug - Green,MUG,1,parent,0
14110,simple,TOWEL-L,Linen Towel L,,1,20,0
15111,simple,TOWEL-M,Linen Towel M,,1,,0
16112,simple,APRON,Canvas Apron,,0,0,0
17113,simple,CANDLE,Soy Candle,,1,-3,notify
18114,simple,0042-SOAP,Olive Soap,,1,30,0
19""",
20 "warehouseText": """SKU,Quantity,Warehouse
21MUG-WHT,12,Tokyo
22MUG-BLK,5,Tokyo
23MUG-BLK,2,Osaka
24MUG-GRN,4,Tokyo
25TOWEL-L,18,Tokyo
26TOWEL-M,6,Tokyo
27APRON,0,Tokyo
28CANDLE,2,Tokyo
290042-SOAP,30,Tokyo
30TRAY-OAK,9,Osaka
31""",
32}
33
34
35run = client.actor("asunoki/woocommerce-inventory-reconciliation").call(run_input=run_input)
36
37
38print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
39for item in client.dataset(run.default_dataset_id).iterate_items():
40 print(item)
41
42