Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Detect if webhook comes from admin or api

Solved

Detect if webhook comes from admin or api

mmlacabra
Shopify Partner
7 0 4

Hi everyone

 

i need to be able to detect whether a webhook (in my care “products/update” is being triggered / called from someone updating the product via the Shopify admin interface or from my own api. 

I have some logic that got my trapped and I don’t have to update a product if that webhook is called as a result of an updated on a variant made by my own api. 

id greatly appreciate any help u might have 

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1453 238 531

This is an accepted solution.

Hi @mmlacabra,

 

Thanks for your post. With the "products/update" webhook there is not currently a way to tell by looking at the webhook's data whether it was triggered by a change in the admin, via the API, or due to a sale decreasing the inventory.

 

We're submitting some feedback on your behalf about how that would be useful information to have.

 

Hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

View solution in original post

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1453 238 531

This is an accepted solution.

Hi @mmlacabra,

 

Thanks for your post. With the "products/update" webhook there is not currently a way to tell by looking at the webhook's data whether it was triggered by a change in the admin, via the API, or due to a sale decreasing the inventory.

 

We're submitting some feedback on your behalf about how that would be useful information to have.

 

Hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

IAmADev
Shopify Partner
20 0 14

Hey !
What is the status on this feature ? 
This is very frustrating not to have it ://

IAmADev
Shopify Partner
20 0 14

Hey !
Did you find a workaround for this ?