@epcc-sdk/sdks-shopper 0.0.40 → 0.0.42

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 CHANGED
@@ -50,7 +50,7 @@ configureClient(config, {
50
50
  For multiple stores or isolated instances:
51
51
 
52
52
  ```typescript
53
- import { createShopperClient } from "@epcc-sdk/sdks-shopper/auth/configure-client";
53
+ import { createShopperClient } from "@epcc-sdk/sdks-shopper";
54
54
 
55
55
  const { client, auth } = createShopperClient(
56
56
  { baseUrl: "https://useast.api.elasticpath.com" },
@@ -308,286 +308,4077 @@ const product = await getByContextProduct({
308
308
  ## Available Operations
309
309
 
310
310
 
311
+ ### **`getByContextRelease`**
311
312
 
312
- - **`getByContextRelease`** (`GET /catalog`)
313
+ **Endpoint:** `GET /catalog`
313
314
 
314
- - **`getByContextAllHierarchies`** (`GET /catalog/hierarchies`)
315
+ **Summary:** Get the catalog release as shoppers
315
316
 
316
- - **`getByContextHierarchy`** (`GET /catalog/hierarchies/{hierarchy_id}`)
317
+ **Description:** Returns a list of all published releases of the specified catalog.
317
318
 
318
- - **`getByContextHierarchyNodes`** (`GET /catalog/hierarchies/{hierarchy_id}/nodes`)
319
+ **TypeScript Example:**
319
320
 
320
- - **`getByContextHierarchyChildNodes`** (`GET /catalog/hierarchies/{hierarchy_id}/children`)
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:** Retrieves all hierarchies from a catalog based on the best matching rule for the shopper's context. Supports filtering by attributes like name and ID using operators like `Eq` and `In`.
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:** Retrieves a specific hierarchy from the catalog based on the provided hierarchy ID. The API uses catalog rules to determine the best match for the shopper's context.
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:** Retrieves all nodes associated with a specified hierarchy, allowing for filtering by attributes like name and ID. Useful for improving store search functionality.
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:** Retrieves the parent nodes for a specified hierarchy, allowing users to identify the hierarchy associated with a node.
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:** Retrieves all nodes in the catalog based on the shopper's context, allowing for filtering by attributes like name or ID. Products associated with nodes are listed, including curated products for promoting specific items.
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:** Retrieves a node from the catalog, displaying associated products. Curated products are prioritized and can be managed for unique product collections.
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:** Retrieves child nodes and associated products for a specific node in the catalog, allowing for filtering by name, slug, or ID. Supports product curation and displays curated products first if configured.
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:** This operation retrieves a list of products from the catalog, including only products in a live status. It allows filtering by attributes like name, SKU, and product type.
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:** Retrieves a specified product from the catalog in 'live' status, using the best matching catalog rule for the shopper's context. Includes options to retrieve associated component products, main images, and files.
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:** Retrieve a list of component product IDs for a specified bundle in Product Experience Manager, allowing you to manage bundles and their associated products efficiently.
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:** This operation retrieves a list of child products associated with a specified parent product in a catalog release, only returning products in a `live` status.
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:** Retrieve live products associated with a specified hierarchy in the catalog. Filter products by attributes like name, SKU, or product type. Include component products, main images, and files using the `include` parameter.
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:** Retrieve products associated with a specified hierarchy node in the catalog, filtered by live status and curated order. Supports filtering by attributes like name, SKU, and product type.
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:** Configure product bundles in your catalog by allowing shoppers to select product options within specified minimum and maximum values, updating the bundle configuration with selected options and displaying them in the storefront.
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:** Retrieves a list of authorized catalogs, showing differences between consecutive releases and indicating whether a full refresh is needed before publishing. Supports filtering by name.
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:** Create a catalog by defining hierarchies, products, and price books with priorities for displaying product prices. Up to five price books can be specified for different scenarios.
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:** Deletes an unpublished catalog by its unique ID. Use other endpoints to delete releases or update associated catalog rules beforehand.
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:** Update specific attributes of a catalog by providing new values, while keeping existing attributes unchanged. If no attributes are specified, the catalog will not be updated.
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:** This operation retrieves a list of published releases for a specified catalog, allowing users to view differences between consecutive releases using the `delta` link. The `is_full_delta` attribute helps determine if a full refresh of data is needed before publishing a catalog release.
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:** Publish a catalog to make it available for retrieval in an organization or store. Published catalogs are read-only and changes require republishing. Delta links provide differences between catalog releases for updating search integration.
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:** This operation retrieves all authorized catalog rules and supports filtering by attributes like id, catalog_id, account_ids, customer_ids, channels, and tags using operators like eq and in.
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:** Create catalog rule resources to display different catalogs to specific shoppers based on custom criteria, such as preferred pricing or device type. Note that there may be a 5-minute delay in displaying catalogs due to caching, and organization catalogs cannot have rules applied.
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:** Update specific attributes of a catalog rule by providing new values. If the attributes section is empty, the catalog rule will not be updated.
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:** Retrieves hierarchies from a published catalog, limited to the current release and two prior releases. Supports filtering by attributes like name and ID.
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:** Retrieve a specific hierarchy from a published catalog, limited to the current release and two prior releases.
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:** Retrieves all nodes for a specified hierarchy from a published catalog, allowing identification of parent nodes for improved store search functionality.
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:** Retrieves parent nodes for a specified hierarchy in a published catalog, allowing identification of associated parent nodes for improved store search functionality.
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:** Retrieves child nodes from a published catalog, limited to the current release and two prior releases. Useful for displaying product associations in a hierarchical structure.
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:** Retrieves a node from a published catalog, showing associated products. Curated products can be highlighted for promotion within the hierarchy.
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:** Retrieves child nodes associated with a specific node in a published catalog, allowing for the display of products and curated products in a hierarchy structure.
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:** This operation retrieves products from a published catalog, limited to the current release and two prior releases, with only products in a 'live' status being returned.
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:** Retrieves a live product from a published catalog within the current release and two prior releases. Includes options to retrieve associated resources like main image and files.
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 a list of component product IDs for a specified bundle in Product Experience Manager, including key attributes like SKU or slug. Use the `include` parameter to retrieve additional resources like main images and files.
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:** Retrieves a list of child products for a specified parent product in a catalog release, only including products in a `live` status. Non-base products will result in a `422 Unprocessable Entity` response.
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:** Retrieve products associated with a specified hierarchy in a catalog, limited to those in 'live' status. Supports filtering by various attributes like name, SKU, and product type.
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:** Retrieves live products associated with a specified node in a catalog, ordered by curation if applicable. Supports filtering by attributes like name, SKU, and product type.
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:** Retrieve carts associated with an account or customer, sorted by updated date in descending order. Requires an implicit token for authentication.
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:** Create a new cart for a customer. Each shopper can have multiple carts with distinct items. Custom discounts and inventory settings can be specified.
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:** Deletes a cart, including items, name, and description. Ensure cart is disassociated from customer before deletion to avoid error.
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:** Retrieve a specific cart by providing the cart ID. If the cart doesn't exist, a new cart will be created. Displays associated shipping group IDs if applicable.
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:** Update properties of a specific cart by specifying custom discounts and enabling/disabling inventory checks until checkout.
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:** This operation allows a shopper to delete all custom items and promotions from their cart, while keeping the cart available for further item additions. Cart details and associations persist.
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:** Retrieve cart items with associated shipping group IDs and breakdown by promotion ID, showing discounts applied using the same promotion code in both Promotions Standard and Rule Promotions.
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:** Add products, bundles, personalized items, subscriptions, and promotions to a cart. Customize items with text inputs. Specify stock locations and merge multiple carts.
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:** This operation allows shoppers to update multiple items in their cart at once, including quantity and shipping group details, saving time and enabling bulk updates.
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:** Create associations between an account and carts, allowing the account to access those carts across devices.
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:** Create associations between a customer and one or more carts, allowing the customer to access those carts across devices.
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:** This operation allows users to bulk add tax items to a specific cart, with a maximum limit of five tax items per cart item. Errors are returned for exceeding the limit or mismatching item types.
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:** This operation allows users to add custom discounts in bulk to a specific cart by setting a default value of 5 if not configured, with the option to increase the value by contacting Elastic Path Support team.
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:** Deletes a shipping group from a cart, but only if it is not attached to any cart items. Remove the shipping group from all cart items before deleting it.
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:** Create a Stripe Payment Intent tied to a shopping cart for tracking payment details and maintaining consistency throughout the order stage. Allows users to create, update, and synchronize Payment Intents between Stripe and Commerce.
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:** Convert a cart to an order for checkout using customer ID, customer object, or account authentication. Response includes order details and associated shipping group.
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:** This operation retrieves orders with custom flow fields, allowing for filtering by various attributes such as status, payment, customer details, and dates. Pagination is available to manage large datasets.
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:** This operation allows you to update custom data, shipping, shipping address, and status of orders. Order number and external reference can be modified, orders can be canceled or fulfilled, with restrictions on fulfillment and refunds.
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:** Anonymize orders by replacing Personal Identifiable Information with * when fulfilled, canceled, or fully refunded.
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:** This operation allows users to set up payments for an order using different transaction types like immediate charging, authorization for future capture, and verification of payment details without transferring funds until confirmation.
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:** Confirm Payment endpoint synchronizes transaction data from third-party payment provider to ensure accurate reflection in Composable Commerce, including handling 3D Secure validations for Stripe Payments.
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:** Capture a previously authorized payment by using this endpoint, allowing you to pass a custom reference, such as the payment reference from your chosen gateway.
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:** This operation allows you to process full or partial refunds for a specific transaction directly through Commerce Manager or API, sending the refund request to the payment gateway for processing.
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:** Cancel or void a pending or authorized transaction for a specific order using this endpoint, applicable only for Stripe and PayPal, not manual gateways.
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:** Retrieves a list of all subscription offerings with support for filtering by attributes like external reference and proration policy ID.
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:** This operation retrieves a list of all subscriptions, supporting filtering by attributes like account ID, name, email, and external reference. It also allows including pricing options and plans associated with a subscription.
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:** Retrieve a list of plans associated with a specific subscription. Identify the currently active plan in the subscription based on the 'active_plan' status.
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:** Retrieve a list of pricing options for a specified subscription to view currently active pricing options. Active pricing options are indicated by the `active_pricing_option` field.
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:** Create a new state for a specific subscription, such as pending, canceled, paused, or resumed, to manage the subscription lifecycle.
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:** This operation retrieves a list of all invoices and supports filtering by attributes such as subscriber ID, subscription ID, outstanding status, and tax requirement using the 'eq' operator.
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:** This operation creates an access token for client-side applications to fetch data with live status using the implicit token type. It is suitable for read-only access to resources like products, categories, and brands.
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
3910
+
3911
+ **Description:** Get an Account Addresses
321
3912
 
322
- - **`getByContextAllNodes`** (`GET /catalog/nodes`)
3913
+ **TypeScript Example:**
323
3914
 
324
- - **`getByContextNode`** (`GET /catalog/nodes/{node_id}`)
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:** Retrieve all accounts with the option to filter by attributes such as name, legal name, registration ID, external reference, ID, creation date, and update date.
3967
+
3968
+ **TypeScript Example:**
3969
+
3970
+ ```typescript
3971
+ import { getV2Accounts, type GetV2AccountsData, type GetV2AccountsResponse } from "@epcc-sdk/sdks-shopper";
325
3972
 
326
- - **`getByContextChildNodes`** (`GET /catalog/nodes/{node_id}/relationships/children`)
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
+ ---
327
3985
 
328
- - **`getByContextAllProducts`** (`GET /catalog/products`)
3986
+ ### **`postV2Accounts`**
329
3987
 
330
- - **`getByContextProduct`** (`GET /catalog/products/{product_id}`)
3988
+ **Endpoint:** `POST /v2/accounts`
331
3989
 
332
- - **`getByContextAllRelatedProducts`** (`GET /catalog/products/{product_id}/relationships/{custom_relationship_slug}/products`)
3990
+ **Summary:** Create an Account
333
3991
 
334
- - **`getByContextComponentProductIds`** (`GET /catalog/products/{product_id}/relationships/component_products`)
3992
+ **Description:** With the account creation endpoint, you have the ability to create accounts which can optionally have another account as a parent.
335
3993
 
336
- - **`getByContextChildProducts`** (`GET /catalog/products/{product_id}/relationships/children`)
3994
+ **TypeScript Example:**
337
3995
 
338
- - **`getByContextProductsForHierarchy`** (`GET /catalog/hierarchies/{hierarchy_id}/products`)
3996
+ ```typescript
3997
+ import { postV2Accounts, type PostV2AccountsData, type PostV2AccountsResponse } from "@epcc-sdk/sdks-shopper";
339
3998
 
340
- - **`getByContextProductsForNode`** (`GET /catalog/nodes/{node_id}/relationships/products`)
3999
+ const params: PostV2AccountsData = {
4000
+ body: {
4001
+ data: {
4002
+ type: "resource"
4003
+ }
4004
+ },
4005
+ };
341
4006
 
342
- - **`configureByContextProduct`** (`POST /catalog/products/{product_id}/configure`)
4007
+ const result: PostV2AccountsResponse = await postV2Accounts(params);
4008
+ ```
343
4009
 
344
- - **`getCatalogs`** (`GET /catalogs`)
4010
+ ---
345
4011
 
346
- - **`createCatalog`** (`POST /catalogs`)
4012
+ ### **`getV2AccountsAccountId`**
347
4013
 
348
- - **`deleteCatalogById`** (`DELETE /catalogs/{catalog_id}`)
4014
+ **Endpoint:** `GET /v2/accounts/{accountID}`
349
4015
 
350
- - **`getCatalogById`** (`GET /catalogs/{catalog_id}`)
4016
+ **Summary:** Get an Account
351
4017
 
352
- - **`updateCatalog`** (`PUT /catalogs/{catalog_id}`)
4018
+ **Description:** View a specific account contained within your store
353
4019
 
354
- - **`deleteReleases`** (`DELETE /catalogs/{catalog_id}/releases`)
4020
+ **TypeScript Example:**
355
4021
 
356
- - **`getReleases`** (`GET /catalogs/{catalog_id}/releases`)
4022
+ ```typescript
4023
+ import { getV2AccountsAccountId, type GetV2AccountsAccountIdData, type GetV2AccountsAccountIdResponse } from "@epcc-sdk/sdks-shopper";
357
4024
 
358
- - **`publishRelease`** (`POST /catalogs/{catalog_id}/releases`)
4025
+ const params: GetV2AccountsAccountIdData = {
4026
+ path: {
4027
+ accountID: "accountID",
4028
+ },
4029
+ };
359
4030
 
360
- - **`deleteReleaseById`** (`DELETE /catalogs/{catalog_id}/releases/{release_id}`)
4031
+ const result: GetV2AccountsAccountIdResponse = await getV2AccountsAccountId(params);
4032
+ ```
361
4033
 
362
- - **`getReleaseById`** (`GET /catalogs/{catalog_id}/releases/{release_id}`)
4034
+ ---
363
4035
 
364
- - **`getRules`** (`GET /catalogs/rules`)
4036
+ ### **`putV2AccountsAccountId`**
365
4037
 
366
- - **`createRule`** (`POST /catalogs/rules`)
4038
+ **Endpoint:** `PUT /v2/accounts/{accountID}`
367
4039
 
368
- - **`deleteRuleById`** (`DELETE /catalogs/rules/{catalog_rule_id}`)
4040
+ **Summary:** Update an Account
369
4041
 
370
- - **`getRuleById`** (`GET /catalogs/rules/{catalog_rule_id}`)
4042
+ **Description:** Update the information contained on an account.
371
4043
 
372
- - **`updateRule`** (`PUT /catalogs/rules/{catalog_rule_id}`)
4044
+ **TypeScript Example:**
373
4045
 
374
- - **`getAllHierarchies`** (`GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies`)
4046
+ ```typescript
4047
+ import { putV2AccountsAccountId, type PutV2AccountsAccountIdData, type PutV2AccountsAccountIdResponse } from "@epcc-sdk/sdks-shopper";
375
4048
 
376
- - **`getHierarchy`** (`GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies/{hierarchy_id}`)
4049
+ const params: PutV2AccountsAccountIdData = {
4050
+ path: {
4051
+ accountID: "accountID",
4052
+ },
4053
+ body: {
4054
+ data: {
4055
+ type: "resource"
4056
+ }
4057
+ },
4058
+ };
377
4059
 
378
- - **`getHierarchyNodes`** (`GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies/{hierarchy_id}/nodes`)
4060
+ const result: PutV2AccountsAccountIdResponse = await putV2AccountsAccountId(params);
4061
+ ```
379
4062
 
380
- - **`getHierarchyChildNodes`** (`GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies/{hierarchy_id}/children`)
4063
+ ---
381
4064
 
382
- - **`getAllNodes`** (`GET /catalogs/{catalog_id}/releases/{release_id}/nodes`)
4065
+ ### **`getV2AccountMembers`**
383
4066
 
384
- - **`getNode`** (`GET /catalogs/{catalog_id}/releases/{release_id}/nodes/{node_id}`)
4067
+ **Endpoint:** `GET /v2/account-members`
385
4068
 
386
- - **`getChildNodes`** (`GET /catalogs/{catalog_id}/releases/{release_id}/nodes/{node_id}/relationships/children`)
4069
+ **Summary:** Get all Account Members
387
4070
 
388
- - **`getAllProducts`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products`)
4071
+ **Description:** Retrieve all account members associated with your store, with options to filter by email or name using specific operators like 'eq' or 'like'.
389
4072
 
390
- - **`getProduct`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}`)
4073
+ **TypeScript Example:**
391
4074
 
392
- - **`getAllRelatedProducts`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/{custom_relationship_slug}/products`)
4075
+ ```typescript
4076
+ import { getV2AccountMembers, type GetV2AccountMembersData, type GetV2AccountMembersResponse } from "@epcc-sdk/sdks-shopper";
393
4077
 
394
- - **`getComponentProductIds`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/component_products`)
4078
+ const params: GetV2AccountMembersData = {
4079
+ query: {
4080
+ "page[limit]": 10, // OPTIONAL
4081
+ "page[offset]": 0, // OPTIONAL
4082
+ "sort": "-created_at", // OPTIONAL
4083
+ },
4084
+ };
395
4085
 
396
- - **`getChildProducts`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/children`)
4086
+ const result: GetV2AccountMembersResponse = await getV2AccountMembers(params);
4087
+ ```
397
4088
 
398
- - **`getProductsForHierarchy`** (`GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies/{hierarchy_id}/products`)
4089
+ ---
399
4090
 
400
- - **`getProductsForNode`** (`GET /catalogs/{catalog_id}/releases/{release_id}/nodes/{node_id}/relationships/products`)
4091
+ ### **`getV2AccountMembersAccountMemberId`**
401
4092
 
402
- - **`getCarts`** (`GET /v2/carts`)
4093
+ **Endpoint:** `GET /v2/account-members/{accountMemberID}`
403
4094
 
404
- - **`createACart`** (`POST /v2/carts`)
4095
+ **Summary:** Get an Account Member
405
4096
 
406
- - **`deleteACart`** (`DELETE /v2/carts/{cartID}`)
4097
+ **Description:** Get an account member from your store
407
4098
 
408
- - **`getACart`** (`GET /v2/carts/{cartID}`)
4099
+ **TypeScript Example:**
409
4100
 
410
- - **`updateACart`** (`PUT /v2/carts/{cartID}`)
4101
+ ```typescript
4102
+ import { getV2AccountMembersAccountMemberId, type GetV2AccountMembersAccountMemberIdData, type GetV2AccountMembersAccountMemberIdResponse } from "@epcc-sdk/sdks-shopper";
411
4103
 
412
- - **`deleteAllCartItems`** (`DELETE /v2/carts/{cartID}/items`)
4104
+ const params: GetV2AccountMembersAccountMemberIdData = {
4105
+ path: {
4106
+ accountMemberID: "accountMemberID",
4107
+ },
4108
+ };
413
4109
 
414
- - **`getCartItems`** (`GET /v2/carts/{cartID}/items`)
4110
+ const result: GetV2AccountMembersAccountMemberIdResponse = await getV2AccountMembersAccountMemberId(params);
4111
+ ```
415
4112
 
416
- - **`manageCarts`** (`POST /v2/carts/{cartID}/items`)
4113
+ ---
417
4114
 
418
- - **`bulkUpdateItemsInCart`** (`PUT /v2/carts/{cartID}/items`)
4115
+ ### **`getV2AccountsAccountIdAccountMemberships`**
419
4116
 
420
- - **`deleteACartItem`** (`DELETE /v2/carts/{cartID}/items/{cartitemID}`)
4117
+ **Endpoint:** `GET /v2/accounts/{accountID}/account-memberships`
421
4118
 
422
- - **`updateACartItem`** (`PUT /v2/carts/{cartID}/items/{cartitemID}`)
4119
+ **Summary:** Get all Account Memberships
423
4120
 
424
- - **`deleteAccountCartAssociation`** (`DELETE /v2/carts/{cartID}/relationships/accounts`)
4121
+ **Description:** Retrieve account memberships with the option to include details about associated account members, such as name and email, using the `include=account_member` parameter. Filter account memberships by `account_member_id` using operators like `eq` and `like`.
425
4122
 
426
- - **`createAccountCartAssociation`** (`POST /v2/carts/{cartID}/relationships/accounts`)
4123
+ **TypeScript Example:**
427
4124
 
428
- - **`deleteCustomerCartAssociation`** (`DELETE /v2/carts/{cartID}/relationships/customers`)
4125
+ ```typescript
4126
+ import { getV2AccountsAccountIdAccountMemberships, type GetV2AccountsAccountIdAccountMembershipsData, type GetV2AccountsAccountIdAccountMembershipsResponse } from "@epcc-sdk/sdks-shopper";
429
4127
 
430
- - **`createCustomerCartAssociation`** (`POST /v2/carts/{cartID}/relationships/customers`)
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
+ };
431
4138
 
432
- - **`deleteAPromotionViaPromotionCode`** (`DELETE /v2/carts/{cartID}/discounts/{promoCode}`)
4139
+ const result: GetV2AccountsAccountIdAccountMembershipsResponse = await getV2AccountsAccountIdAccountMemberships(params);
4140
+ ```
433
4141
 
434
- - **`addTaxItemToCart`** (`POST /v2/carts/{cartID}/items/{cartitemID}/taxes`)
4142
+ ---
435
4143
 
436
- - **`bulkDeleteTaxItemsFromCart`** (`DELETE /v2/carts/{cartID}/taxes`)
4144
+ ### **`postV2AccountMembersTokens`**
437
4145
 
438
- - **`bulkAddTaxItemsToCart`** (`POST /v2/carts/{cartID}/taxes`)
4146
+ **Endpoint:** `POST /v2/account-members/tokens`
439
4147
 
440
- - **`deleteATaxItem`** (`DELETE /v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}`)
4148
+ **Summary:** Generate an Account Management Authentication Token
441
4149
 
442
- - **`updateATaxItem`** (`PUT /v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}`)
4150
+ **Description:** This operation generates authentication tokens for Account Management APIs, allowing shoppers to access resources associated with the account by setting the token as the `EP-Account-Management-Authentication-Token` header when making Commerce API calls.
443
4151
 
444
- - **`bulkDeleteCustomDiscountsFromCart`** (`DELETE /v2/carts/{cartID}/custom-discounts`)
4152
+ **TypeScript Example:**
445
4153
 
446
- - **`bulkAddCustomDiscountsToCart`** (`POST /v2/carts/{cartID}/custom-discounts`)
4154
+ ```typescript
4155
+ import { postV2AccountMembersTokens, type PostV2AccountMembersTokensData, type PostV2AccountMembersTokensResponse } from "@epcc-sdk/sdks-shopper";
447
4156
 
448
- - **`deleteCustomDiscountFromCart`** (`DELETE /v2/carts/{cartID}/custom-discounts/{customdiscountID}`)
4157
+ const params: PostV2AccountMembersTokensData = {
4158
+ body: {
4159
+ data: {
4160
+ type: "resource"
4161
+ }
4162
+ },
4163
+ };
449
4164
 
450
- - **`updateCustomDiscountForCart`** (`PUT /v2/carts/{cartID}/custom-discounts/{customdiscountID}`)
4165
+ const result: PostV2AccountMembersTokensResponse = await postV2AccountMembersTokens(params);
4166
+ ```
451
4167
 
452
- - **`addCustomDiscountToCartItem`** (`POST /v2/carts/{cartID}/items/{cartitemID}/custom-discounts`)
4168
+ ---
453
4169
 
454
- - **`deleteCustomDiscountFromCartItem`** (`DELETE /v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}`)
4170
+ ### **`createOneTimePasswordTokenRequest`**
455
4171
 
456
- - **`updateCustomDiscountForCartItem`** (`PUT /v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}`)
4172
+ **Endpoint:** `POST /v2/authentication-realms/{realmId}/password-profiles/{passwordProfileId}/one-time-password-token-request`
457
4173
 
458
- - **`getShippingGroups`** (`GET /v2/carts/{cartID}/shipping-groups`)
4174
+ **Summary:** Create a one-time password token request
459
4175
 
460
- - **`createShippingGroup`** (`POST /v2/carts/{cartID}/shipping-groups`)
4176
+ **Description:** POST operation
461
4177
 
462
- - **`deleteCartShippingGroup`** (`DELETE /v2/carts/{cartId}/shipping-groups/{shippingGroupId}`)
4178
+ **TypeScript Example:**
463
4179
 
464
- - **`getShippingGroupById`** (`GET /v2/carts/{cartId}/shipping-groups/{shippingGroupId}`)
4180
+ ```typescript
4181
+ import { createOneTimePasswordTokenRequest, type CreateOneTimePasswordTokenRequestData, type CreateOneTimePasswordTokenRequestResponse } from "@epcc-sdk/sdks-shopper";
465
4182
 
466
- - **`updateShippingGroup`** (`PUT /v2/carts/{cartId}/shipping-groups/{shippingGroupId}`)
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
+ };
467
4198
 
468
- - **`createCartPaymentIntent`** (`POST /v2/carts/{cartID}/payments`)
4199
+ const result: CreateOneTimePasswordTokenRequestResponse = await createOneTimePasswordTokenRequest(params);
4200
+ ```
469
4201
 
470
- - **`updateCartPaymentIntent`** (`PUT /v2/carts/{cartID}/payments/{paymentIntentID}`)
4202
+ ---
471
4203
 
472
- - **`checkoutApi`** (`POST /v2/carts/{cartID}/checkout`)
4204
+ ### **`updatePasswordProfileInfo`**
473
4205
 
474
- - **`getCustomerOrders`** (`GET /v2/orders`)
4206
+ **Endpoint:** `PUT /v2/authentication-realms/{realmId}/user-authentication-info/{userAuthenticationInfoId}/user-authentication-password-profile-info/{userAuthenticationPasswordProfileInfoId}`
475
4207
 
476
- - **`getAnOrder`** (`GET /v2/orders/{orderID}`)
4208
+ **Summary:** Update a user authentication password profile info
477
4209
 
478
- - **`updateAnOrder`** (`PUT /v2/orders/{orderID}`)
4210
+ **Description:** PUT operation
479
4211
 
480
- - **`getOrderItems`** (`GET /v2/orders/{orderID}/items`)
4212
+ **TypeScript Example:**
481
4213
 
482
- - **`anonymizeOrders`** (`POST /v2/orders/anonymize`)
4214
+ ```typescript
4215
+ import { updatePasswordProfileInfo, type UpdatePasswordProfileInfoData, type UpdatePasswordProfileInfoResponse } from "@epcc-sdk/sdks-shopper";
483
4216
 
484
- - **`confirmOrder`** (`POST /v2/orders/{orderID}/confirm`)
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
+ };
485
4233
 
486
- - **`paymentSetup`** (`POST /v2/orders/{orderID}/payments`)
4234
+ const result: UpdatePasswordProfileInfoResponse = await updatePasswordProfileInfo(params);
4235
+ ```
487
4236
 
488
- - **`confirmPayment`** (`POST /v2/orders/{orderID}/transactions/{transactionID}/confirm`)
4237
+ ---
489
4238
 
490
- - **`captureATransaction`** (`POST /v2/orders/{orderID}/transactions/{transactionID}/capture`)
4239
+ ### **`getAllCurrencies`**
491
4240
 
492
- - **`refundATransaction`** (`POST /v2/orders/{orderID}/transactions/{transactionID}/refund`)
4241
+ **Endpoint:** `GET /v2/currencies`
493
4242
 
494
- - **`getOrderTransactions`** (`GET /v2/orders/{orderID}/transactions`)
4243
+ **Summary:** Get all Currencies
495
4244
 
496
- - **`getATransaction`** (`GET /v2/orders/{orderID}/transactions/{transactionID}`)
4245
+ **Description:** :::caution
497
4246
 
498
- - **`cancelATransaction`** (`POST /v2/orders/{orderID}/transactions/{transactionID}/cancel`)
4247
+ This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.
499
4248
 
500
- - **`getOrderShippingGroups`** (`GET /v2/orders/{orderID}/shipping-groups`)
4249
+ :::
501
4250
 
502
- - **`createOrderShippingGroup`** (`POST /v2/orders/{orderID}/shipping-groups`)
503
4251
 
504
- - **`getShippingGroupsById`** (`GET /v2/orders/{orderID}/shipping-groups/{shippingGroupID}`)
4252
+ **TypeScript Example:**
505
4253
 
506
- - **`putShippingGroupById`** (`PUT /v2/orders/{orderID}/shipping-groups/{shippingGroupID}`)
4254
+ ```typescript
4255
+ import { getAllCurrencies, type GetAllCurrenciesData, type GetAllCurrenciesResponse } from "@epcc-sdk/sdks-shopper";
507
4256
 
508
- - **`listOfferings`** (`GET /v2/subscriptions/offerings`)
4257
+ const params: GetAllCurrenciesData = {
4258
+ query: {
4259
+ "page[offset]": 0, // OPTIONAL
4260
+ "page[limit]": 10, // OPTIONAL
4261
+ },
4262
+ };
509
4263
 
510
- - **`getOffering`** (`GET /v2/subscriptions/offerings/{offering_uuid}`)
4264
+ const result: GetAllCurrenciesResponse = await getAllCurrencies(params);
4265
+ ```
511
4266
 
512
- - **`listOfferingPricingOptions`** (`GET /v2/subscriptions/offerings/{offering_uuid}/pricing-options`)
4267
+ ---
513
4268
 
514
- - **`listOfferingFeatures`** (`GET /v2/subscriptions/offerings/{offering_uuid}/features`)
4269
+ ### **`getACurrency`**
515
4270
 
516
- - **`listOfferingPlans`** (`GET /v2/subscriptions/offerings/{offering_uuid}/plans`)
4271
+ **Endpoint:** `GET /v2/currencies/{currencyID}`
517
4272
 
518
- - **`listOfferingPlanPricingOptions`** (`GET /v2/subscriptions/offerings/{offering_uuid}/plans/{plan_uuid}/relationships/pricing_options`)
4273
+ **Summary:** Get a Currency
519
4274
 
520
- - **`listSubscriptions`** (`GET /v2/subscriptions/subscriptions`)
4275
+ **Description:** :::caution
521
4276
 
522
- - **`getSubscription`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}`)
4277
+ This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.
523
4278
 
524
- - **`listSubscriptionPlans`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/plans`)
4279
+ :::
525
4280
 
526
- - **`listSubscriptionPricingOptions`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/pricing-options`)
527
4281
 
528
- - **`listSubscriptionStates`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/states`)
4282
+ **TypeScript Example:**
529
4283
 
530
- - **`createSubscriptionState`** (`POST /v2/subscriptions/subscriptions/{subscription_uuid}/states`)
4284
+ ```typescript
4285
+ import { getACurrency, type GetACurrencyData, type GetACurrencyResponse } from "@epcc-sdk/sdks-shopper";
531
4286
 
532
- - **`getSubscriptionState`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/states/{state_uuid}`)
4287
+ const params: GetACurrencyData = {
4288
+ path: {
4289
+ currencyID: "currencyID",
4290
+ },
4291
+ };
533
4292
 
534
- - **`listSubscriptionInvoices`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/invoices`)
4293
+ const result: GetACurrencyResponse = await getACurrency(params);
4294
+ ```
535
4295
 
536
- - **`listSubscriptionInvoicePayments`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments`)
4296
+ ---
537
4297
 
538
- - **`getSubscriptionInvoicePayment`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}/payments/{payment_uuid}`)
4298
+ ### **`getAllFiles`**
539
4299
 
540
- - **`getSubscriptionInvoice`** (`GET /v2/subscriptions/subscriptions/{subscription_uuid}/invoices/{invoice_uuid}`)
4300
+ **Endpoint:** `GET /v2/files`
541
4301
 
542
- - **`listInvoices`** (`GET /v2/subscriptions/invoices`)
4302
+ **Summary:** Get all Files
543
4303
 
544
- - **`getInvoice`** (`GET /v2/subscriptions/invoices/{invoice_uuid}`)
4304
+ **Description:** Retrieves all files with options to filter by file name, width, height, and file size.
545
4305
 
546
- - **`getFeature`** (`GET /v2/subscriptions/features/{feature_uuid}`)
4306
+ **TypeScript Example:**
547
4307
 
548
- - **`getStock`** (`GET /v2/inventories/{product_uuid}`)
4308
+ ```typescript
4309
+ import { getAllFiles, type GetAllFilesData, type GetAllFilesResponse } from "@epcc-sdk/sdks-shopper";
549
4310
 
550
- - **`listLocations`** (`GET /v2/inventories/locations`)
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
+ };
551
4318
 
552
- - **`createAnAccessToken`** (`POST /oauth/access_token`)
4319
+ const result: GetAllFilesResponse = await getAllFiles(params);
4320
+ ```
553
4321
 
554
- - **`getV2AccountAddresses`** (`GET /v2/accounts/{accountID}/addresses`)
4322
+ ---
555
4323
 
556
- - **`postV2AccountAddress`** (`POST /v2/accounts/{accountID}/addresses`)
4324
+ ### **`getAFile`**
557
4325
 
558
- - **`deleteV2AccountAddress`** (`DELETE /v2/accounts/{accountID}/addresses/{addressID}`)
4326
+ **Endpoint:** `GET /v2/files/{fileID}`
559
4327
 
560
- - **`getV2AccountAddress`** (`GET /v2/accounts/{accountID}/addresses/{addressID}`)
4328
+ **Summary:** Get a File
561
4329
 
562
- - **`putV2AccountAddress`** (`PUT /v2/accounts/{accountID}/addresses/{addressID}`)
4330
+ **Description:** Get a File
563
4331
 
564
- - **`getV2Accounts`** (`GET /v2/accounts`)
4332
+ **TypeScript Example:**
565
4333
 
566
- - **`postV2Accounts`** (`POST /v2/accounts`)
4334
+ ```typescript
4335
+ import { getAFile, type GetAFileData, type GetAFileResponse } from "@epcc-sdk/sdks-shopper";
567
4336
 
568
- - **`getV2AccountsAccountId`** (`GET /v2/accounts/{accountID}`)
4337
+ const params: GetAFileData = {
4338
+ path: {
4339
+ fileID: "fileID",
4340
+ },
4341
+ };
569
4342
 
570
- - **`putV2AccountsAccountId`** (`PUT /v2/accounts/{accountID}`)
4343
+ const result: GetAFileResponse = await getAFile(params);
4344
+ ```
571
4345
 
572
- - **`getV2AccountMembers`** (`GET /v2/account-members`)
4346
+ ---
573
4347
 
574
- - **`getV2AccountMembersAccountMemberId`** (`GET /v2/account-members/{accountMemberID}`)
4348
+ ### **`postMultiSearch`**
575
4349
 
576
- - **`getV2AccountsAccountIdAccountMemberships`** (`GET /v2/accounts/{accountID}/account-memberships`)
4350
+ **Endpoint:** `POST /catalog/multi-search`
577
4351
 
578
- - **`postV2AccountMembersTokens`** (`POST /v2/account-members/tokens`)
4352
+ **Summary:** Multi-search
579
4353
 
580
- - **`createOneTimePasswordTokenRequest`** (`POST /v2/authentication-realms/{realmId}/password-profiles/{passwordProfileId}/one-time-password-token-request`)
4354
+ **Description:** Execute one or more searches in a single request.
581
4355
 
582
- - **`updatePasswordProfileInfo`** (`PUT /v2/authentication-realms/{realmId}/user-authentication-info/{userAuthenticationInfoId}/user-authentication-password-profile-info/{userAuthenticationPasswordProfileInfoId}`)
4356
+ **TypeScript Example:**
583
4357
 
584
- - **`getAllCurrencies`** (`GET /v2/currencies`)
4358
+ ```typescript
4359
+ import { postMultiSearch, type PostMultiSearchData, type PostMultiSearchResponse } from "@epcc-sdk/sdks-shopper";
585
4360
 
586
- - **`getACurrency`** (`GET /v2/currencies/{currencyID}`)
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
+ };
587
4377
 
588
- - **`getAllFiles`** (`GET /v2/files`)
4378
+ const result: PostMultiSearchResponse = await postMultiSearch(params);
4379
+ ```
589
4380
 
590
- - **`getAFile`** (`GET /v2/files/{fileID}`)
4381
+ ---
591
4382
 
592
4383
 
593
4384