Hi, I'm building an app and I need to fetch the products images, can I do this via scriptTag API?

New Member
4 0 0

Hi, I'm building an app and I need to fetch the products images, can I do this via scriptTag API? 

so when the customer visits the shop that uses my app the script tag that I added will send a request to get the details of the products?

 

or should I use store-front API?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
249 34 38

Hey @amirbarshavit,

 

In this case it sounds like the Storefront API would be better suited.

0 Likes
New Member
4 0 0

Thanks for your answer  @scottydont , so if I understand you correctly every change in the store UI that needs access to some of the store data (aka products images) needs to be implemented with storefront API? and script tag API  should be used in cases that store data isn’t needed? 

0 Likes
New Member
4 0 0

Thanks for your answer  @scottydont , so if I understand you correctly every change in the store UI that needs access to some of the store data (aka products images) needs to be implemented with storefront API? and script tag API  should be used in cases that store data isn’t needed? 

0 Likes
Shopify Staff
Shopify Staff
249 34 38

Hey @amirbarshavit,

 

If you're building a custom storefront, the Storefront API is a perfect fit:

The Storefront API provides unauthenticated access to customers, checkouts, product collections, and other store resources that you can use to build purchasing experiences on merchant storefronts. 

Whereas the ScriptTag resource:

represents remote JavaScript code that is loaded into the pages of a shop's storefront. This lets you add functionality to those pages without using theme templates.

0 Likes