Skip to main content

Responses

All endpoints will return a JSON object as a response.

Each response sent from the API contains a status property, indicating whether the request was successful. In case of a Success status, the response is always contained within a data property. Upon status being Failure, a message property will be given, indicating the reason for the failure.

Success response​

The data property of the success response will be different depending on the type of request

Success responses for lists of resources (GET):

{
"status": "Success",
"message": "Mortgage retreived successfully.",
"data": {
"items": [],
"totalItems": 0,
"page": 1,
"pageSize": 10
}
}

Success response for single resources (GET, PATCH, POST):

{
"status": "Success",
"message": "Mortgage retreived successfully.",
"data": {
// Specific model of the resource
}
}

Error response​

All error responses follow the same schema:

{
"status": "Failure",
"message": "Unauthorized",
"data": null
}