Update the inventory using API without triggering webhook.

pratikshapatil
New Member
2 0 0

Hi All,

I have a scenario where I need to update the inventory using API without triggering the webhook. Is this possible to do?If yes how can I achieve this?

Thanks,

Pratiksha

0 Likes
Jayvin
Shopify Partner
130 17 30

Hi,

Interesting, hmm..

Maybe you could disable the webhook before updating the inventory and re-enable the webhook, just after you have updated the inventory.

-------

Personally, i don't think it is possible.

0 Likes
mikedasilva
Shopify Staff
Shopify Staff
26 2 2

Hi @pratikshapatil 

As suggested by @Jayvin, it won't be possible to do that without first removing the webhook subscription for that topic and then subscribing again once you've completed performing the updates that you don't want to receive webhooks for.

 

Cheers,

Mike

mikedasilva | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
pratikshapatil
New Member
2 0 0

Hi Jayvin & Mike,

Thank you for the response. But the solution provided cannot be used as I cant disable webhook. So now I am using order fulfilled event to trigger the inventory update.

Thanks,

Pratiksha 

0 Likes