Solved

How to get product URL using Rest API in Node.js (shopify-api-node) [NPM Package]

MP_9597
Shopify Partner
3 0 1

hi, I want the product URL After submitting the new product let me help with how can I get the Product URL using REST API. in node.js

 

MP_9597_0-1653627866299.png

 

Accepted Solution (1)

Alan
Shopify Staff
129 15 24

This is an accepted solution.

Hey @MP_9597 - thanks for reaching out. At the moment, a product's customer facing URL isn't available to be sourced through the REST Admin API, however, one thing you could do is retrieve the handle of the product, which would allow you to reconstruct the product's URL. An example URL would look a little like this:

https://[yourstore].myshopify.com/products/[product's  handle]

 

If you need to retrieve a store's domain, you can pull that from the shop object.

Hope this gives you some next steps to take a look at while building your app.

 

Cheers!

 

Alan | API Support @ 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

View solution in original post

Replies 2 (2)

Alan
Shopify Staff
129 15 24

This is an accepted solution.

Hey @MP_9597 - thanks for reaching out. At the moment, a product's customer facing URL isn't available to be sourced through the REST Admin API, however, one thing you could do is retrieve the handle of the product, which would allow you to reconstruct the product's URL. An example URL would look a little like this:

https://[yourstore].myshopify.com/products/[product's  handle]

 

If you need to retrieve a store's domain, you can pull that from the shop object.

Hope this gives you some next steps to take a look at while building your app.

 

Cheers!

 

Alan | API Support @ 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

MP_9597
Shopify Partner
3 0 1

Hi, Good Morning! @Alan now it's working Thanks a lot for your suggestion.