How to retrieve specific Shopify products through API based on sales channel configuration

I’m working on syncing product data from Shopify to my local database. The goal is to display these products in a mobile app I’m building.

My challenge is that I need to fetch only products that are specifically enabled for a particular sales channel (sp-tools-shopify-connector) in the apps and sales channels section of Shopify admin.

Is there a way to filter products through the Shopify API based on their sales channel availability? I want to avoid pulling all products and then filtering locally since that would be inefficient.

Any guidance on the correct API endpoints or query parameters to achieve this filtering would be greatly appreciated.

Authentication scope config is huge here - most people miss it. Had a retail client where I learned the hard way that your sales channel app needs the right publication access for its specific publication ID. Product Listings API works great, but double-check that your sp-tools-shopify-connector app has read permissions for that publication. Here’s what bit me: some products showed up in the regular API but customers couldn’t actually see them in the sales channel because of inventory policies or regional restrictions. Always test your API calls against what customers see in your mobile app - otherwise you’ll get inconsistent results.

Just dealt with this on a client project. Yeah, use the Product Listings API, but make sure you handle pagination right - it only gives you 50 products at a time by default. I’d also hit the GET /admin/api/2023-10/publications/{publication_id}/resource_feedback.json endpoint to double-check which products customers can actually see vs what’s just technically published. Watch out for draft products sneaking into API responses when they shouldn’t be live. Always filter by published status on your end too. Fair warning - this API crawls with big catalogs, so cache your results and use the updated_at parameter for incremental syncs.

hit this exact issue last week! your webhook setup needs to match the product listings API - regular product webhooks won’t fire for channel-specific changes. set up separate webhooks for product_listings/add and product_listings/remove events to keep your mobile app synced.

You’ll want to use the Product Listings API for this - it grabs products published to your specific sales channel. Use the GET /admin/api/2023-10/product_listings.json endpoint and make sure you’re authenticated with your sales channel app. I did something similar and set up a private app with the right permissions, which worked great and only pulled the products for that channel. Just don’t forget to enable the read_product_listings scope in your app - the regular products endpoint won’t filter by sales channel properly.

I’ve dealt with this exact issue before. You need to authenticate as that specific sales channel to get the filtered data. The Product Listings API alexlee mentioned is spot on, but here’s the catch - use credentials tied to your sp-tools-shopify-connector app, not general admin API credentials. I made that mistake when building something similar and kept getting all products instead of just channel-specific ones. Heads up: the Product Listings endpoint returns data in a slightly different format than the regular Products API, so you’ll need to tweak your parsing. The published_at field is super handy for tracking when products went live on your channel.