fc-landmark 2.1.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/tests/shipment.js CHANGED
@@ -1,456 +1,456 @@
1
- let LandMark = require("../dist/index").LandMark;
2
- let request = {
3
- "app_id": "70bfc230faedcb5fbf9f427d8d6f6f8a",
4
- "rest_api_key": "06638bf8e741b1ac42afe7915444b2ac4e7e75ba",
5
- "async": false,
6
- "reference": 2023090103,
7
- "service_code": "standard",
8
- "label_format": "PDF",
9
- "weight_unit": "LB",
10
- "currency": "USD",
11
- "dimension_unit": "IN",
12
- "insurance": "N",
13
- "terms_of_trade": "ddu",
14
- "shipfrom_address": {
15
- "name": "Wellbel",
16
- "attention_name": "TEST",
17
- "address_line_1": "300 South Pointe Dr apt 1705",
18
- "address_line_2": "",
19
- "address_line_3": "",
20
- "city": "Miami Beach",
21
- "state": "FL",
22
- "country": "US",
23
- "zip": 33139,
24
- "phone": "+18000000000",
25
- "email": "info@isotropic.co",
26
- "federal_tax_id": "",
27
- "state_tax_id": "",
28
- "location_name": "Floarida"
29
- },
30
- "shipto_address": {
31
- "name": "TESTTE",
32
- "attention_name": "TESTTE",
33
- "address_line_1": "33 The Glade, Hampton Park VIC,",
34
- "address_line_2": "Australia",
35
- "address_line_3": "",
36
- "city": "Toronto",
37
- "state": "ON",
38
- "country": "CA",
39
- "zip": "M5J 0A9",
40
- "phone": "+19876567898",
41
- "email": "test_dec_27@flavorcloud.com",
42
- "federal_tax_id": "",
43
- "state_tax_id": "",
44
- "firstName": "",
45
- "lastName": "",
46
- "addressLine1": "33 The Glade, Hampton Park VIC,",
47
- "addressLine2": "Australia",
48
- "addressLine3": ""
49
- },
50
- "pieces": [
51
- {
52
- "quantity": 3,
53
- "weight": 0.24999949875999997,
54
- "length": 2.3,
55
- "width": 2.3,
56
- "height": 3.9,
57
- "sale_price": 50.86333333333334,
58
- "hs_code": 2936900000,
59
- "origin_country_code": "US",
60
- "material": "wellbel glamlab Single International",
61
- "description": "wellbel glamlab Single International",
62
- "sku": "SKU",
63
- "category": [
64
- "wellbel glamlab - Single - International"
65
- ],
66
- "line_item_id": "",
67
- "product_id": "",
68
- "variant_id": "",
69
- "sale_price_usd": 50.86,
70
- "hs_code_real": 293690,
71
- "update": true,
72
- "hs_code_10": 2936900000,
73
- "origin_country_name": "United States"
74
- },
75
- {
76
- "quantity": 1,
77
- "weight": 0.24999949875999997,
78
- "length": 2.3,
79
- "width": 2.3,
80
- "height": 3.9,
81
- "sale_price": 50.86333333333334,
82
- "hs_code": 2936800000,
83
- "origin_country_code": "US",
84
- "material": "wellbel glamlab Single International",
85
- "description": "wellbel glamlab Single International",
86
- "sku": "SKU",
87
- "category": [
88
- "wellbel glamlab - Single - International"
89
- ],
90
- "line_item_id": "",
91
- "product_id": "",
92
- "variant_id": "",
93
- "sale_price_usd": 50.86,
94
- "hs_code_real": 293680,
95
- "update": true,
96
- "hs_code_10": 2936800000,
97
- "origin_country_name": "United States"
98
- }
99
- ],
100
- "package": {
101
- "length": 8,
102
- "width": 6,
103
- "height": 4,
104
- "weight": 0.5,
105
- "total_weight": null
106
- },
107
- "shipment_total": 152.59,
108
- "invoice_date": "2018-01-01 01:01:01",
109
- "carrier": "landmark",
110
- "rate_hash_key": "47927ec2-cbb5-45b5-85f6-9b47d641f8be",
111
- "duty_hash_key": "",
112
- "reason_for_export": "merchandise",
113
- "customer_key": "",
114
- "itn_number": "",
115
- "is_return": "N",
116
- "parter_api": true,
117
- "flcl_customer_type": 1,
118
- "pickUpDate": "",
119
- "metadata": {
120
- "india_export_info": {}
121
- },
122
- "b2b": false,
123
- "isNewShipment": false,
124
- "requestId": "c5fcdfd0-459d-11ee-9038-13c1842eab0d",
125
- "rootRequestId": "9de56156-1297-4db3-b6d6-fe7d85c34871",
126
- "public_api": true,
127
- "userId": 3847,
128
- "customerId": 3278,
129
- "_personId": 3278,
130
- "isRequestFromBigcommerce": false,
131
- "weight_correction_value": 6.61,
132
- "fc_shipping_cost_surcharge": "",
133
- "fc_shipping_cost_surcharge_type": "percentage",
134
- "partner_shipping_cost_surcharge": 53.85,
135
- "partner_shipping_cost_surcharge_type": "percentage",
136
- "landed_cost_surcharge": 15,
137
- "landed_cost_surcharge_type": "percentage",
138
- "consumer_commission": "",
139
- "consumer_commission_type": "",
140
- "consumer_commission_on_shipping": "",
141
- "consumer_commission_on_landedcost": "",
142
- "MerchantHasCustomRateCard": 0,
143
- "CustomerID": 0,
144
- "_3PLCustomerID": 2405,
145
- "TaxId": 0,
146
- "orderDataPhoneNumber": "+19876567898",
147
- "targetFromCountry": "",
148
- "targetToCountry": "",
149
- "OriginCountryID": 226,
150
- "DestinationCountryID": 38,
151
- "DDUVat": 0,
152
- "CountryRule": {
153
- "MinimumThresholds": {
154
- "duty": {
155
- "fob": "CAD150"
156
- },
157
- "vat": {
158
- "fob": "CAD40"
159
- },
160
- "ait": {
161
- "fob": " "
162
- }
163
- },
164
- "FobFlag": 1
165
- },
166
- "shipment_total_usd": 153,
167
- "currency_usd": "USD",
168
- "empty_package_weight": 0,
169
- "scalled_weight": 0.3,
170
- "rate_api_shiping_usd": 72.79,
171
- "rate_api_shiping": 72.79,
172
- "rate_api_duty_usd": 0,
173
- "rate_api_duty": 0,
174
- "service_code_flcl": "standard",
175
- "carrier_exclusion": "Canada Post,Delhivery,Deutsche Post,DHLEcommerce,ECMS,FIMS,InXpress,SEKO,SFExpress,WIZMO,DHL,FedEx,FedExCB,UPS,UPSMI,USPS",
176
- "previous_rate_hash_key": "no hash key",
177
- "flclRateId": 10722694,
178
- "landedCostId": "",
179
- "flcl_order_id": 1444676,
180
- "order_id": 1444676,
181
- "currencyRate": 1,
182
- "_routeRules": {
183
- "carriers": {
184
- "inXpress": {
185
- "weightUnit": "LB",
186
- "tradeFreeFlag": 0,
187
- "isDutiable": "Y",
188
- "dutyPaymentType": "S",
189
- "shipmentPaymentAccountNumber": 971644351,
190
- "dutyPaymentAccountNumber": 971644351,
191
- "serviceCode": {
192
- "express": {
193
- "duty": "P",
194
- "nonDuty": "U"
195
- },
196
- "standard": {
197
- "duty": "P",
198
- "nonDuty": "U"
199
- }
200
- },
201
- "rules": {
202
- "price": "",
203
- "weight": "",
204
- "serviceLevel": "",
205
- "categories": {
206
- "inclusion": [],
207
- "exclusion": []
208
- },
209
- "hsCode": {
210
- "inclusion": [],
211
- "exclusion": []
212
- }
213
- }
214
- },
215
- "ups": {
216
- "weightUnit": "LBS",
217
- "serviceCode": {
218
- "express": "08",
219
- "standard": 11,
220
- "ground": "03"
221
- },
222
- "rules": {
223
- "price": "",
224
- "weight": "",
225
- "serviceLevel": "",
226
- "categories": {
227
- "inclusion": [],
228
- "exclusion": []
229
- },
230
- "hsCode": {
231
- "inclusion": [
232
- 711319,
233
- 711311
234
- ],
235
- "exclusion": []
236
- }
237
- }
238
- },
239
- "upsmi": {
240
- "weightUnit": "OZ",
241
- "serviceCode": {
242
- "standard": "M5"
243
- },
244
- "rules": {}
245
- },
246
- "wizmo": {
247
- "weightUnit": "LB",
248
- "rules": {}
249
- },
250
- "dhl": {
251
- "weightUnit": "LB",
252
- "tradeFreeFlag": 0,
253
- "isDutiable": "Y",
254
- "dutyPaymentType": "S",
255
- "shipmentPaymentAccountNumber": 847143348,
256
- "dutyPaymentAccountNumber": 847143348,
257
- "serviceCode": {
258
- "express": {
259
- "duty": "P",
260
- "nonDuty": "P"
261
- },
262
- "standard": {
263
- "duty": "P",
264
- "nonDuty": "P"
265
- }
266
- },
267
- "rules": {
268
- "price": "",
269
- "weight": "",
270
- "serviceLevel": "",
271
- "categories": {
272
- "inclusion": [],
273
- "exclusion": []
274
- },
275
- "hsCode": {
276
- "inclusion": [],
277
- "exclusion": []
278
- }
279
- }
280
- },
281
- "easyPost": {
282
- "serviceCode": {
283
- "express": "express",
284
- "standard": "standard"
285
- },
286
- "carriersExclusions": {
287
- "ddu": [
288
- "Canada Post",
289
- " USPS",
290
- " GlobegisticsCA",
291
- " GlobegisticsUSA",
292
- " Deutsche Post"
293
- ],
294
- "ddp": [
295
- "Canada Post",
296
- " USPS",
297
- " GlobegisticsCA",
298
- " GlobegisticsUSA",
299
- " Deutsche Post"
300
- ]
301
- }
302
- },
303
- "apc lax": {
304
- "serviceCode": {
305
- "standard": "standard"
306
- }
307
- },
308
- "landmark": {
309
- "serviceCode": {
310
- "standard": "standard"
311
- }
312
- },
313
- "apc ord": {
314
- "serviceCode": {
315
- "standard": "standard"
316
- }
317
- },
318
- "sfexpress": {
319
- "serviceCode": {
320
- "economy": "economy",
321
- "standard": "STANDARD"
322
- }
323
- },
324
- "dhlecommerce": {
325
- "serviceCode": {
326
- "express": "EXPRESS",
327
- "standard": "STANDARD"
328
- }
329
- },
330
- "fims": {
331
- "serviceCode": {
332
- "express": "express",
333
- "standard": "standard",
334
- "standard-economy": "STANDARD-ECONOMY",
335
- "express-economy": "EXPRESS-ECONOMY",
336
- "economy": "economy"
337
- }
338
- },
339
- "ecourierz": {
340
- "serviceCode": {
341
- "express": "EXPRESS",
342
- "standard": "STANDARD",
343
- "economy": "ECONOMY"
344
- }
345
- },
346
- "fedex": {
347
- "serviceCode": {
348
- "express": "EXPRESS",
349
- "standard": "STANDARD",
350
- "ground": "FEDEX_GROUND",
351
- "economy": "economy"
352
- }
353
- },
354
- "asendiaca": {
355
- "serviceCode": {
356
- "standard": "standard",
357
- "express": "express"
358
- }
359
- },
360
- "asendiausa": {
361
- "serviceCode": {
362
- "standard": "standard"
363
- }
364
- },
365
- "fedexcb": {
366
- "serviceCode": {
367
- "standard": "STANDARD"
368
- }
369
- },
370
- "ecms": {
371
- "serviceCode": {
372
- "standard": "STANDARD"
373
- }
374
- },
375
- "delhivery": {
376
- "serviceCode": {
377
- "express": "EXPORTS_EXPRESS"
378
- }
379
- }
380
- },
381
- "termsOfTrade": "DDP,DDU",
382
- "defaultETDSupportedCarriers": [
383
- "APC LAX",
384
- "APC Logistics",
385
- "landmark",
386
- "APC ORD"
387
- ]
388
- },
389
- "shipment_total_gbp": 0,
390
- "shipment_total_eur": 0,
391
- "dim_weight": 1.381294964028777,
392
- "total_weight": 7.35999849628,
393
- "weight_without_dim": 7.35999849628,
394
- "_rateHashKey": "47927ec2-cbb5-45b5-85f6-9b47d641f8be",
395
- "_rateProviderObj": {
396
- "Provider": "landmark",
397
- "DeliveryDays": "",
398
- "FlclRateID": 10722694
399
- },
400
- "_carrierRateObj": {
401
- "carrierrateid": 21513581,
402
- "flclRateID": 10722694,
403
- "providerrateid": 9437685,
404
- "hashkey": "ZpPGix",
405
- "carrier": "landmark",
406
- "servicecode": "APC.PRIUDC",
407
- "flclservicecode": "standard",
408
- "termsoftrade": "DDU",
409
- "easypostreferenceid": "",
410
- "easypostrateid": "",
411
- "isreturnrate": 0,
412
- "rate": 72.79,
413
- "duty": null,
414
- "rateselected": null,
415
- "labelgenerated": 0,
416
- "deliverydays": "",
417
- "createddate": "2023-08-25T03:20:07.000Z",
418
- "modifieddate": "2023-08-25T03:20:07.000Z",
419
- "landedCostId": null,
420
- "actualCarrierRate": 47.31,
421
- "uuid": "47927ec2-cbb5-45b5-85f6-9b47d641f8be"
422
- },
423
- "CustomerCommission": {
424
- "Type": "percentage",
425
- "Value": 0,
426
- "Floor": 0,
427
- "Cap": 0
428
- },
429
- "_carrier": "landmark",
430
- "_customerTaxId": 0
431
- };
432
- async function create(){
433
- try{
434
- console.log('sampel gift');
435
-
436
- let landmark = new LandMark("demoapi","demo123",false,'','','','');
437
- let res = await landmark.createShipmet(request);
438
- console.log(res);
439
- return res;
440
-
441
- }catch(err){
442
- console.log('ERR-1', err)
443
- throw err;
444
- }
445
- }
446
-
447
-
448
- try{
449
- create().then(function(res){
450
- console.log(res)
451
- }).catch(function(err){
452
- console.log('ERR-2',err)
453
- })
454
- }catch(err){
455
- console.log('ERR-3',err)
456
- }
1
+ let LandMark = require("../dist/index").LandMark;
2
+ let request = {
3
+ "app_id": "70bfc230faedcb5fbf9f427d8d6f6f8a",
4
+ "rest_api_key": "06638bf8e741b1ac42afe7915444b2ac4e7e75ba",
5
+ "async": false,
6
+ "reference": 2023090103,
7
+ "service_code": "standard",
8
+ "label_format": "PDF",
9
+ "weight_unit": "LB",
10
+ "currency": "USD",
11
+ "dimension_unit": "IN",
12
+ "insurance": "N",
13
+ "terms_of_trade": "ddu",
14
+ "shipfrom_address": {
15
+ "name": "Wellbel",
16
+ "attention_name": "TEST",
17
+ "address_line_1": "300 South Pointe Dr apt 1705",
18
+ "address_line_2": "",
19
+ "address_line_3": "",
20
+ "city": "Miami Beach",
21
+ "state": "FL",
22
+ "country": "US",
23
+ "zip": 33139,
24
+ "phone": "+18000000000",
25
+ "email": "info@isotropic.co",
26
+ "federal_tax_id": "",
27
+ "state_tax_id": "",
28
+ "location_name": "Floarida"
29
+ },
30
+ "shipto_address": {
31
+ "name": "TESTTE",
32
+ "attention_name": "TESTTE",
33
+ "address_line_1": "33 The Glade, Hampton Park VIC,",
34
+ "address_line_2": "Australia",
35
+ "address_line_3": "",
36
+ "city": "Toronto",
37
+ "state": "ON",
38
+ "country": "CA",
39
+ "zip": "M5J 0A9",
40
+ "phone": "+19876567898",
41
+ "email": "test_dec_27@flavorcloud.com",
42
+ "federal_tax_id": "",
43
+ "state_tax_id": "",
44
+ "firstName": "",
45
+ "lastName": "",
46
+ "addressLine1": "33 The Glade, Hampton Park VIC,",
47
+ "addressLine2": "Australia",
48
+ "addressLine3": ""
49
+ },
50
+ "pieces": [
51
+ {
52
+ "quantity": 3,
53
+ "weight": 0.24999949875999997,
54
+ "length": 2.3,
55
+ "width": 2.3,
56
+ "height": 3.9,
57
+ "sale_price": 50.86333333333334,
58
+ "hs_code": 2936900000,
59
+ "origin_country_code": "US",
60
+ "material": "wellbel glamlab Single International",
61
+ "description": "wellbel glamlab Single International",
62
+ "sku": "SKU",
63
+ "category": [
64
+ "wellbel glamlab - Single - International"
65
+ ],
66
+ "line_item_id": "",
67
+ "product_id": "",
68
+ "variant_id": "",
69
+ "sale_price_usd": 50.86,
70
+ "hs_code_real": 293690,
71
+ "update": true,
72
+ "hs_code_10": 2936900000,
73
+ "origin_country_name": "United States"
74
+ },
75
+ {
76
+ "quantity": 1,
77
+ "weight": 0.24999949875999997,
78
+ "length": 2.3,
79
+ "width": 2.3,
80
+ "height": 3.9,
81
+ "sale_price": 50.86333333333334,
82
+ "hs_code": 2936800000,
83
+ "origin_country_code": "US",
84
+ "material": "wellbel glamlab Single International",
85
+ "description": "wellbel glamlab Single International",
86
+ "sku": "SKU",
87
+ "category": [
88
+ "wellbel glamlab - Single - International"
89
+ ],
90
+ "line_item_id": "",
91
+ "product_id": "",
92
+ "variant_id": "",
93
+ "sale_price_usd": 50.86,
94
+ "hs_code_real": 293680,
95
+ "update": true,
96
+ "hs_code_10": 2936800000,
97
+ "origin_country_name": "United States"
98
+ }
99
+ ],
100
+ "package": {
101
+ "length": 8,
102
+ "width": 6,
103
+ "height": 4,
104
+ "weight": 0.5,
105
+ "total_weight": null
106
+ },
107
+ "shipment_total": 152.59,
108
+ "invoice_date": "2018-01-01 01:01:01",
109
+ "carrier": "landmark",
110
+ "rate_hash_key": "47927ec2-cbb5-45b5-85f6-9b47d641f8be",
111
+ "duty_hash_key": "",
112
+ "reason_for_export": "merchandise",
113
+ "customer_key": "",
114
+ "itn_number": "",
115
+ "is_return": "N",
116
+ "parter_api": true,
117
+ "flcl_customer_type": 1,
118
+ "pickUpDate": "",
119
+ "metadata": {
120
+ "india_export_info": {}
121
+ },
122
+ "b2b": false,
123
+ "isNewShipment": false,
124
+ "requestId": "c5fcdfd0-459d-11ee-9038-13c1842eab0d",
125
+ "rootRequestId": "9de56156-1297-4db3-b6d6-fe7d85c34871",
126
+ "public_api": true,
127
+ "userId": 3847,
128
+ "customerId": 3278,
129
+ "_personId": 3278,
130
+ "isRequestFromBigcommerce": false,
131
+ "weight_correction_value": 6.61,
132
+ "fc_shipping_cost_surcharge": "",
133
+ "fc_shipping_cost_surcharge_type": "percentage",
134
+ "partner_shipping_cost_surcharge": 53.85,
135
+ "partner_shipping_cost_surcharge_type": "percentage",
136
+ "landed_cost_surcharge": 15,
137
+ "landed_cost_surcharge_type": "percentage",
138
+ "consumer_commission": "",
139
+ "consumer_commission_type": "",
140
+ "consumer_commission_on_shipping": "",
141
+ "consumer_commission_on_landedcost": "",
142
+ "MerchantHasCustomRateCard": 0,
143
+ "CustomerID": 0,
144
+ "_3PLCustomerID": 2405,
145
+ "TaxId": 0,
146
+ "orderDataPhoneNumber": "+19876567898",
147
+ "targetFromCountry": "",
148
+ "targetToCountry": "",
149
+ "OriginCountryID": 226,
150
+ "DestinationCountryID": 38,
151
+ "DDUVat": 0,
152
+ "CountryRule": {
153
+ "MinimumThresholds": {
154
+ "duty": {
155
+ "fob": "CAD150"
156
+ },
157
+ "vat": {
158
+ "fob": "CAD40"
159
+ },
160
+ "ait": {
161
+ "fob": " "
162
+ }
163
+ },
164
+ "FobFlag": 1
165
+ },
166
+ "shipment_total_usd": 153,
167
+ "currency_usd": "USD",
168
+ "empty_package_weight": 0,
169
+ "scalled_weight": 0.3,
170
+ "rate_api_shiping_usd": 72.79,
171
+ "rate_api_shiping": 72.79,
172
+ "rate_api_duty_usd": 0,
173
+ "rate_api_duty": 0,
174
+ "service_code_flcl": "standard",
175
+ "carrier_exclusion": "Canada Post,Delhivery,Deutsche Post,DHLEcommerce,ECMS,FIMS,InXpress,SEKO,SFExpress,WIZMO,DHL,FedEx,FedExCB,UPS,UPSMI,USPS",
176
+ "previous_rate_hash_key": "no hash key",
177
+ "flclRateId": 10722694,
178
+ "landedCostId": "",
179
+ "flcl_order_id": 1444676,
180
+ "order_id": 1444676,
181
+ "currencyRate": 1,
182
+ "_routeRules": {
183
+ "carriers": {
184
+ "inXpress": {
185
+ "weightUnit": "LB",
186
+ "tradeFreeFlag": 0,
187
+ "isDutiable": "Y",
188
+ "dutyPaymentType": "S",
189
+ "shipmentPaymentAccountNumber": 971644351,
190
+ "dutyPaymentAccountNumber": 971644351,
191
+ "serviceCode": {
192
+ "express": {
193
+ "duty": "P",
194
+ "nonDuty": "U"
195
+ },
196
+ "standard": {
197
+ "duty": "P",
198
+ "nonDuty": "U"
199
+ }
200
+ },
201
+ "rules": {
202
+ "price": "",
203
+ "weight": "",
204
+ "serviceLevel": "",
205
+ "categories": {
206
+ "inclusion": [],
207
+ "exclusion": []
208
+ },
209
+ "hsCode": {
210
+ "inclusion": [],
211
+ "exclusion": []
212
+ }
213
+ }
214
+ },
215
+ "ups": {
216
+ "weightUnit": "LBS",
217
+ "serviceCode": {
218
+ "express": "08",
219
+ "standard": 11,
220
+ "ground": "03"
221
+ },
222
+ "rules": {
223
+ "price": "",
224
+ "weight": "",
225
+ "serviceLevel": "",
226
+ "categories": {
227
+ "inclusion": [],
228
+ "exclusion": []
229
+ },
230
+ "hsCode": {
231
+ "inclusion": [
232
+ 711319,
233
+ 711311
234
+ ],
235
+ "exclusion": []
236
+ }
237
+ }
238
+ },
239
+ "upsmi": {
240
+ "weightUnit": "OZ",
241
+ "serviceCode": {
242
+ "standard": "M5"
243
+ },
244
+ "rules": {}
245
+ },
246
+ "wizmo": {
247
+ "weightUnit": "LB",
248
+ "rules": {}
249
+ },
250
+ "dhl": {
251
+ "weightUnit": "LB",
252
+ "tradeFreeFlag": 0,
253
+ "isDutiable": "Y",
254
+ "dutyPaymentType": "S",
255
+ "shipmentPaymentAccountNumber": 847143348,
256
+ "dutyPaymentAccountNumber": 847143348,
257
+ "serviceCode": {
258
+ "express": {
259
+ "duty": "P",
260
+ "nonDuty": "P"
261
+ },
262
+ "standard": {
263
+ "duty": "P",
264
+ "nonDuty": "P"
265
+ }
266
+ },
267
+ "rules": {
268
+ "price": "",
269
+ "weight": "",
270
+ "serviceLevel": "",
271
+ "categories": {
272
+ "inclusion": [],
273
+ "exclusion": []
274
+ },
275
+ "hsCode": {
276
+ "inclusion": [],
277
+ "exclusion": []
278
+ }
279
+ }
280
+ },
281
+ "easyPost": {
282
+ "serviceCode": {
283
+ "express": "express",
284
+ "standard": "standard"
285
+ },
286
+ "carriersExclusions": {
287
+ "ddu": [
288
+ "Canada Post",
289
+ " USPS",
290
+ " GlobegisticsCA",
291
+ " GlobegisticsUSA",
292
+ " Deutsche Post"
293
+ ],
294
+ "ddp": [
295
+ "Canada Post",
296
+ " USPS",
297
+ " GlobegisticsCA",
298
+ " GlobegisticsUSA",
299
+ " Deutsche Post"
300
+ ]
301
+ }
302
+ },
303
+ "apc lax": {
304
+ "serviceCode": {
305
+ "standard": "standard"
306
+ }
307
+ },
308
+ "landmark": {
309
+ "serviceCode": {
310
+ "standard": "standard"
311
+ }
312
+ },
313
+ "apc ord": {
314
+ "serviceCode": {
315
+ "standard": "standard"
316
+ }
317
+ },
318
+ "sfexpress": {
319
+ "serviceCode": {
320
+ "economy": "economy",
321
+ "standard": "STANDARD"
322
+ }
323
+ },
324
+ "dhlecommerce": {
325
+ "serviceCode": {
326
+ "express": "EXPRESS",
327
+ "standard": "STANDARD"
328
+ }
329
+ },
330
+ "fims": {
331
+ "serviceCode": {
332
+ "express": "express",
333
+ "standard": "standard",
334
+ "standard-economy": "STANDARD-ECONOMY",
335
+ "express-economy": "EXPRESS-ECONOMY",
336
+ "economy": "economy"
337
+ }
338
+ },
339
+ "ecourierz": {
340
+ "serviceCode": {
341
+ "express": "EXPRESS",
342
+ "standard": "STANDARD",
343
+ "economy": "ECONOMY"
344
+ }
345
+ },
346
+ "fedex": {
347
+ "serviceCode": {
348
+ "express": "EXPRESS",
349
+ "standard": "STANDARD",
350
+ "ground": "FEDEX_GROUND",
351
+ "economy": "economy"
352
+ }
353
+ },
354
+ "asendiaca": {
355
+ "serviceCode": {
356
+ "standard": "standard",
357
+ "express": "express"
358
+ }
359
+ },
360
+ "asendiausa": {
361
+ "serviceCode": {
362
+ "standard": "standard"
363
+ }
364
+ },
365
+ "fedexcb": {
366
+ "serviceCode": {
367
+ "standard": "STANDARD"
368
+ }
369
+ },
370
+ "ecms": {
371
+ "serviceCode": {
372
+ "standard": "STANDARD"
373
+ }
374
+ },
375
+ "delhivery": {
376
+ "serviceCode": {
377
+ "express": "EXPORTS_EXPRESS"
378
+ }
379
+ }
380
+ },
381
+ "termsOfTrade": "DDP,DDU",
382
+ "defaultETDSupportedCarriers": [
383
+ "APC LAX",
384
+ "APC Logistics",
385
+ "landmark",
386
+ "APC ORD"
387
+ ]
388
+ },
389
+ "shipment_total_gbp": 0,
390
+ "shipment_total_eur": 0,
391
+ "dim_weight": 1.381294964028777,
392
+ "total_weight": 7.35999849628,
393
+ "weight_without_dim": 7.35999849628,
394
+ "_rateHashKey": "47927ec2-cbb5-45b5-85f6-9b47d641f8be",
395
+ "_rateProviderObj": {
396
+ "Provider": "landmark",
397
+ "DeliveryDays": "",
398
+ "FlclRateID": 10722694
399
+ },
400
+ "_carrierRateObj": {
401
+ "carrierrateid": 21513581,
402
+ "flclRateID": 10722694,
403
+ "providerrateid": 9437685,
404
+ "hashkey": "ZpPGix",
405
+ "carrier": "landmark",
406
+ "servicecode": "APC.PRIUDC",
407
+ "flclservicecode": "standard",
408
+ "termsoftrade": "DDU",
409
+ "easypostreferenceid": "",
410
+ "easypostrateid": "",
411
+ "isreturnrate": 0,
412
+ "rate": 72.79,
413
+ "duty": null,
414
+ "rateselected": null,
415
+ "labelgenerated": 0,
416
+ "deliverydays": "",
417
+ "createddate": "2023-08-25T03:20:07.000Z",
418
+ "modifieddate": "2023-08-25T03:20:07.000Z",
419
+ "landedCostId": null,
420
+ "actualCarrierRate": 47.31,
421
+ "uuid": "47927ec2-cbb5-45b5-85f6-9b47d641f8be"
422
+ },
423
+ "CustomerCommission": {
424
+ "Type": "percentage",
425
+ "Value": 0,
426
+ "Floor": 0,
427
+ "Cap": 0
428
+ },
429
+ "_carrier": "landmark",
430
+ "_customerTaxId": 0
431
+ };
432
+ async function create(){
433
+ try{
434
+ console.log('sampel gift');
435
+
436
+ let landmark = new LandMark("demoapi","demo123",false,'','','','');
437
+ let res = await landmark.createShipmet(request);
438
+ console.log(res);
439
+ return res;
440
+
441
+ }catch(err){
442
+ console.log('ERR-1', err)
443
+ throw err;
444
+ }
445
+ }
446
+
447
+
448
+ try{
449
+ create().then(function(res){
450
+ console.log(res)
451
+ }).catch(function(err){
452
+ console.log('ERR-2',err)
453
+ })
454
+ }catch(err){
455
+ console.log('ERR-3',err)
456
+ }