Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello,
When uploading products to a store via the API, I am unable to add these products to a cart via the Storefront API.
When creating products manually within Shopify, these products work fine with the Cart API.
I have tried filling out all product fields and filling out minimal product fields, but both not working.
When creating the product manually on Shopify, any amount of fields will work fine, don't even need to add inventory for it to work.
However, any products uploaded through the API, don't work when being added to the cart via API.
Any help would be appreciated.
Regards,
Brendan
Hey @brendanj
Can you confirm the products are published to the channel trying to add them to the cart (screenshot), and their available quantity is >0?
Are you seeing a specific error message?
Scott | Developer Advocate @ Shopify
Hi,
Yes, the products are available on the store and can be added to the cart -
The products will return 'null' when trying to add to the cart via API.
Products created within Shopify will work fine -
Cheers,
Brendan
Are you able to DM me store URL / example product?
Scott | Developer Advocate @ Shopify
Sure
For anyone following along: products aren't automatically published to every channel. You can publish them using the PublishablePublish mutation.
Scott | Developer Advocate @ Shopify
Thank you very much!