GitHub

Introduction

Webhooks

Webhooks overview

You can use webhook subscriptions to receive notifications about particular events. After you've subscribed to a webhook topic, your app can execute code immediately after specific events occur in the eWMS, instead of having to make API calls periodically to check their status.

Webhook headers

Each webhook message has a variety of headers containing extra context.

1X-Hmac-Sha256: `the-webhook-sha`
2X-Webhook-Id: `dba10ff9-b82f-4601-8d58-1f7b6a8ae721`

Properties

X-Hmac-Sha256string

Hash of the webhook content

X-Webhook-Idstring

Unique identifier of a webhook event

To learn more about the usage and verification of the X-Hmac-Sha256, visit the webhook setup docs

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-Id header to previous events.
  • Webhook delivery isn't always guaranteed. You should therefore implement reconciliation jobs to fetch data from eWarehousing periodically.

Available groups and actions

The following webhook groups are supported

GroupActions
articlecreated, updated, deleted
batchupdated
inboundcreated, updated, completed
modificationcreated, updated, approved, disapproved
ordercreated, updated, planned, processing, shipped
shipmentcreated, updated
stockupdated
variantcreated, updated, deleted

Examples

Stock webhook example

1{
2 "body": {
3 "id": "f9cc7e9c-7ac2-45df-b4a3-1a19321c144d",
4 "ean": "123",
5 "sku": "12345",
6 "modified_at": "2022-02-11T17:45:01+0000",
7 "article_code": "green_jacket",
8 "stock_salable": 973,
9 "stock_physical": 1000,
10 "stock_available": 973,
11 "stock_quarantine": 0
12 },
13 "group": "stock",
14 "action": "updated",
15 "entity": "variant",
16 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
17 "entityId": "f9cc7e9c-7ac2-45df-b4a3-1a19321c144d"
18}

Order webhook example

1{
2 "body": {
3 "id": "015e8f52-3431-4811-8150-609610feb16b",
4 "note": "Testorder",
5 "status": "planned",
6 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
7 "language": null,
8 "documents": [
9 {
10 "id": "ab969b7b-ee2a-41bc-9389-9e581f30738c",
11 "title": "my_label.pdf",
12 "quantity": 1,
13 "mime_type": "application/pdf",
14 "order_price": null,
15 "is_shipping_label": false
16 }
17 ],
18 "reference": "ORD00000003066",
19 "created_at": "2022-02-11T17:44:41+0000",
20 "order_lines": [
21 {
22 "variant": {
23 "id": "f9cc7e9c-7ac2-45df-b4a3-1a19321c144d",
24 "ean": "123",
25 "sku": "12345",
26 "name": "Green",
27 "depth": 40,
28 "value": 50.45,
29 "width": 40,
30 "height": 40,
31 "weight": 400,
32 "expirable": false,
33 "description": "The best green jacket ever created",
34 "article_code": "green_jacket",
35 "hs_tariff_code": "123456789",
36 "country_of_origin": "NL",
37 "using_serial_numbers": false
38 },
39 "quantity": 3,
40 "description": "green_jacket_test"
41 }
42 ],
43 "order_amount": null,
44 "customer_note": "Pleaserushthisorder",
45 "assured_amount": null,
46 "shipping_method": "a299249a-b2cd-4666-a6e5-77d3e1156a22",
47 "partial_delivery": false,
48 "shipping_address": {
49 "city": "Heinenoord",
50 "state": "ZH",
51 "street": "Nijverheidsweg",
52 "country": "NL",
53 "street2": null,
54 "zipcode": "3331MB",
55 "fax_number": null,
56 "addressed_to": "eWarehousing Solutions",
57 "phone_number": "0102202863",
58 "email_address": null,
59 "mobile_number": null,
60 "street_number": "27",
61 "contact_person": null,
62 "street_number_addition": null
63 },
64 "external_reference": "1644601481",
65 "business_to_business": false,
66 "applied_business_rules": null
67 },
68 "group": "order",
69 "action": "updated",
70 "entity": "order",
71 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
72 "entityId": "015e8f52-3431-4811-8150-609610feb16b"
73}
Previous
Status codes