GitHub

Webhooks

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 setup

To learn more about setting up webhooks, or learn how to verify the webhooks, visit the webhook docs.


Webhook resource

idreadonly

Unique numeric identifier for the webhook subscription.

addressstring

Destination URI to which the webhook subscription should send the POST request when an event occurs. Must be a https secured endpoint.

topicstring

Event that triggers the webhook.


GET Collection

Retrieves a list of webhooks.

Example

1curl --location --request GET 'https://eu-dev.middleware.ewarehousing-solutions.com/webhooks/'

Response

1{
2 "count": 2,
3 "next": null,
4 "previous": null,
5 "results": [
6 {
7 "id": "6caeff6d-cd72-4fde-9d02-0704514ad917",
8 "url": "https://webhook.site/d8cfed29-d64c-41e6-82fe-f4919992b7a8",
9 "group": "stock",
10 "action": "updated",
11 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
12 },
13 {
14 "id": "ac954ac8-4182-4dc5-b951-f570dc145fe4",
15 "url": "https://webhook.site/d8cfed29-d64c-41e6-82fe-f4919992b7a8",
16 "group": "order",
17 "action": "updated",
18 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
19 }
20 ]
21}

POST Create

Create a new webhook subscription by specifying both an address and a topic.

Parameters

urlrequiredstring

grouprequiredstring

actionrequiredstring

hash_secretrequiredstring

Example

1curl --location --request POST 'https://eu-dev.middleware.ewarehousing-solutions.com/webhooks/' \
2--data-raw '{
3 "url": "https://webhook.site/d8cfed29-d64c-41e6-82fe-f4919992b7a8",
4 "group": "stock",
5 "action": "updated",
6 "hash_secret": "ABC12345"
7}'

Response

1{
2 "id": "2f1a2b53-b499-40a5-b440-e5c30e37c97c",
3 "url": "https://webhook.site/d8cfed29-d64c-41e6-82fe-f4919992b7a8",
4 "group": "stock",
5 "action": "updated",
6 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
7 "hash_secret": "ABC12345"
8}

PUT Update

Update a webhook subscription's topic or address URIs

Parameters

urlstring

groupstring

actionstring

Example

1curl --location --request PUT 'https://eu-dev.middleware.ewarehousing-solutions.com/webhooks/2f1a2b53-b499-40a5-b440-e5c30e37c97c' \
2--data-raw '{
3 "url": "https://webhook.site/5c2bba38-7515-478d-95c9-cc263f38e23f",
4 "group": "order",
5 "action": "created"
6}'

Response

1{
2 "id": "2f1a2b53-b499-40a5-b440-e5c30e37c97c",
3 "url": "https://webhook.site/5c2bba38-7515-478d-95c9-cc263f38e23f",
4 "group": "order",
5 "action": "created",
6 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
7}

DEL Delete

Delete a webhook.

Example

1curl --location --request DELETE 'https://eu-dev.middleware.ewarehousing-solutions.com/webhooks/2f1a2b53-b499-40a5-b440-e5c30e37c97c'