Solved

Retrieve products destined for Sales Channel through GraphQL and ProductListing API

markko
Shopify Partner
1 0 1

Hi everyone,

 

we are currently in App Review for our Sales Channel, that we are developing. The reviewer kindly asked us to comply with the following requirement, which is one of the special requirements for sales channels:

 

"Use the ProductListing API to retrieve products set for publication by merchants and comply with our requirements."

 

Now, so far, we sync (updates to) products with our Sales Channel using the GraphQL webhooks. However, these webhooks do not contain the information, if the product is supposed to be published on our sales channel by the merchant.

 

Our current understanding is, that after receiving updates about a given product through the webhooks, we need to manually ping the respective ProductListing API endpoint (REST), to see, whether or not this given product is destined for our sales channel or not.

 

With that approach, we worry that we could run into rate limits pretty soon, especially with bulk uploads of lots of products.

 

Our question is: Is our abovementioned understanding of the process of complying with the requirement the only way to do so, or is there a more convenient way, that does not require us to manually ping the ProductListing API for every single product? Is there a way to receive the information, if a product is set for our sales channel, right in the GraphQL webhooks?

 

Thank you for your help!

Accepted Solution (1)

AsafGitai
Shopify Staff
9 4 10

This is an accepted solution.

Hi @markko 

I believe you can also subscribe to the corresponding webhook of that end point, instead of calling it for every product update
https://shopify.dev/docs/api/admin-rest/2024-04/resources/webhook#event-topics-product-listings-add

View solution in original post

Reply 1 (1)

AsafGitai
Shopify Staff
9 4 10

This is an accepted solution.

Hi @markko 

I believe you can also subscribe to the corresponding webhook of that end point, instead of calling it for every product update
https://shopify.dev/docs/api/admin-rest/2024-04/resources/webhook#event-topics-product-listings-add