Webhook Integration
This guide provides instructions for setting up and configuring webhooks in our system. The webhook system supports multiple authentication types, allowing you to secure your webhook endpoints according to your security requirements.
Overview
Webhooks allow you to receive real-time updates about specific events in your azakaw integration. When an event occurs, our system sends an HTTP POST request to your configured webhook endpoint with relevant information about the event.
Webhook Configuration
Each webhook is associated with a tenant and includes several configurable properties:
Configuration Properties
Property | Description |
---|---|
Id | Unique identifier for the webhook configuration |
TenantId | The tenant's unique identifier |
RetryCount | Number of retry attempts in case of failure |
RetryInterval | Time interval between retries |
WebhookBaseUrl | Base URL of your webhook endpoint (e.g., https://example.com/api) |
WebhookRelativePath | Relative path to the webhook endpoint (e.g., /webhook/events) |
IsActive | Boolean indicating if the webhook is currently active |
AuthType | Type of authentication used for the webhook |
AuthSettings | Authentication settings based on the selected AuthType |
Authentication Types
We support several authentication mechanisms to secure your webhook endpoints:
None
No authentication required. Not recommended for production environments.
API Key
Authenticate using a simple API key in the request headers.
{
"authType": "ApiKey",
"authSettings": {
"apiKey": "your-api-key"
}
}
Basic Authentication
HTTP Basic Authentication using a username and password.
{
"authType": "Basic",
"authSettings": {
"username": "your-username",
"password": "your-password"
}
}
Retry Mechanism
In the event of a failed webhook request (e.g., if your server returns a 500 status code), the system will automatically retry the request based on the following configuration:
- RetryCount: The maximum number of retry attempts
- RetryInterval: The time between retry attempts
Webhook Request Body
The body of the webhook request will contain important information depending on the event being triggered. Below are the structures for two types of webhook events: RiskAssessmentCalculated and ProfileStatusUpdated.
RiskAssessmentCalculated
When the RiskAssessmentCalculated event is triggered, the body will contain the following fields:
{
"Type": "RiskAssessmentCalculated",
"RiskAssessmentId": "{RiskAssessmentId}",
"SubmissionId": "{SubmissionId}",
"Risk": "{RiskTypeId}",
"ClientRating": "{ClientRating}"
}
Properties
Property | Description | Values |
---|---|---|
Type | Event type | "RiskAssessmentCalculated" |
RiskAssessmentId | Unique identifier for the risk assessment | String |
SubmissionId | Submission identifier | String |
Risk | Risk level of the profile | "Low", "Medium", "High" |
ClientRating | Customer segment rating | "Retail", "Professional", "N/A" |
Example
{
"Type": "RiskAssessmentCalculated",
"RiskAssessmentId": "12345",
"SubmissionId": "67890",
"Risk": "Low",
"ClientRating": "Retail"
}
ProfileStatusUpdated
When the ProfileStatusUpdated event is triggered, the body will contain the following fields:
{
"Type": "ProfileStatusUpdated",
"RiskAssessmentId": "{RiskAssessmentId}",
"SubmissionId": "{SubmissionId}",
"Status": "{Status}",
"ApprovedBy": {
"Id": "{userId}",
"Name": "{fullName}",
"Email": "{email}",
"Roles": [
"{role1}",
"{role2}"
]
}
}
Properties
Property | Description |
---|---|
Type | Event type ("ProfileStatusUpdated") |
RiskAssessmentId | Unique identifier for the associated risk assessment |
SubmissionId | Submission identifier |
Status | Updated status (e.g., "Approved") |
ApprovedBy | The user who approved the profile |
ApprovedBy.Id | The id of the user who approved |
ApprovedBy.Name | The full name of the user who approved |
ApprovedBy.Email | The email of the user who approved |
ApprovedBy.Roles | The user roles |
Example
{
"Type": "ProfileStatusUpdated",
"RiskAssessmentId": "1bf4f6ad-807d-45e4-8e8b-613e51203618",
"SubmissionId": "9dc1b390-4a35-4310-a85a-25e6bd7cd3f6",
"Status": "Approved",
"ApprovedBy": {
"Id": "8392d3fb-ad15-43ca-8b9e-a7cbcf411067",
"Name": "Noelani Alfreda Boone William",
"Email": "tazixog@yopmail.com",
"Roles": [
"MLRO"
]
}
}