@@ -598,6 +598,117 @@ You can query product images at different resolutions. The following query retri
598
598
</Tab >
599
599
</Tabs >
600
600
601
+ ## Get product videos
602
+
603
+ The following example retrieves video titles and URLs associated with videos attached to a product.
604
+
605
+ <Tabs items = { [' Request' , ' Response' ]} >
606
+ <Tab >
607
+ ``` graphql filename="Example query: Get product videos for a product" showLineNumbers copy
608
+ query {
609
+ site {
610
+ products (entityIds : [112 , 113 ]) {
611
+ pageInfo {
612
+ startCursor
613
+ endCursor
614
+ }
615
+ edges {
616
+ cursor
617
+ node {
618
+ entityId
619
+ name
620
+ videos {
621
+ pageInfo {
622
+ startCursor
623
+ endCursor
624
+ hasNextPage
625
+ hasPreviousPage
626
+ }
627
+ edges {
628
+ cursor
629
+ node {
630
+ title
631
+ url
632
+ }
633
+ }
634
+ }
635
+ }
636
+ }
637
+ }
638
+ }
639
+ }
640
+ ```
641
+
642
+ </Tab >
643
+ <Tab >
644
+
645
+ ``` json filename="Example response: Get product videos for a product" showLineNumbers copy
646
+ {
647
+ "data" : {
648
+ "site" : {
649
+ "products" : {
650
+ "pageInfo" : {
651
+ "startCursor" : " YXJyYXljb25uZWN0aW9uOjA=" ,
652
+ "endCursor" : " YXJyYXljb25uZWN0aW9uOjM="
653
+ },
654
+ "edges" : [
655
+ {
656
+ "cursor" : " YXJyYXljb25uZWN0aW9uOjA=" ,
657
+ "node" : {
658
+ "entityId" : 112 ,
659
+ "name" : " Product_112" ,
660
+ "videos" : {
661
+ "pageInfo" : {
662
+ "startCursor" : " YXJyYXljb25uZWN0aW9uOjA=" ,
663
+ "endCursor" : " YXJyYXljb25uZWN0aW9uOjA=" ,
664
+ "hasNextPage" : false ,
665
+ "hasPreviousPage" : false
666
+ },
667
+ "edges" : [
668
+ {
669
+ "cursor" : " YXJyYXljb25uZWN0aW9uOjA=" ,
670
+ "node" : {
671
+ "title" : " What is BigCommerce" ,
672
+ "url" : " https://www.youtube.com/watch?v=Vx0OmcMSWGQ&t=8s"
673
+ }
674
+ }
675
+ ]
676
+ }
677
+ }
678
+ },
679
+ {
680
+ "cursor" : " YXJyYXljb25uZWN0aW9uOjE=" ,
681
+ "node" : {
682
+ "entityId" : 113 ,
683
+ "name" : " Product_113" ,
684
+ "videos" : {
685
+ "pageInfo" : {
686
+ "startCursor" : " YXJyYXljb25uZWN0aW9uOjA=" ,
687
+ "endCursor" : " YXJyYXljb25uZWN0aW9uOjA=" ,
688
+ "hasNextPage" : false ,
689
+ "hasPreviousPage" : false
690
+ },
691
+ "edges" : [
692
+ {
693
+ "cursor" : " YXJyYXljb25uZWN0aW9uOjA=" ,
694
+ "node" : {
695
+ "title" : " BigCommerce is enterprise ecommerce, simplified." ,
696
+ "url" : " https://www.youtube.com/watch?v=vAZ0e5lomfk"
697
+ }
698
+ }
699
+ ]
700
+ }
701
+ }
702
+ }
703
+ ]
704
+ }
705
+ }
706
+ }
707
+ }
708
+ ```
709
+ </Tab >
710
+ </Tabs >
711
+
601
712
## Get product metafields
602
713
603
714
Query product metafields by specifying the product metafield's namespace. The API returns only metafields that have storefront permissions. Permissions must be set to ` write_and_sf_access ` or ` read_and_sf_access ` . To set permissions, use the [ Update a product metafield] ( /docs/rest-catalog/products/metafields#update-a-product-metafield ) endpoint.
0 commit comments