Shopify Native Actions - Products

In this section, we will talk about the “Products & Collection” related actions. UChat support below customer related actions:

  • Search for products

  • Get product information

  • Get product images

  • Get product variants

  • Search for custom collections

  • Search for smart collections

  • Get collection information

  • Get collection products

Now, let’s go over these actions one by one.

 

Get Products

This action is used to bring up products available on your shopify store using various parameters such as product id, title, vendor etc 

Input

 

Response Payload

{
"products": [
{
"id": 1413101355074,
"title": "2 in 1 Gold MacBook Riser & Stand",
"body_html": "Model Number: For Tablet PC StandMaterial: MetalFeature: Tablet Holder Mount for iPad & phone &TabletModel number: For Macbook Pro 13 15Material: Aluminum alloytablet stands: For Macbook Retina 12 13 15Stand for Tablet: For Ipad mini 1 2 3 4 ",
"vendor": "hapans",
"product_type": "Electronics",
"handle": "2-in-1-gold-macbook-riser-stand",
"variants": [
{
"id": 12535571218498,
"product_id": 1413101355074,
"title": "silver",
"price": "47.99",
"sku": "9877410-silver",
"position": 1,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "silver",
"option2": null,
"option3": null,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2022-10-13T02:39:56-04:00",
"taxable": false,
"barcode": null,
"grams": 0,
"image_id": 3736679678018,
"weight": 0,
"weight_unit": "kg",
"inventory_item_id": 12660409401410,
"inventory_quantity": 989,
"old_inventory_quantity": 989,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/12535571218498"
},
{
"id": 12535571251266,
"product_id": 1413101355074,
"title": "gold",
"price": "47.99",
"sku": "9877410-gold",
"position": 2,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "gold",
"option2": null,
"option3": null,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2022-09-09T13:26:56-04:00",
"taxable": false,
"barcode": null,
"grams": 0,
"image_id": 3736679678018,
"weight": 0,
"weight_unit": "kg",
"inventory_item_id": 12660409434178,
"inventory_quantity": 998,
"old_inventory_quantity": 998,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/12535571251266"
},
{
"id": 12535571284034,
"product_id": 1413101355074,
"title": "rose gold",
"price": "47.99",
"sku": "9877410-rose-gold",
"position": 3,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "rose gold",
"option2": null,
"option3": null,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2018-09-12T00:53:05-04:00",
"taxable": false,
"barcode": null,
"grams": 0,
"image_id": 3736679710786,
"weight": 0,
"weight_unit": "kg",
"inventory_item_id": 12660409466946,
"inventory_quantity": 999,
"old_inventory_quantity": 999,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/12535571284034"
}
],
"options": [
{
"id": 1864082522178,
"product_id": 1413101355074,
"name": "Color",
"position": 1,
"values": [
"silver",
"gold",
"rose gold"
]
}
],
"images": [
{
"id": 3736679645250,
"product_id": 1413101355074,
"position": 1,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 800,
"height": 800,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/macbook_stand.png?v=1571715576",
"variant_ids": [
],
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679645250"
},
{
"id": 3736679678018,
"product_id": 1413101355074,
"position": 2,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 640,
"height": 640,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004687.jpg?v=1571715576",
"variant_ids": [
12535571218498,
12535571251266
],
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679678018"
},
{
"id": 3736679710786,
"product_id": 1413101355074,
"position": 3,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 640,
"height": 640,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004689.jpg?v=1571715576",
"variant_ids": [
12535571284034
],
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679710786"
},
{
"id": 3736679743554,
"product_id": 1413101355074,
"position": 4,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 800,
"height": 800,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004701.jpg?v=1571715576",
"variant_ids": [...], // 0 items
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679743554"
},
{
"id": 3736679776322,
"product_id": 1413101355074,
"position": 5,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 800,
"height": 632,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004699.jpg?v=1571715576",
"variant_ids": [...], // 0 items
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679776322"
}
],
"image": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/macbook_stand.png?v=1571715576"
}
]
}

 

 

Get Product Info

This action is used to bring up information regarding a particular product using its product ID.

 

Input

 

Response Payload

{
"product": {
"id": 1413101355074,
"title": "2 in 1 Gold MacBook Riser & Stand",
"body_html": "Model Number: For Tablet PC StandMaterial: MetalFeature: Tablet Holder Mount for iPad & phone &TabletModel number: For Macbook Pro 13 15Material: Aluminum alloytablet stands: For Macbook Retina 12 13 15Stand for Tablet: For Ipad mini 1 2 3 4 ",
"vendor": "hapans",
"product_type": "Electronics",
"handle": "2-in-1-gold-macbook-riser-stand",
"variants": [
{
"id": 12535571218498,
"product_id": 1413101355074,
"title": "silver",
"price": "47.99",
"sku": "9877410-silver",
"position": 1,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "silver",
"option2": null,
"option3": null,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2022-10-13T02:39:56-04:00",
"taxable": false,
"barcode": null,
"grams": 0,
"image_id": 3736679678018,
"weight": 0,
"weight_unit": "kg",
"inventory_item_id": 12660409401410,
"inventory_quantity": 989,
"old_inventory_quantity": 989,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/12535571218498",
"image": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004687.jpg?v=1571715576"
},
{
"id": 12535571251266,
"product_id": 1413101355074,
"title": "gold",
"price": "47.99",
"sku": "9877410-gold",
"position": 2,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "gold",
"option2": null,
"option3": null,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2022-09-09T13:26:56-04:00",
"taxable": false,
"barcode": null,
"grams": 0,
"image_id": 3736679678018,
"weight": 0,
"weight_unit": "kg",
"inventory_item_id": 12660409434178,
"inventory_quantity": 998,
"old_inventory_quantity": 998,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/12535571251266",
"image": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004687.jpg?v=1571715576"
},
{
"id": 12535571284034,
"product_id": 1413101355074,
"title": "rose gold",
"price": "47.99",
"sku": "9877410-rose-gold",
"position": 3,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "rose gold",
"option2": null,
"option3": null,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2018-09-12T00:53:05-04:00",
"taxable": false,
"barcode": null,
"grams": 0,
"image_id": 3736679710786,
"weight": 0,
"weight_unit": "kg",
"inventory_item_id": 12660409466946,
"inventory_quantity": 999,
"old_inventory_quantity": 999,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/12535571284034",
"image": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004689.jpg?v=1571715576"
}
],
"options": [
{
"id": 1864082522178,
"product_id": 1413101355074,
"name": "Color",
"position": 1,
"values": [
"silver",
"gold",
"rose gold"
]
}
],
"images": [
{
"id": 3736679645250,
"product_id": 1413101355074,
"position": 1,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 800,
"height": 800,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/macbook_stand.png?v=1571715576",
"variant_ids": [
],
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679645250"
},
{
"id": 3736679678018,
"product_id": 1413101355074,
"position": 2,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 640,
"height": 640,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004687.jpg?v=1571715576",
"variant_ids": [
12535571218498,
12535571251266
],
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679678018"
},
{
"id": 3736679710786,
"product_id": 1413101355074,
"position": 3,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 640,
"height": 640,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004689.jpg?v=1571715576",
"variant_ids": [
12535571284034
],
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679710786"
},
{
"id": 3736679743554,
"product_id": 1413101355074,
"position": 4,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 800,
"height": 800,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004701.jpg?v=1571715576",
"variant_ids": [...], // 0 items
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679743554"
},
{
"id": 3736679776322,
"product_id": 1413101355074,
"position": 5,
"created_at": "2018-06-18T08:20:46-04:00",
"updated_at": "2019-10-21T23:39:36-04:00",
"alt": null,
"width": 800,
"height": 632,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004699.jpg?v=1571715576",
"variant_ids": [
],
"admin_graphql_api_id": "gid://shopify/ProductImage/3736679776322"
}
],
"image": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/macbook_stand.png?v=1571715576"
}
}

 

 

Get Product Images

This action is used to fetch images of the product and its variants using the product IDs.

 

Input

 

Response Payload

{
"images": [
{
"id": 3736679645250,
"product_id": 1413101355074,
"position": 1,
"width": 800,
"height": 800,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/macbook_stand.png?v=1571715576"
},
{
"id": 3736679678018,
"product_id": 1413101355074,
"position": 2,
"width": 640,
"height": 640,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004687.jpg?v=1571715576"
},
{
"id": 3736679710786,
"product_id": 1413101355074,
"position": 3,
"width": 640,
"height": 640,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004689.jpg?v=1571715576"
},
{
"id": 3736679743554,
"product_id": 1413101355074,
"position": 4,
"width": 800,
"height": 800,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004701.jpg?v=1571715576"
},
{
"id": 3736679776322,
"product_id": 1413101355074,
"position": 5,
"width": 800,
"height": 632,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/product-image-421004699.jpg?v=1571715576"
}
]
}

 

 

Get Product Variants

This action is used to bring up information regarding variants of a product using its product ID

 

Input

 

Response Payload

{
"variants": [
{
"id": 12535571218498,
"product_id": 1413101355074,
"title": "silver",
"price": "47.99",
"sku": "9877410-silver",
"position": 1,
"compare_at_price": null,
"option1": "silver",
"option2": null,
"option3": null,
"barcode": null,
"grams": 0,
"image_id": 3736679678018,
"weight": 0,
"weight_unit": "kg",
"inventory_quantity": 989
}
]
}

 

Search For Custom Collections

This action is used to search up custom collections available for your products on your shopify store.

 

Input

 

Response Payload

{
"custom_collections": [
{
"id": 34403156034,
"handle": "frontpage",
"title": "Best Selling Products",
"body_html": "<p>Here is our Best selling products.</p> <p>The tips &amp; tricks will power your Shopify store with MUCH More AWESOME data!</p>",
"sort_order": "best-selling",
"image": {
"created_at": "2022-08-17T00:24:01-04:00",
"alt": null,
"width": 900,
"height": 900,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/collections/Custom_dimensions_900x900_px_8.jpg?v=1660710241"
}
}
]
}

 

 

Search For Smart Collections

This action is used to bring up smart collections of the products you have on your shopify stores.

 

Input

 

Response Payload

{
"smart_collections": [
{
"id": 264802598978,
"handle": "backpack-collection",
"title": "Backpack collection",
"body_html": "get your backpack and start enjoying your life outdoors!",
"sort_order": "best-selling",
"rules": [
{
"column": "tag",
"relation": "equals",
"condition": "backpack"
}
],
"image": {
"created_at": "2022-08-17T00:23:00-04:00",
"alt": null,
"width": 900,
"height": 900,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/collections/Custom_dimensions_900x900_px_7.jpg?v=1660710180"
}
},
{
"id": 264802631746,
"handle": "electronics",
"title": "Electronics",
"body_html": "Looks for the digital gadget you can't live out with. more information here.",
"sort_order": "best-selling",
"rules": [
{
"column": "tag",
"relation": "equals",
"condition": "Electronics"
}
],
"image": {
"created_at": "2022-08-17T00:21:47-04:00",
"alt": null,
"width": 900,
"height": 900,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/collections/Custom_dimensions_900x900_px_6.jpg?v=1660710107"
}
}
]
}

 

 

Get Collection Info

This action is used to bring up information about a collection using its collection ID.

 

Input

 

Reponse Payload

{
"collection": {
"id": 264802598978,
"handle": "backpack-collection",
"title": "Backpack collection",
"updated_at": "2023-02-25T07:42:25-05:00",
"body_html": "get your backpack and start enjoying your life outdoors!",
"published_at": "2022-07-28T21:07:11-04:00",
"sort_order": "best-selling",
"template_suffix": "",
"products_count": 7,
"disjunctive": false,
"collection_type": "smart",
"rules": [
{
"column": "tag",
"relation": "equals",
"condition": "backpack"
}
],
"published_scope": "web",
"admin_graphql_api_id": "gid://shopify/Collection/264802598978",
"image": {
"created_at": "2022-08-17T00:23:00-04:00",
"alt": null,
"width": 900,
"height": 900,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/collections/Custom_dimensions_900x900_px_7.jpg?v=1660710180"
}
}
}

 

 

Get collection Products

This action is used to fetch products related to a particular collection using collection ID

 

Input

 

Response Payload

{
"products": [
{
"id": 1413104205890,
"title": "Mochila Backpack",
"body_html": " ★LOTS OF STORAGE SPACE&amp;POCKETS: One separate laptop compartment hold 15.6 Inch Laptop as well as 15 Inch,14 Inch and 13 Inch Macbook/Laptop. One spacious packing compartment roomy for daily necessities,tech electronics accessories. Front compartment with many pockets, pen pockets and key fob hook, make your items organized and easier to find ★COMFY&amp;STURDY: Comfortable airflow back design with thick but soft multi-panel ventilated padding, gives you maximum back support. Breathable and adjustable shoulder straps relieve the stress of shoulder. Foam padded top handle for a long time carry on ★FUNCTIONAL&amp;SAFE: A luggage strap allows backpack fit on luggage/suitcase, slide over the luggage upright handle tube for easier carrying. With a hidden anti theft pocket on the back protect your valuable items from thieves. Well made for international airplane travel and day trip ★USB PORT DESIGN: With built in USB charger outside and built in charging cable inside,this usb backpack offers you a more convenient way to charge your phone while walking. Please noted that this backpack doesn't power itself, usb charging port only offers an easy access to charge ★DURABLE MATERIAL&amp;SOLID: Made of Water Resistant and Durable Polyester Fabric with metal zippers.Ensure a secure &amp; long-lasting usage everyday &amp; weekend.Serve you well as professional office work bag,slim USB charging bagpack,college high school big student backpack for boys,girls,teens,adults ",
"vendor": "hapans",
"product_type": "backpack",
"handle": "mochila-backpack",
"options": [
{
"id": 1864085733442,
"product_id": 1413104205890,
"name": "Color",
"position": 1
},
{
"id": 1864085766210,
"product_id": 1413104205890,
"name": "Size",
"position": 2
}
],
"images": [
{
"id": 3736686919746,
"product_id": 1413104205890,
"position": 1,
"created_at": "2018-06-18T08:22:39-04:00",
"updated_at": "2019-10-21T23:39:37-04:00",
"alt": null,
"width": 800,
"height": 800,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/Mochila_Backpack.png?v=1571715577",
"variant_ids": [
12535580164162
],
"admin_graphql_api_id": "gid://shopify/ProductImage/3736686919746"
},
{
"id": 3736686952514,
"product_id": 1413104205890,
"position": 2,
"created_at": "2018-06-18T08:22:39-04:00",
"updated_at": "2019-10-21T23:39:37-04:00",
"alt": null,
"width": 430,
"height": 430,
"src": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/Backpack_black.png?v=1571715577",
"variant_ids": [...], // 1 items
"admin_graphql_api_id": "gid://shopify/ProductImage/3736686952514"
}
],
"image": "https://cdn.shopify.com/s/files/1/0017/6367/2130/products/Mochila_Backpack.png?v=1571715577"
}
]
}