For the complete documentation index, see llms.txt. This page is also available as Markdown.

External decisioning

External decisioning API reference

Base path: /external-decisioning

Tag: External Decisioning

Persists to ExternalDecisioningResult.

Runtime scoring uses the matrix’s authoringMode (FREE_TEXT vs CATALOG) automatically.

6.1 Evaluate

POST /external-decisioning/evaluate

Behaviour

  1. If referenceId already exists for orgKey → return stored result (idempotent; no re-score).

  2. Else create PENDING row → load active matrix for org → fetch bank statement from Midax via accountId → score → store COMPLETED (or FAILED + rethrow).

Request body (EvaluateExternalDecisioningDto)

Field
Type
Required
Notes

orgKey

string (2–120)

Yes

Organisation id / key

decisionMatrixId

UUID

Yes

Must belong to org and be isActive: true

applicationType

INDIVIDUAL | CORPORATE

Yes

applicationData

object

Yes

Must include loan.amount > 0

creditBureauData

object

No

Bureau reports / profile used by scorers

bankStatement

object

Yes

{ "accountId": "…" }

referenceId

string (max 120)

No

Unique per organisation when set

{
  "orgKey": "acme",
  "decisionMatrixId": "ea040abd-8084-4bab-8bbb-c9d091710149",
  "applicationType": "INDIVIDUAL",
  "referenceId": "ACME-LOAN-998877",
  "applicationData": {
    "loan": {
      "amount": 500000,
      "tenure": 12
    },
    "dob": "1992-04-12",
    "gender": "female",
    "phone": "08012345678",
    "email": "jane@example.com",
    "homeAddress": {
      "street": "12 Admiralty Way",
      "lga": "Eti-Osa",
      "state": "Lagos"
    },
    "monthlyIncome": 350000,
    "employmentStatus": "Salaried",
    "creditBureau": {
      "gender": "female",
      "maritalStatus": "single",
      "bvn": "22222222222",
      "dob": "1992-04-12"
    }
  },
  "creditBureauData": {
    "summary": {
      "successful": 2,
      "totalBureaus": 3
    },
    "reports": []
  },
  "bankStatement": {
    "accountId": "mono-account-id-123"
  }
}

applicationData notes

  • Required: loan.amount (number > 0).

  • You may send either:

    • Flat / nested fields (auto-normalized into internal responses), or

    • Internal-shaped { "responses": [ { "fields": [ { "name", "value", "type" } ] } ] }.

  • Optional nested creditBureau on application data is merged with top-level creditBureauData.

Response data

amountApproved is the percentage of requested loan amount from the matched decision band (stored as string).

6.2 List results

Query (ListExternalDecisioningQueryDto)

Param
Type
Required
Notes

orgKey

string

Yes

decisionMatrixId

UUID

No

status

enum

No

PENDING | COMPLETED | FAILED

referenceId

string

No

minScore

number ≥ 0

No

Inclusive

maxScore

number ≥ 0

No

Inclusive

page

number ≥ 1

No

Default 1

limit

number ≥ 1

No

Default 20

Response data

6.3 Get by id

:id = ExternalDecisioningResult UUID.

Response data is the same object as a single evaluate result (§6.1).

6.4 Rerun

Reuses stored applicationData, creditBureauData, and bankStatementRef.accountId. Re-scores against the current active matrix definition (useful after matrix updates).

No request body.

Response data is the same shape as evaluate.