File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -437,6 +437,50 @@ oauthClient
437
437
});
438
438
```
439
439
440
+
441
+ You can also make the calling using the endpoint path:
442
+
443
+ ``` javascript
444
+ // Body sample from API explorer examples
445
+ const body = {
446
+ TrackQtyOnHand: true ,
447
+ Name: ' Garden Supplies' ,
448
+ QtyOnHand: 10 ,
449
+ InvStartDate: ' 2015-01-01' ,
450
+ Type: ' Inventory' ,
451
+ IncomeAccountRef: {
452
+ name: ' Sales of Product Income' ,
453
+ value: ' 79' ,
454
+ },
455
+ AssetAccountRef: {
456
+ name: ' Inventory Asset' ,
457
+ value: ' 81' ,
458
+ },
459
+ ExpenseAccountRef: {
460
+ name: ' Cost of Goods Sold' ,
461
+ value: ' 80' ,
462
+ },
463
+ };
464
+
465
+ oauthClient
466
+ .makeApiCall ({
467
+ url: ' /v3/company/1234/item' ,
468
+ method: ' POST' ,
469
+ headers: {
470
+ ' Content-Type' : ' application/json' ,
471
+ },
472
+ body: JSON .stringify (body),
473
+ })
474
+ .then (function (response ) {
475
+ console .log (' The API response is : ' + response);
476
+ })
477
+ .catch (function (e ) {
478
+ console .log (' The error is ' + JSON .stringify (e));
479
+ });
480
+ ```
481
+
482
+
483
+
440
484
The client validates the ID Token and returns boolean ` true ` if validates successfully else it would
441
485
throw an exception.
442
486
You can’t perform that action at this time.
0 commit comments