Get Borrower History

GET /v1/borrowers/{borrower_id}/get_history

Retrieves all historical changes to the status of a borrower, with their effective date

Query parameters

  • calculation_date null | string

    Status will be calculated as it was on this date. Format: YYYY-MM-DD will be considered as end of day.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • calculation_date string(date-time)

      The status shown corresponds to this date

    • records array[object] | null

      When replaying the borrower's history a record is generated for every change in the status

      Hide records attributes Show records attributes object
      • balance number

        The balance of the bucket after the change in status

      • The status of the bucket that was affected

      • The type of bucket that was affected

      • delta number

        The amount of money that was added or subtracted from the bucket balance

      • The date when the change in status was effective

      • loan_id string

        The loan identifier

      • The type of step that generated the change in status

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 409 application/json

    Conflict

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

GET /v1/borrowers/{borrower_id}/get_history
curl \
 --request GET 'https://lms.kordev.io/v1/borrowers/7dabe6cd-db31-45c7-a3fb-00f2dc7324dc/get_history'
Response examples (200)
{
  "borrower_id": "7dabe6cd-db31-45c7-a3fb-00f2dc7324dc",
  "calculation_date": "2024-01-01",
  "records": [
    {
      "balance": 298000,
      "bucket_status": "overdue",
      "bucket_type": "principal",
      "delta": 2000,
      "effective_date": "2024-01-01T00:00:00-05:00",
      "loan_id": "fc1f4edc-a653-4367-a5f2-a80543f3d6da",
      "step_type": "PAYMENT_APPLICATION"
    }
  ]
}
Response examples (400)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (404)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (409)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (500)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}