1. Create endpoints handling webhooks
This is your endpoint that will handle incoming rest-hooks from the CONVELA Cloud system. We recommend making one endpoint that receives all events. Your endpoint can then use the event_name key/value pair in the rest-hooks's payload to handle different event types.
However, you can also make a separate endpoint for each event, if you prefer to do so.
Sample response payload#
The payload, your endpoints should expect, depends on the event that was triggered. However, you'll always find the event_name key/value pair on top level, and all the instance data inside the payload object.
{ "event_name": "[rest-hooks even name]", "payload": { "type": "[entity name]", "attributes": { "id": [int], ... } }}