Getting productByHandle not returning the necessary ID info

Solved
Highlighted
New Member
6 0 0

Hi All!
I have my X-Shopify-Storefront-Access-Token set up. I am now attempting a post to 

/api/2019-07/graphql.json to retrieve the productByHandle. I know that the app and function works because we are employing the same code for another store's mobile app as well. One store responds with a beautiful product object and the other gives us status code 400 and a null product ID. What could I be missing?
Thanks!
0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 124

This is an accepted solution.

Hey @SandboxCommerce ,

 

To help effectively troubleshoot this issue, we might require more information. Any details you could provide - such as the value X-Request-ID header from the 400 Status API Response, the names of stores impacted, the time this error was thrown, the exact product that returned the null ID, etc - would be very helpful for the investigation.

 

One thing that comes to mind that could cause this problem would be if the product returning a null product ID has not been made available through your sales channel / app. You can determine this by going through that store's Shopify Admin site, finding the exact product that is causing the 400 error, and then selecting the "Manage" link next to the 'Product Availability' heading on the right hand side of the screen. From here you should confirm whether or not this product has been made available for your sales channel / app (see screenshot: https://screenshot.click/19-12-hov1k-21a7u.png). If not, your app will get a null product ID when trying to query for it. 

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
6 0 0

Thank you @hassain! Your instincts were correct. I was hoping there would be a way to add the products to the sales channel for the client. The best solution was just to ask them to select all products and make them available to us. Thanks again!

0 Likes