I am using Admin SDK API and since it doesnt allow publishing products on sales channel (like custom store) other than shopify store, I wanted to know if there is any way I could add a line item to checkout of a product that is not published on the sales channel?
Or is there a way to change the publish state of a product for other sales channel from the Admin API?
If you want to add a product that exists in the store to a checkout, that product will need to be published to the sales channel creating the checkout. Product publications allow merchants to control the products that are available for sale on each channel, so it's not currently possible to change the publication status through the API.
Do you mind telling me more about your use-case? If you can clarify why you want to create a checkout for a product that isn't published to your channel, I can try to suggest an alternative way to accomplish what you're trying to do.
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Hey there JB, thanks for the answer!
Well my usecase is simple, since I cant make a product available on a sales channel programmatically (other than the "Online store"), I have to load all products to the custom website (sales channel/private app), including non-available and than have to filter them based on `published_at` attribute, to see if they are at all available.
Once I filter them, I have "available" products, which are not completely "available", since they are only, by default, made available to the "Online store".
Thats why I need to be able to add these products to checkouts, without the need for them to be specifically available to my sales channel.
Or, if you finally made it possible for us make products available on other (custom) sales channels programmatically, then you could completely omit this problem.
Thanks for the answer in advance!