score

POST /v1/score returns a calibrated risk score from 0 to 1000 for one record.

See Scores.

POST
/v1/score

Scores one record with a score you created: an integer from 0 (lowest risk) to 1000 (highest), about the probability of a bad outcome times 1,000. The record must have the fields of the score's schema.

Request body

application/json or multipart/form-data

FieldTypeDescription
model_idrequiredstring

The score's id, from Create a score.

score_idrequiredstring

Your id for this record, unique within the score. Send it back with the outcome to calibrate.

datarequiredobject or array of object or string

One record, with the fields of the score's examples. A JSON object (or an array holding one), or CSV text with a header and one row. Up to 60,000 bytes as compact JSON. An is_bad field is ignored.

skip_schema_validationboolean

Score the record even if its fields differ from the score's schema.

update_schemaboolean

Score it and make its fields the schema from now on.

Responses

The score.

FieldTypeDescription
model_idstring

The score's id

score_idstring

As sent.

scoreinteger

0 (lowest risk) to 1000 (highest); score ÷ 1000 is about the probability of a bad outcome.

request_idstring

req_…, the same as the X-Request-Id header.

Examples

Example Request
curl -X POST 'https://api.finic.ai/v1/score' \  -H "Authorization: Bearer $FINIC_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "model_id": "scm_01M4XRC000RT2GZSKYPD8J86G9",  "score_id": "pay_88213",  "data": {    "amount_usd": 1850,    "merchant_category": "electronics",    "account_age_days": 6,    "new_device": true,    "billing_country": "US",    "ip_country": "RO"  }}'
Example Response
{  "model_id": "scm_01M4XRC000RT2GZSKYPD8J86G9",  "score_id": "pay_88213",  "score": 874,  "request_id": "req_01M4YF1068X8B4C458ENPD4JHT"}