How to publish discounts created via mutation in all sales channels?

I’m creating discounts via mutation, the problem is that I can’t/don’t know how to enable the discount so that it can be used across all sales channels.

With just 1 request I know it’s not possible, because the discountCodeBasicCreate mutation doesn’t have a parameter for that.

So, I tried using the publishablePublish mutation, but it seems that it doesn’t work with discounts, with products it works but needs access to a specific scope

Does anyone know of a way to activate, either via graphql or rest api, the discount on all channels?

mutation discountCodeBasicCreate:

shopify discount page:

mutation publishablePublish:

1 Like

Hi SauloB,

Asking our discounts product team about this! But I also wasn’t able to see from our dev docs how this is possible via the API.

1 Like

Hi @SauloB ,
Any good news on the topic?
I have the same problem.

@Shopify_77 , can you help us?

Unfortunately, Shopify does not currently have a solution for this issue :disappointed_face:

Hey @Liam , what’s up? Did the dev team get back to you? Any updates? Thanks!

This is bad for everyone. @Shopify needs to do something, please!

I have found that discounts created using the discountCodeBasicCreate mutation will still work on the POS even though the POS sales channel is not enabled when you view the created discount in the admin. I’m not sure if this is a bug or intended, but the codes work both online and on the POS.