Unable to register webhooks for discounts

LatikaSingh
Shopify Partner
3 0 0

I'm integrating Shopify into my App. In that, I'm registering webhooks dynamically. I can register all other webhooks for customers, orders, and products successfully. But I'm registering a webhooks for discounts as "discounts/create, discounts/update, discounts/delete", it's throwing an error as "API Exception (404): {'errors': 'Could not find the webhook topic discounts/create'". My app is already authenticated with scopes "read_discounts, write_discounts". I'm using this code to register a webhook,

POST "/admin/api/2024-01/webhooks.json" 

 

{
  "webhook": {
    "topic": "discounts/create",
    "address": "my host",
    "format": "json"
  }
}

 

Replies 0 (0)