You can subscribe to webhooks to be updated in real time when changes occur in Hello Harel.
First, get a list of available webhooks using GET /api/v1/webhooks/available. 0nly webhooks that you are allowed to receive will be displayed.
You can then subscribe to a webhook by using 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", [...] }
The content of the webhook request is generally the same model as the corresponding GET /api/v1/<entity>/{id} representation of the entity.