AltScore
Borrower Central (BC)

Executions API

This API allows managing workflow executions in the system. It provides endpoints to create, list, update, and obtain detailed information about executions, as well as to handle their inputs, outputs, and states.

The Execution Object

The Execution object represents a workflow execution in the system.

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "principalId": "user123",
  "workflowId": "workflow456",
  "workflowAlias": "credit-score",
  "workflowVersion": "1.0.0",
  "workflowType": "scoring",
  "batchId": "batch789",
  "billableId": "bill123",
  "executionBatch": {
    "id": "992e4567-e89b-1432-a456-426614175837",
    "itemIndex": 5
  },
  "borrowerId": "borrower456",
  "status": "complete",
  "isSuccess": true,
  "isBillable": true,
  "isReScoring": false,
  "tags": ["credit", "automated"],
  "createdAt": "2023-04-01T12:00:00Z"
}

Attributes

AttributeDescriptionType
idUnique identifier of the executionString
principalIdID of the user who initiated the executionString
workflowIdID of the executed workflowString
workflowAliasAlias of the workflowString
workflowVersionVersion of the workflowString
workflowTypeType of workflow (optional)String
batchIdID of the execution batch (optional, deprecated)String
billableIdID of the billable item (optional)String
executionBatchObject with metadata of the batch to which the execution belongs (optional)Object
borrowerIdID of the associated borrower (optional)String
statusCurrent status of the executionString
isSuccessIndicates if the execution was successfulBoolean
isBillableIndicates if the execution is billableBoolean
isReScoringIndicates if it is a re-evaluationBoolean
tagsTags associated with the executionArray of String
createdAtDate and time of execution creationString (ISO 8601)

The ExecutionInput Object

The ExecutionInput object represents the input of a workflow execution in the system.

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workflowId": "workflow456",
  "workflowAlias": "credit-score",
  "workflowVersion": "1.0.0",
  "input": {
    "borrowerId": "borrower789",
    "loanAmount": 50000,
    "loanTerm": 36
  },
  "createdAt": "2023-04-01T12:00:00Z"
}

Attributes

AttributeDescriptionType
idUnique identifier of the execution inputString
workflowIdID of the associated workflowString
workflowAliasAlias of the workflowString
workflowVersionVersion of the workflowString
inputObject with the input data for the executionObject
createdAtDate and time of input creationString (ISO 8601)

The ExecutionOutput Object

The ExecutionOutput object represents the output of a workflow execution in the system.

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "billableId": "bill123",
  "borrowerId": "borrower789",
  "workflowId": "workflow456",
  "workflowAlias": "credit-score",
  "workflowVersion": "1.0.0",
  "workflowType": "evaluation",
  "statusCode": 200,
  "isSuccess": true,
  "output": {
    "creditScore": 750,
    "recommendation": "approve"
  },
  "customOutput": {
    "additionalInfo": "Low-risk client"
  },
  "hasAttachments": true,
  "notices": [
    {
        "message": "Income verification completed",
        "severity": "info"
    }
  ],
  "notes": ["Manual review of credit history required"],
  "errorMessage": null,
  "createdAt": "2023-04-01T12:05:00Z"
}

Attributes

AttributeDescriptionType
idUnique identifier of the execution outputString
billableIdID of the billable item (optional)String
borrowerIdID of the associated borrower (optional)String
workflowIdID of the executed workflowString
workflowAliasAlias of the workflowString
workflowVersionVersion of the workflowString
workflowTypeType of workflow (optional)String
statusCodeExecution status codeInteger
isSuccessIndicates if the execution was successfulBoolean
outputObject with the output data of the executionObject
customOutputCustom output data (optional)Any
hasAttachmentsIndicates if the output has attachmentsBoolean
noticesList of notices related to the outputArray of Object
notesList of notes related to the outputArray of String
errorMessageError message if the execution failed (optional)String
createdAtDate and time of output creationString (ISO 8601)

Get Execution Input

Retrieves the input of a specific execution.

GET /v1/executions/:execution_id/input

Path Parameters

ParameterDescription
execution_idID of the execution

Successful Response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workflowId": "workflow456",
  "workflowAlias": "credit-score",
  "workflowVersion": "1.0.0",
  "input": {
    "borrowerId": "borrower789",
    "loanAmount": 50000,
    "loanTerm": 36
  },
  "createdAt": "2023-04-01T12:00:00Z"
}

Get Execution Output

Retrieves the output of a specific execution.

GET /v1/executions/:execution_id/output

Path Parameters

ParameterDescription
execution_idID of the execution

Successful Response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "billableId": "bill123",
  "borrowerId": "borrower789",
  "workflowId": "workflow456",
  "workflowAlias": "credit-score",
  "workflowVersion": "1.0.0",
  "workflowType": "scoring",
  "statusCode": 200,
  "isSuccess": true,
  "output": {
    "creditScore": 750,
    "recommendation": "approve"
  },
  "customOutput": {
    "additionalInfo": "Low-risk client"
  },
  "hasAttachments": true,
  "notices": [
    {
        "message": "Income verification completed",
        "severity": "info"
    }
  ],
  "notes": ["Manual review of credit history required"],
  "errorMessage": null,
  "createdAt": "2023-04-01T12:05:00Z"
}

Operations

List Executions

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

GET /v1/executions

Query Parameters

ParameterDescriptionType
billable-idFilter by billable IDString
borrower-idFilter by borrower IDString
workflow-idFilter by workflow IDString
workflow-versionFilter by workflow versionString
workflow-aliasFilter by workflow aliasString
workflow-typeFilter by workflow typeString
pagePage number (default: 1)Integer
per-pageItems per page (default: 10)Integer
searchText to search in executionsString
sort-byField to sort byString
sort-directionSorting direction (asc or desc)String
tagsFilter by tagsString
date-fromStart date for filteringString
date-toEnd date for filteringString
statusFilter by execution statusString
exclude-testsExclude test executionsBoolean
exclude-batch-executionsExclude executions belonging to a batchBoolean

Successful Response

The response will be a paginated list of Execution objects.

Get an Execution

Retrieves detailed information of a specific execution.

GET /v1/executions/:execution_id

Path Parameters

ParameterDescription
execution_idID of the execution to retrieve

Successful Response

The response will be a complete Execution object.

Get Execution Output

Retrieves the output of a specific execution.

GET /v1/executions/:execution_id/output

Path Parameters

ParameterDescription
execution_idID of the execution

Successful Response

The response will be an ExecutionOutput object.

Get Execution Input

Retrieves the input of a specific execution.

GET /v1/executions/:execution_id/input

Path Parameters

ParameterDescription
execution_idID of the execution

Successful Response

The response will be an ExecutionInput object.

Get Execution State

Retrieves the current state of a specific execution.

GET /v1/executions/:execution_id/state

Path Parameters

ParameterDescription
execution_idID of the execution

Successful Response

The response will be an ExecutionState object.

Retry Execution

Retries a specific execution.

POST /v1/executions/:execution_id/retry

Path Parameters

ParameterDescription
execution_idID of the execution to retry

Input Parameters

ParameterDescriptionType
skipTasksList of tasks to skip in the retryArray of String

Request Example

{
  "skipTasks": ["dataValidation", "creditCheck"]
}

Successful Response

The response will include information about the execution retry.

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.