Focusing on managing products, variants, and collections through the API.
Hello to everyone,
I am currently using the (REST) Product API to retrieve some information about products.
I am also retrieving "body_html" which is just containing small information about the product and not the complete product description (as seen in the screenshot).
Is there a possibility to get those information trough Shopify API.
Screenshot and link are just for demonstration purpose:
https://snocks.com/products/retrosneaker
Thankful for every help!
Is all the description entered in as a usual product description (ie: you're not using extra content blocks on the product page or referencing metafileds? This might be easier to achieve with the GraphQL API which has a description field and a descriptionHtml field on the product object. It would look something like:
query GetProductDescription {
product(id: "gid://shopify/Product/12345678") {
description
}
}
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hey @Liam,
thanks for your help! Unfortunately the GraphQL query is only returning the same data as the Rest Product API (body_html), which just contains a few words.
I guess the product description is not part of the product itself but more like content blocks or something similar.
Is there a possibility to get those information trough API?
Thanks!
How is this information added currently? ie: Are you adding the content to the admin in the products section, or somewhere else?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog