Can't get data with product_listings method

eugeniy
Visitor
2 0 0

I'm trying to get product information with Postman

"https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/{{api_version}}/product_listings.json?limit=250"

and response is "Not Found 404".

 

But this request with products.json work perfect.

"https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/{{api_version}}/products.json?limit=250"

 

What should I do to fix request with product_listings method?

Credentials for app looks fine:

Product listings

View or manage product or collection listings:

  • read_product_listings
Products

View or manage products, variants, and collections

  • read_products

 

Replies 2 (2)

lizk
Shopify Staff
246 58 71

Hi there 👋

Is your app currently a sales channel?A ProductListing resource represents a Product which is available to your sales channel. If your app is not a sales channel, it will not have product listings to query, and return 404 not found.

To learn more visit the Shopify Help Center or the Community Blog.

eugeniy
Visitor
2 0 0

Hi, Lizk.

Thank you for your answer!

In my case, I didn't add in Storefront API access scopes credentials for:

Products

Read products, variants, and collections

  • unauthenticated_read_product_listings

If the product is not in channel you get 200 but the [product_listings] is empty.