
Webhook payloads
The endpoint at the URL you specify in Webhooks will receive HTTP requests as below:
Method type: POST
Headers:
Content-Type: Application/Json
X-Poetic-HMAC-SHA256: A hash of the request body generated with secret key. (See below for more details)
Example request body ( JSON ):
{
"lastTriggeredTime": "Oct 21, 2021 2:06:49 PM",
"links": [
{
"rel": "entitlements",
"href": "https://api-dev.poetic-software.com/entitlements/v28.0/7572843"
},
{
"rel": "entitlements",
"href": "https://api-dev.poetic-software.com/entitlements/v28.0/7572844"
}
],
"eventType": "entitlement.created",
"eventObjectName": "Entitlements"
}Note: The above example is a case of entitlement webhook. Here is a case of company webhook example:
{"lastTriggeredTime":"Oct 27, 2021 9:08:43 AM","links":[{"rel":"company","href":"https://api-dev.poetic-software.com/companies/v28.0/56002"}],"eventType":"company.updated","eventObjectName":"Company"}
Here is a case of user webhook example:
{"lastTriggeredTime":"Nov 15, 2021 6:26:56 AM","links":[{"rel":"user","href":"https://api-dev.poetic-software.com/profiles/v28.0/1617141"}],"eventType":"user.created","eventObjectName":"User"}
Below table describes the relevant fields in the webhook message (request body):
Elements
Description
eventType
The event type to be triggered, for example, xxxxx.created, xxxxx.updated, or xxxxx.disabled, where xxxxx could be entitlement, company, or user.
eventObjectName
Type of object e.g., Entitlement, Company or User.
lastTriggeredTime
Date-timestamp of the event (It will be updated only when the Poetic event is successfully processed.)
Links
Link to the object (which is Entitlement in the above sample request).URL to get complete entitlement/company/user details.