I am trying to make the product available on all sales channels when it is created.
It worked when I create from the Store Admin but it is not working when I use the Product API.
Can anyone help me, please?
Thanks in advance.
What happens when you specify published_scope as global? As is described here --> https://shopify.dev/docs/admin-api/rest/reference/products/product#create-2020-10. If that doesn't publish to any other sales channels (besides POS and Ecom), then perhaps take a look here --> https://shopify.dev/docs/admin-api/rest/reference/sales-channels/productlisting#create-2020-10. This is assuming you are using the REST API.
I believe per this article that this isn't currently possible via the Product API (unfortunately).
It seems that there maybe an option using GraphQL, but I haven't confirmed that functionality myself.