GET /api/v1/webhooks/available. 0nly webhooks that you are allowed to receive will be displayed.PUT /api/v1/webhooks with this content :
{
"event": "sales_order_validated",
"url": "https://myapplication.com/webhooks/order_validated"
}
Once subscribed, events that concern your application will be sent via an anonymous POST request that contains a JSON representation of the associated data as well as two custom headers:
X-WEBHOOK-EVENT : the webhook event
X-WEBHOOK-KEY : the webhook authentication key.
For example :
POST / HTTP/1.1
X-WEBHOOK-EVENT: sales_order_validated
X-WEBHOOK-KEY: dKsZUSiLjyexoelsxExCEuXS8PUKvuJhqiNSDz-C8u4
Content-Type: application/json
User-Agent: HarelSystems HelloHarel/9.2.4
{
"code": "ORD-20210923-0001",
[...]
}
GET /api/v1/<entity>/{id} representation of the entity.