Webhooks
Webhooks allow you to subscribe to Aventus events associated with user actions. To consume a webhook, you will need to set up a URL on a publicly accessible web server.
When certain events are triggered, Aventus will send a POST request to your URL with a JSON body. Aventus expects your webhook URL to return a 2xx
HTTP Status code to indicate that the webhook has been received successfully. If a webhook is not successfully received, Aventus will retry sending the webhook an additional 2 times (maximum of 3 attempts).
Policy Purchased
When a policy is purchased the Policy Purchased webhook is triggered with the following payload.
{
"customerID": "12345678-0001-0001-0001-000000000001",
"partnerReference": "Xvodj9XZtP",
"policyCoverType": "HomeContents",
"policyLob": "Home",
"policyPremium": {
"value": 11200,
"currencyCode": "GBP"
},
"policyReference": "HLHHNSP0001",
"paymentMethod": "CreditCard"
}
Name | DataType | Description |
---|---|---|
customerID | string | The user's Aventus ID |
partnerReference | string | An Aventus Partner’s unique reference for the user. |
policyCoverType | string | The type of cover purchased. |
policyLob | string | The policy type |
policyPremium | Money | The total Gross Premium of the policy Money is represented in 1/100 of the currency. e.g. if the currency is Pounds, then this value is in pence |
policyReference | string | The user’s reference number for policy |
paymentMethod | string | The payment method used to purchase the policy |
Updated about 6 years ago