AltScore
Borrower Central (BC)

Steps API

This API allows managing steps in a borrower's process within the system. It provides endpoints to create, list, update, and delete steps, as well as to obtain summaries and step counts.

The Step Object

The Step object represents a step in a borrower's process.

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "borrowerId": "789e4567-e89b-12d3-a456-426614174111",
  "principalId": "456e4567-e89b-12d3-a456-426614174222",
  "order": 1,
  "key": "application",
  "label": "Application",
  "createdAt": "2023-04-01T12:00:00Z"
}

Attributes

AttributeDescriptionType
idUnique identifier of the stepString
borrowerIdAssociated borrower IDString
principalIdID of the principal who created the step (optional)String
orderOrder of the step in the processInteger
keyUnique key identifying the type of stepString
labelDescriptive label of the stepString
createdAtDate and time of step creationString (ISO 8601)

Available Operations

Create a New Step

Creates a new step for a borrower.

POST /v1/steps

Input Parameters

ParameterDescriptionTypeRequired
borrowerIdBorrower IDStringYes
keyStep keyStringYes

Example Request

{
  "borrowerId": "789e4567-e89b-12d3-a456-426614174111",
  "key": "application"
}

Successful Response

Status code 204 (No Content) if the step was successfully created.

List Steps

Retrieves a paginated list of steps with filtering and sorting options.

GET /v1/steps

Query Parameters

ParameterDescriptionType
borrower-idFilter by borrower IDString
keyFilter by step keyString
orderFilter by step orderInteger
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 Step objects.

Delete a Step

Deletes a specific step.

DELETE /v1/steps/:step_id

Path Parameters

ParameterDescription
step_idID of the step to delete

Successful Response

Status code 204 (No Content) if the step was successfully deleted.

Get Steps Summary

Retrieves a summary of the borrowers' steps.

GET /v1/steps/summary

Query Parameters

ParameterDescriptionType
dateToAnalyzeDate to analyze (optional)String

Successful Response

The response will be a StepSummary object with information about the steps and conversion funnel.

Get Steps Summary by Borrower

Retrieves a summary of the current steps of all borrowers.

GET /v1/steps/borrower-summary

Successful Response

The response will be a list of BorrowerStepSummary objects with information about the current steps of the borrowers.

Get Steps Count

Retrieves a count of steps by period.

GET /v1/steps/count

Query Parameters

ParameterDescriptionType
dateFromStart date for the count (optional)String
dateToEnd date for the count (optional)String
periodicityCount periodicity (daily, weekly, monthly)String

Successful Response

The response will be a StepCount object with information about the count of steps by period.

Other Relevant Objects

The StepSummary Object

The StepSummary object provides a summary of the conversion funnel of the steps on a specific date.

{
  "date": "2023-04-01T12:00:00Z",
  "steps": [
    {
      "order": 1,
      "step": "application",
      "count": 100,
      "funnelCount": 300,
      "label": "Application"
    },
    {
      "order": 2,
      "step": "approval",
      "count": 75,
      "funnelCount": 200,
      "label": "Approval"
    },
    {
      "order": 3,
      "step": "disbursement",
      "count": 50,
      "funnelCount": 125,
      "label": "Disbursement"
    }
  ]
}

Attributes

AttributeDescriptionType
dateSummary dateString (ISO 8601)
stepsList of StepData objectsArray

The StepData Object

AttributeDescriptionType
orderOrder of the step in the processInteger
stepStep keyString
countNumber of borrowers in this stepInteger
funnelCountCumulative number of borrowers up to this stepInteger
labelDescriptive label of the stepString

The BorrowerStepSummary Object

The BorrowerStepSummary object provides a summary of the current steps of all borrowers.

[
  {
    "order": 1,
    "step": "application",
    "count": 50,
    "label": "Application"
  },
  {
    "order": 2,
    "step": "approval",
    "count": 30,
    "label": "Approval"
  },
  {
    "order": 3,
    "step": "disbursement",
    "count": 20,
    "label": "Disbursement"
  }
]

Attributes

AttributeDescriptionType
orderOrder of the step in the processInteger
stepStep keyString
countNumber of borrowers currently in this stepInteger
labelDescriptive label of the stepString

The StepCount Object

The StepCount object provides a count of steps by period.

{
  "data": [
    {
      "date": "2023-04-01",
      "stages": [
        {
          "key": "application",
          "count": 10,
          "label": "Application",
          "order": 1
        },
        {
          "key": "approval",
          "count": 5,
          "label": "Approval",
          "order": 2
        },
        {
          "key": "disbursement",
          "count": 3,
          "label": "Disbursement",
          "order": 3
        }
      ]
    },
    {
      "date": "2023-04-02",
      "stages": [
        {
          "key": "application",
          "count": 15,
          "label": "Application",
          "order": 1
        },
        {
          "key": "approval",
          "count": 8,
          "label": "Approval",
          "order": 2
        },
        {
          "key": "disbursement",
          "count": 4,
          "label": "Disbursement",
          "order": 3
        }
      ]
    }
  ]
}

Attributes

AttributeDescriptionType
dataList of PeriodData objectsArray

The PeriodData Object

AttributeDescriptionType
datePeriod dateString
stagesList of StageDetail objectsArray

The StageDetail Object

AttributeDescriptionType
keyStep keyString
countNumber of borrowers in this stepInteger
labelDescriptive label of the stepString
orderOrder of the step in the processInteger

Error Handling

The API may return the following error codes:

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

Errors will include a descriptive message in the response body.