ChannelEngine: webhooks
About this article
This article describes the webhooks feature on ChannelEngine, how to add them, and how to configure
Table of contents
Introduction
A webhook is a method for applications to provide other applications with information. It differs from APIs in the sense that these need to be polled, while webhooks are always listening – so you get the data provided by them as it is updated.
ChannelEngine's webhooks allow you to subscribe to certain events, such as when a new order is created or a shipment is changed.
Add a webhook
Via the ChannelEngine web application
To add a webhook via the ChannelEngine web application, do the following:
1. Go to Settings > Webhooks.
2. Click the Add button.
3. Add a Name to easily identify your webhook.
4. Add a URL. The URL you need to provide is simple, all required parameters are added automatically by ChannelEngine. Below you can find examples of the required input and of the resulting URL:
- Example of input - https://test-store.com/callback
- Example of result - https://test-store.com/callback?type=orders&tenant=test-company&updatedSince=1640172185
5. Select the kind of event the webhook should track. The options are described below:
- Orders create - triggered when orders are created.
- Products change - triggered when there is a change in the product feed.
- Returns change - triggered when returns are created or updated.
- Shipments change - triggered when a shipment is created and when a cancelation is created.
- Notifications create - triggered when ChannelEngine pushes a new notification.
- Product bundles change - triggered when product bundles are created or updated.
- Orders change - triggered when the order is updated on any other field then the status.
6. When you are done, set the webhook to active and click Save.
Via the ChannelEngine API
The ChannelEngine Merchant API exposes four webhook-related endpoints. To add a webhook via the API, submit a request using the POST /v2/webhooks
endpoint:
{ "Name": "string", "Url": "string", "IsActive": true, "Events": [ "ORDERS_CREATE" ] }
The GET, PUT, and DELETE endpoints are available too, and can be used to, respectively: retrieve all existing endpoints; update an existing endpoint; and delete an existing endpoint.
For more information on ChannelEngine's webhook-related endpoints, check out the API reference.
Delete a webhook
To delete a previously added webhook, make sure to deactivate it before actually deleting it.
Comments
0 comments
Article is closed for comments.