Data available when fetching a product through Storefront API

peteczar
New Member
4 0 0

Hello all,

First post here.

Is it possible to GET TAGS etc. other custom data?

What is the best practice to assign other custom data to a product being sold through Storefront API?

I am trying to display additional data for my products other than title, description, and pricing etc.

Thank you for any help

Replies 3 (3)
c10s
Shopify Partner
44 8 9

Is it possible to GET TAGS etc. other custom data?

Yes, you can see what's available here: https://shopify.dev/api/storefront/reference/products/product

Additional information can be stored/retrieved via metafields.

peteczar
New Member
4 0 0

Thank you for the pointer - will check it out!

peteczar
New Member
4 0 0

Follow up question:

I am fetching product data from products that I have added using the shopify admin page.

({PRODUCT_DOMAIN}.myshopify.com/admin)

- Where can I set metadata within this page?

From the link you suggested, metadata including:

collections

- media

- metafields

etc. should be available, but these are the only fields returned that show any value:

  1. availableForSale: (...)
  2. createdAt: (...)
  3. description: (...)
  4. descriptionHtml: (...)
  5. handle: (...)
  6. id: (...)
  7. images: (...)
  8. onlineStoreUrl: (...)
  9. options: (...)
  10. productType: (...)
  11. publishedAt: (...)
  12. refetchQuery: (...)
  13. title: (...)
  14. type: (...)
  15. updatedAt: (...)
  16. variants: (...)

I am fetching the product details using the js-buy-sdk.

https://shopify.github.io/js-buy-sdk/