Skip to main content

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

PropertyDescription
IdUnique identifier for the webhook configuration
TenantIdThe tenant's unique identifier
RetryCountNumber of retry attempts in case of failure
RetryIntervalTime interval between retries
WebhookBaseUrlBase URL of your webhook endpoint (e.g., https://example.com/api)
WebhookRelativePathRelative path to the webhook endpoint (e.g., /webhook/events)
IsActiveBoolean indicating if the webhook is currently active
AuthTypeType of authentication used for the webhook
AuthSettingsAuthentication 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

PropertyDescriptionValues
TypeEvent type"RiskAssessmentCalculated"
RiskAssessmentIdUnique identifier for the risk assessmentString
SubmissionIdSubmission identifierString
RiskRisk level of the profile"Low", "Medium", "High"
ClientRatingCustomer 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

PropertyDescription
TypeEvent type ("ProfileStatusUpdated")
RiskAssessmentIdUnique identifier for the associated risk assessment
SubmissionIdSubmission identifier
StatusUpdated status (e.g., "Approved")
ApprovedByThe user who approved the profile
ApprovedBy.IdThe id of the user who approved
ApprovedBy.NameThe full name of the user who approved
ApprovedBy.EmailThe email of the user who approved
ApprovedBy.RolesThe 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"
]
}
}