AltScore
Borrower Central (BC)

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.

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "ruleId": "rule123",
  "ruleCode": "HIGH_RISK",
  "borrowerId": "borrower456",
  "level": 3,
  "message": "High risk detected",
  "executionId": "exec789",
  "referenceId": "ref101112",
  "isAcknowledged": false,
  "acknowledgedBy": null,
  "acknowledgedAt": null,
  "createdAt": "2023-04-01T12:00:00Z",
  "updatedAt": "2023-04-01T12:00:00Z"
}

Attributes

AttributeDescriptionType
idUnique identifier of the alertString
ruleIdID of the rule that generated the alertString
ruleCodeRule code (optional)String
borrowerIdID of the borrower associated with the alertString
levelSeverity level of the alertInteger
messageDescriptive message of the alertString
executionIdID of the execution that generated the alert (optional)String
referenceIdReference ID (optional)String
isAcknowledgedIndicates if the alert has been acknowledgedBoolean
acknowledgedByEmail of the person who acknowledged the alert (optional)String
acknowledgedAtAcknowledgment date and time (optional)String (ISO 8601)
createdAtAlert creation date and timeString (ISO 8601)
updatedAtLast update date and timeString (ISO 8601)

Endpoints

Create a New Alert

Creates a new alert in the system.

POST /v1/alerts

Input Parameters:

ParameterDescriptionTypeRequired
borrowerIdID of the borrower associated with the alertStringYes
ruleIdID of the rule that generates the alertStringNo
ruleCodeRule codeStringNo
levelSeverity level of the alertIntegerYes
messageDescriptive message of the alertStringNo
executionIdID of the execution that generated the alertStringNo
referenceIdReference IDStringNo

Example Request:

{
  "borrowerId": "borrower456",
  "ruleCode": "HIGH_RISK",
  "level": 3,
  "message": "High risk detected"
}

Successful Response:

{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Acknowledge an Alert

Marks an alert as acknowledged.

PUT /v1/alerts/:alert_id/acknowledge

Path Parameters:

ParameterDescription
alert_idID of the alert to acknowledge

Successful Response:

The response will be the updated Alert object.

Get an Alert

Retrieves information about a specific alert.

GET /v1/alerts/:alert_id

Path Parameters:

ParameterDescription
alert_idID 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.

DELETE /v1/alerts/:alert_id

Path Parameters:

ParameterDescription
alert_idID 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.

GET /v1/alerts

Query Parameters:

ParameterDescriptionType
borrower-idFilter by borrower IDString
reference-idFilter by reference IDString
execution-idFilter by execution IDString
levelFilter by severity levelInteger
is-acknowledgedFilter by acknowledgment statusBoolean
searchText to search in alertsString
pagePage number (default: 1)Integer
per-pageItems per page (default: 10)Integer
sort-byField to sort byString
sort-directionSorting 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:

CodeDescription
400Bad Request
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error

Errors will include a descriptive message in the response body.

On this page