Developer documentation
Webhooks
Webhooks allow apps to stay in sync with eWarehousing data
Registering webhooks
To learn more about registering webhooks, visit the webhook setup docs
Available webhook topics
article.created: A new article was created.article.updated: An existing article was updated.article.deleted: An article was successfully deleted.batch.updated: An existing batch was updated.inbound.created: A new inbound was created.inbound.updated: An existing inbound was updated.inbound.completed: An existing inbound was completed.modification.created: A new modification was created.modification.updated: An existing modification was updated.modification.approved: An existing modification was approved.modification.disapproved: An existing modification was disapproved.order.created: A new order was created.order.updated: An existing order was updated.order.planned: An order was successfully planned.order.processing: An order is being processed.order.shipped: An order was successfully shipped.shipment.created: A new shipment was created.shipment.updated: An existing shipment was updated.stock.updated: An existing stock was updated.variant.created: A new variant was created.variant.updated: An existing variant was updated.variant.deleted: A variant was successfully deleted.
Code exampleJSON
{
"body": {
"id": "f9cc7e9c-7ac2-45df-b4a3-1a19321c144d",
"ean": "123",
"sku": "12345",
"modified_at": "2022-02-11T17:45:01+0000",
"article_code": "green_jacket",
"stock_salable": 973,
"stock_physical": 1000,
"stock_available": 973,
"stock_quarantine": 0
},
"group": "stock",
"action": "updated",
"entity": "variant",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"entityId": "f9cc7e9c-7ac2-45df-b4a3-1a19321c144d"
}Webhook headers
Each webhook message has a variety of headers containing extra context. To know for sure that a webhook was, in fact, sent by eWarehousing instead of a malicious actor, you can verify the request signature. Each webhook request contains a header named X-Hmac-Sha256, and you can verify this signature by using your secret webhook key. The signature is an HMAC hash of the request payload hashed using your secret key.
Headers
X-Hmac-Sha256: The webhook signature which can be used to validate the webhook. To learn more about the usage and verification of theX-Hmac-Sha256header, visit the webhook setup docsX-Webhook-Id: The unique identifier of the webhook which can be used to validate the uniqueness of the webhook. Example:dba10ff9-b82f-4601-8d58-1f7b6a8ae721X-Webhook-Topic: Topic of the webhook, such as order/updated or stock/updated
Webhook limitations
- Ordering isn't guaranteed between different topics for the same resource. For example, it's possible that an orders/updated webhook might be delivered before an orders/created webhook.
- The webhooks API provides "at least once" delivery of webhook events. This means that an endpoint might receive the same webhook event more than once. You can detect duplicate webhook events by comparing the
X-Webhook-Idheader to previous events.
Warning
Webhook delivery isn't always guaranteed. You should therefore implement reconciliation jobs to fetch data from eWarehousing periodically.