Discussing APIs and development related to customers, discounts, and order management.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I would like to create a discount using Shopify API and apply it to all my sales channels.
I do not see any field that I can use to specify channel ids in https://shopify.dev/docs/api/admin-graphql/2023-07/mutations/discountCodeBasicCreate mutation. However when I am creating the discount using Shopify UI the request contains channelIds field. When I am trying to add channelIds field to my mutation I got an error.
I've also tried to use https://shopify.dev/docs/api/admin-graphql/2023-07/mutations/publishablePublish mutation to publish discount to a channel but it returns me an error.
Please advice.
How did you manage to resolve it?