Closed achadee closed 8 years ago
There are a few "layers" to this suggestion. First, let's tackle the obvious:
product.update
triggered for a new sale:sale.update
and inventory.update
. Sale, because obviously a sale was created and inventory because as a result of the sale the inventory has changed. No product.update
should be happening. If you see it happening please let us know at api@vendhq.com.product.update
triggered for a new consignment:Now, you are right about race conditions. There is no good way to determine the order in which events were triggered and delivered. We recognise that and that's why we have introduced the concept of versioning in the next iteration of the API. It is primarily used for pagination (http://docs.vend.apiary.io/#introduction/pagination) but the version number on an object can also be used to find out if the event received from the webhook does, in fact, contain the latest version of the resource. The next version of webhooks will also include version numbers.
Thanks for that clarification, maybe we are doing something funky with our post requests. I'll review the code later today!
+1 to the versioning that will be awesome
You guys trigger multiple webhook events per single action. for example
Some suggestions: