@epcc-sdk/sdks-shopper 0.0.41 → 0.0.43
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/README.md +3930 -141
- package/dist/client/sdk.gen.cjs.map +1 -1
- package/dist/client/sdk.gen.d.cts +1 -0
- package/dist/client/sdk.gen.d.ts +1 -0
- package/dist/client/sdk.gen.mjs.map +1 -1
- package/dist/client/types.gen.cjs.map +1 -1
- package/dist/client/types.gen.d.cts +19 -0
- package/dist/client/types.gen.d.ts +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -308,288 +308,4077 @@ const product = await getByContextProduct({
|
|
|
308
308
|
## Available Operations
|
|
309
309
|
|
|
310
310
|
|
|
311
|
+
### **`getByContextRelease`**
|
|
311
312
|
|
|
312
|
-
|
|
313
|
+
**Endpoint:** `GET /catalog`
|
|
313
314
|
|
|
314
|
-
|
|
315
|
+
**Summary:** Get the catalog release as shoppers
|
|
315
316
|
|
|
316
|
-
|
|
317
|
+
**Description:** Returns a list of all published releases of the specified catalog.
|
|
317
318
|
|
|
318
|
-
|
|
319
|
+
**TypeScript Example:**
|
|
319
320
|
|
|
320
|
-
|
|
321
|
+
```typescript
|
|
322
|
+
import { getByContextRelease, type GetByContextReleaseData, type GetByContextReleaseResponse } from "@epcc-sdk/sdks-shopper";
|
|
323
|
+
|
|
324
|
+
const params: GetByContextReleaseData = {
|
|
325
|
+
headers: {
|
|
326
|
+
"accept-language": "en-US", // OPTIONAL
|
|
327
|
+
"EP-Channel": "web", // OPTIONAL
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
const result: GetByContextReleaseResponse = await getByContextRelease(params);
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
### **`getByContextAllHierarchies`**
|
|
337
|
+
|
|
338
|
+
**Endpoint:** `GET /catalog/hierarchies`
|
|
339
|
+
|
|
340
|
+
**Summary:** Get all Hierarchies
|
|
341
|
+
|
|
342
|
+
**Description:** GET operation
|
|
343
|
+
|
|
344
|
+
**TypeScript Example:**
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
import { getByContextAllHierarchies, type GetByContextAllHierarchiesData, type GetByContextAllHierarchiesResponse } from "@epcc-sdk/sdks-shopper";
|
|
348
|
+
|
|
349
|
+
const params: GetByContextAllHierarchiesData = {
|
|
350
|
+
query: {
|
|
351
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
352
|
+
"page[limit]": 10, // OPTIONAL
|
|
353
|
+
"page[offset]": 0, // OPTIONAL
|
|
354
|
+
},
|
|
355
|
+
headers: {
|
|
356
|
+
"accept-language": "en-US", // OPTIONAL
|
|
357
|
+
"EP-Channel": "web", // OPTIONAL
|
|
358
|
+
},
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
const result: GetByContextAllHierarchiesResponse = await getByContextAllHierarchies(params);
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
### **`getByContextHierarchy`**
|
|
367
|
+
|
|
368
|
+
**Endpoint:** `GET /catalog/hierarchies/{hierarchy_id}`
|
|
369
|
+
|
|
370
|
+
**Summary:** Get a Hierarchy
|
|
371
|
+
|
|
372
|
+
**Description:** GET operation
|
|
373
|
+
|
|
374
|
+
**TypeScript Example:**
|
|
375
|
+
|
|
376
|
+
```typescript
|
|
377
|
+
import { getByContextHierarchy, type GetByContextHierarchyData, type GetByContextHierarchyResponse } from "@epcc-sdk/sdks-shopper";
|
|
378
|
+
|
|
379
|
+
const params: GetByContextHierarchyData = {
|
|
380
|
+
path: {
|
|
381
|
+
hierarchy_id: "12345678-1234-5678-9012-123456789012",
|
|
382
|
+
},
|
|
383
|
+
headers: {
|
|
384
|
+
"accept-language": "en-US", // OPTIONAL
|
|
385
|
+
"EP-Channel": "web", // OPTIONAL
|
|
386
|
+
},
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
const result: GetByContextHierarchyResponse = await getByContextHierarchy(params);
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
### **`getByContextHierarchyNodes`**
|
|
395
|
+
|
|
396
|
+
**Endpoint:** `GET /catalog/hierarchies/{hierarchy_id}/nodes`
|
|
397
|
+
|
|
398
|
+
**Summary:** Get a Hierarchy's Nodes
|
|
399
|
+
|
|
400
|
+
**Description:** GET operation
|
|
401
|
+
|
|
402
|
+
**TypeScript Example:**
|
|
403
|
+
|
|
404
|
+
```typescript
|
|
405
|
+
import { getByContextHierarchyNodes, type GetByContextHierarchyNodesData, type GetByContextHierarchyNodesResponse } from "@epcc-sdk/sdks-shopper";
|
|
406
|
+
|
|
407
|
+
const params: GetByContextHierarchyNodesData = {
|
|
408
|
+
path: {
|
|
409
|
+
hierarchy_id: "12345678-1234-5678-9012-123456789012",
|
|
410
|
+
},
|
|
411
|
+
query: {
|
|
412
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
413
|
+
"page[limit]": 10, // OPTIONAL
|
|
414
|
+
"page[offset]": 0, // OPTIONAL
|
|
415
|
+
},
|
|
416
|
+
headers: {
|
|
417
|
+
"EP-Channel": "web", // OPTIONAL
|
|
418
|
+
"EP-Context-Tag": "header-value", // OPTIONAL
|
|
419
|
+
},
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
const result: GetByContextHierarchyNodesResponse = await getByContextHierarchyNodes(params);
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
### **`getByContextHierarchyChildNodes`**
|
|
428
|
+
|
|
429
|
+
**Endpoint:** `GET /catalog/hierarchies/{hierarchy_id}/children`
|
|
430
|
+
|
|
431
|
+
**Summary:** Get a Hierarchy's Children
|
|
432
|
+
|
|
433
|
+
**Description:** GET operation
|
|
434
|
+
|
|
435
|
+
**TypeScript Example:**
|
|
436
|
+
|
|
437
|
+
```typescript
|
|
438
|
+
import { getByContextHierarchyChildNodes, type GetByContextHierarchyChildNodesData, type GetByContextHierarchyChildNodesResponse } from "@epcc-sdk/sdks-shopper";
|
|
439
|
+
|
|
440
|
+
const params: GetByContextHierarchyChildNodesData = {
|
|
441
|
+
path: {
|
|
442
|
+
hierarchy_id: "12345678-1234-5678-9012-123456789012",
|
|
443
|
+
},
|
|
444
|
+
query: {
|
|
445
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
446
|
+
"page[limit]": 10, // OPTIONAL
|
|
447
|
+
"page[offset]": 0, // OPTIONAL
|
|
448
|
+
},
|
|
449
|
+
headers: {
|
|
450
|
+
"EP-Channel": "web", // OPTIONAL
|
|
451
|
+
"EP-Context-Tag": "header-value", // OPTIONAL
|
|
452
|
+
},
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
const result: GetByContextHierarchyChildNodesResponse = await getByContextHierarchyChildNodes(params);
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
### **`getByContextAllNodes`**
|
|
461
|
+
|
|
462
|
+
**Endpoint:** `GET /catalog/nodes`
|
|
463
|
+
|
|
464
|
+
**Summary:** Get all Nodes
|
|
465
|
+
|
|
466
|
+
**Description:** GET operation
|
|
467
|
+
|
|
468
|
+
**TypeScript Example:**
|
|
469
|
+
|
|
470
|
+
```typescript
|
|
471
|
+
import { getByContextAllNodes, type GetByContextAllNodesData, type GetByContextAllNodesResponse } from "@epcc-sdk/sdks-shopper";
|
|
472
|
+
|
|
473
|
+
const params: GetByContextAllNodesData = {
|
|
474
|
+
query: {
|
|
475
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
476
|
+
"page[limit]": 10, // OPTIONAL
|
|
477
|
+
"page[offset]": 0, // OPTIONAL
|
|
478
|
+
},
|
|
479
|
+
headers: {
|
|
480
|
+
"EP-Channel": "web", // OPTIONAL
|
|
481
|
+
"EP-Context-Tag": "header-value", // OPTIONAL
|
|
482
|
+
},
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
const result: GetByContextAllNodesResponse = await getByContextAllNodes(params);
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
---
|
|
489
|
+
|
|
490
|
+
### **`getByContextNode`**
|
|
491
|
+
|
|
492
|
+
**Endpoint:** `GET /catalog/nodes/{node_id}`
|
|
493
|
+
|
|
494
|
+
**Summary:** Get a Node
|
|
495
|
+
|
|
496
|
+
**Description:** GET operation
|
|
497
|
+
|
|
498
|
+
**TypeScript Example:**
|
|
499
|
+
|
|
500
|
+
```typescript
|
|
501
|
+
import { getByContextNode, type GetByContextNodeData, type GetByContextNodeResponse } from "@epcc-sdk/sdks-shopper";
|
|
502
|
+
|
|
503
|
+
const params: GetByContextNodeData = {
|
|
504
|
+
path: {
|
|
505
|
+
node_id: "12345678-1234-5678-9012-123456789012",
|
|
506
|
+
},
|
|
507
|
+
headers: {
|
|
508
|
+
"EP-Channel": "web", // OPTIONAL
|
|
509
|
+
"EP-Context-Tag": "header-value", // OPTIONAL
|
|
510
|
+
},
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
const result: GetByContextNodeResponse = await getByContextNode(params);
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
### **`getByContextChildNodes`**
|
|
519
|
+
|
|
520
|
+
**Endpoint:** `GET /catalog/nodes/{node_id}/relationships/children`
|
|
521
|
+
|
|
522
|
+
**Summary:** Get a Node's Children
|
|
523
|
+
|
|
524
|
+
**Description:** GET operation
|
|
525
|
+
|
|
526
|
+
**TypeScript Example:**
|
|
527
|
+
|
|
528
|
+
```typescript
|
|
529
|
+
import { getByContextChildNodes, type GetByContextChildNodesData, type GetByContextChildNodesResponse } from "@epcc-sdk/sdks-shopper";
|
|
530
|
+
|
|
531
|
+
const params: GetByContextChildNodesData = {
|
|
532
|
+
path: {
|
|
533
|
+
node_id: "12345678-1234-5678-9012-123456789012",
|
|
534
|
+
},
|
|
535
|
+
query: {
|
|
536
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
537
|
+
"page[limit]": 10, // OPTIONAL
|
|
538
|
+
"page[offset]": 0, // OPTIONAL
|
|
539
|
+
},
|
|
540
|
+
headers: {
|
|
541
|
+
"EP-Channel": "web", // OPTIONAL
|
|
542
|
+
"EP-Context-Tag": "header-value", // OPTIONAL
|
|
543
|
+
},
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
const result: GetByContextChildNodesResponse = await getByContextChildNodes(params);
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
### **`getByContextAllProducts`**
|
|
552
|
+
|
|
553
|
+
**Endpoint:** `GET /catalog/products`
|
|
554
|
+
|
|
555
|
+
**Summary:** Get all Products
|
|
556
|
+
|
|
557
|
+
**Description:** GET operation
|
|
558
|
+
|
|
559
|
+
**TypeScript Example:**
|
|
560
|
+
|
|
561
|
+
```typescript
|
|
562
|
+
import { getByContextAllProducts, type GetByContextAllProductsData, type GetByContextAllProductsResponse } from "@epcc-sdk/sdks-shopper";
|
|
563
|
+
|
|
564
|
+
const params: GetByContextAllProductsData = {
|
|
565
|
+
query: {
|
|
566
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
567
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
568
|
+
"page[limit]": 10, // OPTIONAL
|
|
569
|
+
},
|
|
570
|
+
headers: {
|
|
571
|
+
"accept-language": "en-US", // OPTIONAL
|
|
572
|
+
"EP-Channel": "web", // OPTIONAL
|
|
573
|
+
},
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
const result: GetByContextAllProductsResponse = await getByContextAllProducts(params);
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
---
|
|
580
|
+
|
|
581
|
+
### **`getByContextProduct`**
|
|
582
|
+
|
|
583
|
+
**Endpoint:** `GET /catalog/products/{product_id}`
|
|
584
|
+
|
|
585
|
+
**Summary:** Get a Product
|
|
586
|
+
|
|
587
|
+
**Description:** GET operation
|
|
588
|
+
|
|
589
|
+
**TypeScript Example:**
|
|
590
|
+
|
|
591
|
+
```typescript
|
|
592
|
+
import { getByContextProduct, type GetByContextProductData, type GetByContextProductResponse } from "@epcc-sdk/sdks-shopper";
|
|
593
|
+
|
|
594
|
+
const params: GetByContextProductData = {
|
|
595
|
+
path: {
|
|
596
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
597
|
+
},
|
|
598
|
+
query: {
|
|
599
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
600
|
+
},
|
|
601
|
+
headers: {
|
|
602
|
+
"accept-language": "en-US", // OPTIONAL
|
|
603
|
+
"EP-Channel": "web", // OPTIONAL
|
|
604
|
+
},
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
const result: GetByContextProductResponse = await getByContextProduct(params);
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
---
|
|
611
|
+
|
|
612
|
+
### **`getByContextAllRelatedProducts`**
|
|
613
|
+
|
|
614
|
+
**Endpoint:** `GET /catalog/products/{product_id}/relationships/{custom_relationship_slug}/products`
|
|
615
|
+
|
|
616
|
+
**Summary:** Get all Related Products of a Product
|
|
617
|
+
|
|
618
|
+
**Description:** Returns related products of the provided product ID from a catalog.
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
**TypeScript Example:**
|
|
622
|
+
|
|
623
|
+
```typescript
|
|
624
|
+
import { getByContextAllRelatedProducts, type GetByContextAllRelatedProductsData, type GetByContextAllRelatedProductsResponse } from "@epcc-sdk/sdks-shopper";
|
|
625
|
+
|
|
626
|
+
const params: GetByContextAllRelatedProductsData = {
|
|
627
|
+
path: {
|
|
628
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
629
|
+
custom_relationship_slug: "product-slug",
|
|
630
|
+
},
|
|
631
|
+
query: {
|
|
632
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
633
|
+
"page[limit]": 10, // OPTIONAL
|
|
634
|
+
"page[offset]": 0, // OPTIONAL
|
|
635
|
+
},
|
|
636
|
+
headers: {
|
|
637
|
+
"accept-language": "en-US", // OPTIONAL
|
|
638
|
+
"EP-Channel": "web", // OPTIONAL
|
|
639
|
+
},
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
const result: GetByContextAllRelatedProductsResponse = await getByContextAllRelatedProducts(params);
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
---
|
|
646
|
+
|
|
647
|
+
### **`getByContextComponentProductIds`**
|
|
648
|
+
|
|
649
|
+
**Endpoint:** `GET /catalog/products/{product_id}/relationships/component_products`
|
|
650
|
+
|
|
651
|
+
**Summary:** Get a Bundle's Component Products
|
|
652
|
+
|
|
653
|
+
**Description:** GET operation
|
|
654
|
+
|
|
655
|
+
**TypeScript Example:**
|
|
656
|
+
|
|
657
|
+
```typescript
|
|
658
|
+
import { getByContextComponentProductIds, type GetByContextComponentProductIdsData, type GetByContextComponentProductIdsResponse } from "@epcc-sdk/sdks-shopper";
|
|
659
|
+
|
|
660
|
+
const params: GetByContextComponentProductIdsData = {
|
|
661
|
+
path: {
|
|
662
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
663
|
+
},
|
|
664
|
+
query: {
|
|
665
|
+
"page[limit]": 10, // OPTIONAL
|
|
666
|
+
"page[offset]": 0, // OPTIONAL
|
|
667
|
+
},
|
|
668
|
+
headers: {
|
|
669
|
+
"EP-Channel": "web", // OPTIONAL
|
|
670
|
+
"EP-Context-Tag": "header-value", // OPTIONAL
|
|
671
|
+
},
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
const result: GetByContextComponentProductIdsResponse = await getByContextComponentProductIds(params);
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
---
|
|
678
|
+
|
|
679
|
+
### **`getByContextChildProducts`**
|
|
680
|
+
|
|
681
|
+
**Endpoint:** `GET /catalog/products/{product_id}/relationships/children`
|
|
682
|
+
|
|
683
|
+
**Summary:** Get a Parent Product's Child Products
|
|
684
|
+
|
|
685
|
+
**Description:** GET operation
|
|
686
|
+
|
|
687
|
+
**TypeScript Example:**
|
|
688
|
+
|
|
689
|
+
```typescript
|
|
690
|
+
import { getByContextChildProducts, type GetByContextChildProductsData, type GetByContextChildProductsResponse } from "@epcc-sdk/sdks-shopper";
|
|
691
|
+
|
|
692
|
+
const params: GetByContextChildProductsData = {
|
|
693
|
+
path: {
|
|
694
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
695
|
+
},
|
|
696
|
+
query: {
|
|
697
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
698
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
699
|
+
"page[limit]": 10, // OPTIONAL
|
|
700
|
+
},
|
|
701
|
+
headers: {
|
|
702
|
+
"EP-Channel": "web", // OPTIONAL
|
|
703
|
+
"EP-Context-Tag": "header-value", // OPTIONAL
|
|
704
|
+
},
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
const result: GetByContextChildProductsResponse = await getByContextChildProducts(params);
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
---
|
|
711
|
+
|
|
712
|
+
### **`getByContextProductsForHierarchy`**
|
|
713
|
+
|
|
714
|
+
**Endpoint:** `GET /catalog/hierarchies/{hierarchy_id}/products`
|
|
715
|
+
|
|
716
|
+
**Summary:** Get a Hierarchy's Products
|
|
717
|
+
|
|
718
|
+
**Description:** GET operation
|
|
719
|
+
|
|
720
|
+
**TypeScript Example:**
|
|
721
|
+
|
|
722
|
+
```typescript
|
|
723
|
+
import { getByContextProductsForHierarchy, type GetByContextProductsForHierarchyData, type GetByContextProductsForHierarchyResponse } from "@epcc-sdk/sdks-shopper";
|
|
724
|
+
|
|
725
|
+
const params: GetByContextProductsForHierarchyData = {
|
|
726
|
+
path: {
|
|
727
|
+
hierarchy_id: "12345678-1234-5678-9012-123456789012",
|
|
728
|
+
},
|
|
729
|
+
query: {
|
|
730
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
731
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
732
|
+
"page[limit]": 10, // OPTIONAL
|
|
733
|
+
},
|
|
734
|
+
headers: {
|
|
735
|
+
"accept-language": "en-US", // OPTIONAL
|
|
736
|
+
"EP-Channel": "web", // OPTIONAL
|
|
737
|
+
},
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
const result: GetByContextProductsForHierarchyResponse = await getByContextProductsForHierarchy(params);
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
---
|
|
744
|
+
|
|
745
|
+
### **`getByContextProductsForNode`**
|
|
746
|
+
|
|
747
|
+
**Endpoint:** `GET /catalog/nodes/{node_id}/relationships/products`
|
|
748
|
+
|
|
749
|
+
**Summary:** Get a Node's Products
|
|
750
|
+
|
|
751
|
+
**Description:** GET operation
|
|
752
|
+
|
|
753
|
+
**TypeScript Example:**
|
|
754
|
+
|
|
755
|
+
```typescript
|
|
756
|
+
import { getByContextProductsForNode, type GetByContextProductsForNodeData, type GetByContextProductsForNodeResponse } from "@epcc-sdk/sdks-shopper";
|
|
757
|
+
|
|
758
|
+
const params: GetByContextProductsForNodeData = {
|
|
759
|
+
path: {
|
|
760
|
+
node_id: "12345678-1234-5678-9012-123456789012",
|
|
761
|
+
},
|
|
762
|
+
query: {
|
|
763
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
764
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
765
|
+
"page[limit]": 10, // OPTIONAL
|
|
766
|
+
},
|
|
767
|
+
headers: {
|
|
768
|
+
"accept-language": "en-US", // OPTIONAL
|
|
769
|
+
"EP-Channel": "web", // OPTIONAL
|
|
770
|
+
},
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
const result: GetByContextProductsForNodeResponse = await getByContextProductsForNode(params);
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
---
|
|
777
|
+
|
|
778
|
+
### **`configureByContextProduct`**
|
|
779
|
+
|
|
780
|
+
**Endpoint:** `POST /catalog/products/{product_id}/configure`
|
|
781
|
+
|
|
782
|
+
**Summary:** Configure a Shopper Bundle
|
|
783
|
+
|
|
784
|
+
**Description:** POST operation
|
|
785
|
+
|
|
786
|
+
**TypeScript Example:**
|
|
787
|
+
|
|
788
|
+
```typescript
|
|
789
|
+
import { configureByContextProduct, type ConfigureByContextProductData, type ConfigureByContextProductResponse } from "@epcc-sdk/sdks-shopper";
|
|
790
|
+
|
|
791
|
+
const params: ConfigureByContextProductData = {
|
|
792
|
+
path: {
|
|
793
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
794
|
+
},
|
|
795
|
+
query: {
|
|
796
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
797
|
+
},
|
|
798
|
+
headers: {
|
|
799
|
+
"accept-language": "en-US", // OPTIONAL
|
|
800
|
+
"EP-Channel": "web", // OPTIONAL
|
|
801
|
+
},
|
|
802
|
+
body: {
|
|
803
|
+
data: {
|
|
804
|
+
type: "resource"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
const result: ConfigureByContextProductResponse = await configureByContextProduct(params);
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
---
|
|
813
|
+
|
|
814
|
+
### **`getCatalogs`**
|
|
815
|
+
|
|
816
|
+
**Endpoint:** `GET /catalogs`
|
|
817
|
+
|
|
818
|
+
**Summary:** Gets all authorized catalogs
|
|
819
|
+
|
|
820
|
+
**Description:** GET operation
|
|
821
|
+
|
|
822
|
+
**TypeScript Example:**
|
|
823
|
+
|
|
824
|
+
```typescript
|
|
825
|
+
import { getCatalogs, type GetCatalogsData, type GetCatalogsResponse } from "@epcc-sdk/sdks-shopper";
|
|
826
|
+
|
|
827
|
+
const params: GetCatalogsData = {
|
|
828
|
+
query: {
|
|
829
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
830
|
+
"page[limit]": 10, // OPTIONAL
|
|
831
|
+
"page[offset]": 0, // OPTIONAL
|
|
832
|
+
},
|
|
833
|
+
};
|
|
834
|
+
|
|
835
|
+
const result: GetCatalogsResponse = await getCatalogs(params);
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
---
|
|
839
|
+
|
|
840
|
+
### **`createCatalog`**
|
|
841
|
+
|
|
842
|
+
**Endpoint:** `POST /catalogs`
|
|
843
|
+
|
|
844
|
+
**Summary:** Creates a new catalog
|
|
845
|
+
|
|
846
|
+
**Description:** POST operation
|
|
847
|
+
|
|
848
|
+
**TypeScript Example:**
|
|
849
|
+
|
|
850
|
+
```typescript
|
|
851
|
+
import { createCatalog, type CreateCatalogData, type CreateCatalogResponse } from "@epcc-sdk/sdks-shopper";
|
|
852
|
+
|
|
853
|
+
const params: CreateCatalogData = {
|
|
854
|
+
body: {
|
|
855
|
+
data: {
|
|
856
|
+
type: "resource",
|
|
857
|
+
attributes: {
|
|
858
|
+
name: "Resource Name",
|
|
859
|
+
description: "Resource Description"
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
};
|
|
864
|
+
|
|
865
|
+
const result: CreateCatalogResponse = await createCatalog(params);
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
---
|
|
869
|
+
|
|
870
|
+
### **`deleteCatalogById`**
|
|
871
|
+
|
|
872
|
+
**Endpoint:** `DELETE /catalogs/{catalog_id}`
|
|
873
|
+
|
|
874
|
+
**Summary:** Deletes a catalog
|
|
875
|
+
|
|
876
|
+
**Description:** DELETE operation
|
|
877
|
+
|
|
878
|
+
**TypeScript Example:**
|
|
879
|
+
|
|
880
|
+
```typescript
|
|
881
|
+
import { deleteCatalogById, type DeleteCatalogByIdData, type DeleteCatalogByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
882
|
+
|
|
883
|
+
const params: DeleteCatalogByIdData = {
|
|
884
|
+
path: {
|
|
885
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
886
|
+
},
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
const result: DeleteCatalogByIdResponse = await deleteCatalogById(params);
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
---
|
|
893
|
+
|
|
894
|
+
### **`getCatalogById`**
|
|
895
|
+
|
|
896
|
+
**Endpoint:** `GET /catalogs/{catalog_id}`
|
|
897
|
+
|
|
898
|
+
**Summary:** Get a catalog by ID
|
|
899
|
+
|
|
900
|
+
**Description:** Retrieves the specified catalog.
|
|
901
|
+
|
|
902
|
+
**TypeScript Example:**
|
|
903
|
+
|
|
904
|
+
```typescript
|
|
905
|
+
import { getCatalogById, type GetCatalogByIdData, type GetCatalogByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
906
|
+
|
|
907
|
+
const params: GetCatalogByIdData = {
|
|
908
|
+
path: {
|
|
909
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
910
|
+
},
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
const result: GetCatalogByIdResponse = await getCatalogById(params);
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
---
|
|
917
|
+
|
|
918
|
+
### **`updateCatalog`**
|
|
919
|
+
|
|
920
|
+
**Endpoint:** `PUT /catalogs/{catalog_id}`
|
|
921
|
+
|
|
922
|
+
**Summary:** Updates a catalog
|
|
923
|
+
|
|
924
|
+
**Description:** PUT operation
|
|
925
|
+
|
|
926
|
+
**TypeScript Example:**
|
|
927
|
+
|
|
928
|
+
```typescript
|
|
929
|
+
import { updateCatalog, type UpdateCatalogData, type UpdateCatalogResponse } from "@epcc-sdk/sdks-shopper";
|
|
930
|
+
|
|
931
|
+
const params: UpdateCatalogData = {
|
|
932
|
+
path: {
|
|
933
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
934
|
+
},
|
|
935
|
+
body: {
|
|
936
|
+
data: {
|
|
937
|
+
type: "resource",
|
|
938
|
+
attributes: {
|
|
939
|
+
name: "Resource Name",
|
|
940
|
+
description: "Resource Description"
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
const result: UpdateCatalogResponse = await updateCatalog(params);
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
### **`deleteReleases`**
|
|
952
|
+
|
|
953
|
+
**Endpoint:** `DELETE /catalogs/{catalog_id}/releases`
|
|
954
|
+
|
|
955
|
+
**Summary:** Deletes all releases
|
|
956
|
+
|
|
957
|
+
**Description:** Deletes all releases of the specified published catalog.
|
|
958
|
+
|
|
959
|
+
**TypeScript Example:**
|
|
960
|
+
|
|
961
|
+
```typescript
|
|
962
|
+
import { deleteReleases, type DeleteReleasesData, type DeleteReleasesResponse } from "@epcc-sdk/sdks-shopper";
|
|
963
|
+
|
|
964
|
+
const params: DeleteReleasesData = {
|
|
965
|
+
path: {
|
|
966
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
967
|
+
},
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
const result: DeleteReleasesResponse = await deleteReleases(params);
|
|
971
|
+
```
|
|
972
|
+
|
|
973
|
+
---
|
|
974
|
+
|
|
975
|
+
### **`getReleases`**
|
|
976
|
+
|
|
977
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases`
|
|
978
|
+
|
|
979
|
+
**Summary:** Gets all authorized catalog releases
|
|
980
|
+
|
|
981
|
+
**Description:** GET operation
|
|
982
|
+
|
|
983
|
+
**TypeScript Example:**
|
|
984
|
+
|
|
985
|
+
```typescript
|
|
986
|
+
import { getReleases, type GetReleasesData, type GetReleasesResponse } from "@epcc-sdk/sdks-shopper";
|
|
987
|
+
|
|
988
|
+
const params: GetReleasesData = {
|
|
989
|
+
path: {
|
|
990
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
991
|
+
},
|
|
992
|
+
headers: {
|
|
993
|
+
"accept-language": "en-US", // OPTIONAL
|
|
994
|
+
},
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
const result: GetReleasesResponse = await getReleases(params);
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
---
|
|
1001
|
+
|
|
1002
|
+
### **`publishRelease`**
|
|
1003
|
+
|
|
1004
|
+
**Endpoint:** `POST /catalogs/{catalog_id}/releases`
|
|
1005
|
+
|
|
1006
|
+
**Summary:** Publishes a catalog
|
|
1007
|
+
|
|
1008
|
+
**Description:** POST operation
|
|
1009
|
+
|
|
1010
|
+
**TypeScript Example:**
|
|
1011
|
+
|
|
1012
|
+
```typescript
|
|
1013
|
+
import { publishRelease, type PublishReleaseData, type PublishReleaseResponse } from "@epcc-sdk/sdks-shopper";
|
|
1014
|
+
|
|
1015
|
+
const params: PublishReleaseData = {
|
|
1016
|
+
path: {
|
|
1017
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1018
|
+
},
|
|
1019
|
+
body: {
|
|
1020
|
+
data: {
|
|
1021
|
+
type: "resource"
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
const result: PublishReleaseResponse = await publishRelease(params);
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
---
|
|
1030
|
+
|
|
1031
|
+
### **`deleteReleaseById`**
|
|
1032
|
+
|
|
1033
|
+
**Endpoint:** `DELETE /catalogs/{catalog_id}/releases/{release_id}`
|
|
1034
|
+
|
|
1035
|
+
**Summary:** Deletes a release
|
|
1036
|
+
|
|
1037
|
+
**Description:** Deletes the specified published catalog release.
|
|
1038
|
+
|
|
1039
|
+
**TypeScript Example:**
|
|
1040
|
+
|
|
1041
|
+
```typescript
|
|
1042
|
+
import { deleteReleaseById, type DeleteReleaseByIdData, type DeleteReleaseByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
1043
|
+
|
|
1044
|
+
const params: DeleteReleaseByIdData = {
|
|
1045
|
+
path: {
|
|
1046
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1047
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1048
|
+
},
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
const result: DeleteReleaseByIdResponse = await deleteReleaseById(params);
|
|
1052
|
+
```
|
|
1053
|
+
|
|
1054
|
+
---
|
|
1055
|
+
|
|
1056
|
+
### **`getReleaseById`**
|
|
1057
|
+
|
|
1058
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}`
|
|
1059
|
+
|
|
1060
|
+
**Summary:** Get a catalog release by ID
|
|
1061
|
+
|
|
1062
|
+
**Description:** Retrieves the specified catalog release.
|
|
1063
|
+
|
|
1064
|
+
**TypeScript Example:**
|
|
1065
|
+
|
|
1066
|
+
```typescript
|
|
1067
|
+
import { getReleaseById, type GetReleaseByIdData, type GetReleaseByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
1068
|
+
|
|
1069
|
+
const params: GetReleaseByIdData = {
|
|
1070
|
+
path: {
|
|
1071
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1072
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1073
|
+
},
|
|
1074
|
+
headers: {
|
|
1075
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1076
|
+
},
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
const result: GetReleaseByIdResponse = await getReleaseById(params);
|
|
1080
|
+
```
|
|
1081
|
+
|
|
1082
|
+
---
|
|
1083
|
+
|
|
1084
|
+
### **`getRules`**
|
|
1085
|
+
|
|
1086
|
+
**Endpoint:** `GET /catalogs/rules`
|
|
1087
|
+
|
|
1088
|
+
**Summary:** Gets all authorized catalog rules
|
|
1089
|
+
|
|
1090
|
+
**Description:** GET operation
|
|
1091
|
+
|
|
1092
|
+
**TypeScript Example:**
|
|
1093
|
+
|
|
1094
|
+
```typescript
|
|
1095
|
+
import { getRules, type GetRulesData, type GetRulesResponse } from "@epcc-sdk/sdks-shopper";
|
|
1096
|
+
|
|
1097
|
+
const params: GetRulesData = {
|
|
1098
|
+
query: {
|
|
1099
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1100
|
+
"page[limit]": 10, // OPTIONAL
|
|
1101
|
+
"page[offset]": 0, // OPTIONAL
|
|
1102
|
+
},
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
const result: GetRulesResponse = await getRules(params);
|
|
1106
|
+
```
|
|
1107
|
+
|
|
1108
|
+
---
|
|
1109
|
+
|
|
1110
|
+
### **`createRule`**
|
|
1111
|
+
|
|
1112
|
+
**Endpoint:** `POST /catalogs/rules`
|
|
1113
|
+
|
|
1114
|
+
**Summary:** Creates a new catalog rule
|
|
1115
|
+
|
|
1116
|
+
**Description:** POST operation
|
|
1117
|
+
|
|
1118
|
+
**TypeScript Example:**
|
|
1119
|
+
|
|
1120
|
+
```typescript
|
|
1121
|
+
import { createRule, type CreateRuleData, type CreateRuleResponse } from "@epcc-sdk/sdks-shopper";
|
|
1122
|
+
|
|
1123
|
+
const params: CreateRuleData = {
|
|
1124
|
+
body: {
|
|
1125
|
+
data: {
|
|
1126
|
+
type: "resource",
|
|
1127
|
+
attributes: {
|
|
1128
|
+
name: "Resource Name",
|
|
1129
|
+
description: "Resource Description"
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1135
|
+
const result: CreateRuleResponse = await createRule(params);
|
|
1136
|
+
```
|
|
1137
|
+
|
|
1138
|
+
---
|
|
1139
|
+
|
|
1140
|
+
### **`deleteRuleById`**
|
|
1141
|
+
|
|
1142
|
+
**Endpoint:** `DELETE /catalogs/rules/{catalog_rule_id}`
|
|
1143
|
+
|
|
1144
|
+
**Summary:** Deletes a catalog rule
|
|
1145
|
+
|
|
1146
|
+
**Description:** DELETE operation
|
|
1147
|
+
|
|
1148
|
+
**TypeScript Example:**
|
|
1149
|
+
|
|
1150
|
+
```typescript
|
|
1151
|
+
import { deleteRuleById, type DeleteRuleByIdData, type DeleteRuleByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
1152
|
+
|
|
1153
|
+
const params: DeleteRuleByIdData = {
|
|
1154
|
+
path: {
|
|
1155
|
+
catalog_rule_id: "12345678-1234-5678-9012-123456789012",
|
|
1156
|
+
},
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
const result: DeleteRuleByIdResponse = await deleteRuleById(params);
|
|
1160
|
+
```
|
|
1161
|
+
|
|
1162
|
+
---
|
|
1163
|
+
|
|
1164
|
+
### **`getRuleById`**
|
|
1165
|
+
|
|
1166
|
+
**Endpoint:** `GET /catalogs/rules/{catalog_rule_id}`
|
|
1167
|
+
|
|
1168
|
+
**Summary:** Get a catalog rule by ID
|
|
1169
|
+
|
|
1170
|
+
**Description:** GET operation
|
|
1171
|
+
|
|
1172
|
+
**TypeScript Example:**
|
|
1173
|
+
|
|
1174
|
+
```typescript
|
|
1175
|
+
import { getRuleById, type GetRuleByIdData, type GetRuleByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
1176
|
+
|
|
1177
|
+
const params: GetRuleByIdData = {
|
|
1178
|
+
path: {
|
|
1179
|
+
catalog_rule_id: "12345678-1234-5678-9012-123456789012",
|
|
1180
|
+
},
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
const result: GetRuleByIdResponse = await getRuleById(params);
|
|
1184
|
+
```
|
|
1185
|
+
|
|
1186
|
+
---
|
|
1187
|
+
|
|
1188
|
+
### **`updateRule`**
|
|
1189
|
+
|
|
1190
|
+
**Endpoint:** `PUT /catalogs/rules/{catalog_rule_id}`
|
|
1191
|
+
|
|
1192
|
+
**Summary:** Updates a catalog rule
|
|
1193
|
+
|
|
1194
|
+
**Description:** PUT operation
|
|
1195
|
+
|
|
1196
|
+
**TypeScript Example:**
|
|
1197
|
+
|
|
1198
|
+
```typescript
|
|
1199
|
+
import { updateRule, type UpdateRuleData, type UpdateRuleResponse } from "@epcc-sdk/sdks-shopper";
|
|
1200
|
+
|
|
1201
|
+
const params: UpdateRuleData = {
|
|
1202
|
+
path: {
|
|
1203
|
+
catalog_rule_id: "12345678-1234-5678-9012-123456789012",
|
|
1204
|
+
},
|
|
1205
|
+
body: {
|
|
1206
|
+
data: {
|
|
1207
|
+
type: "resource",
|
|
1208
|
+
attributes: {
|
|
1209
|
+
name: "Resource Name",
|
|
1210
|
+
description: "Resource Description"
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
const result: UpdateRuleResponse = await updateRule(params);
|
|
1217
|
+
```
|
|
1218
|
+
|
|
1219
|
+
---
|
|
1220
|
+
|
|
1221
|
+
### **`getAllHierarchies`**
|
|
1222
|
+
|
|
1223
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies`
|
|
1224
|
+
|
|
1225
|
+
**Summary:** Get all Hierarchies
|
|
1226
|
+
|
|
1227
|
+
**Description:** GET operation
|
|
1228
|
+
|
|
1229
|
+
**TypeScript Example:**
|
|
1230
|
+
|
|
1231
|
+
```typescript
|
|
1232
|
+
import { getAllHierarchies, type GetAllHierarchiesData, type GetAllHierarchiesResponse } from "@epcc-sdk/sdks-shopper";
|
|
1233
|
+
|
|
1234
|
+
const params: GetAllHierarchiesData = {
|
|
1235
|
+
path: {
|
|
1236
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1237
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1238
|
+
},
|
|
1239
|
+
query: {
|
|
1240
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1241
|
+
"page[limit]": 10, // OPTIONAL
|
|
1242
|
+
"page[offset]": 0, // OPTIONAL
|
|
1243
|
+
},
|
|
1244
|
+
headers: {
|
|
1245
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1246
|
+
},
|
|
1247
|
+
};
|
|
1248
|
+
|
|
1249
|
+
const result: GetAllHierarchiesResponse = await getAllHierarchies(params);
|
|
1250
|
+
```
|
|
1251
|
+
|
|
1252
|
+
---
|
|
1253
|
+
|
|
1254
|
+
### **`getHierarchy`**
|
|
1255
|
+
|
|
1256
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies/{hierarchy_id}`
|
|
1257
|
+
|
|
1258
|
+
**Summary:** Get a Hierarchy
|
|
1259
|
+
|
|
1260
|
+
**Description:** GET operation
|
|
1261
|
+
|
|
1262
|
+
**TypeScript Example:**
|
|
1263
|
+
|
|
1264
|
+
```typescript
|
|
1265
|
+
import { getHierarchy, type GetHierarchyData, type GetHierarchyResponse } from "@epcc-sdk/sdks-shopper";
|
|
1266
|
+
|
|
1267
|
+
const params: GetHierarchyData = {
|
|
1268
|
+
path: {
|
|
1269
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1270
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1271
|
+
hierarchy_id: "12345678-1234-5678-9012-123456789012",
|
|
1272
|
+
},
|
|
1273
|
+
headers: {
|
|
1274
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1275
|
+
},
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
const result: GetHierarchyResponse = await getHierarchy(params);
|
|
1279
|
+
```
|
|
1280
|
+
|
|
1281
|
+
---
|
|
1282
|
+
|
|
1283
|
+
### **`getHierarchyNodes`**
|
|
1284
|
+
|
|
1285
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies/{hierarchy_id}/nodes`
|
|
1286
|
+
|
|
1287
|
+
**Summary:** Get a Hierarchy's Nodes
|
|
1288
|
+
|
|
1289
|
+
**Description:** GET operation
|
|
1290
|
+
|
|
1291
|
+
**TypeScript Example:**
|
|
1292
|
+
|
|
1293
|
+
```typescript
|
|
1294
|
+
import { getHierarchyNodes, type GetHierarchyNodesData, type GetHierarchyNodesResponse } from "@epcc-sdk/sdks-shopper";
|
|
1295
|
+
|
|
1296
|
+
const params: GetHierarchyNodesData = {
|
|
1297
|
+
path: {
|
|
1298
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1299
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1300
|
+
hierarchy_id: "12345678-1234-5678-9012-123456789012",
|
|
1301
|
+
},
|
|
1302
|
+
query: {
|
|
1303
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1304
|
+
"page[limit]": 10, // OPTIONAL
|
|
1305
|
+
"page[offset]": 0, // OPTIONAL
|
|
1306
|
+
},
|
|
1307
|
+
headers: {
|
|
1308
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1309
|
+
},
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
const result: GetHierarchyNodesResponse = await getHierarchyNodes(params);
|
|
1313
|
+
```
|
|
1314
|
+
|
|
1315
|
+
---
|
|
1316
|
+
|
|
1317
|
+
### **`getHierarchyChildNodes`**
|
|
1318
|
+
|
|
1319
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies/{hierarchy_id}/children`
|
|
1320
|
+
|
|
1321
|
+
**Summary:** Get a Hierarchy's Children
|
|
1322
|
+
|
|
1323
|
+
**Description:** GET operation
|
|
1324
|
+
|
|
1325
|
+
**TypeScript Example:**
|
|
1326
|
+
|
|
1327
|
+
```typescript
|
|
1328
|
+
import { getHierarchyChildNodes, type GetHierarchyChildNodesData, type GetHierarchyChildNodesResponse } from "@epcc-sdk/sdks-shopper";
|
|
1329
|
+
|
|
1330
|
+
const params: GetHierarchyChildNodesData = {
|
|
1331
|
+
path: {
|
|
1332
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1333
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1334
|
+
hierarchy_id: "12345678-1234-5678-9012-123456789012",
|
|
1335
|
+
},
|
|
1336
|
+
query: {
|
|
1337
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1338
|
+
"page[limit]": 10, // OPTIONAL
|
|
1339
|
+
"page[offset]": 0, // OPTIONAL
|
|
1340
|
+
},
|
|
1341
|
+
headers: {
|
|
1342
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1343
|
+
},
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
const result: GetHierarchyChildNodesResponse = await getHierarchyChildNodes(params);
|
|
1347
|
+
```
|
|
1348
|
+
|
|
1349
|
+
---
|
|
1350
|
+
|
|
1351
|
+
### **`getAllNodes`**
|
|
1352
|
+
|
|
1353
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/nodes`
|
|
1354
|
+
|
|
1355
|
+
**Summary:** Get all Nodes
|
|
1356
|
+
|
|
1357
|
+
**Description:** GET operation
|
|
1358
|
+
|
|
1359
|
+
**TypeScript Example:**
|
|
1360
|
+
|
|
1361
|
+
```typescript
|
|
1362
|
+
import { getAllNodes, type GetAllNodesData, type GetAllNodesResponse } from "@epcc-sdk/sdks-shopper";
|
|
1363
|
+
|
|
1364
|
+
const params: GetAllNodesData = {
|
|
1365
|
+
path: {
|
|
1366
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1367
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1368
|
+
},
|
|
1369
|
+
query: {
|
|
1370
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1371
|
+
"page[limit]": 10, // OPTIONAL
|
|
1372
|
+
"page[offset]": 0, // OPTIONAL
|
|
1373
|
+
},
|
|
1374
|
+
headers: {
|
|
1375
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1376
|
+
},
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1379
|
+
const result: GetAllNodesResponse = await getAllNodes(params);
|
|
1380
|
+
```
|
|
1381
|
+
|
|
1382
|
+
---
|
|
1383
|
+
|
|
1384
|
+
### **`getNode`**
|
|
1385
|
+
|
|
1386
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/nodes/{node_id}`
|
|
1387
|
+
|
|
1388
|
+
**Summary:** Get a Node
|
|
1389
|
+
|
|
1390
|
+
**Description:** GET operation
|
|
1391
|
+
|
|
1392
|
+
**TypeScript Example:**
|
|
1393
|
+
|
|
1394
|
+
```typescript
|
|
1395
|
+
import { getNode, type GetNodeData, type GetNodeResponse } from "@epcc-sdk/sdks-shopper";
|
|
1396
|
+
|
|
1397
|
+
const params: GetNodeData = {
|
|
1398
|
+
path: {
|
|
1399
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1400
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1401
|
+
node_id: "12345678-1234-5678-9012-123456789012",
|
|
1402
|
+
},
|
|
1403
|
+
headers: {
|
|
1404
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1405
|
+
},
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
const result: GetNodeResponse = await getNode(params);
|
|
1409
|
+
```
|
|
1410
|
+
|
|
1411
|
+
---
|
|
1412
|
+
|
|
1413
|
+
### **`getChildNodes`**
|
|
1414
|
+
|
|
1415
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/nodes/{node_id}/relationships/children`
|
|
1416
|
+
|
|
1417
|
+
**Summary:** Get a Node's Children
|
|
1418
|
+
|
|
1419
|
+
**Description:** GET operation
|
|
1420
|
+
|
|
1421
|
+
**TypeScript Example:**
|
|
1422
|
+
|
|
1423
|
+
```typescript
|
|
1424
|
+
import { getChildNodes, type GetChildNodesData, type GetChildNodesResponse } from "@epcc-sdk/sdks-shopper";
|
|
1425
|
+
|
|
1426
|
+
const params: GetChildNodesData = {
|
|
1427
|
+
path: {
|
|
1428
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1429
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1430
|
+
node_id: "12345678-1234-5678-9012-123456789012",
|
|
1431
|
+
},
|
|
1432
|
+
query: {
|
|
1433
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1434
|
+
"page[limit]": 10, // OPTIONAL
|
|
1435
|
+
"page[offset]": 0, // OPTIONAL
|
|
1436
|
+
},
|
|
1437
|
+
headers: {
|
|
1438
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1439
|
+
},
|
|
1440
|
+
};
|
|
1441
|
+
|
|
1442
|
+
const result: GetChildNodesResponse = await getChildNodes(params);
|
|
1443
|
+
```
|
|
1444
|
+
|
|
1445
|
+
---
|
|
1446
|
+
|
|
1447
|
+
### **`getAllProducts`**
|
|
1448
|
+
|
|
1449
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/products`
|
|
1450
|
+
|
|
1451
|
+
**Summary:** Get all Products
|
|
1452
|
+
|
|
1453
|
+
**Description:** GET operation
|
|
1454
|
+
|
|
1455
|
+
**TypeScript Example:**
|
|
1456
|
+
|
|
1457
|
+
```typescript
|
|
1458
|
+
import { getAllProducts, type GetAllProductsData, type GetAllProductsResponse } from "@epcc-sdk/sdks-shopper";
|
|
1459
|
+
|
|
1460
|
+
const params: GetAllProductsData = {
|
|
1461
|
+
path: {
|
|
1462
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1463
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1464
|
+
},
|
|
1465
|
+
query: {
|
|
1466
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
1467
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1468
|
+
"page[limit]": 10, // OPTIONAL
|
|
1469
|
+
},
|
|
1470
|
+
headers: {
|
|
1471
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1472
|
+
"EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
|
|
1473
|
+
},
|
|
1474
|
+
};
|
|
1475
|
+
|
|
1476
|
+
const result: GetAllProductsResponse = await getAllProducts(params);
|
|
1477
|
+
```
|
|
1478
|
+
|
|
1479
|
+
---
|
|
1480
|
+
|
|
1481
|
+
### **`getProduct`**
|
|
1482
|
+
|
|
1483
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}`
|
|
1484
|
+
|
|
1485
|
+
**Summary:** Get a Product
|
|
1486
|
+
|
|
1487
|
+
**Description:** GET operation
|
|
1488
|
+
|
|
1489
|
+
**TypeScript Example:**
|
|
1490
|
+
|
|
1491
|
+
```typescript
|
|
1492
|
+
import { getProduct, type GetProductData, type GetProductResponse } from "@epcc-sdk/sdks-shopper";
|
|
1493
|
+
|
|
1494
|
+
const params: GetProductData = {
|
|
1495
|
+
path: {
|
|
1496
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1497
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1498
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
1499
|
+
},
|
|
1500
|
+
query: {
|
|
1501
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
1502
|
+
},
|
|
1503
|
+
headers: {
|
|
1504
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1505
|
+
"EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
|
|
1506
|
+
},
|
|
1507
|
+
};
|
|
1508
|
+
|
|
1509
|
+
const result: GetProductResponse = await getProduct(params);
|
|
1510
|
+
```
|
|
1511
|
+
|
|
1512
|
+
---
|
|
1513
|
+
|
|
1514
|
+
### **`getAllRelatedProducts`**
|
|
1515
|
+
|
|
1516
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/{custom_relationship_slug}/products`
|
|
1517
|
+
|
|
1518
|
+
**Summary:** Get all Related Products of a Product
|
|
1519
|
+
|
|
1520
|
+
**Description:** Returns related products of the provided product ID from a published catalog.
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
**TypeScript Example:**
|
|
1524
|
+
|
|
1525
|
+
```typescript
|
|
1526
|
+
import { getAllRelatedProducts, type GetAllRelatedProductsData, type GetAllRelatedProductsResponse } from "@epcc-sdk/sdks-shopper";
|
|
1527
|
+
|
|
1528
|
+
const params: GetAllRelatedProductsData = {
|
|
1529
|
+
path: {
|
|
1530
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1531
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1532
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
1533
|
+
custom_relationship_slug: "product-slug",
|
|
1534
|
+
},
|
|
1535
|
+
query: {
|
|
1536
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1537
|
+
"page[limit]": 10, // OPTIONAL
|
|
1538
|
+
"page[offset]": 0, // OPTIONAL
|
|
1539
|
+
},
|
|
1540
|
+
headers: {
|
|
1541
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1542
|
+
"EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
|
|
1543
|
+
},
|
|
1544
|
+
};
|
|
1545
|
+
|
|
1546
|
+
const result: GetAllRelatedProductsResponse = await getAllRelatedProducts(params);
|
|
1547
|
+
```
|
|
1548
|
+
|
|
1549
|
+
---
|
|
1550
|
+
|
|
1551
|
+
### **`getComponentProductIds`**
|
|
1552
|
+
|
|
1553
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/component_products`
|
|
1554
|
+
|
|
1555
|
+
**Summary:** Get a Bundle's Component Products
|
|
1556
|
+
|
|
1557
|
+
**Description:** GET operation
|
|
1558
|
+
|
|
1559
|
+
**TypeScript Example:**
|
|
1560
|
+
|
|
1561
|
+
```typescript
|
|
1562
|
+
import { getComponentProductIds, type GetComponentProductIdsData, type GetComponentProductIdsResponse } from "@epcc-sdk/sdks-shopper";
|
|
1563
|
+
|
|
1564
|
+
const params: GetComponentProductIdsData = {
|
|
1565
|
+
path: {
|
|
1566
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1567
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1568
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
1569
|
+
},
|
|
1570
|
+
query: {
|
|
1571
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
1572
|
+
"page[limit]": 10, // OPTIONAL
|
|
1573
|
+
"page[offset]": 0, // OPTIONAL
|
|
1574
|
+
},
|
|
1575
|
+
headers: {
|
|
1576
|
+
"EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
|
|
1577
|
+
},
|
|
1578
|
+
};
|
|
1579
|
+
|
|
1580
|
+
const result: GetComponentProductIdsResponse = await getComponentProductIds(params);
|
|
1581
|
+
```
|
|
1582
|
+
|
|
1583
|
+
---
|
|
1584
|
+
|
|
1585
|
+
### **`getChildProducts`**
|
|
1586
|
+
|
|
1587
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/children`
|
|
1588
|
+
|
|
1589
|
+
**Summary:** Get a Parent Product's Child Products
|
|
1590
|
+
|
|
1591
|
+
**Description:** GET operation
|
|
1592
|
+
|
|
1593
|
+
**TypeScript Example:**
|
|
1594
|
+
|
|
1595
|
+
```typescript
|
|
1596
|
+
import { getChildProducts, type GetChildProductsData, type GetChildProductsResponse } from "@epcc-sdk/sdks-shopper";
|
|
1597
|
+
|
|
1598
|
+
const params: GetChildProductsData = {
|
|
1599
|
+
path: {
|
|
1600
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1601
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1602
|
+
product_id: "12345678-1234-5678-9012-123456789012",
|
|
1603
|
+
},
|
|
1604
|
+
query: {
|
|
1605
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
1606
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1607
|
+
"page[limit]": 10, // OPTIONAL
|
|
1608
|
+
},
|
|
1609
|
+
headers: {
|
|
1610
|
+
"EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
|
|
1611
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1612
|
+
},
|
|
1613
|
+
};
|
|
1614
|
+
|
|
1615
|
+
const result: GetChildProductsResponse = await getChildProducts(params);
|
|
1616
|
+
```
|
|
1617
|
+
|
|
1618
|
+
---
|
|
1619
|
+
|
|
1620
|
+
### **`getProductsForHierarchy`**
|
|
1621
|
+
|
|
1622
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies/{hierarchy_id}/products`
|
|
1623
|
+
|
|
1624
|
+
**Summary:** Get a Hierarchy's Products
|
|
1625
|
+
|
|
1626
|
+
**Description:** GET operation
|
|
1627
|
+
|
|
1628
|
+
**TypeScript Example:**
|
|
1629
|
+
|
|
1630
|
+
```typescript
|
|
1631
|
+
import { getProductsForHierarchy, type GetProductsForHierarchyData, type GetProductsForHierarchyResponse } from "@epcc-sdk/sdks-shopper";
|
|
1632
|
+
|
|
1633
|
+
const params: GetProductsForHierarchyData = {
|
|
1634
|
+
path: {
|
|
1635
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1636
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1637
|
+
hierarchy_id: "12345678-1234-5678-9012-123456789012",
|
|
1638
|
+
},
|
|
1639
|
+
query: {
|
|
1640
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
1641
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1642
|
+
"page[limit]": 10, // OPTIONAL
|
|
1643
|
+
},
|
|
1644
|
+
headers: {
|
|
1645
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1646
|
+
"EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
|
|
1647
|
+
},
|
|
1648
|
+
};
|
|
1649
|
+
|
|
1650
|
+
const result: GetProductsForHierarchyResponse = await getProductsForHierarchy(params);
|
|
1651
|
+
```
|
|
1652
|
+
|
|
1653
|
+
---
|
|
1654
|
+
|
|
1655
|
+
### **`getProductsForNode`**
|
|
1656
|
+
|
|
1657
|
+
**Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/nodes/{node_id}/relationships/products`
|
|
1658
|
+
|
|
1659
|
+
**Summary:** Get a Node's Products
|
|
1660
|
+
|
|
1661
|
+
**Description:** GET operation
|
|
1662
|
+
|
|
1663
|
+
**TypeScript Example:**
|
|
1664
|
+
|
|
1665
|
+
```typescript
|
|
1666
|
+
import { getProductsForNode, type GetProductsForNodeData, type GetProductsForNodeResponse } from "@epcc-sdk/sdks-shopper";
|
|
1667
|
+
|
|
1668
|
+
const params: GetProductsForNodeData = {
|
|
1669
|
+
path: {
|
|
1670
|
+
catalog_id: "12345678-1234-5678-9012-123456789012",
|
|
1671
|
+
release_id: "12345678-1234-5678-9012-123456789012",
|
|
1672
|
+
node_id: "12345678-1234-5678-9012-123456789012",
|
|
1673
|
+
},
|
|
1674
|
+
query: {
|
|
1675
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
1676
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
1677
|
+
"page[limit]": 10, // OPTIONAL
|
|
1678
|
+
},
|
|
1679
|
+
headers: {
|
|
1680
|
+
"accept-language": "en-US", // OPTIONAL
|
|
1681
|
+
"EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
|
|
1682
|
+
},
|
|
1683
|
+
};
|
|
1684
|
+
|
|
1685
|
+
const result: GetProductsForNodeResponse = await getProductsForNode(params);
|
|
1686
|
+
```
|
|
1687
|
+
|
|
1688
|
+
---
|
|
1689
|
+
|
|
1690
|
+
### **`getCarts`**
|
|
1691
|
+
|
|
1692
|
+
**Endpoint:** `GET /v2/carts`
|
|
1693
|
+
|
|
1694
|
+
**Summary:** Get Shopper Carts
|
|
1695
|
+
|
|
1696
|
+
**Description:** GET operation
|
|
1697
|
+
|
|
1698
|
+
**TypeScript Example:**
|
|
1699
|
+
|
|
1700
|
+
```typescript
|
|
1701
|
+
import { getCarts, type GetCartsData, type GetCartsResponse } from "@epcc-sdk/sdks-shopper";
|
|
1702
|
+
|
|
1703
|
+
const params: GetCartsData = {
|
|
1704
|
+
headers: {
|
|
1705
|
+
"x-moltin-customer-token": "header-value", // OPTIONAL
|
|
1706
|
+
},
|
|
1707
|
+
};
|
|
1708
|
+
|
|
1709
|
+
const result: GetCartsResponse = await getCarts(params);
|
|
1710
|
+
```
|
|
1711
|
+
|
|
1712
|
+
---
|
|
1713
|
+
|
|
1714
|
+
### **`createACart`**
|
|
1715
|
+
|
|
1716
|
+
**Endpoint:** `POST /v2/carts`
|
|
1717
|
+
|
|
1718
|
+
**Summary:** Create a Cart
|
|
1719
|
+
|
|
1720
|
+
**Description:** POST operation
|
|
1721
|
+
|
|
1722
|
+
**TypeScript Example:**
|
|
1723
|
+
|
|
1724
|
+
```typescript
|
|
1725
|
+
import { createACart, type CreateACartData, type CreateACartResponse } from "@epcc-sdk/sdks-shopper";
|
|
1726
|
+
|
|
1727
|
+
const params: CreateACartData = {
|
|
1728
|
+
headers: {
|
|
1729
|
+
"x-moltin-customer-token": "header-value", // OPTIONAL
|
|
1730
|
+
},
|
|
1731
|
+
body: {
|
|
1732
|
+
data: {
|
|
1733
|
+
type: "cart_item",
|
|
1734
|
+
quantity: 1,
|
|
1735
|
+
sku: "PRODUCT-SKU-001"
|
|
1736
|
+
}
|
|
1737
|
+
},
|
|
1738
|
+
};
|
|
1739
|
+
|
|
1740
|
+
const result: CreateACartResponse = await createACart(params);
|
|
1741
|
+
```
|
|
1742
|
+
|
|
1743
|
+
---
|
|
1744
|
+
|
|
1745
|
+
### **`deleteACart`**
|
|
1746
|
+
|
|
1747
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}`
|
|
1748
|
+
|
|
1749
|
+
**Summary:** Delete a Cart
|
|
1750
|
+
|
|
1751
|
+
**Description:** DELETE operation
|
|
1752
|
+
|
|
1753
|
+
**TypeScript Example:**
|
|
1754
|
+
|
|
1755
|
+
```typescript
|
|
1756
|
+
import { deleteACart, type DeleteACartData, type DeleteACartResponse } from "@epcc-sdk/sdks-shopper";
|
|
1757
|
+
|
|
1758
|
+
const params: DeleteACartData = {
|
|
1759
|
+
path: {
|
|
1760
|
+
cartID: "cartID",
|
|
1761
|
+
},
|
|
1762
|
+
};
|
|
1763
|
+
|
|
1764
|
+
const result: DeleteACartResponse = await deleteACart(params);
|
|
1765
|
+
```
|
|
1766
|
+
|
|
1767
|
+
---
|
|
1768
|
+
|
|
1769
|
+
### **`getACart`**
|
|
1770
|
+
|
|
1771
|
+
**Endpoint:** `GET /v2/carts/{cartID}`
|
|
1772
|
+
|
|
1773
|
+
**Summary:** Get a Cart
|
|
1774
|
+
|
|
1775
|
+
**Description:** GET operation
|
|
1776
|
+
|
|
1777
|
+
**TypeScript Example:**
|
|
1778
|
+
|
|
1779
|
+
```typescript
|
|
1780
|
+
import { getACart, type GetACartData, type GetACartResponse } from "@epcc-sdk/sdks-shopper";
|
|
1781
|
+
|
|
1782
|
+
const params: GetACartData = {
|
|
1783
|
+
path: {
|
|
1784
|
+
cartID: "cartID",
|
|
1785
|
+
},
|
|
1786
|
+
query: {
|
|
1787
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
1788
|
+
},
|
|
1789
|
+
};
|
|
1790
|
+
|
|
1791
|
+
const result: GetACartResponse = await getACart(params);
|
|
1792
|
+
```
|
|
1793
|
+
|
|
1794
|
+
---
|
|
1795
|
+
|
|
1796
|
+
### **`updateACart`**
|
|
1797
|
+
|
|
1798
|
+
**Endpoint:** `PUT /v2/carts/{cartID}`
|
|
1799
|
+
|
|
1800
|
+
**Summary:** Update a Cart
|
|
1801
|
+
|
|
1802
|
+
**Description:** PUT operation
|
|
1803
|
+
|
|
1804
|
+
**TypeScript Example:**
|
|
1805
|
+
|
|
1806
|
+
```typescript
|
|
1807
|
+
import { updateACart, type UpdateACartData, type UpdateACartResponse } from "@epcc-sdk/sdks-shopper";
|
|
1808
|
+
|
|
1809
|
+
const params: UpdateACartData = {
|
|
1810
|
+
path: {
|
|
1811
|
+
cartID: "cartID",
|
|
1812
|
+
},
|
|
1813
|
+
body: {
|
|
1814
|
+
data: {
|
|
1815
|
+
type: "cart_item",
|
|
1816
|
+
quantity: 1,
|
|
1817
|
+
sku: "PRODUCT-SKU-001"
|
|
1818
|
+
}
|
|
1819
|
+
},
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1822
|
+
const result: UpdateACartResponse = await updateACart(params);
|
|
1823
|
+
```
|
|
1824
|
+
|
|
1825
|
+
---
|
|
1826
|
+
|
|
1827
|
+
### **`deleteAllCartItems`**
|
|
1828
|
+
|
|
1829
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/items`
|
|
1830
|
+
|
|
1831
|
+
**Summary:** Delete all Cart Items
|
|
1832
|
+
|
|
1833
|
+
**Description:** DELETE operation
|
|
1834
|
+
|
|
1835
|
+
**TypeScript Example:**
|
|
1836
|
+
|
|
1837
|
+
```typescript
|
|
1838
|
+
import { deleteAllCartItems, type DeleteAllCartItemsData, type DeleteAllCartItemsResponse } from "@epcc-sdk/sdks-shopper";
|
|
1839
|
+
|
|
1840
|
+
const params: DeleteAllCartItemsData = {
|
|
1841
|
+
path: {
|
|
1842
|
+
cartID: "cartID",
|
|
1843
|
+
},
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1846
|
+
const result: DeleteAllCartItemsResponse = await deleteAllCartItems(params);
|
|
1847
|
+
```
|
|
1848
|
+
|
|
1849
|
+
---
|
|
1850
|
+
|
|
1851
|
+
### **`getCartItems`**
|
|
1852
|
+
|
|
1853
|
+
**Endpoint:** `GET /v2/carts/{cartID}/items`
|
|
1854
|
+
|
|
1855
|
+
**Summary:** Get Cart Items
|
|
1856
|
+
|
|
1857
|
+
**Description:** GET operation
|
|
1858
|
+
|
|
1859
|
+
**TypeScript Example:**
|
|
1860
|
+
|
|
1861
|
+
```typescript
|
|
1862
|
+
import { getCartItems, type GetCartItemsData, type GetCartItemsResponse } from "@epcc-sdk/sdks-shopper";
|
|
1863
|
+
|
|
1864
|
+
const params: GetCartItemsData = {
|
|
1865
|
+
path: {
|
|
1866
|
+
cartID: "cartID",
|
|
1867
|
+
},
|
|
1868
|
+
};
|
|
1869
|
+
|
|
1870
|
+
const result: GetCartItemsResponse = await getCartItems(params);
|
|
1871
|
+
```
|
|
1872
|
+
|
|
1873
|
+
---
|
|
1874
|
+
|
|
1875
|
+
### **`manageCarts`**
|
|
1876
|
+
|
|
1877
|
+
**Endpoint:** `POST /v2/carts/{cartID}/items`
|
|
1878
|
+
|
|
1879
|
+
**Summary:** Add Items to Cart
|
|
1880
|
+
|
|
1881
|
+
**Description:** POST operation
|
|
1882
|
+
|
|
1883
|
+
**TypeScript Example:**
|
|
1884
|
+
|
|
1885
|
+
```typescript
|
|
1886
|
+
import { manageCarts, type ManageCartsData, type ManageCartsResponse } from "@epcc-sdk/sdks-shopper";
|
|
1887
|
+
|
|
1888
|
+
const params: ManageCartsData = {
|
|
1889
|
+
path: {
|
|
1890
|
+
cartID: "cartID",
|
|
1891
|
+
},
|
|
1892
|
+
body: {
|
|
1893
|
+
data: {
|
|
1894
|
+
type: "cart_item",
|
|
1895
|
+
quantity: 1,
|
|
1896
|
+
sku: "PRODUCT-SKU-001"
|
|
1897
|
+
}
|
|
1898
|
+
},
|
|
1899
|
+
};
|
|
1900
|
+
|
|
1901
|
+
const result: ManageCartsResponse = await manageCarts(params);
|
|
1902
|
+
```
|
|
1903
|
+
|
|
1904
|
+
---
|
|
1905
|
+
|
|
1906
|
+
### **`bulkUpdateItemsInCart`**
|
|
1907
|
+
|
|
1908
|
+
**Endpoint:** `PUT /v2/carts/{cartID}/items`
|
|
1909
|
+
|
|
1910
|
+
**Summary:** Bulk Update Items in Cart
|
|
1911
|
+
|
|
1912
|
+
**Description:** PUT operation
|
|
1913
|
+
|
|
1914
|
+
**TypeScript Example:**
|
|
1915
|
+
|
|
1916
|
+
```typescript
|
|
1917
|
+
import { bulkUpdateItemsInCart, type BulkUpdateItemsInCartData, type BulkUpdateItemsInCartResponse } from "@epcc-sdk/sdks-shopper";
|
|
1918
|
+
|
|
1919
|
+
const params: BulkUpdateItemsInCartData = {
|
|
1920
|
+
path: {
|
|
1921
|
+
cartID: "cartID",
|
|
1922
|
+
},
|
|
1923
|
+
body: {
|
|
1924
|
+
data: [
|
|
1925
|
+
{
|
|
1926
|
+
type: "cart_item",
|
|
1927
|
+
quantity: 2,
|
|
1928
|
+
sku: "PRODUCT-SKU-001"
|
|
1929
|
+
}
|
|
1930
|
+
]
|
|
1931
|
+
},
|
|
1932
|
+
};
|
|
1933
|
+
|
|
1934
|
+
const result: BulkUpdateItemsInCartResponse = await bulkUpdateItemsInCart(params);
|
|
1935
|
+
```
|
|
1936
|
+
|
|
1937
|
+
---
|
|
1938
|
+
|
|
1939
|
+
### **`deleteACartItem`**
|
|
1940
|
+
|
|
1941
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/items/{cartitemID}`
|
|
1942
|
+
|
|
1943
|
+
**Summary:** Delete a Cart Item
|
|
1944
|
+
|
|
1945
|
+
**Description:** Use this endpoint to delete a cart item.
|
|
1946
|
+
|
|
1947
|
+
**TypeScript Example:**
|
|
1948
|
+
|
|
1949
|
+
```typescript
|
|
1950
|
+
import { deleteACartItem, type DeleteACartItemData, type DeleteACartItemResponse } from "@epcc-sdk/sdks-shopper";
|
|
1951
|
+
|
|
1952
|
+
const params: DeleteACartItemData = {
|
|
1953
|
+
path: {
|
|
1954
|
+
cartID: "cartID",
|
|
1955
|
+
cartitemID: "cartitemID",
|
|
1956
|
+
},
|
|
1957
|
+
};
|
|
1958
|
+
|
|
1959
|
+
const result: DeleteACartItemResponse = await deleteACartItem(params);
|
|
1960
|
+
```
|
|
1961
|
+
|
|
1962
|
+
---
|
|
1963
|
+
|
|
1964
|
+
### **`updateACartItem`**
|
|
1965
|
+
|
|
1966
|
+
**Endpoint:** `PUT /v2/carts/{cartID}/items/{cartitemID}`
|
|
1967
|
+
|
|
1968
|
+
**Summary:** Update a Cart Item
|
|
1969
|
+
|
|
1970
|
+
**Description:** You can easily update a cart item. A successful update returns the cart items.
|
|
1971
|
+
|
|
1972
|
+
**TypeScript Example:**
|
|
1973
|
+
|
|
1974
|
+
```typescript
|
|
1975
|
+
import { updateACartItem, type UpdateACartItemData, type UpdateACartItemResponse } from "@epcc-sdk/sdks-shopper";
|
|
1976
|
+
|
|
1977
|
+
const params: UpdateACartItemData = {
|
|
1978
|
+
path: {
|
|
1979
|
+
cartID: "cartID",
|
|
1980
|
+
cartitemID: "cartitemID",
|
|
1981
|
+
},
|
|
1982
|
+
body: {
|
|
1983
|
+
data: {
|
|
1984
|
+
type: "cart_item",
|
|
1985
|
+
quantity: 1,
|
|
1986
|
+
sku: "PRODUCT-SKU-001"
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
};
|
|
1990
|
+
|
|
1991
|
+
const result: UpdateACartItemResponse = await updateACartItem(params);
|
|
1992
|
+
```
|
|
1993
|
+
|
|
1994
|
+
---
|
|
1995
|
+
|
|
1996
|
+
### **`deleteAccountCartAssociation`**
|
|
1997
|
+
|
|
1998
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/relationships/accounts`
|
|
1999
|
+
|
|
2000
|
+
**Summary:** Delete Account Cart Association
|
|
2001
|
+
|
|
2002
|
+
**Description:** You can delete an association between an account and a cart.
|
|
2003
|
+
|
|
2004
|
+
**TypeScript Example:**
|
|
2005
|
+
|
|
2006
|
+
```typescript
|
|
2007
|
+
import { deleteAccountCartAssociation, type DeleteAccountCartAssociationData, type DeleteAccountCartAssociationResponse } from "@epcc-sdk/sdks-shopper";
|
|
2008
|
+
|
|
2009
|
+
const params: DeleteAccountCartAssociationData = {
|
|
2010
|
+
path: {
|
|
2011
|
+
cartID: "cartID",
|
|
2012
|
+
},
|
|
2013
|
+
};
|
|
2014
|
+
|
|
2015
|
+
const result: DeleteAccountCartAssociationResponse = await deleteAccountCartAssociation(params);
|
|
2016
|
+
```
|
|
2017
|
+
|
|
2018
|
+
---
|
|
2019
|
+
|
|
2020
|
+
### **`createAccountCartAssociation`**
|
|
2021
|
+
|
|
2022
|
+
**Endpoint:** `POST /v2/carts/{cartID}/relationships/accounts`
|
|
2023
|
+
|
|
2024
|
+
**Summary:** Create an Account Cart Association
|
|
2025
|
+
|
|
2026
|
+
**Description:** POST operation
|
|
2027
|
+
|
|
2028
|
+
**TypeScript Example:**
|
|
2029
|
+
|
|
2030
|
+
```typescript
|
|
2031
|
+
import { createAccountCartAssociation, type CreateAccountCartAssociationData, type CreateAccountCartAssociationResponse } from "@epcc-sdk/sdks-shopper";
|
|
2032
|
+
|
|
2033
|
+
const params: CreateAccountCartAssociationData = {
|
|
2034
|
+
path: {
|
|
2035
|
+
cartID: "cartID",
|
|
2036
|
+
},
|
|
2037
|
+
body: {
|
|
2038
|
+
data: {
|
|
2039
|
+
type: "cart_item",
|
|
2040
|
+
quantity: 1,
|
|
2041
|
+
sku: "PRODUCT-SKU-001"
|
|
2042
|
+
}
|
|
2043
|
+
},
|
|
2044
|
+
};
|
|
2045
|
+
|
|
2046
|
+
const result: CreateAccountCartAssociationResponse = await createAccountCartAssociation(params);
|
|
2047
|
+
```
|
|
2048
|
+
|
|
2049
|
+
---
|
|
2050
|
+
|
|
2051
|
+
### **`deleteCustomerCartAssociation`**
|
|
2052
|
+
|
|
2053
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/relationships/customers`
|
|
2054
|
+
|
|
2055
|
+
**Summary:** Delete Customer Cart Association
|
|
2056
|
+
|
|
2057
|
+
**Description:** You can delete an association between a customer and a cart.
|
|
2058
|
+
|
|
2059
|
+
**TypeScript Example:**
|
|
2060
|
+
|
|
2061
|
+
```typescript
|
|
2062
|
+
import { deleteCustomerCartAssociation, type DeleteCustomerCartAssociationData, type DeleteCustomerCartAssociationResponse } from "@epcc-sdk/sdks-shopper";
|
|
2063
|
+
|
|
2064
|
+
const params: DeleteCustomerCartAssociationData = {
|
|
2065
|
+
path: {
|
|
2066
|
+
cartID: "cartID",
|
|
2067
|
+
},
|
|
2068
|
+
headers: {
|
|
2069
|
+
"x-moltin-customer-token": "header-value", // OPTIONAL
|
|
2070
|
+
},
|
|
2071
|
+
};
|
|
2072
|
+
|
|
2073
|
+
const result: DeleteCustomerCartAssociationResponse = await deleteCustomerCartAssociation(params);
|
|
2074
|
+
```
|
|
2075
|
+
|
|
2076
|
+
---
|
|
2077
|
+
|
|
2078
|
+
### **`createCustomerCartAssociation`**
|
|
2079
|
+
|
|
2080
|
+
**Endpoint:** `POST /v2/carts/{cartID}/relationships/customers`
|
|
2081
|
+
|
|
2082
|
+
**Summary:** Create a Customer Cart Association
|
|
2083
|
+
|
|
2084
|
+
**Description:** POST operation
|
|
2085
|
+
|
|
2086
|
+
**TypeScript Example:**
|
|
2087
|
+
|
|
2088
|
+
```typescript
|
|
2089
|
+
import { createCustomerCartAssociation, type CreateCustomerCartAssociationData, type CreateCustomerCartAssociationResponse } from "@epcc-sdk/sdks-shopper";
|
|
2090
|
+
|
|
2091
|
+
const params: CreateCustomerCartAssociationData = {
|
|
2092
|
+
path: {
|
|
2093
|
+
cartID: "cartID",
|
|
2094
|
+
},
|
|
2095
|
+
headers: {
|
|
2096
|
+
"x-moltin-customer-token": "header-value", // OPTIONAL
|
|
2097
|
+
},
|
|
2098
|
+
body: {
|
|
2099
|
+
data: {
|
|
2100
|
+
type: "cart_item",
|
|
2101
|
+
quantity: 1,
|
|
2102
|
+
sku: "PRODUCT-SKU-001"
|
|
2103
|
+
}
|
|
2104
|
+
},
|
|
2105
|
+
};
|
|
2106
|
+
|
|
2107
|
+
const result: CreateCustomerCartAssociationResponse = await createCustomerCartAssociation(params);
|
|
2108
|
+
```
|
|
2109
|
+
|
|
2110
|
+
---
|
|
2111
|
+
|
|
2112
|
+
### **`deleteAPromotionViaPromotionCode`**
|
|
2113
|
+
|
|
2114
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/discounts/{promoCode}`
|
|
2115
|
+
|
|
2116
|
+
**Summary:** Delete a Promotion via Promotion Code
|
|
2117
|
+
|
|
2118
|
+
**Description:** You can remove promotion code from a cart if it was applied manually. This endpoint does not work if the promotion is applied automatically.
|
|
2119
|
+
|
|
2120
|
+
**TypeScript Example:**
|
|
2121
|
+
|
|
2122
|
+
```typescript
|
|
2123
|
+
import { deleteAPromotionViaPromotionCode, type DeleteAPromotionViaPromotionCodeData, type DeleteAPromotionViaPromotionCodeResponse } from "@epcc-sdk/sdks-shopper";
|
|
2124
|
+
|
|
2125
|
+
const params: DeleteAPromotionViaPromotionCodeData = {
|
|
2126
|
+
path: {
|
|
2127
|
+
cartID: "cartID",
|
|
2128
|
+
promoCode: "promoCode",
|
|
2129
|
+
},
|
|
2130
|
+
};
|
|
2131
|
+
|
|
2132
|
+
const result: DeleteAPromotionViaPromotionCodeResponse = await deleteAPromotionViaPromotionCode(params);
|
|
2133
|
+
```
|
|
2134
|
+
|
|
2135
|
+
---
|
|
2136
|
+
|
|
2137
|
+
### **`addTaxItemToCart`**
|
|
2138
|
+
|
|
2139
|
+
**Endpoint:** `POST /v2/carts/{cartID}/items/{cartitemID}/taxes`
|
|
2140
|
+
|
|
2141
|
+
**Summary:** Add Tax Item to Cart
|
|
2142
|
+
|
|
2143
|
+
**Description:**
|
|
2144
|
+
Use this endpoint to add a tax item to a cart.
|
|
2145
|
+
|
|
2146
|
+
:::note
|
|
2147
|
+
|
|
2148
|
+
There is a soft limit of 5 unique tax items per cart item at any one time.
|
|
2149
|
+
|
|
2150
|
+
:::
|
|
2151
|
+
|
|
2152
|
+
|
|
2153
|
+
**TypeScript Example:**
|
|
2154
|
+
|
|
2155
|
+
```typescript
|
|
2156
|
+
import { addTaxItemToCart, type AddTaxItemToCartData, type AddTaxItemToCartResponse } from "@epcc-sdk/sdks-shopper";
|
|
2157
|
+
|
|
2158
|
+
const params: AddTaxItemToCartData = {
|
|
2159
|
+
path: {
|
|
2160
|
+
cartID: "cartID",
|
|
2161
|
+
cartitemID: "cartitemID",
|
|
2162
|
+
},
|
|
2163
|
+
body: {
|
|
2164
|
+
data: {
|
|
2165
|
+
type: "custom_discount",
|
|
2166
|
+
name: "Discount Name",
|
|
2167
|
+
amount: {
|
|
2168
|
+
amount: 1000,
|
|
2169
|
+
currency: "USD"
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
};
|
|
2174
|
+
|
|
2175
|
+
const result: AddTaxItemToCartResponse = await addTaxItemToCart(params);
|
|
2176
|
+
```
|
|
2177
|
+
|
|
2178
|
+
---
|
|
2179
|
+
|
|
2180
|
+
### **`bulkDeleteTaxItemsFromCart`**
|
|
2181
|
+
|
|
2182
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/taxes`
|
|
2183
|
+
|
|
2184
|
+
**Summary:** Bulk Delete Tax Items from Cart
|
|
2185
|
+
|
|
2186
|
+
**Description:** Use this endpoint to bulk delete tax items from cart.
|
|
2187
|
+
|
|
2188
|
+
**TypeScript Example:**
|
|
2189
|
+
|
|
2190
|
+
```typescript
|
|
2191
|
+
import { bulkDeleteTaxItemsFromCart, type BulkDeleteTaxItemsFromCartData, type BulkDeleteTaxItemsFromCartResponse } from "@epcc-sdk/sdks-shopper";
|
|
2192
|
+
|
|
2193
|
+
const params: BulkDeleteTaxItemsFromCartData = {
|
|
2194
|
+
path: {
|
|
2195
|
+
cartID: "cartID",
|
|
2196
|
+
},
|
|
2197
|
+
};
|
|
2198
|
+
|
|
2199
|
+
const result: BulkDeleteTaxItemsFromCartResponse = await bulkDeleteTaxItemsFromCart(params);
|
|
2200
|
+
```
|
|
2201
|
+
|
|
2202
|
+
---
|
|
2203
|
+
|
|
2204
|
+
### **`bulkAddTaxItemsToCart`**
|
|
2205
|
+
|
|
2206
|
+
**Endpoint:** `POST /v2/carts/{cartID}/taxes`
|
|
2207
|
+
|
|
2208
|
+
**Summary:** Bulk Add Tax Items to Cart
|
|
2209
|
+
|
|
2210
|
+
**Description:** POST operation
|
|
2211
|
+
|
|
2212
|
+
**TypeScript Example:**
|
|
2213
|
+
|
|
2214
|
+
```typescript
|
|
2215
|
+
import { bulkAddTaxItemsToCart, type BulkAddTaxItemsToCartData, type BulkAddTaxItemsToCartResponse } from "@epcc-sdk/sdks-shopper";
|
|
2216
|
+
|
|
2217
|
+
const params: BulkAddTaxItemsToCartData = {
|
|
2218
|
+
path: {
|
|
2219
|
+
cartID: "cartID",
|
|
2220
|
+
},
|
|
2221
|
+
body: {
|
|
2222
|
+
data: [
|
|
2223
|
+
{
|
|
2224
|
+
type: "cart_item",
|
|
2225
|
+
quantity: 2,
|
|
2226
|
+
sku: "PRODUCT-SKU-001"
|
|
2227
|
+
}
|
|
2228
|
+
]
|
|
2229
|
+
},
|
|
2230
|
+
};
|
|
2231
|
+
|
|
2232
|
+
const result: BulkAddTaxItemsToCartResponse = await bulkAddTaxItemsToCart(params);
|
|
2233
|
+
```
|
|
2234
|
+
|
|
2235
|
+
---
|
|
2236
|
+
|
|
2237
|
+
### **`deleteATaxItem`**
|
|
2238
|
+
|
|
2239
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}`
|
|
2240
|
+
|
|
2241
|
+
**Summary:** Delete a Tax Item
|
|
2242
|
+
|
|
2243
|
+
**Description:** Use this endpoint to delete a tax item.
|
|
2244
|
+
|
|
2245
|
+
**TypeScript Example:**
|
|
2246
|
+
|
|
2247
|
+
```typescript
|
|
2248
|
+
import { deleteATaxItem, type DeleteATaxItemData, type DeleteATaxItemResponse } from "@epcc-sdk/sdks-shopper";
|
|
2249
|
+
|
|
2250
|
+
const params: DeleteATaxItemData = {
|
|
2251
|
+
path: {
|
|
2252
|
+
cartID: "cartID",
|
|
2253
|
+
cartitemID: "cartitemID",
|
|
2254
|
+
taxitemID: "taxitemID",
|
|
2255
|
+
},
|
|
2256
|
+
};
|
|
2257
|
+
|
|
2258
|
+
const result: DeleteATaxItemResponse = await deleteATaxItem(params);
|
|
2259
|
+
```
|
|
2260
|
+
|
|
2261
|
+
---
|
|
2262
|
+
|
|
2263
|
+
### **`updateATaxItem`**
|
|
2264
|
+
|
|
2265
|
+
**Endpoint:** `PUT /v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}`
|
|
2266
|
+
|
|
2267
|
+
**Summary:** Update a Tax Item
|
|
2268
|
+
|
|
2269
|
+
**Description:** Use this endpoint to update a tax item. To change tax value from `rate` to `amount`, set `rate` to `null`, then set `amount` value and vice versa.
|
|
2270
|
+
|
|
2271
|
+
**TypeScript Example:**
|
|
2272
|
+
|
|
2273
|
+
```typescript
|
|
2274
|
+
import { updateATaxItem, type UpdateATaxItemData, type UpdateATaxItemResponse } from "@epcc-sdk/sdks-shopper";
|
|
2275
|
+
|
|
2276
|
+
const params: UpdateATaxItemData = {
|
|
2277
|
+
path: {
|
|
2278
|
+
cartID: "cartID",
|
|
2279
|
+
cartitemID: "cartitemID",
|
|
2280
|
+
taxitemID: "taxitemID",
|
|
2281
|
+
},
|
|
2282
|
+
body: {
|
|
2283
|
+
data: {
|
|
2284
|
+
type: "resource",
|
|
2285
|
+
attributes: {
|
|
2286
|
+
name: "Resource Name",
|
|
2287
|
+
description: "Resource Description"
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
},
|
|
2291
|
+
};
|
|
2292
|
+
|
|
2293
|
+
const result: UpdateATaxItemResponse = await updateATaxItem(params);
|
|
2294
|
+
```
|
|
2295
|
+
|
|
2296
|
+
---
|
|
2297
|
+
|
|
2298
|
+
### **`bulkDeleteCustomDiscountsFromCart`**
|
|
2299
|
+
|
|
2300
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/custom-discounts`
|
|
2301
|
+
|
|
2302
|
+
**Summary:** Bulk Delete Custom Discounts From Cart
|
|
2303
|
+
|
|
2304
|
+
**Description:** Use this endpoint to bulk delete custom discounts from cart.
|
|
2305
|
+
|
|
2306
|
+
**TypeScript Example:**
|
|
2307
|
+
|
|
2308
|
+
```typescript
|
|
2309
|
+
import { bulkDeleteCustomDiscountsFromCart, type BulkDeleteCustomDiscountsFromCartData, type BulkDeleteCustomDiscountsFromCartResponse } from "@epcc-sdk/sdks-shopper";
|
|
2310
|
+
|
|
2311
|
+
const params: BulkDeleteCustomDiscountsFromCartData = {
|
|
2312
|
+
path: {
|
|
2313
|
+
cartID: "cartID",
|
|
2314
|
+
},
|
|
2315
|
+
};
|
|
2316
|
+
|
|
2317
|
+
const result: BulkDeleteCustomDiscountsFromCartResponse = await bulkDeleteCustomDiscountsFromCart(params);
|
|
2318
|
+
```
|
|
2319
|
+
|
|
2320
|
+
---
|
|
2321
|
+
|
|
2322
|
+
### **`bulkAddCustomDiscountsToCart`**
|
|
2323
|
+
|
|
2324
|
+
**Endpoint:** `POST /v2/carts/{cartID}/custom-discounts`
|
|
2325
|
+
|
|
2326
|
+
**Summary:** Bulk Add Custom Discounts to Cart
|
|
2327
|
+
|
|
2328
|
+
**Description:** POST operation
|
|
2329
|
+
|
|
2330
|
+
**TypeScript Example:**
|
|
2331
|
+
|
|
2332
|
+
```typescript
|
|
2333
|
+
import { bulkAddCustomDiscountsToCart, type BulkAddCustomDiscountsToCartData, type BulkAddCustomDiscountsToCartResponse } from "@epcc-sdk/sdks-shopper";
|
|
2334
|
+
|
|
2335
|
+
const params: BulkAddCustomDiscountsToCartData = {
|
|
2336
|
+
path: {
|
|
2337
|
+
cartID: "cartID",
|
|
2338
|
+
},
|
|
2339
|
+
body: {
|
|
2340
|
+
data: [
|
|
2341
|
+
{
|
|
2342
|
+
type: "cart_item",
|
|
2343
|
+
quantity: 2,
|
|
2344
|
+
sku: "PRODUCT-SKU-001"
|
|
2345
|
+
}
|
|
2346
|
+
]
|
|
2347
|
+
},
|
|
2348
|
+
};
|
|
2349
|
+
|
|
2350
|
+
const result: BulkAddCustomDiscountsToCartResponse = await bulkAddCustomDiscountsToCart(params);
|
|
2351
|
+
```
|
|
2352
|
+
|
|
2353
|
+
---
|
|
2354
|
+
|
|
2355
|
+
### **`deleteCustomDiscountFromCart`**
|
|
2356
|
+
|
|
2357
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/custom-discounts/{customdiscountID}`
|
|
2358
|
+
|
|
2359
|
+
**Summary:** Delete Custom Discount From Cart
|
|
2360
|
+
|
|
2361
|
+
**Description:** Use this endpoint to delete custom discount from cart.
|
|
2362
|
+
|
|
2363
|
+
**TypeScript Example:**
|
|
2364
|
+
|
|
2365
|
+
```typescript
|
|
2366
|
+
import { deleteCustomDiscountFromCart, type DeleteCustomDiscountFromCartData, type DeleteCustomDiscountFromCartResponse } from "@epcc-sdk/sdks-shopper";
|
|
2367
|
+
|
|
2368
|
+
const params: DeleteCustomDiscountFromCartData = {
|
|
2369
|
+
path: {
|
|
2370
|
+
cartID: "cartID",
|
|
2371
|
+
customdiscountID: "customdiscountID",
|
|
2372
|
+
},
|
|
2373
|
+
};
|
|
2374
|
+
|
|
2375
|
+
const result: DeleteCustomDiscountFromCartResponse = await deleteCustomDiscountFromCart(params);
|
|
2376
|
+
```
|
|
2377
|
+
|
|
2378
|
+
---
|
|
2379
|
+
|
|
2380
|
+
### **`updateCustomDiscountForCart`**
|
|
2381
|
+
|
|
2382
|
+
**Endpoint:** `PUT /v2/carts/{cartID}/custom-discounts/{customdiscountID}`
|
|
2383
|
+
|
|
2384
|
+
**Summary:** Update Custom Discount For Cart
|
|
2385
|
+
|
|
2386
|
+
**Description:** Use this endpoint to update a custom discount in your cart.
|
|
2387
|
+
|
|
2388
|
+
**TypeScript Example:**
|
|
2389
|
+
|
|
2390
|
+
```typescript
|
|
2391
|
+
import { updateCustomDiscountForCart, type UpdateCustomDiscountForCartData, type UpdateCustomDiscountForCartResponse } from "@epcc-sdk/sdks-shopper";
|
|
2392
|
+
|
|
2393
|
+
const params: UpdateCustomDiscountForCartData = {
|
|
2394
|
+
path: {
|
|
2395
|
+
cartID: "cartID",
|
|
2396
|
+
customdiscountID: "customdiscountID",
|
|
2397
|
+
},
|
|
2398
|
+
body: {
|
|
2399
|
+
data: {
|
|
2400
|
+
type: "cart_item",
|
|
2401
|
+
quantity: 1,
|
|
2402
|
+
sku: "PRODUCT-SKU-001"
|
|
2403
|
+
}
|
|
2404
|
+
},
|
|
2405
|
+
};
|
|
2406
|
+
|
|
2407
|
+
const result: UpdateCustomDiscountForCartResponse = await updateCustomDiscountForCart(params);
|
|
2408
|
+
```
|
|
2409
|
+
|
|
2410
|
+
---
|
|
2411
|
+
|
|
2412
|
+
### **`addCustomDiscountToCartItem`**
|
|
2413
|
+
|
|
2414
|
+
**Endpoint:** `POST /v2/carts/{cartID}/items/{cartitemID}/custom-discounts`
|
|
2415
|
+
|
|
2416
|
+
**Summary:** Add Custom Discount To Cart Item
|
|
2417
|
+
|
|
2418
|
+
**Description:** Use this endpoint to add a custom discount to cart item.
|
|
2419
|
+
|
|
2420
|
+
**TypeScript Example:**
|
|
2421
|
+
|
|
2422
|
+
```typescript
|
|
2423
|
+
import { addCustomDiscountToCartItem, type AddCustomDiscountToCartItemData, type AddCustomDiscountToCartItemResponse } from "@epcc-sdk/sdks-shopper";
|
|
2424
|
+
|
|
2425
|
+
const params: AddCustomDiscountToCartItemData = {
|
|
2426
|
+
path: {
|
|
2427
|
+
cartID: "cartID",
|
|
2428
|
+
cartitemID: "cartitemID",
|
|
2429
|
+
},
|
|
2430
|
+
body: {
|
|
2431
|
+
data: {
|
|
2432
|
+
type: "custom_discount",
|
|
2433
|
+
name: "Discount Name",
|
|
2434
|
+
amount: {
|
|
2435
|
+
amount: 1000,
|
|
2436
|
+
currency: "USD"
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
},
|
|
2440
|
+
};
|
|
2441
|
+
|
|
2442
|
+
const result: AddCustomDiscountToCartItemResponse = await addCustomDiscountToCartItem(params);
|
|
2443
|
+
```
|
|
2444
|
+
|
|
2445
|
+
---
|
|
2446
|
+
|
|
2447
|
+
### **`deleteCustomDiscountFromCartItem`**
|
|
2448
|
+
|
|
2449
|
+
**Endpoint:** `DELETE /v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}`
|
|
2450
|
+
|
|
2451
|
+
**Summary:** Delete Custom Discount From Cart Item
|
|
2452
|
+
|
|
2453
|
+
**Description:** Use this endpoint to delete custom discount from cart item.
|
|
2454
|
+
|
|
2455
|
+
**TypeScript Example:**
|
|
2456
|
+
|
|
2457
|
+
```typescript
|
|
2458
|
+
import { deleteCustomDiscountFromCartItem, type DeleteCustomDiscountFromCartItemData, type DeleteCustomDiscountFromCartItemResponse } from "@epcc-sdk/sdks-shopper";
|
|
2459
|
+
|
|
2460
|
+
const params: DeleteCustomDiscountFromCartItemData = {
|
|
2461
|
+
path: {
|
|
2462
|
+
cartID: "cartID",
|
|
2463
|
+
cartitemID: "cartitemID",
|
|
2464
|
+
customdiscountID: "customdiscountID",
|
|
2465
|
+
},
|
|
2466
|
+
};
|
|
2467
|
+
|
|
2468
|
+
const result: DeleteCustomDiscountFromCartItemResponse = await deleteCustomDiscountFromCartItem(params);
|
|
2469
|
+
```
|
|
2470
|
+
|
|
2471
|
+
---
|
|
2472
|
+
|
|
2473
|
+
### **`updateCustomDiscountForCartItem`**
|
|
2474
|
+
|
|
2475
|
+
**Endpoint:** `PUT /v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}`
|
|
2476
|
+
|
|
2477
|
+
**Summary:** Update Custom Discount For Cart Item
|
|
2478
|
+
|
|
2479
|
+
**Description:** Use this endpoint to update a custom discount in your cart item.
|
|
2480
|
+
|
|
2481
|
+
**TypeScript Example:**
|
|
2482
|
+
|
|
2483
|
+
```typescript
|
|
2484
|
+
import { updateCustomDiscountForCartItem, type UpdateCustomDiscountForCartItemData, type UpdateCustomDiscountForCartItemResponse } from "@epcc-sdk/sdks-shopper";
|
|
2485
|
+
|
|
2486
|
+
const params: UpdateCustomDiscountForCartItemData = {
|
|
2487
|
+
path: {
|
|
2488
|
+
cartID: "cartID",
|
|
2489
|
+
cartitemID: "cartitemID",
|
|
2490
|
+
customdiscountID: "customdiscountID",
|
|
2491
|
+
},
|
|
2492
|
+
body: {
|
|
2493
|
+
data: {
|
|
2494
|
+
type: "cart_item",
|
|
2495
|
+
quantity: 1,
|
|
2496
|
+
sku: "PRODUCT-SKU-001"
|
|
2497
|
+
}
|
|
2498
|
+
},
|
|
2499
|
+
};
|
|
2500
|
+
|
|
2501
|
+
const result: UpdateCustomDiscountForCartItemResponse = await updateCustomDiscountForCartItem(params);
|
|
2502
|
+
```
|
|
2503
|
+
|
|
2504
|
+
---
|
|
2505
|
+
|
|
2506
|
+
### **`getShippingGroups`**
|
|
2507
|
+
|
|
2508
|
+
**Endpoint:** `GET /v2/carts/{cartID}/shipping-groups`
|
|
2509
|
+
|
|
2510
|
+
**Summary:** Retrieve all shipping groups for a cart
|
|
2511
|
+
|
|
2512
|
+
**Description:** Retrieve all shipping groups for a cart
|
|
2513
|
+
|
|
2514
|
+
**TypeScript Example:**
|
|
2515
|
+
|
|
2516
|
+
```typescript
|
|
2517
|
+
import { getShippingGroups, type GetShippingGroupsData, type GetShippingGroupsResponse } from "@epcc-sdk/sdks-shopper";
|
|
2518
|
+
|
|
2519
|
+
const params: GetShippingGroupsData = {
|
|
2520
|
+
path: {
|
|
2521
|
+
cartID: "cartID",
|
|
2522
|
+
},
|
|
2523
|
+
};
|
|
2524
|
+
|
|
2525
|
+
const result: GetShippingGroupsResponse = await getShippingGroups(params);
|
|
2526
|
+
```
|
|
2527
|
+
|
|
2528
|
+
---
|
|
2529
|
+
|
|
2530
|
+
### **`createShippingGroup`**
|
|
2531
|
+
|
|
2532
|
+
**Endpoint:** `POST /v2/carts/{cartID}/shipping-groups`
|
|
2533
|
+
|
|
2534
|
+
**Summary:** Create a new shipping group for a cart
|
|
2535
|
+
|
|
2536
|
+
**Description:** Create a new shipping group for a cart
|
|
2537
|
+
|
|
2538
|
+
**TypeScript Example:**
|
|
2539
|
+
|
|
2540
|
+
```typescript
|
|
2541
|
+
import { createShippingGroup, type CreateShippingGroupData, type CreateShippingGroupResponse } from "@epcc-sdk/sdks-shopper";
|
|
2542
|
+
|
|
2543
|
+
const params: CreateShippingGroupData = {
|
|
2544
|
+
path: {
|
|
2545
|
+
cartID: "cartID",
|
|
2546
|
+
},
|
|
2547
|
+
body: {
|
|
2548
|
+
data: {
|
|
2549
|
+
type: "resource",
|
|
2550
|
+
attributes: {
|
|
2551
|
+
name: "Resource Name",
|
|
2552
|
+
description: "Resource Description"
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
},
|
|
2556
|
+
};
|
|
2557
|
+
|
|
2558
|
+
const result: CreateShippingGroupResponse = await createShippingGroup(params);
|
|
2559
|
+
```
|
|
2560
|
+
|
|
2561
|
+
---
|
|
2562
|
+
|
|
2563
|
+
### **`deleteCartShippingGroup`**
|
|
2564
|
+
|
|
2565
|
+
**Endpoint:** `DELETE /v2/carts/{cartId}/shipping-groups/{shippingGroupId}`
|
|
2566
|
+
|
|
2567
|
+
**Summary:** Delete Cart Shipping Group
|
|
2568
|
+
|
|
2569
|
+
**Description:** DELETE operation
|
|
2570
|
+
|
|
2571
|
+
**TypeScript Example:**
|
|
2572
|
+
|
|
2573
|
+
```typescript
|
|
2574
|
+
import { deleteCartShippingGroup, type DeleteCartShippingGroupData, type DeleteCartShippingGroupResponse } from "@epcc-sdk/sdks-shopper";
|
|
2575
|
+
|
|
2576
|
+
const params: DeleteCartShippingGroupData = {
|
|
2577
|
+
path: {
|
|
2578
|
+
cartId: "12345678-1234-5678-9012-123456789012",
|
|
2579
|
+
shippingGroupId: "12345678-1234-5678-9012-123456789012",
|
|
2580
|
+
},
|
|
2581
|
+
};
|
|
2582
|
+
|
|
2583
|
+
const result: DeleteCartShippingGroupResponse = await deleteCartShippingGroup(params);
|
|
2584
|
+
```
|
|
2585
|
+
|
|
2586
|
+
---
|
|
2587
|
+
|
|
2588
|
+
### **`getShippingGroupById`**
|
|
2589
|
+
|
|
2590
|
+
**Endpoint:** `GET /v2/carts/{cartId}/shipping-groups/{shippingGroupId}`
|
|
2591
|
+
|
|
2592
|
+
**Summary:** Retrieve a specific shipping group for a cart
|
|
2593
|
+
|
|
2594
|
+
**Description:** Retrieve a specific shipping group for a cart
|
|
2595
|
+
|
|
2596
|
+
**TypeScript Example:**
|
|
2597
|
+
|
|
2598
|
+
```typescript
|
|
2599
|
+
import { getShippingGroupById, type GetShippingGroupByIdData, type GetShippingGroupByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
2600
|
+
|
|
2601
|
+
const params: GetShippingGroupByIdData = {
|
|
2602
|
+
path: {
|
|
2603
|
+
cartId: "12345678-1234-5678-9012-123456789012",
|
|
2604
|
+
shippingGroupId: "12345678-1234-5678-9012-123456789012",
|
|
2605
|
+
},
|
|
2606
|
+
};
|
|
2607
|
+
|
|
2608
|
+
const result: GetShippingGroupByIdResponse = await getShippingGroupById(params);
|
|
2609
|
+
```
|
|
2610
|
+
|
|
2611
|
+
---
|
|
2612
|
+
|
|
2613
|
+
### **`updateShippingGroup`**
|
|
2614
|
+
|
|
2615
|
+
**Endpoint:** `PUT /v2/carts/{cartId}/shipping-groups/{shippingGroupId}`
|
|
2616
|
+
|
|
2617
|
+
**Summary:** Update a shipping group for a cart
|
|
2618
|
+
|
|
2619
|
+
**Description:** Update a specific shipping group for a cart
|
|
2620
|
+
|
|
2621
|
+
**TypeScript Example:**
|
|
2622
|
+
|
|
2623
|
+
```typescript
|
|
2624
|
+
import { updateShippingGroup, type UpdateShippingGroupData, type UpdateShippingGroupResponse } from "@epcc-sdk/sdks-shopper";
|
|
2625
|
+
|
|
2626
|
+
const params: UpdateShippingGroupData = {
|
|
2627
|
+
path: {
|
|
2628
|
+
cartId: "12345678-1234-5678-9012-123456789012",
|
|
2629
|
+
shippingGroupId: "12345678-1234-5678-9012-123456789012",
|
|
2630
|
+
},
|
|
2631
|
+
body: {
|
|
2632
|
+
data: {
|
|
2633
|
+
type: "resource",
|
|
2634
|
+
attributes: {
|
|
2635
|
+
name: "Resource Name",
|
|
2636
|
+
description: "Resource Description"
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
},
|
|
2640
|
+
};
|
|
2641
|
+
|
|
2642
|
+
const result: UpdateShippingGroupResponse = await updateShippingGroup(params);
|
|
2643
|
+
```
|
|
2644
|
+
|
|
2645
|
+
---
|
|
2646
|
+
|
|
2647
|
+
### **`createCartPaymentIntent`**
|
|
2648
|
+
|
|
2649
|
+
**Endpoint:** `POST /v2/carts/{cartID}/payments`
|
|
2650
|
+
|
|
2651
|
+
**Summary:** Create Stripe Payment Intent for a Cart
|
|
2652
|
+
|
|
2653
|
+
**Description:** POST operation
|
|
2654
|
+
|
|
2655
|
+
**TypeScript Example:**
|
|
2656
|
+
|
|
2657
|
+
```typescript
|
|
2658
|
+
import { createCartPaymentIntent, type CreateCartPaymentIntentData, type CreateCartPaymentIntentResponse } from "@epcc-sdk/sdks-shopper";
|
|
2659
|
+
|
|
2660
|
+
const params: CreateCartPaymentIntentData = {
|
|
2661
|
+
path: {
|
|
2662
|
+
cartID: "cartID",
|
|
2663
|
+
},
|
|
2664
|
+
body: {
|
|
2665
|
+
data: {
|
|
2666
|
+
type: "cart_item",
|
|
2667
|
+
quantity: 1,
|
|
2668
|
+
sku: "PRODUCT-SKU-001"
|
|
2669
|
+
}
|
|
2670
|
+
},
|
|
2671
|
+
};
|
|
2672
|
+
|
|
2673
|
+
const result: CreateCartPaymentIntentResponse = await createCartPaymentIntent(params);
|
|
2674
|
+
```
|
|
2675
|
+
|
|
2676
|
+
---
|
|
2677
|
+
|
|
2678
|
+
### **`updateCartPaymentIntent`**
|
|
2679
|
+
|
|
2680
|
+
**Endpoint:** `PUT /v2/carts/{cartID}/payments/{paymentIntentID}`
|
|
2681
|
+
|
|
2682
|
+
**Summary:** Update a Payment Intent on a Cart
|
|
2683
|
+
|
|
2684
|
+
**Description:** Updates the payment information for a specific payment intent on a cart.
|
|
2685
|
+
|
|
2686
|
+
**TypeScript Example:**
|
|
2687
|
+
|
|
2688
|
+
```typescript
|
|
2689
|
+
import { updateCartPaymentIntent, type UpdateCartPaymentIntentData, type UpdateCartPaymentIntentResponse } from "@epcc-sdk/sdks-shopper";
|
|
2690
|
+
|
|
2691
|
+
const params: UpdateCartPaymentIntentData = {
|
|
2692
|
+
path: {
|
|
2693
|
+
cartID: "cartID",
|
|
2694
|
+
paymentIntentID: "paymentIntentID",
|
|
2695
|
+
},
|
|
2696
|
+
body: {
|
|
2697
|
+
data: {
|
|
2698
|
+
type: "cart_item",
|
|
2699
|
+
quantity: 1,
|
|
2700
|
+
sku: "PRODUCT-SKU-001"
|
|
2701
|
+
}
|
|
2702
|
+
},
|
|
2703
|
+
};
|
|
2704
|
+
|
|
2705
|
+
const result: UpdateCartPaymentIntentResponse = await updateCartPaymentIntent(params);
|
|
2706
|
+
```
|
|
2707
|
+
|
|
2708
|
+
---
|
|
2709
|
+
|
|
2710
|
+
### **`checkoutApi`**
|
|
2711
|
+
|
|
2712
|
+
**Endpoint:** `POST /v2/carts/{cartID}/checkout`
|
|
2713
|
+
|
|
2714
|
+
**Summary:** Checkout API
|
|
2715
|
+
|
|
2716
|
+
**Description:** POST operation
|
|
2717
|
+
|
|
2718
|
+
**TypeScript Example:**
|
|
2719
|
+
|
|
2720
|
+
```typescript
|
|
2721
|
+
import { checkoutApi, type CheckoutApiData, type CheckoutApiResponse } from "@epcc-sdk/sdks-shopper";
|
|
2722
|
+
|
|
2723
|
+
const params: CheckoutApiData = {
|
|
2724
|
+
path: {
|
|
2725
|
+
cartID: "cartID",
|
|
2726
|
+
},
|
|
2727
|
+
body: {
|
|
2728
|
+
data: {
|
|
2729
|
+
type: "resource"
|
|
2730
|
+
}
|
|
2731
|
+
},
|
|
2732
|
+
};
|
|
2733
|
+
|
|
2734
|
+
const result: CheckoutApiResponse = await checkoutApi(params);
|
|
2735
|
+
```
|
|
2736
|
+
|
|
2737
|
+
---
|
|
2738
|
+
|
|
2739
|
+
### **`getCustomerOrders`**
|
|
2740
|
+
|
|
2741
|
+
**Endpoint:** `GET /v2/orders`
|
|
2742
|
+
|
|
2743
|
+
**Summary:** Get all Orders
|
|
2744
|
+
|
|
2745
|
+
**Description:** GET operation
|
|
2746
|
+
|
|
2747
|
+
**TypeScript Example:**
|
|
2748
|
+
|
|
2749
|
+
```typescript
|
|
2750
|
+
import { getCustomerOrders, type GetCustomerOrdersData, type GetCustomerOrdersResponse } from "@epcc-sdk/sdks-shopper";
|
|
2751
|
+
|
|
2752
|
+
const params: GetCustomerOrdersData = {
|
|
2753
|
+
query: {
|
|
2754
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
2755
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
2756
|
+
"page[limit]": 10, // OPTIONAL
|
|
2757
|
+
},
|
|
2758
|
+
headers: {
|
|
2759
|
+
"x-moltin-customer-token": "header-value", // OPTIONAL
|
|
2760
|
+
},
|
|
2761
|
+
};
|
|
2762
|
+
|
|
2763
|
+
const result: GetCustomerOrdersResponse = await getCustomerOrders(params);
|
|
2764
|
+
```
|
|
2765
|
+
|
|
2766
|
+
---
|
|
2767
|
+
|
|
2768
|
+
### **`getAnOrder`**
|
|
2769
|
+
|
|
2770
|
+
**Endpoint:** `GET /v2/orders/{orderID}`
|
|
2771
|
+
|
|
2772
|
+
**Summary:** Get an Order
|
|
2773
|
+
|
|
2774
|
+
**Description:** Use this endpoint to retrieve a specific order.
|
|
2775
|
+
|
|
2776
|
+
**TypeScript Example:**
|
|
2777
|
+
|
|
2778
|
+
```typescript
|
|
2779
|
+
import { getAnOrder, type GetAnOrderData, type GetAnOrderResponse } from "@epcc-sdk/sdks-shopper";
|
|
2780
|
+
|
|
2781
|
+
const params: GetAnOrderData = {
|
|
2782
|
+
path: {
|
|
2783
|
+
orderID: "orderID",
|
|
2784
|
+
},
|
|
2785
|
+
query: {
|
|
2786
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
2787
|
+
},
|
|
2788
|
+
};
|
|
2789
|
+
|
|
2790
|
+
const result: GetAnOrderResponse = await getAnOrder(params);
|
|
2791
|
+
```
|
|
2792
|
+
|
|
2793
|
+
---
|
|
2794
|
+
|
|
2795
|
+
### **`updateAnOrder`**
|
|
2796
|
+
|
|
2797
|
+
**Endpoint:** `PUT /v2/orders/{orderID}`
|
|
2798
|
+
|
|
2799
|
+
**Summary:** Update an Order
|
|
2800
|
+
|
|
2801
|
+
**Description:** PUT operation
|
|
2802
|
+
|
|
2803
|
+
**TypeScript Example:**
|
|
2804
|
+
|
|
2805
|
+
```typescript
|
|
2806
|
+
import { updateAnOrder, type UpdateAnOrderData, type UpdateAnOrderResponse } from "@epcc-sdk/sdks-shopper";
|
|
2807
|
+
|
|
2808
|
+
const params: UpdateAnOrderData = {
|
|
2809
|
+
path: {
|
|
2810
|
+
orderID: "orderID",
|
|
2811
|
+
},
|
|
2812
|
+
body: {
|
|
2813
|
+
data: {
|
|
2814
|
+
type: "resource",
|
|
2815
|
+
attributes: {
|
|
2816
|
+
name: "Resource Name",
|
|
2817
|
+
description: "Resource Description"
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
};
|
|
2822
|
+
|
|
2823
|
+
const result: UpdateAnOrderResponse = await updateAnOrder(params);
|
|
2824
|
+
```
|
|
2825
|
+
|
|
2826
|
+
---
|
|
2827
|
+
|
|
2828
|
+
### **`getOrderItems`**
|
|
2829
|
+
|
|
2830
|
+
**Endpoint:** `GET /v2/orders/{orderID}/items`
|
|
2831
|
+
|
|
2832
|
+
**Summary:** Get Order Items
|
|
2833
|
+
|
|
2834
|
+
**Description:** Use this endpoint to retrieve order items.
|
|
2835
|
+
|
|
2836
|
+
**TypeScript Example:**
|
|
2837
|
+
|
|
2838
|
+
```typescript
|
|
2839
|
+
import { getOrderItems, type GetOrderItemsData, type GetOrderItemsResponse } from "@epcc-sdk/sdks-shopper";
|
|
2840
|
+
|
|
2841
|
+
const params: GetOrderItemsData = {
|
|
2842
|
+
path: {
|
|
2843
|
+
orderID: "orderID",
|
|
2844
|
+
},
|
|
2845
|
+
};
|
|
2846
|
+
|
|
2847
|
+
const result: GetOrderItemsResponse = await getOrderItems(params);
|
|
2848
|
+
```
|
|
2849
|
+
|
|
2850
|
+
---
|
|
2851
|
+
|
|
2852
|
+
### **`anonymizeOrders`**
|
|
2853
|
+
|
|
2854
|
+
**Endpoint:** `POST /v2/orders/anonymize`
|
|
2855
|
+
|
|
2856
|
+
**Summary:** Anonymize Orders
|
|
2857
|
+
|
|
2858
|
+
**Description:** POST operation
|
|
2859
|
+
|
|
2860
|
+
**TypeScript Example:**
|
|
2861
|
+
|
|
2862
|
+
```typescript
|
|
2863
|
+
import { anonymizeOrders, type AnonymizeOrdersData, type AnonymizeOrdersResponse } from "@epcc-sdk/sdks-shopper";
|
|
2864
|
+
|
|
2865
|
+
const params: AnonymizeOrdersData = {
|
|
2866
|
+
body: {
|
|
2867
|
+
data: {
|
|
2868
|
+
type: "resource"
|
|
2869
|
+
}
|
|
2870
|
+
},
|
|
2871
|
+
};
|
|
2872
|
+
|
|
2873
|
+
const result: AnonymizeOrdersResponse = await anonymizeOrders(params);
|
|
2874
|
+
```
|
|
2875
|
+
|
|
2876
|
+
---
|
|
2877
|
+
|
|
2878
|
+
### **`confirmOrder`**
|
|
2879
|
+
|
|
2880
|
+
**Endpoint:** `POST /v2/orders/{orderID}/confirm`
|
|
2881
|
+
|
|
2882
|
+
**Summary:** Confirm Order
|
|
2883
|
+
|
|
2884
|
+
**Description:** Use this endpoint to confirm an order. Confirming an order finalizes it and makes it ready for processing.
|
|
2885
|
+
|
|
2886
|
+
|
|
2887
|
+
**TypeScript Example:**
|
|
2888
|
+
|
|
2889
|
+
```typescript
|
|
2890
|
+
import { confirmOrder, type ConfirmOrderData, type ConfirmOrderResponse } from "@epcc-sdk/sdks-shopper";
|
|
2891
|
+
|
|
2892
|
+
const params: ConfirmOrderData = {
|
|
2893
|
+
path: {
|
|
2894
|
+
orderID: "orderID",
|
|
2895
|
+
},
|
|
2896
|
+
body: {
|
|
2897
|
+
data: {
|
|
2898
|
+
type: "resource"
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
};
|
|
2902
|
+
|
|
2903
|
+
const result: ConfirmOrderResponse = await confirmOrder(params);
|
|
2904
|
+
```
|
|
2905
|
+
|
|
2906
|
+
---
|
|
2907
|
+
|
|
2908
|
+
### **`paymentSetup`**
|
|
2909
|
+
|
|
2910
|
+
**Endpoint:** `POST /v2/orders/{orderID}/payments`
|
|
2911
|
+
|
|
2912
|
+
**Summary:** Payments
|
|
2913
|
+
|
|
2914
|
+
**Description:** POST operation
|
|
2915
|
+
|
|
2916
|
+
**TypeScript Example:**
|
|
2917
|
+
|
|
2918
|
+
```typescript
|
|
2919
|
+
import { paymentSetup, type PaymentSetupData, type PaymentSetupResponse } from "@epcc-sdk/sdks-shopper";
|
|
2920
|
+
|
|
2921
|
+
const params: PaymentSetupData = {
|
|
2922
|
+
path: {
|
|
2923
|
+
orderID: "orderID",
|
|
2924
|
+
},
|
|
2925
|
+
body: {
|
|
2926
|
+
data: {
|
|
2927
|
+
gateway: "stripe",
|
|
2928
|
+
method: "purchase"
|
|
2929
|
+
}
|
|
2930
|
+
},
|
|
2931
|
+
};
|
|
2932
|
+
|
|
2933
|
+
const result: PaymentSetupResponse = await paymentSetup(params);
|
|
2934
|
+
```
|
|
2935
|
+
|
|
2936
|
+
---
|
|
2937
|
+
|
|
2938
|
+
### **`confirmPayment`**
|
|
2939
|
+
|
|
2940
|
+
**Endpoint:** `POST /v2/orders/{orderID}/transactions/{transactionID}/confirm`
|
|
2941
|
+
|
|
2942
|
+
**Summary:** Confirm Payment
|
|
2943
|
+
|
|
2944
|
+
**Description:** POST operation
|
|
2945
|
+
|
|
2946
|
+
**TypeScript Example:**
|
|
2947
|
+
|
|
2948
|
+
```typescript
|
|
2949
|
+
import { confirmPayment, type ConfirmPaymentData, type ConfirmPaymentResponse } from "@epcc-sdk/sdks-shopper";
|
|
2950
|
+
|
|
2951
|
+
const params: ConfirmPaymentData = {
|
|
2952
|
+
path: {
|
|
2953
|
+
orderID: "orderID",
|
|
2954
|
+
transactionID: "transactionID",
|
|
2955
|
+
},
|
|
2956
|
+
body: {
|
|
2957
|
+
data: {
|
|
2958
|
+
gateway: "stripe",
|
|
2959
|
+
method: "purchase"
|
|
2960
|
+
}
|
|
2961
|
+
},
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
const result: ConfirmPaymentResponse = await confirmPayment(params);
|
|
2965
|
+
```
|
|
2966
|
+
|
|
2967
|
+
---
|
|
2968
|
+
|
|
2969
|
+
### **`captureATransaction`**
|
|
2970
|
+
|
|
2971
|
+
**Endpoint:** `POST /v2/orders/{orderID}/transactions/{transactionID}/capture`
|
|
2972
|
+
|
|
2973
|
+
**Summary:** Capture a Transaction
|
|
2974
|
+
|
|
2975
|
+
**Description:** POST operation
|
|
2976
|
+
|
|
2977
|
+
**TypeScript Example:**
|
|
2978
|
+
|
|
2979
|
+
```typescript
|
|
2980
|
+
import { captureATransaction, type CaptureATransactionData, type CaptureATransactionResponse } from "@epcc-sdk/sdks-shopper";
|
|
2981
|
+
|
|
2982
|
+
const params: CaptureATransactionData = {
|
|
2983
|
+
path: {
|
|
2984
|
+
orderID: "orderID",
|
|
2985
|
+
transactionID: "transactionID",
|
|
2986
|
+
},
|
|
2987
|
+
body: {
|
|
2988
|
+
data: {
|
|
2989
|
+
type: "resource"
|
|
2990
|
+
}
|
|
2991
|
+
},
|
|
2992
|
+
};
|
|
2993
|
+
|
|
2994
|
+
const result: CaptureATransactionResponse = await captureATransaction(params);
|
|
2995
|
+
```
|
|
2996
|
+
|
|
2997
|
+
---
|
|
2998
|
+
|
|
2999
|
+
### **`refundATransaction`**
|
|
3000
|
+
|
|
3001
|
+
**Endpoint:** `POST /v2/orders/{orderID}/transactions/{transactionID}/refund`
|
|
3002
|
+
|
|
3003
|
+
**Summary:** Refund a Transaction
|
|
3004
|
+
|
|
3005
|
+
**Description:** POST operation
|
|
3006
|
+
|
|
3007
|
+
**TypeScript Example:**
|
|
3008
|
+
|
|
3009
|
+
```typescript
|
|
3010
|
+
import { refundATransaction, type RefundATransactionData, type RefundATransactionResponse } from "@epcc-sdk/sdks-shopper";
|
|
3011
|
+
|
|
3012
|
+
const params: RefundATransactionData = {
|
|
3013
|
+
path: {
|
|
3014
|
+
orderID: "orderID",
|
|
3015
|
+
transactionID: "transactionID",
|
|
3016
|
+
},
|
|
3017
|
+
body: {
|
|
3018
|
+
data: {
|
|
3019
|
+
type: "resource"
|
|
3020
|
+
}
|
|
3021
|
+
},
|
|
3022
|
+
};
|
|
3023
|
+
|
|
3024
|
+
const result: RefundATransactionResponse = await refundATransaction(params);
|
|
3025
|
+
```
|
|
3026
|
+
|
|
3027
|
+
---
|
|
3028
|
+
|
|
3029
|
+
### **`getOrderTransactions`**
|
|
3030
|
+
|
|
3031
|
+
**Endpoint:** `GET /v2/orders/{orderID}/transactions`
|
|
3032
|
+
|
|
3033
|
+
**Summary:** Get Order Transactions
|
|
3034
|
+
|
|
3035
|
+
**Description:** Get order transactions
|
|
3036
|
+
|
|
3037
|
+
**TypeScript Example:**
|
|
3038
|
+
|
|
3039
|
+
```typescript
|
|
3040
|
+
import { getOrderTransactions, type GetOrderTransactionsData, type GetOrderTransactionsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3041
|
+
|
|
3042
|
+
const params: GetOrderTransactionsData = {
|
|
3043
|
+
path: {
|
|
3044
|
+
orderID: "orderID",
|
|
3045
|
+
},
|
|
3046
|
+
};
|
|
3047
|
+
|
|
3048
|
+
const result: GetOrderTransactionsResponse = await getOrderTransactions(params);
|
|
3049
|
+
```
|
|
3050
|
+
|
|
3051
|
+
---
|
|
3052
|
+
|
|
3053
|
+
### **`getATransaction`**
|
|
3054
|
+
|
|
3055
|
+
**Endpoint:** `GET /v2/orders/{orderID}/transactions/{transactionID}`
|
|
3056
|
+
|
|
3057
|
+
**Summary:** Get a Transaction
|
|
3058
|
+
|
|
3059
|
+
**Description:** Retrieves a transaction
|
|
3060
|
+
|
|
3061
|
+
**TypeScript Example:**
|
|
3062
|
+
|
|
3063
|
+
```typescript
|
|
3064
|
+
import { getATransaction, type GetATransactionData, type GetATransactionResponse } from "@epcc-sdk/sdks-shopper";
|
|
3065
|
+
|
|
3066
|
+
const params: GetATransactionData = {
|
|
3067
|
+
path: {
|
|
3068
|
+
orderID: "orderID",
|
|
3069
|
+
transactionID: "transactionID",
|
|
3070
|
+
},
|
|
3071
|
+
};
|
|
3072
|
+
|
|
3073
|
+
const result: GetATransactionResponse = await getATransaction(params);
|
|
3074
|
+
```
|
|
3075
|
+
|
|
3076
|
+
---
|
|
3077
|
+
|
|
3078
|
+
### **`cancelATransaction`**
|
|
3079
|
+
|
|
3080
|
+
**Endpoint:** `POST /v2/orders/{orderID}/transactions/{transactionID}/cancel`
|
|
3081
|
+
|
|
3082
|
+
**Summary:** Cancel a Transaction
|
|
3083
|
+
|
|
3084
|
+
**Description:** POST operation
|
|
3085
|
+
|
|
3086
|
+
**TypeScript Example:**
|
|
3087
|
+
|
|
3088
|
+
```typescript
|
|
3089
|
+
import { cancelATransaction, type CancelATransactionData, type CancelATransactionResponse } from "@epcc-sdk/sdks-shopper";
|
|
3090
|
+
|
|
3091
|
+
const params: CancelATransactionData = {
|
|
3092
|
+
path: {
|
|
3093
|
+
orderID: "orderID",
|
|
3094
|
+
transactionID: "transactionID",
|
|
3095
|
+
},
|
|
3096
|
+
body: {
|
|
3097
|
+
data: {
|
|
3098
|
+
type: "resource"
|
|
3099
|
+
}
|
|
3100
|
+
},
|
|
3101
|
+
};
|
|
3102
|
+
|
|
3103
|
+
const result: CancelATransactionResponse = await cancelATransaction(params);
|
|
3104
|
+
```
|
|
3105
|
+
|
|
3106
|
+
---
|
|
3107
|
+
|
|
3108
|
+
### **`getOrderShippingGroups`**
|
|
3109
|
+
|
|
3110
|
+
**Endpoint:** `GET /v2/orders/{orderID}/shipping-groups`
|
|
3111
|
+
|
|
3112
|
+
**Summary:** Retrieve all shipping groups for an order
|
|
3113
|
+
|
|
3114
|
+
**Description:** Retrieve all shipping groups for an order
|
|
3115
|
+
|
|
3116
|
+
**TypeScript Example:**
|
|
3117
|
+
|
|
3118
|
+
```typescript
|
|
3119
|
+
import { getOrderShippingGroups, type GetOrderShippingGroupsData, type GetOrderShippingGroupsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3120
|
+
|
|
3121
|
+
const params: GetOrderShippingGroupsData = {
|
|
3122
|
+
path: {
|
|
3123
|
+
orderID: "orderID",
|
|
3124
|
+
},
|
|
3125
|
+
};
|
|
3126
|
+
|
|
3127
|
+
const result: GetOrderShippingGroupsResponse = await getOrderShippingGroups(params);
|
|
3128
|
+
```
|
|
3129
|
+
|
|
3130
|
+
---
|
|
3131
|
+
|
|
3132
|
+
### **`createOrderShippingGroup`**
|
|
3133
|
+
|
|
3134
|
+
**Endpoint:** `POST /v2/orders/{orderID}/shipping-groups`
|
|
3135
|
+
|
|
3136
|
+
**Summary:** Create a shipping group for an order
|
|
3137
|
+
|
|
3138
|
+
**Description:** Create a new shipping group for an order
|
|
3139
|
+
|
|
3140
|
+
**TypeScript Example:**
|
|
3141
|
+
|
|
3142
|
+
```typescript
|
|
3143
|
+
import { createOrderShippingGroup, type CreateOrderShippingGroupData, type CreateOrderShippingGroupResponse } from "@epcc-sdk/sdks-shopper";
|
|
3144
|
+
|
|
3145
|
+
const params: CreateOrderShippingGroupData = {
|
|
3146
|
+
path: {
|
|
3147
|
+
orderID: "orderID",
|
|
3148
|
+
},
|
|
3149
|
+
body: {
|
|
3150
|
+
data: {
|
|
3151
|
+
type: "resource",
|
|
3152
|
+
attributes: {
|
|
3153
|
+
name: "Resource Name",
|
|
3154
|
+
description: "Resource Description"
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
},
|
|
3158
|
+
};
|
|
3159
|
+
|
|
3160
|
+
const result: CreateOrderShippingGroupResponse = await createOrderShippingGroup(params);
|
|
3161
|
+
```
|
|
3162
|
+
|
|
3163
|
+
---
|
|
3164
|
+
|
|
3165
|
+
### **`getShippingGroupsById`**
|
|
3166
|
+
|
|
3167
|
+
**Endpoint:** `GET /v2/orders/{orderID}/shipping-groups/{shippingGroupID}`
|
|
3168
|
+
|
|
3169
|
+
**Summary:** Retrieve a specific shipping group for an order
|
|
3170
|
+
|
|
3171
|
+
**Description:** Retrieve a specific shipping group for an order
|
|
3172
|
+
|
|
3173
|
+
**TypeScript Example:**
|
|
3174
|
+
|
|
3175
|
+
```typescript
|
|
3176
|
+
import { getShippingGroupsById, type GetShippingGroupsByIdData, type GetShippingGroupsByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
3177
|
+
|
|
3178
|
+
const params: GetShippingGroupsByIdData = {
|
|
3179
|
+
path: {
|
|
3180
|
+
orderID: "orderID",
|
|
3181
|
+
shippingGroupID: "shippingGroupID",
|
|
3182
|
+
},
|
|
3183
|
+
};
|
|
3184
|
+
|
|
3185
|
+
const result: GetShippingGroupsByIdResponse = await getShippingGroupsById(params);
|
|
3186
|
+
```
|
|
3187
|
+
|
|
3188
|
+
---
|
|
3189
|
+
|
|
3190
|
+
### **`putShippingGroupById`**
|
|
3191
|
+
|
|
3192
|
+
**Endpoint:** `PUT /v2/orders/{orderID}/shipping-groups/{shippingGroupID}`
|
|
3193
|
+
|
|
3194
|
+
**Summary:** Update a shipping group for an order
|
|
3195
|
+
|
|
3196
|
+
**Description:** Update a shipping group for an order
|
|
3197
|
+
|
|
3198
|
+
**TypeScript Example:**
|
|
3199
|
+
|
|
3200
|
+
```typescript
|
|
3201
|
+
import { putShippingGroupById, type PutShippingGroupByIdData, type PutShippingGroupByIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
3202
|
+
|
|
3203
|
+
const params: PutShippingGroupByIdData = {
|
|
3204
|
+
path: {
|
|
3205
|
+
orderID: "orderID",
|
|
3206
|
+
shippingGroupID: "shippingGroupID",
|
|
3207
|
+
},
|
|
3208
|
+
body: {
|
|
3209
|
+
data: {
|
|
3210
|
+
type: "resource"
|
|
3211
|
+
}
|
|
3212
|
+
},
|
|
3213
|
+
};
|
|
3214
|
+
|
|
3215
|
+
const result: PutShippingGroupByIdResponse = await putShippingGroupById(params);
|
|
3216
|
+
```
|
|
3217
|
+
|
|
3218
|
+
---
|
|
3219
|
+
|
|
3220
|
+
### **`listOfferings`**
|
|
3221
|
+
|
|
3222
|
+
**Endpoint:** `GET /v2/subscriptions/offerings`
|
|
3223
|
+
|
|
3224
|
+
**Summary:** List offerings
|
|
3225
|
+
|
|
3226
|
+
**Description:** GET operation
|
|
3227
|
+
|
|
3228
|
+
**TypeScript Example:**
|
|
3229
|
+
|
|
3230
|
+
```typescript
|
|
3231
|
+
import { listOfferings, type ListOfferingsData, type ListOfferingsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3232
|
+
|
|
3233
|
+
const params: ListOfferingsData = {
|
|
3234
|
+
query: {
|
|
3235
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
3236
|
+
"page[offset]": 0, // OPTIONAL
|
|
3237
|
+
"page[limit]": 10, // OPTIONAL
|
|
3238
|
+
},
|
|
3239
|
+
};
|
|
3240
|
+
|
|
3241
|
+
const result: ListOfferingsResponse = await listOfferings(params);
|
|
3242
|
+
```
|
|
3243
|
+
|
|
3244
|
+
---
|
|
3245
|
+
|
|
3246
|
+
### **`getOffering`**
|
|
3247
|
+
|
|
3248
|
+
**Endpoint:** `GET /v2/subscriptions/offerings/{offering_uuid}`
|
|
3249
|
+
|
|
3250
|
+
**Summary:** Get offering
|
|
3251
|
+
|
|
3252
|
+
**Description:** GET operation
|
|
3253
|
+
|
|
3254
|
+
**TypeScript Example:**
|
|
3255
|
+
|
|
3256
|
+
```typescript
|
|
3257
|
+
import { getOffering, type GetOfferingData, type GetOfferingResponse } from "@epcc-sdk/sdks-shopper";
|
|
3258
|
+
|
|
3259
|
+
const params: GetOfferingData = {
|
|
3260
|
+
path: {
|
|
3261
|
+
offering_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3262
|
+
},
|
|
3263
|
+
query: {
|
|
3264
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
3265
|
+
},
|
|
3266
|
+
};
|
|
3267
|
+
|
|
3268
|
+
const result: GetOfferingResponse = await getOffering(params);
|
|
3269
|
+
```
|
|
3270
|
+
|
|
3271
|
+
---
|
|
3272
|
+
|
|
3273
|
+
### **`listOfferingPricingOptions`**
|
|
3274
|
+
|
|
3275
|
+
**Endpoint:** `GET /v2/subscriptions/offerings/{offering_uuid}/pricing-options`
|
|
3276
|
+
|
|
3277
|
+
**Summary:** List an offering's pricing options
|
|
3278
|
+
|
|
3279
|
+
**Description:** GET operation
|
|
3280
|
+
|
|
3281
|
+
**TypeScript Example:**
|
|
3282
|
+
|
|
3283
|
+
```typescript
|
|
3284
|
+
import { listOfferingPricingOptions, type ListOfferingPricingOptionsData, type ListOfferingPricingOptionsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3285
|
+
|
|
3286
|
+
const params: ListOfferingPricingOptionsData = {
|
|
3287
|
+
path: {
|
|
3288
|
+
offering_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3289
|
+
},
|
|
3290
|
+
query: {
|
|
3291
|
+
"page[offset]": 0, // OPTIONAL
|
|
3292
|
+
"page[limit]": 10, // OPTIONAL
|
|
3293
|
+
},
|
|
3294
|
+
};
|
|
3295
|
+
|
|
3296
|
+
const result: ListOfferingPricingOptionsResponse = await listOfferingPricingOptions(params);
|
|
3297
|
+
```
|
|
3298
|
+
|
|
3299
|
+
---
|
|
3300
|
+
|
|
3301
|
+
### **`listOfferingFeatures`**
|
|
3302
|
+
|
|
3303
|
+
**Endpoint:** `GET /v2/subscriptions/offerings/{offering_uuid}/features`
|
|
3304
|
+
|
|
3305
|
+
**Summary:** List an offering's features
|
|
3306
|
+
|
|
3307
|
+
**Description:** GET operation
|
|
3308
|
+
|
|
3309
|
+
**TypeScript Example:**
|
|
3310
|
+
|
|
3311
|
+
```typescript
|
|
3312
|
+
import { listOfferingFeatures, type ListOfferingFeaturesData, type ListOfferingFeaturesResponse } from "@epcc-sdk/sdks-shopper";
|
|
3313
|
+
|
|
3314
|
+
const params: ListOfferingFeaturesData = {
|
|
3315
|
+
path: {
|
|
3316
|
+
offering_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3317
|
+
},
|
|
3318
|
+
query: {
|
|
3319
|
+
"page[offset]": 0, // OPTIONAL
|
|
3320
|
+
"page[limit]": 10, // OPTIONAL
|
|
3321
|
+
},
|
|
3322
|
+
};
|
|
3323
|
+
|
|
3324
|
+
const result: ListOfferingFeaturesResponse = await listOfferingFeatures(params);
|
|
3325
|
+
```
|
|
3326
|
+
|
|
3327
|
+
---
|
|
3328
|
+
|
|
3329
|
+
### **`listOfferingPlans`**
|
|
3330
|
+
|
|
3331
|
+
**Endpoint:** `GET /v2/subscriptions/offerings/{offering_uuid}/plans`
|
|
3332
|
+
|
|
3333
|
+
**Summary:** List an offering's plans
|
|
3334
|
+
|
|
3335
|
+
**Description:** GET operation
|
|
3336
|
+
|
|
3337
|
+
**TypeScript Example:**
|
|
3338
|
+
|
|
3339
|
+
```typescript
|
|
3340
|
+
import { listOfferingPlans, type ListOfferingPlansData, type ListOfferingPlansResponse } from "@epcc-sdk/sdks-shopper";
|
|
3341
|
+
|
|
3342
|
+
const params: ListOfferingPlansData = {
|
|
3343
|
+
path: {
|
|
3344
|
+
offering_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3345
|
+
},
|
|
3346
|
+
query: {
|
|
3347
|
+
"page[offset]": 0, // OPTIONAL
|
|
3348
|
+
"page[limit]": 10, // OPTIONAL
|
|
3349
|
+
},
|
|
3350
|
+
};
|
|
3351
|
+
|
|
3352
|
+
const result: ListOfferingPlansResponse = await listOfferingPlans(params);
|
|
3353
|
+
```
|
|
3354
|
+
|
|
3355
|
+
---
|
|
3356
|
+
|
|
3357
|
+
### **`listOfferingPlanPricingOptions`**
|
|
3358
|
+
|
|
3359
|
+
**Endpoint:** `GET /v2/subscriptions/offerings/{offering_uuid}/plans/{plan_uuid}/relationships/pricing_options`
|
|
3360
|
+
|
|
3361
|
+
**Summary:** List the pricing options available to a plan in an offering
|
|
3362
|
+
|
|
3363
|
+
**Description:** GET operation
|
|
3364
|
+
|
|
3365
|
+
**TypeScript Example:**
|
|
3366
|
+
|
|
3367
|
+
```typescript
|
|
3368
|
+
import { listOfferingPlanPricingOptions, type ListOfferingPlanPricingOptionsData, type ListOfferingPlanPricingOptionsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3369
|
+
|
|
3370
|
+
const params: ListOfferingPlanPricingOptionsData = {
|
|
3371
|
+
path: {
|
|
3372
|
+
offering_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3373
|
+
plan_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3374
|
+
},
|
|
3375
|
+
};
|
|
3376
|
+
|
|
3377
|
+
const result: ListOfferingPlanPricingOptionsResponse = await listOfferingPlanPricingOptions(params);
|
|
3378
|
+
```
|
|
3379
|
+
|
|
3380
|
+
---
|
|
3381
|
+
|
|
3382
|
+
### **`listSubscriptions`**
|
|
3383
|
+
|
|
3384
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions`
|
|
3385
|
+
|
|
3386
|
+
**Summary:** List subscriptions
|
|
3387
|
+
|
|
3388
|
+
**Description:** GET operation
|
|
3389
|
+
|
|
3390
|
+
**TypeScript Example:**
|
|
3391
|
+
|
|
3392
|
+
```typescript
|
|
3393
|
+
import { listSubscriptions, type ListSubscriptionsData, type ListSubscriptionsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3394
|
+
|
|
3395
|
+
const params: ListSubscriptionsData = {
|
|
3396
|
+
query: {
|
|
3397
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
3398
|
+
"page[offset]": 0, // OPTIONAL
|
|
3399
|
+
"page[limit]": 10, // OPTIONAL
|
|
3400
|
+
},
|
|
3401
|
+
};
|
|
3402
|
+
|
|
3403
|
+
const result: ListSubscriptionsResponse = await listSubscriptions(params);
|
|
3404
|
+
```
|
|
3405
|
+
|
|
3406
|
+
---
|
|
3407
|
+
|
|
3408
|
+
### **`getSubscription`**
|
|
3409
|
+
|
|
3410
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}`
|
|
3411
|
+
|
|
3412
|
+
**Summary:** Get subscription
|
|
3413
|
+
|
|
3414
|
+
**Description:** GET operation
|
|
3415
|
+
|
|
3416
|
+
**TypeScript Example:**
|
|
3417
|
+
|
|
3418
|
+
```typescript
|
|
3419
|
+
import { getSubscription, type GetSubscriptionData, type GetSubscriptionResponse } from "@epcc-sdk/sdks-shopper";
|
|
3420
|
+
|
|
3421
|
+
const params: GetSubscriptionData = {
|
|
3422
|
+
path: {
|
|
3423
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3424
|
+
},
|
|
3425
|
+
query: {
|
|
3426
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
3427
|
+
},
|
|
3428
|
+
};
|
|
3429
|
+
|
|
3430
|
+
const result: GetSubscriptionResponse = await getSubscription(params);
|
|
3431
|
+
```
|
|
3432
|
+
|
|
3433
|
+
---
|
|
3434
|
+
|
|
3435
|
+
### **`listSubscriptionPlans`**
|
|
3436
|
+
|
|
3437
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}/plans`
|
|
3438
|
+
|
|
3439
|
+
**Summary:** List subscription plans
|
|
3440
|
+
|
|
3441
|
+
**Description:** GET operation
|
|
3442
|
+
|
|
3443
|
+
**TypeScript Example:**
|
|
3444
|
+
|
|
3445
|
+
```typescript
|
|
3446
|
+
import { listSubscriptionPlans, type ListSubscriptionPlansData, type ListSubscriptionPlansResponse } from "@epcc-sdk/sdks-shopper";
|
|
3447
|
+
|
|
3448
|
+
const params: ListSubscriptionPlansData = {
|
|
3449
|
+
path: {
|
|
3450
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3451
|
+
},
|
|
3452
|
+
};
|
|
3453
|
+
|
|
3454
|
+
const result: ListSubscriptionPlansResponse = await listSubscriptionPlans(params);
|
|
3455
|
+
```
|
|
3456
|
+
|
|
3457
|
+
---
|
|
3458
|
+
|
|
3459
|
+
### **`listSubscriptionPricingOptions`**
|
|
3460
|
+
|
|
3461
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}/pricing-options`
|
|
3462
|
+
|
|
3463
|
+
**Summary:** List subscription pricing options
|
|
3464
|
+
|
|
3465
|
+
**Description:** GET operation
|
|
3466
|
+
|
|
3467
|
+
**TypeScript Example:**
|
|
3468
|
+
|
|
3469
|
+
```typescript
|
|
3470
|
+
import { listSubscriptionPricingOptions, type ListSubscriptionPricingOptionsData, type ListSubscriptionPricingOptionsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3471
|
+
|
|
3472
|
+
const params: ListSubscriptionPricingOptionsData = {
|
|
3473
|
+
path: {
|
|
3474
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3475
|
+
},
|
|
3476
|
+
};
|
|
3477
|
+
|
|
3478
|
+
const result: ListSubscriptionPricingOptionsResponse = await listSubscriptionPricingOptions(params);
|
|
3479
|
+
```
|
|
3480
|
+
|
|
3481
|
+
---
|
|
3482
|
+
|
|
3483
|
+
### **`listSubscriptionStates`**
|
|
3484
|
+
|
|
3485
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}/states`
|
|
3486
|
+
|
|
3487
|
+
**Summary:** List subscription states
|
|
3488
|
+
|
|
3489
|
+
**Description:** GET operation
|
|
3490
|
+
|
|
3491
|
+
**TypeScript Example:**
|
|
3492
|
+
|
|
3493
|
+
```typescript
|
|
3494
|
+
import { listSubscriptionStates, type ListSubscriptionStatesData, type ListSubscriptionStatesResponse } from "@epcc-sdk/sdks-shopper";
|
|
3495
|
+
|
|
3496
|
+
const params: ListSubscriptionStatesData = {
|
|
3497
|
+
path: {
|
|
3498
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3499
|
+
},
|
|
3500
|
+
};
|
|
3501
|
+
|
|
3502
|
+
const result: ListSubscriptionStatesResponse = await listSubscriptionStates(params);
|
|
3503
|
+
```
|
|
3504
|
+
|
|
3505
|
+
---
|
|
3506
|
+
|
|
3507
|
+
### **`createSubscriptionState`**
|
|
3508
|
+
|
|
3509
|
+
**Endpoint:** `POST /v2/subscriptions/subscriptions/{subscription_uuid}/states`
|
|
3510
|
+
|
|
3511
|
+
**Summary:** Create a subscription state
|
|
3512
|
+
|
|
3513
|
+
**Description:** POST operation
|
|
3514
|
+
|
|
3515
|
+
**TypeScript Example:**
|
|
3516
|
+
|
|
3517
|
+
```typescript
|
|
3518
|
+
import { createSubscriptionState, type CreateSubscriptionStateData, type CreateSubscriptionStateResponse } from "@epcc-sdk/sdks-shopper";
|
|
3519
|
+
|
|
3520
|
+
const params: CreateSubscriptionStateData = {
|
|
3521
|
+
path: {
|
|
3522
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3523
|
+
},
|
|
3524
|
+
body: {
|
|
3525
|
+
data: {
|
|
3526
|
+
type: "resource",
|
|
3527
|
+
attributes: {
|
|
3528
|
+
name: "Resource Name",
|
|
3529
|
+
description: "Resource Description"
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
},
|
|
3533
|
+
};
|
|
3534
|
+
|
|
3535
|
+
const result: CreateSubscriptionStateResponse = await createSubscriptionState(params);
|
|
3536
|
+
```
|
|
3537
|
+
|
|
3538
|
+
---
|
|
3539
|
+
|
|
3540
|
+
### **`getSubscriptionState`**
|
|
3541
|
+
|
|
3542
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}/states/{state_uuid}`
|
|
3543
|
+
|
|
3544
|
+
**Summary:** Get subscription state
|
|
3545
|
+
|
|
3546
|
+
**Description:** GET operation
|
|
3547
|
+
|
|
3548
|
+
**TypeScript Example:**
|
|
3549
|
+
|
|
3550
|
+
```typescript
|
|
3551
|
+
import { getSubscriptionState, type GetSubscriptionStateData, type GetSubscriptionStateResponse } from "@epcc-sdk/sdks-shopper";
|
|
3552
|
+
|
|
3553
|
+
const params: GetSubscriptionStateData = {
|
|
3554
|
+
path: {
|
|
3555
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3556
|
+
state_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3557
|
+
},
|
|
3558
|
+
};
|
|
3559
|
+
|
|
3560
|
+
const result: GetSubscriptionStateResponse = await getSubscriptionState(params);
|
|
3561
|
+
```
|
|
3562
|
+
|
|
3563
|
+
---
|
|
3564
|
+
|
|
3565
|
+
### **`listSubscriptionInvoices`**
|
|
3566
|
+
|
|
3567
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}/invoices`
|
|
3568
|
+
|
|
3569
|
+
**Summary:** List subscription invoices
|
|
3570
|
+
|
|
3571
|
+
**Description:** Lists all invoices for a given subscription.
|
|
3572
|
+
|
|
3573
|
+
**TypeScript Example:**
|
|
3574
|
+
|
|
3575
|
+
```typescript
|
|
3576
|
+
import { listSubscriptionInvoices, type ListSubscriptionInvoicesData, type ListSubscriptionInvoicesResponse } from "@epcc-sdk/sdks-shopper";
|
|
3577
|
+
|
|
3578
|
+
const params: ListSubscriptionInvoicesData = {
|
|
3579
|
+
path: {
|
|
3580
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3581
|
+
},
|
|
3582
|
+
query: {
|
|
3583
|
+
"page[offset]": 0, // OPTIONAL
|
|
3584
|
+
"page[limit]": 10, // OPTIONAL
|
|
3585
|
+
},
|
|
3586
|
+
};
|
|
3587
|
+
|
|
3588
|
+
const result: ListSubscriptionInvoicesResponse = await listSubscriptionInvoices(params);
|
|
3589
|
+
```
|
|
3590
|
+
|
|
3591
|
+
---
|
|
3592
|
+
|
|
3593
|
+
### **`listSubscriptionInvoicePayments`**
|
|
3594
|
+
|
|
3595
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments`
|
|
3596
|
+
|
|
3597
|
+
**Summary:** List subscription invoice payments
|
|
3598
|
+
|
|
3599
|
+
**Description:** Lists all invoice payments for a given invoice.
|
|
3600
|
+
|
|
3601
|
+
**TypeScript Example:**
|
|
3602
|
+
|
|
3603
|
+
```typescript
|
|
3604
|
+
import { listSubscriptionInvoicePayments, type ListSubscriptionInvoicePaymentsData, type ListSubscriptionInvoicePaymentsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3605
|
+
|
|
3606
|
+
const params: ListSubscriptionInvoicePaymentsData = {
|
|
3607
|
+
path: {
|
|
3608
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3609
|
+
invoice_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3610
|
+
},
|
|
3611
|
+
query: {
|
|
3612
|
+
"page[offset]": 0, // OPTIONAL
|
|
3613
|
+
"page[limit]": 10, // OPTIONAL
|
|
3614
|
+
},
|
|
3615
|
+
};
|
|
3616
|
+
|
|
3617
|
+
const result: ListSubscriptionInvoicePaymentsResponse = await listSubscriptionInvoicePayments(params);
|
|
3618
|
+
```
|
|
3619
|
+
|
|
3620
|
+
---
|
|
3621
|
+
|
|
3622
|
+
### **`getSubscriptionInvoicePayment`**
|
|
3623
|
+
|
|
3624
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments/{payment_uuid}`
|
|
3625
|
+
|
|
3626
|
+
**Summary:** Get subscription invoice payment
|
|
3627
|
+
|
|
3628
|
+
**Description:** Gets a specific payment for a given invoice.
|
|
3629
|
+
|
|
3630
|
+
**TypeScript Example:**
|
|
3631
|
+
|
|
3632
|
+
```typescript
|
|
3633
|
+
import { getSubscriptionInvoicePayment, type GetSubscriptionInvoicePaymentData, type GetSubscriptionInvoicePaymentResponse } from "@epcc-sdk/sdks-shopper";
|
|
3634
|
+
|
|
3635
|
+
const params: GetSubscriptionInvoicePaymentData = {
|
|
3636
|
+
path: {
|
|
3637
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3638
|
+
invoice_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3639
|
+
payment_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3640
|
+
},
|
|
3641
|
+
};
|
|
3642
|
+
|
|
3643
|
+
const result: GetSubscriptionInvoicePaymentResponse = await getSubscriptionInvoicePayment(params);
|
|
3644
|
+
```
|
|
3645
|
+
|
|
3646
|
+
---
|
|
3647
|
+
|
|
3648
|
+
### **`getSubscriptionInvoice`**
|
|
3649
|
+
|
|
3650
|
+
**Endpoint:** `GET /v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}`
|
|
3651
|
+
|
|
3652
|
+
**Summary:** Get subscription invoice
|
|
3653
|
+
|
|
3654
|
+
**Description:** Gets a specific invoice for a given subscription.
|
|
3655
|
+
|
|
3656
|
+
**TypeScript Example:**
|
|
3657
|
+
|
|
3658
|
+
```typescript
|
|
3659
|
+
import { getSubscriptionInvoice, type GetSubscriptionInvoiceData, type GetSubscriptionInvoiceResponse } from "@epcc-sdk/sdks-shopper";
|
|
3660
|
+
|
|
3661
|
+
const params: GetSubscriptionInvoiceData = {
|
|
3662
|
+
path: {
|
|
3663
|
+
subscription_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3664
|
+
invoice_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3665
|
+
},
|
|
3666
|
+
};
|
|
3667
|
+
|
|
3668
|
+
const result: GetSubscriptionInvoiceResponse = await getSubscriptionInvoice(params);
|
|
3669
|
+
```
|
|
3670
|
+
|
|
3671
|
+
---
|
|
3672
|
+
|
|
3673
|
+
### **`listInvoices`**
|
|
3674
|
+
|
|
3675
|
+
**Endpoint:** `GET /v2/subscriptions/invoices`
|
|
3676
|
+
|
|
3677
|
+
**Summary:** List invoices
|
|
3678
|
+
|
|
3679
|
+
**Description:** GET operation
|
|
3680
|
+
|
|
3681
|
+
**TypeScript Example:**
|
|
3682
|
+
|
|
3683
|
+
```typescript
|
|
3684
|
+
import { listInvoices, type ListInvoicesData, type ListInvoicesResponse } from "@epcc-sdk/sdks-shopper";
|
|
3685
|
+
|
|
3686
|
+
const params: ListInvoicesData = {
|
|
3687
|
+
query: {
|
|
3688
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
3689
|
+
"page[offset]": 0, // OPTIONAL
|
|
3690
|
+
"page[limit]": 10, // OPTIONAL
|
|
3691
|
+
},
|
|
3692
|
+
};
|
|
3693
|
+
|
|
3694
|
+
const result: ListInvoicesResponse = await listInvoices(params);
|
|
3695
|
+
```
|
|
3696
|
+
|
|
3697
|
+
---
|
|
3698
|
+
|
|
3699
|
+
### **`getInvoice`**
|
|
3700
|
+
|
|
3701
|
+
**Endpoint:** `GET /v2/subscriptions/invoices/{invoice_uuid}`
|
|
3702
|
+
|
|
3703
|
+
**Summary:** Get invoice
|
|
3704
|
+
|
|
3705
|
+
**Description:** GET operation
|
|
3706
|
+
|
|
3707
|
+
**TypeScript Example:**
|
|
3708
|
+
|
|
3709
|
+
```typescript
|
|
3710
|
+
import { getInvoice, type GetInvoiceData, type GetInvoiceResponse } from "@epcc-sdk/sdks-shopper";
|
|
3711
|
+
|
|
3712
|
+
const params: GetInvoiceData = {
|
|
3713
|
+
path: {
|
|
3714
|
+
invoice_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3715
|
+
},
|
|
3716
|
+
};
|
|
3717
|
+
|
|
3718
|
+
const result: GetInvoiceResponse = await getInvoice(params);
|
|
3719
|
+
```
|
|
3720
|
+
|
|
3721
|
+
---
|
|
3722
|
+
|
|
3723
|
+
### **`getFeature`**
|
|
3724
|
+
|
|
3725
|
+
**Endpoint:** `GET /v2/subscriptions/features/{feature_uuid}`
|
|
3726
|
+
|
|
3727
|
+
**Summary:** Get feature
|
|
3728
|
+
|
|
3729
|
+
**Description:** GET operation
|
|
3730
|
+
|
|
3731
|
+
**TypeScript Example:**
|
|
3732
|
+
|
|
3733
|
+
```typescript
|
|
3734
|
+
import { getFeature, type GetFeatureData, type GetFeatureResponse } from "@epcc-sdk/sdks-shopper";
|
|
3735
|
+
|
|
3736
|
+
const params: GetFeatureData = {
|
|
3737
|
+
path: {
|
|
3738
|
+
feature_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3739
|
+
},
|
|
3740
|
+
};
|
|
3741
|
+
|
|
3742
|
+
const result: GetFeatureResponse = await getFeature(params);
|
|
3743
|
+
```
|
|
3744
|
+
|
|
3745
|
+
---
|
|
3746
|
+
|
|
3747
|
+
### **`getStock`**
|
|
3748
|
+
|
|
3749
|
+
**Endpoint:** `GET /v2/inventories/{product_uuid}`
|
|
3750
|
+
|
|
3751
|
+
**Summary:** Get Stock for Product
|
|
3752
|
+
|
|
3753
|
+
**Description:** Gets the stock for the product matching the specified unique identifier.
|
|
3754
|
+
|
|
3755
|
+
**TypeScript Example:**
|
|
3756
|
+
|
|
3757
|
+
```typescript
|
|
3758
|
+
import { getStock, type GetStockData, type GetStockResponse } from "@epcc-sdk/sdks-shopper";
|
|
3759
|
+
|
|
3760
|
+
const params: GetStockData = {
|
|
3761
|
+
path: {
|
|
3762
|
+
product_uuid: "12345678-1234-5678-9012-123456789012",
|
|
3763
|
+
},
|
|
3764
|
+
};
|
|
3765
|
+
|
|
3766
|
+
const result: GetStockResponse = await getStock(params);
|
|
3767
|
+
```
|
|
3768
|
+
|
|
3769
|
+
---
|
|
3770
|
+
|
|
3771
|
+
### **`listLocations`**
|
|
3772
|
+
|
|
3773
|
+
**Endpoint:** `GET /v2/inventories/locations`
|
|
3774
|
+
|
|
3775
|
+
**Summary:** List Locations
|
|
3776
|
+
|
|
3777
|
+
**Description:** Lists all Inventory Locations
|
|
3778
|
+
|
|
3779
|
+
**TypeScript Example:**
|
|
3780
|
+
|
|
3781
|
+
```typescript
|
|
3782
|
+
import { listLocations, type ListLocationsData, type ListLocationsResponse } from "@epcc-sdk/sdks-shopper";
|
|
3783
|
+
|
|
3784
|
+
const params: ListLocationsData = {
|
|
3785
|
+
query: {
|
|
3786
|
+
"page[offset]": 0, // OPTIONAL
|
|
3787
|
+
"page[limit]": 10, // OPTIONAL
|
|
3788
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
3789
|
+
},
|
|
3790
|
+
};
|
|
3791
|
+
|
|
3792
|
+
const result: ListLocationsResponse = await listLocations(params);
|
|
3793
|
+
```
|
|
3794
|
+
|
|
3795
|
+
---
|
|
3796
|
+
|
|
3797
|
+
### **`createAnAccessToken`**
|
|
3798
|
+
|
|
3799
|
+
**Endpoint:** `POST /oauth/access_token`
|
|
3800
|
+
|
|
3801
|
+
**Summary:** Create an Access Token
|
|
3802
|
+
|
|
3803
|
+
**Description:** POST operation
|
|
3804
|
+
|
|
3805
|
+
**TypeScript Example:**
|
|
3806
|
+
|
|
3807
|
+
```typescript
|
|
3808
|
+
import { createAnAccessToken, type CreateAnAccessTokenData, type CreateAnAccessTokenResponse } from "@epcc-sdk/sdks-shopper";
|
|
3809
|
+
|
|
3810
|
+
const params: CreateAnAccessTokenData = {
|
|
3811
|
+
body: {
|
|
3812
|
+
data: {
|
|
3813
|
+
type: "resource",
|
|
3814
|
+
attributes: {
|
|
3815
|
+
name: "Resource Name",
|
|
3816
|
+
description: "Resource Description"
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3819
|
+
},
|
|
3820
|
+
};
|
|
3821
|
+
|
|
3822
|
+
const result: CreateAnAccessTokenResponse = await createAnAccessToken(params);
|
|
3823
|
+
```
|
|
3824
|
+
|
|
3825
|
+
---
|
|
3826
|
+
|
|
3827
|
+
### **`getV2AccountAddresses`**
|
|
3828
|
+
|
|
3829
|
+
**Endpoint:** `GET /v2/accounts/{accountID}/addresses`
|
|
3830
|
+
|
|
3831
|
+
**Summary:** Get Account Addresses
|
|
3832
|
+
|
|
3833
|
+
**Description:** Get Account Addresses
|
|
3834
|
+
|
|
3835
|
+
**TypeScript Example:**
|
|
3836
|
+
|
|
3837
|
+
```typescript
|
|
3838
|
+
import { getV2AccountAddresses, type GetV2AccountAddressesData, type GetV2AccountAddressesResponse } from "@epcc-sdk/sdks-shopper";
|
|
3839
|
+
|
|
3840
|
+
const params: GetV2AccountAddressesData = {
|
|
3841
|
+
path: {
|
|
3842
|
+
accountID: "accountID",
|
|
3843
|
+
},
|
|
3844
|
+
};
|
|
3845
|
+
|
|
3846
|
+
const result: GetV2AccountAddressesResponse = await getV2AccountAddresses(params);
|
|
3847
|
+
```
|
|
3848
|
+
|
|
3849
|
+
---
|
|
3850
|
+
|
|
3851
|
+
### **`postV2AccountAddress`**
|
|
3852
|
+
|
|
3853
|
+
**Endpoint:** `POST /v2/accounts/{accountID}/addresses`
|
|
3854
|
+
|
|
3855
|
+
**Summary:** Create an Account Address
|
|
3856
|
+
|
|
3857
|
+
**Description:** Create an Account Address
|
|
3858
|
+
|
|
3859
|
+
**TypeScript Example:**
|
|
3860
|
+
|
|
3861
|
+
```typescript
|
|
3862
|
+
import { postV2AccountAddress, type PostV2AccountAddressData, type PostV2AccountAddressResponse } from "@epcc-sdk/sdks-shopper";
|
|
3863
|
+
|
|
3864
|
+
const params: PostV2AccountAddressData = {
|
|
3865
|
+
path: {
|
|
3866
|
+
accountID: "accountID",
|
|
3867
|
+
},
|
|
3868
|
+
body: {
|
|
3869
|
+
data: {
|
|
3870
|
+
type: "resource"
|
|
3871
|
+
}
|
|
3872
|
+
},
|
|
3873
|
+
};
|
|
3874
|
+
|
|
3875
|
+
const result: PostV2AccountAddressResponse = await postV2AccountAddress(params);
|
|
3876
|
+
```
|
|
3877
|
+
|
|
3878
|
+
---
|
|
3879
|
+
|
|
3880
|
+
### **`deleteV2AccountAddress`**
|
|
3881
|
+
|
|
3882
|
+
**Endpoint:** `DELETE /v2/accounts/{accountID}/addresses/{addressID}`
|
|
3883
|
+
|
|
3884
|
+
**Summary:** Delete an Account Address
|
|
3885
|
+
|
|
3886
|
+
**Description:** Delete a specific account within a store
|
|
3887
|
+
|
|
3888
|
+
**TypeScript Example:**
|
|
3889
|
+
|
|
3890
|
+
```typescript
|
|
3891
|
+
import { deleteV2AccountAddress, type DeleteV2AccountAddressData, type DeleteV2AccountAddressResponse } from "@epcc-sdk/sdks-shopper";
|
|
3892
|
+
|
|
3893
|
+
const params: DeleteV2AccountAddressData = {
|
|
3894
|
+
path: {
|
|
3895
|
+
accountID: "accountID",
|
|
3896
|
+
addressID: "addressID",
|
|
3897
|
+
},
|
|
3898
|
+
};
|
|
3899
|
+
|
|
3900
|
+
const result: DeleteV2AccountAddressResponse = await deleteV2AccountAddress(params);
|
|
3901
|
+
```
|
|
3902
|
+
|
|
3903
|
+
---
|
|
3904
|
+
|
|
3905
|
+
### **`getV2AccountAddress`**
|
|
3906
|
+
|
|
3907
|
+
**Endpoint:** `GET /v2/accounts/{accountID}/addresses/{addressID}`
|
|
3908
|
+
|
|
3909
|
+
**Summary:** Get an Account Address
|
|
321
3910
|
|
|
322
|
-
|
|
3911
|
+
**Description:** Get an Account Addresses
|
|
323
3912
|
|
|
324
|
-
|
|
3913
|
+
**TypeScript Example:**
|
|
325
3914
|
|
|
326
|
-
|
|
3915
|
+
```typescript
|
|
3916
|
+
import { getV2AccountAddress, type GetV2AccountAddressData, type GetV2AccountAddressResponse } from "@epcc-sdk/sdks-shopper";
|
|
3917
|
+
|
|
3918
|
+
const params: GetV2AccountAddressData = {
|
|
3919
|
+
path: {
|
|
3920
|
+
accountID: "accountID",
|
|
3921
|
+
addressID: "addressID",
|
|
3922
|
+
},
|
|
3923
|
+
};
|
|
3924
|
+
|
|
3925
|
+
const result: GetV2AccountAddressResponse = await getV2AccountAddress(params);
|
|
3926
|
+
```
|
|
3927
|
+
|
|
3928
|
+
---
|
|
3929
|
+
|
|
3930
|
+
### **`putV2AccountAddress`**
|
|
3931
|
+
|
|
3932
|
+
**Endpoint:** `PUT /v2/accounts/{accountID}/addresses/{addressID}`
|
|
3933
|
+
|
|
3934
|
+
**Summary:** Update an Account Address
|
|
3935
|
+
|
|
3936
|
+
**Description:** Update an Account Address
|
|
3937
|
+
|
|
3938
|
+
**TypeScript Example:**
|
|
3939
|
+
|
|
3940
|
+
```typescript
|
|
3941
|
+
import { putV2AccountAddress, type PutV2AccountAddressData, type PutV2AccountAddressResponse } from "@epcc-sdk/sdks-shopper";
|
|
3942
|
+
|
|
3943
|
+
const params: PutV2AccountAddressData = {
|
|
3944
|
+
path: {
|
|
3945
|
+
accountID: "accountID",
|
|
3946
|
+
addressID: "addressID",
|
|
3947
|
+
},
|
|
3948
|
+
body: {
|
|
3949
|
+
data: {
|
|
3950
|
+
type: "resource"
|
|
3951
|
+
}
|
|
3952
|
+
},
|
|
3953
|
+
};
|
|
3954
|
+
|
|
3955
|
+
const result: PutV2AccountAddressResponse = await putV2AccountAddress(params);
|
|
3956
|
+
```
|
|
3957
|
+
|
|
3958
|
+
---
|
|
3959
|
+
|
|
3960
|
+
### **`getV2Accounts`**
|
|
3961
|
+
|
|
3962
|
+
**Endpoint:** `GET /v2/accounts`
|
|
3963
|
+
|
|
3964
|
+
**Summary:** Get All Accounts
|
|
3965
|
+
|
|
3966
|
+
**Description:** GET operation
|
|
3967
|
+
|
|
3968
|
+
**TypeScript Example:**
|
|
3969
|
+
|
|
3970
|
+
```typescript
|
|
3971
|
+
import { getV2Accounts, type GetV2AccountsData, type GetV2AccountsResponse } from "@epcc-sdk/sdks-shopper";
|
|
327
3972
|
|
|
328
|
-
|
|
3973
|
+
const params: GetV2AccountsData = {
|
|
3974
|
+
query: {
|
|
3975
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
3976
|
+
"page[limit]": 10, // OPTIONAL
|
|
3977
|
+
"page[offset]": 0, // OPTIONAL
|
|
3978
|
+
},
|
|
3979
|
+
};
|
|
3980
|
+
|
|
3981
|
+
const result: GetV2AccountsResponse = await getV2Accounts(params);
|
|
3982
|
+
```
|
|
3983
|
+
|
|
3984
|
+
---
|
|
329
3985
|
|
|
330
|
-
|
|
3986
|
+
### **`postV2Accounts`**
|
|
331
3987
|
|
|
332
|
-
|
|
3988
|
+
**Endpoint:** `POST /v2/accounts`
|
|
333
3989
|
|
|
334
|
-
|
|
3990
|
+
**Summary:** Create an Account
|
|
335
3991
|
|
|
336
|
-
|
|
3992
|
+
**Description:** With the account creation endpoint, you have the ability to create accounts which can optionally have another account as a parent.
|
|
337
3993
|
|
|
338
|
-
|
|
3994
|
+
**TypeScript Example:**
|
|
339
3995
|
|
|
340
|
-
|
|
3996
|
+
```typescript
|
|
3997
|
+
import { postV2Accounts, type PostV2AccountsData, type PostV2AccountsResponse } from "@epcc-sdk/sdks-shopper";
|
|
341
3998
|
|
|
342
|
-
|
|
3999
|
+
const params: PostV2AccountsData = {
|
|
4000
|
+
body: {
|
|
4001
|
+
data: {
|
|
4002
|
+
type: "resource"
|
|
4003
|
+
}
|
|
4004
|
+
},
|
|
4005
|
+
};
|
|
343
4006
|
|
|
344
|
-
|
|
4007
|
+
const result: PostV2AccountsResponse = await postV2Accounts(params);
|
|
4008
|
+
```
|
|
345
4009
|
|
|
346
|
-
|
|
4010
|
+
---
|
|
347
4011
|
|
|
348
|
-
|
|
4012
|
+
### **`getV2AccountsAccountId`**
|
|
349
4013
|
|
|
350
|
-
|
|
4014
|
+
**Endpoint:** `GET /v2/accounts/{accountID}`
|
|
351
4015
|
|
|
352
|
-
|
|
4016
|
+
**Summary:** Get an Account
|
|
353
4017
|
|
|
354
|
-
|
|
4018
|
+
**Description:** View a specific account contained within your store
|
|
355
4019
|
|
|
356
|
-
|
|
4020
|
+
**TypeScript Example:**
|
|
357
4021
|
|
|
358
|
-
|
|
4022
|
+
```typescript
|
|
4023
|
+
import { getV2AccountsAccountId, type GetV2AccountsAccountIdData, type GetV2AccountsAccountIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
359
4024
|
|
|
360
|
-
|
|
4025
|
+
const params: GetV2AccountsAccountIdData = {
|
|
4026
|
+
path: {
|
|
4027
|
+
accountID: "accountID",
|
|
4028
|
+
},
|
|
4029
|
+
};
|
|
361
4030
|
|
|
362
|
-
|
|
4031
|
+
const result: GetV2AccountsAccountIdResponse = await getV2AccountsAccountId(params);
|
|
4032
|
+
```
|
|
363
4033
|
|
|
364
|
-
|
|
4034
|
+
---
|
|
365
4035
|
|
|
366
|
-
|
|
4036
|
+
### **`putV2AccountsAccountId`**
|
|
367
4037
|
|
|
368
|
-
|
|
4038
|
+
**Endpoint:** `PUT /v2/accounts/{accountID}`
|
|
369
4039
|
|
|
370
|
-
|
|
4040
|
+
**Summary:** Update an Account
|
|
371
4041
|
|
|
372
|
-
|
|
4042
|
+
**Description:** Update the information contained on an account.
|
|
373
4043
|
|
|
374
|
-
|
|
4044
|
+
**TypeScript Example:**
|
|
375
4045
|
|
|
376
|
-
|
|
4046
|
+
```typescript
|
|
4047
|
+
import { putV2AccountsAccountId, type PutV2AccountsAccountIdData, type PutV2AccountsAccountIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
377
4048
|
|
|
378
|
-
|
|
4049
|
+
const params: PutV2AccountsAccountIdData = {
|
|
4050
|
+
path: {
|
|
4051
|
+
accountID: "accountID",
|
|
4052
|
+
},
|
|
4053
|
+
body: {
|
|
4054
|
+
data: {
|
|
4055
|
+
type: "resource"
|
|
4056
|
+
}
|
|
4057
|
+
},
|
|
4058
|
+
};
|
|
379
4059
|
|
|
380
|
-
|
|
4060
|
+
const result: PutV2AccountsAccountIdResponse = await putV2AccountsAccountId(params);
|
|
4061
|
+
```
|
|
381
4062
|
|
|
382
|
-
|
|
4063
|
+
---
|
|
383
4064
|
|
|
384
|
-
|
|
4065
|
+
### **`getV2AccountMembers`**
|
|
385
4066
|
|
|
386
|
-
|
|
4067
|
+
**Endpoint:** `GET /v2/account-members`
|
|
387
4068
|
|
|
388
|
-
|
|
4069
|
+
**Summary:** Get all Account Members
|
|
389
4070
|
|
|
390
|
-
|
|
4071
|
+
**Description:** GET operation
|
|
391
4072
|
|
|
392
|
-
|
|
4073
|
+
**TypeScript Example:**
|
|
393
4074
|
|
|
394
|
-
|
|
4075
|
+
```typescript
|
|
4076
|
+
import { getV2AccountMembers, type GetV2AccountMembersData, type GetV2AccountMembersResponse } from "@epcc-sdk/sdks-shopper";
|
|
395
4077
|
|
|
396
|
-
|
|
4078
|
+
const params: GetV2AccountMembersData = {
|
|
4079
|
+
query: {
|
|
4080
|
+
"page[limit]": 10, // OPTIONAL
|
|
4081
|
+
"page[offset]": 0, // OPTIONAL
|
|
4082
|
+
"sort": "-created_at", // OPTIONAL
|
|
4083
|
+
},
|
|
4084
|
+
};
|
|
397
4085
|
|
|
398
|
-
|
|
4086
|
+
const result: GetV2AccountMembersResponse = await getV2AccountMembers(params);
|
|
4087
|
+
```
|
|
399
4088
|
|
|
400
|
-
|
|
4089
|
+
---
|
|
401
4090
|
|
|
402
|
-
|
|
4091
|
+
### **`getV2AccountMembersAccountMemberId`**
|
|
403
4092
|
|
|
404
|
-
|
|
4093
|
+
**Endpoint:** `GET /v2/account-members/{accountMemberID}`
|
|
405
4094
|
|
|
406
|
-
|
|
4095
|
+
**Summary:** Get an Account Member
|
|
407
4096
|
|
|
408
|
-
|
|
4097
|
+
**Description:** Get an account member from your store
|
|
409
4098
|
|
|
410
|
-
|
|
4099
|
+
**TypeScript Example:**
|
|
411
4100
|
|
|
412
|
-
|
|
4101
|
+
```typescript
|
|
4102
|
+
import { getV2AccountMembersAccountMemberId, type GetV2AccountMembersAccountMemberIdData, type GetV2AccountMembersAccountMemberIdResponse } from "@epcc-sdk/sdks-shopper";
|
|
413
4103
|
|
|
414
|
-
|
|
4104
|
+
const params: GetV2AccountMembersAccountMemberIdData = {
|
|
4105
|
+
path: {
|
|
4106
|
+
accountMemberID: "accountMemberID",
|
|
4107
|
+
},
|
|
4108
|
+
};
|
|
415
4109
|
|
|
416
|
-
|
|
4110
|
+
const result: GetV2AccountMembersAccountMemberIdResponse = await getV2AccountMembersAccountMemberId(params);
|
|
4111
|
+
```
|
|
417
4112
|
|
|
418
|
-
|
|
4113
|
+
---
|
|
419
4114
|
|
|
420
|
-
|
|
4115
|
+
### **`getV2AccountsAccountIdAccountMemberships`**
|
|
421
4116
|
|
|
422
|
-
|
|
4117
|
+
**Endpoint:** `GET /v2/accounts/{accountID}/account-memberships`
|
|
423
4118
|
|
|
424
|
-
|
|
4119
|
+
**Summary:** Get all Account Memberships
|
|
425
4120
|
|
|
426
|
-
|
|
4121
|
+
**Description:** GET operation
|
|
427
4122
|
|
|
428
|
-
|
|
4123
|
+
**TypeScript Example:**
|
|
429
4124
|
|
|
430
|
-
|
|
4125
|
+
```typescript
|
|
4126
|
+
import { getV2AccountsAccountIdAccountMemberships, type GetV2AccountsAccountIdAccountMembershipsData, type GetV2AccountsAccountIdAccountMembershipsResponse } from "@epcc-sdk/sdks-shopper";
|
|
431
4127
|
|
|
432
|
-
|
|
4128
|
+
const params: GetV2AccountsAccountIdAccountMembershipsData = {
|
|
4129
|
+
path: {
|
|
4130
|
+
accountID: "accountID",
|
|
4131
|
+
},
|
|
4132
|
+
query: {
|
|
4133
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
4134
|
+
"sort": "-created_at", // OPTIONAL
|
|
4135
|
+
"page[limit]": 10, // OPTIONAL
|
|
4136
|
+
},
|
|
4137
|
+
};
|
|
433
4138
|
|
|
434
|
-
|
|
4139
|
+
const result: GetV2AccountsAccountIdAccountMembershipsResponse = await getV2AccountsAccountIdAccountMemberships(params);
|
|
4140
|
+
```
|
|
435
4141
|
|
|
436
|
-
|
|
4142
|
+
---
|
|
437
4143
|
|
|
438
|
-
|
|
4144
|
+
### **`postV2AccountMembersTokens`**
|
|
439
4145
|
|
|
440
|
-
|
|
4146
|
+
**Endpoint:** `POST /v2/account-members/tokens`
|
|
441
4147
|
|
|
442
|
-
|
|
4148
|
+
**Summary:** Generate an Account Management Authentication Token
|
|
443
4149
|
|
|
444
|
-
|
|
4150
|
+
**Description:** POST operation
|
|
445
4151
|
|
|
446
|
-
|
|
4152
|
+
**TypeScript Example:**
|
|
447
4153
|
|
|
448
|
-
|
|
4154
|
+
```typescript
|
|
4155
|
+
import { postV2AccountMembersTokens, type PostV2AccountMembersTokensData, type PostV2AccountMembersTokensResponse } from "@epcc-sdk/sdks-shopper";
|
|
449
4156
|
|
|
450
|
-
|
|
4157
|
+
const params: PostV2AccountMembersTokensData = {
|
|
4158
|
+
body: {
|
|
4159
|
+
data: {
|
|
4160
|
+
type: "resource"
|
|
4161
|
+
}
|
|
4162
|
+
},
|
|
4163
|
+
};
|
|
451
4164
|
|
|
452
|
-
|
|
4165
|
+
const result: PostV2AccountMembersTokensResponse = await postV2AccountMembersTokens(params);
|
|
4166
|
+
```
|
|
453
4167
|
|
|
454
|
-
|
|
4168
|
+
---
|
|
455
4169
|
|
|
456
|
-
|
|
4170
|
+
### **`createOneTimePasswordTokenRequest`**
|
|
457
4171
|
|
|
458
|
-
|
|
4172
|
+
**Endpoint:** `POST /v2/authentication-realms/{realmId}/password-profiles/{passwordProfileId}/one-time-password-token-request`
|
|
459
4173
|
|
|
460
|
-
-
|
|
4174
|
+
**Summary:** Create a one-time password token request
|
|
461
4175
|
|
|
462
|
-
|
|
4176
|
+
**Description:** POST operation
|
|
463
4177
|
|
|
464
|
-
|
|
4178
|
+
**TypeScript Example:**
|
|
465
4179
|
|
|
466
|
-
|
|
4180
|
+
```typescript
|
|
4181
|
+
import { createOneTimePasswordTokenRequest, type CreateOneTimePasswordTokenRequestData, type CreateOneTimePasswordTokenRequestResponse } from "@epcc-sdk/sdks-shopper";
|
|
467
4182
|
|
|
468
|
-
|
|
4183
|
+
const params: CreateOneTimePasswordTokenRequestData = {
|
|
4184
|
+
path: {
|
|
4185
|
+
realmId: "12345678-1234-5678-9012-123456789012",
|
|
4186
|
+
passwordProfileId: "12345678-1234-5678-9012-123456789012",
|
|
4187
|
+
},
|
|
4188
|
+
body: {
|
|
4189
|
+
data: {
|
|
4190
|
+
type: "resource",
|
|
4191
|
+
attributes: {
|
|
4192
|
+
name: "Resource Name",
|
|
4193
|
+
description: "Resource Description"
|
|
4194
|
+
}
|
|
4195
|
+
}
|
|
4196
|
+
},
|
|
4197
|
+
};
|
|
469
4198
|
|
|
470
|
-
|
|
4199
|
+
const result: CreateOneTimePasswordTokenRequestResponse = await createOneTimePasswordTokenRequest(params);
|
|
4200
|
+
```
|
|
471
4201
|
|
|
472
|
-
|
|
4202
|
+
---
|
|
473
4203
|
|
|
474
|
-
|
|
4204
|
+
### **`updatePasswordProfileInfo`**
|
|
475
4205
|
|
|
476
|
-
|
|
4206
|
+
**Endpoint:** `PUT /v2/authentication-realms/{realmId}/user-authentication-info/{userAuthenticationInfoId}/user-authentication-password-profile-info/{userAuthenticationPasswordProfileInfoId}`
|
|
477
4207
|
|
|
478
|
-
|
|
4208
|
+
**Summary:** Update a user authentication password profile info
|
|
479
4209
|
|
|
480
|
-
|
|
4210
|
+
**Description:** PUT operation
|
|
481
4211
|
|
|
482
|
-
|
|
4212
|
+
**TypeScript Example:**
|
|
483
4213
|
|
|
484
|
-
|
|
4214
|
+
```typescript
|
|
4215
|
+
import { updatePasswordProfileInfo, type UpdatePasswordProfileInfoData, type UpdatePasswordProfileInfoResponse } from "@epcc-sdk/sdks-shopper";
|
|
485
4216
|
|
|
486
|
-
|
|
4217
|
+
const params: UpdatePasswordProfileInfoData = {
|
|
4218
|
+
path: {
|
|
4219
|
+
realmId: "12345678-1234-5678-9012-123456789012",
|
|
4220
|
+
userAuthenticationInfoId: "12345678-1234-5678-9012-123456789012",
|
|
4221
|
+
userAuthenticationPasswordProfileInfoId: "12345678-1234-5678-9012-123456789012",
|
|
4222
|
+
},
|
|
4223
|
+
body: {
|
|
4224
|
+
data: {
|
|
4225
|
+
type: "resource",
|
|
4226
|
+
attributes: {
|
|
4227
|
+
name: "Resource Name",
|
|
4228
|
+
description: "Resource Description"
|
|
4229
|
+
}
|
|
4230
|
+
}
|
|
4231
|
+
},
|
|
4232
|
+
};
|
|
487
4233
|
|
|
488
|
-
|
|
4234
|
+
const result: UpdatePasswordProfileInfoResponse = await updatePasswordProfileInfo(params);
|
|
4235
|
+
```
|
|
489
4236
|
|
|
490
|
-
|
|
4237
|
+
---
|
|
491
4238
|
|
|
492
|
-
|
|
4239
|
+
### **`getAllCurrencies`**
|
|
493
4240
|
|
|
494
|
-
|
|
4241
|
+
**Endpoint:** `GET /v2/currencies`
|
|
495
4242
|
|
|
496
|
-
|
|
4243
|
+
**Summary:** Get all Currencies
|
|
497
4244
|
|
|
498
|
-
|
|
4245
|
+
**Description:** :::caution
|
|
499
4246
|
|
|
500
|
-
|
|
4247
|
+
This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.
|
|
501
4248
|
|
|
502
|
-
|
|
4249
|
+
:::
|
|
503
4250
|
|
|
504
|
-
- **`getShippingGroupsById`** (`GET /v2/orders/{orderID}/shipping-groups/{shippingGroupID}`)
|
|
505
4251
|
|
|
506
|
-
|
|
4252
|
+
**TypeScript Example:**
|
|
507
4253
|
|
|
508
|
-
|
|
4254
|
+
```typescript
|
|
4255
|
+
import { getAllCurrencies, type GetAllCurrenciesData, type GetAllCurrenciesResponse } from "@epcc-sdk/sdks-shopper";
|
|
509
4256
|
|
|
510
|
-
|
|
4257
|
+
const params: GetAllCurrenciesData = {
|
|
4258
|
+
query: {
|
|
4259
|
+
"page[offset]": 0, // OPTIONAL
|
|
4260
|
+
"page[limit]": 10, // OPTIONAL
|
|
4261
|
+
},
|
|
4262
|
+
};
|
|
511
4263
|
|
|
512
|
-
|
|
4264
|
+
const result: GetAllCurrenciesResponse = await getAllCurrencies(params);
|
|
4265
|
+
```
|
|
513
4266
|
|
|
514
|
-
|
|
4267
|
+
---
|
|
515
4268
|
|
|
516
|
-
|
|
4269
|
+
### **`getACurrency`**
|
|
517
4270
|
|
|
518
|
-
|
|
4271
|
+
**Endpoint:** `GET /v2/currencies/{currencyID}`
|
|
519
4272
|
|
|
520
|
-
|
|
4273
|
+
**Summary:** Get a Currency
|
|
521
4274
|
|
|
522
|
-
|
|
4275
|
+
**Description:** :::caution
|
|
523
4276
|
|
|
524
|
-
|
|
4277
|
+
This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.
|
|
525
4278
|
|
|
526
|
-
|
|
4279
|
+
:::
|
|
527
4280
|
|
|
528
|
-
- **`listSubscriptionStates`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/states`)
|
|
529
4281
|
|
|
530
|
-
|
|
4282
|
+
**TypeScript Example:**
|
|
531
4283
|
|
|
532
|
-
|
|
4284
|
+
```typescript
|
|
4285
|
+
import { getACurrency, type GetACurrencyData, type GetACurrencyResponse } from "@epcc-sdk/sdks-shopper";
|
|
533
4286
|
|
|
534
|
-
|
|
4287
|
+
const params: GetACurrencyData = {
|
|
4288
|
+
path: {
|
|
4289
|
+
currencyID: "currencyID",
|
|
4290
|
+
},
|
|
4291
|
+
};
|
|
535
4292
|
|
|
536
|
-
|
|
4293
|
+
const result: GetACurrencyResponse = await getACurrency(params);
|
|
4294
|
+
```
|
|
537
4295
|
|
|
538
|
-
|
|
4296
|
+
---
|
|
539
4297
|
|
|
540
|
-
|
|
4298
|
+
### **`getAllFiles`**
|
|
541
4299
|
|
|
542
|
-
|
|
4300
|
+
**Endpoint:** `GET /v2/files`
|
|
543
4301
|
|
|
544
|
-
|
|
4302
|
+
**Summary:** Get all Files
|
|
545
4303
|
|
|
546
|
-
|
|
4304
|
+
**Description:** GET operation
|
|
547
4305
|
|
|
548
|
-
|
|
4306
|
+
**TypeScript Example:**
|
|
549
4307
|
|
|
550
|
-
|
|
4308
|
+
```typescript
|
|
4309
|
+
import { getAllFiles, type GetAllFilesData, type GetAllFilesResponse } from "@epcc-sdk/sdks-shopper";
|
|
551
4310
|
|
|
552
|
-
|
|
4311
|
+
const params: GetAllFilesData = {
|
|
4312
|
+
query: {
|
|
4313
|
+
"filter": "eq(name,\"Product Name\")", // OPTIONAL
|
|
4314
|
+
"page[limit]": 10, // OPTIONAL
|
|
4315
|
+
"page[offset]": 0, // OPTIONAL
|
|
4316
|
+
},
|
|
4317
|
+
};
|
|
553
4318
|
|
|
554
|
-
|
|
4319
|
+
const result: GetAllFilesResponse = await getAllFiles(params);
|
|
4320
|
+
```
|
|
555
4321
|
|
|
556
|
-
|
|
4322
|
+
---
|
|
557
4323
|
|
|
558
|
-
|
|
4324
|
+
### **`getAFile`**
|
|
559
4325
|
|
|
560
|
-
|
|
4326
|
+
**Endpoint:** `GET /v2/files/{fileID}`
|
|
561
4327
|
|
|
562
|
-
|
|
4328
|
+
**Summary:** Get a File
|
|
563
4329
|
|
|
564
|
-
|
|
4330
|
+
**Description:** Get a File
|
|
565
4331
|
|
|
566
|
-
|
|
4332
|
+
**TypeScript Example:**
|
|
567
4333
|
|
|
568
|
-
|
|
4334
|
+
```typescript
|
|
4335
|
+
import { getAFile, type GetAFileData, type GetAFileResponse } from "@epcc-sdk/sdks-shopper";
|
|
569
4336
|
|
|
570
|
-
|
|
4337
|
+
const params: GetAFileData = {
|
|
4338
|
+
path: {
|
|
4339
|
+
fileID: "fileID",
|
|
4340
|
+
},
|
|
4341
|
+
};
|
|
571
4342
|
|
|
572
|
-
|
|
4343
|
+
const result: GetAFileResponse = await getAFile(params);
|
|
4344
|
+
```
|
|
573
4345
|
|
|
574
|
-
|
|
4346
|
+
---
|
|
575
4347
|
|
|
576
|
-
|
|
4348
|
+
### **`postMultiSearch`**
|
|
577
4349
|
|
|
578
|
-
|
|
4350
|
+
**Endpoint:** `POST /catalog/multi-search`
|
|
579
4351
|
|
|
580
|
-
|
|
4352
|
+
**Summary:** Multi-search
|
|
581
4353
|
|
|
582
|
-
|
|
4354
|
+
**Description:** Execute one or more searches in a single request.
|
|
583
4355
|
|
|
584
|
-
|
|
4356
|
+
**TypeScript Example:**
|
|
585
4357
|
|
|
586
|
-
|
|
4358
|
+
```typescript
|
|
4359
|
+
import { postMultiSearch, type PostMultiSearchData, type PostMultiSearchResponse } from "@epcc-sdk/sdks-shopper";
|
|
587
4360
|
|
|
588
|
-
|
|
4361
|
+
const params: PostMultiSearchData = {
|
|
4362
|
+
query: {
|
|
4363
|
+
"include": ["files", "main_images"], // OPTIONAL
|
|
4364
|
+
"page[limit]": 10, // OPTIONAL
|
|
4365
|
+
"page[offset]": 0, // OPTIONAL
|
|
4366
|
+
},
|
|
4367
|
+
headers: {
|
|
4368
|
+
"accept-language": "en-US", // OPTIONAL
|
|
4369
|
+
"EP-Channel": "web", // OPTIONAL
|
|
4370
|
+
},
|
|
4371
|
+
body: {
|
|
4372
|
+
data: {
|
|
4373
|
+
type: "resource"
|
|
4374
|
+
}
|
|
4375
|
+
},
|
|
4376
|
+
};
|
|
589
4377
|
|
|
590
|
-
|
|
4378
|
+
const result: PostMultiSearchResponse = await postMultiSearch(params);
|
|
4379
|
+
```
|
|
591
4380
|
|
|
592
|
-
|
|
4381
|
+
---
|
|
593
4382
|
|
|
594
4383
|
|
|
595
4384
|
|