Getting double response from create product webhook

Quivers
Visitor
2 0 0

I have created a create_product  webhook and whenever I create a product, I am receiving a response two times.

Is there any solution to that?

Replies 2 (2)

cdarne
Shopify Staff
30 5 14

Hello!

 

Could it be possible that the create_product webhook has been registered multiple times? You can check the list of registered webhook here: https://shopify.dev/api/admin-rest/2022-01/resources/webhook#get-webhooks.

 

Cheers,

 

Cedric | Developer @ Shopify

To learn more visit the Shopify Help Center or the Community Blog.

Quivers
Visitor
2 0 0

I have checked, this endpoint only shows two webhooks. We have created two webhooks one is for product_create and the second is for product_update.

So the problem is whenever we update a product we get a normal response but in the case of new product creation, we get the same response 2 times.

For reference, I have attached the JSON response of the above-mentioned endpoint

{
"webhooks": [
{
"id": 1133182255361,
"address": "****",
"topic": "products/create",
"created_at": "2022-03-02T17:43:33+05:30",
"updated_at": "2022-03-02T17:43:33+05:30",
"format": "json",
"fields": [],
"metafield_namespaces": [],
"api_version": "2022-01",
"private_metafield_namespaces": []
},
{
"id": 1133182288129,
"address": "*****",
"topic": "products/update",
"created_at": "2022-03-02T17:43:34+05:30",
"updated_at": "2022-03-02T17:43:34+05:30",
"format": "json",
"fields": [],
"metafield_namespaces": [],
"api_version": "2022-01",
"private_metafield_namespaces": []
}
]
}