App reviews, troubleshooting, and recommendations
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"
}
}
My store is, "cascade-test-store-1.myshopify.com", And I'm using this code to register a webhook,
const webhookData = {
webhook: {
topic: "discounts/create",
address: `my host`,
format: 'json',
},
};
const response = await axios({
method: 'post',
url: `https://${storeDomain}/admin/api/2024-01/webhooks.json`,
data: webhookData,
headers: {
'Content-Type': 'application/json',
'X-Shopify-Access-Token': accessToken,
},
});
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024