Alerts API
This API allows managing alerts in the system. It provides endpoints to create, read, update, and delete alerts, as well as perform specific operations like acknowledging alerts and obtaining information about borrowers with alerts.
The Alert Object
The Alert object represents an alert in the system.
Attributes
| Attribute | Description | Type |
|---|---|---|
id | Unique identifier of the alert | String |
ruleId | ID of the rule that generated the alert | String |
ruleCode | Rule code (optional) | String |
borrowerId | ID of the borrower associated with the alert | String |
level | Severity level of the alert | Integer |
message | Descriptive message of the alert | String |
executionId | ID of the execution that generated the alert (optional) | String |
referenceId | Reference ID (optional) | String |
isAcknowledged | Indicates if the alert has been acknowledged | Boolean |
acknowledgedBy | Email of the person who acknowledged the alert (optional) | String |
acknowledgedAt | Acknowledgment date and time (optional) | String (ISO 8601) |
createdAt | Alert creation date and time | String (ISO 8601) |
updatedAt | Last update date and time | String (ISO 8601) |
Endpoints
Create a New Alert
Creates a new alert in the system.
Input Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
borrowerId | ID of the borrower associated with the alert | String | Yes |
ruleId | ID of the rule that generates the alert | String | No |
ruleCode | Rule code | String | No |
level | Severity level of the alert | Integer | Yes |
message | Descriptive message of the alert | String | No |
executionId | ID of the execution that generated the alert | String | No |
referenceId | Reference ID | String | No |
Example Request:
Successful Response:
Acknowledge an Alert
Marks an alert as acknowledged.
Path Parameters:
| Parameter | Description |
|---|---|
alert_id | ID of the alert to acknowledge |
Successful Response:
The response will be the updated Alert object.
Get an Alert
Retrieves information about a specific alert.
Path Parameters:
| Parameter | Description |
|---|---|
alert_id | ID of the alert to retrieve |
Successful Response:
The response will be a complete Alert object, as described above.
Delete an Alert
Deletes an alert from the system.
Path Parameters:
| Parameter | Description |
|---|---|
alert_id | ID of the alert to delete |
Successful Response:
Status code 204 (No Content) if the deletion was successful.
List Alerts
Retrieves a paginated list of alerts with filtering and sorting options.
Query Parameters:
| Parameter | Description | Type |
|---|---|---|
borrower-id | Filter by borrower ID | String |
reference-id | Filter by reference ID | String |
execution-id | Filter by execution ID | String |
level | Filter by severity level | Integer |
is-acknowledged | Filter by acknowledgment status | Boolean |
search | Text to search in alerts | String |
page | Page number (default: 1) | Integer |
per-page | Items per page (default: 10) | Integer |
sort-by | Field to sort by | String |
sort-direction | Sorting direction (asc or desc) | String |
Successful Response:
The response will be a paginated list of Alert objects.
Error Handling
The API may return the following error codes:
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
Errors will include a descriptive message in the response body.