WorkspaceDarkLight
Contents

API reference

Score

Measured against your own book. Open the product

GET/v1/scoreOpen ↗

Describes this API: what it takes and what it returns.

POST/v1/scoreKey

Score an applicant against the lender’s model borrower, or on the plain scale out of 1200. The answer carries the first entry of the rating history, to keep.

Body
{ statement (CSV text) | application (reading, assessment, history, answers…), amount, termMonths, frequency, scale: elo | plain, model? (the model borrower, as /v1/score/model-borrower returned it), lender?, reference? (the application’s), loan? }

POST/v1/score/model-borrowerKey

Count completed and written-off loans in the lender’s model borrower, up to 25 a call: its rating moves with each, and repaid loans join its profile. Send it back each time; each loan counts once.

Body
{ model? | lender, loans: [{ loan, application?, outcome: completed | written off, on, good: repaid and never over 7 days past due, rated: the history’s first entry (scale, rating, measures) }] }

POST/v1/score/historyKey

Bring a loan’s rating history up to a day from its ledger: every repayment, dishonour, cleared arrears, early payout, completion or write-off since, each once. Hardship never lowers it.

Body
{ history: [the entries so far, first to last], terms, events (the ledger’s events), through: YYYY-MM-DD, graceDays?, model? }

POST/v1/score/benchmarkKey

Build a model borrower’s profile from closed loans in one go.

Body
{ loans: [{ measures, outcome: good|bad|neither, closedOn }], from?, to? }

POST/v1/score/validateKey

How well the score separates good and bad loans: AUC, Gini, KS and the bad rate by band.

Body
{ loans: [{ rating, outcome }] }

POST/v1/score/updateKey

Move a rating by repayment results: each instalment is a match.

Body
{ rating, results: [{ result: on time|late|missed|plan kept }], baseRate? }

GET/v1/l/:tenant/score/model-borrower

The lender’s model borrower: its name, rating, profile and window, and every loan that moved it, from the lender’s own records.

GET/v1/l/:tenant/score/history/:loanRef

A loan’s rating history: the assessment against the model borrower, measure by measure, then every change since, each with its day, reason and the gap to the model borrower.