How to retrieve the product_id and variant_id from Product Page

Highlighted
Tourist
5 0 0

I'm trying to make my first app and am having trouble finding information on how to retrieve the product id and variant id of the product the user is currently on. I'm trying to follow these instructions on making a REST but it requires those two pieces of data: https://shopify.dev/tutorials/manage-product-inventory-with-admin-api

 

I can get the handle from the URL but that doesn't seem to be enough. This is probably something simple but I'm not seeing anything. Thanks!

0 Likes