1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "interchanges": [
12 {
13 "sourceId": "store-qa-order-1001",
14 "content": "UNB+UNOC:3+STORE-QA-SENDER:14+STORE-QA-RECEIVER:14+260916:1200+STORE-QA-1'UNH+1+ORDERS:D:01B:UN'BGM+220+PO-1001+9'DTM+137:20260916:102'NAD+BY+STORE-QA-BUYER::9'LIN+1++STORE-QA-SKU:EN'QTY+21:5'UNT+7+1'UNZ+1+STORE-QA-1'"
15 }
16 ],
17 "directory": "D01B",
18 "generateContrl": true,
19 "partnerRules": []
20};
21
22
23const run = await client.actor("ceddl/unedifact-transaction-quality-gate").call(input);
24
25
26console.log('Results from dataset');
27console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
28const { items } = await client.dataset(run.defaultDatasetId).listItems();
29items.forEach((item) => {
30 console.dir(item);
31});
32
33