score
POST /v1/score returns a calibrated risk score from 0 to 1000 for one record.
See Scores.
Request body
application/json or multipart/form-data
| Field | Type | Description |
|---|---|---|
model_idrequired | string | The score's id, from Create a score. |
score_idrequired | string | Your id for this record, unique within the score. Send it back with the outcome to calibrate. |
datarequired | object 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 |
skip_schema_validation | boolean | Score the record even if its fields differ from the score's schema. |
update_schema | boolean | Score it and make its fields the schema from now on. |
| Field | Type | Description |
|---|---|---|
model_idrequired | string | The score's id. |
score_idrequired | string | Your id for this record. |
filerequired | string | The record: CSV with a header and one row, or a JSON object. |
skip_schema_validation | boolean | |
update_schema | boolean |
Responses
The score.
| Field | Type | Description |
|---|---|---|
model_id | string | The score's id |
score_id | string | As sent. |
score | integer | 0 (lowest risk) to 1000 (highest); score ÷ 1000 is about the probability of a bad outcome. |
request_id | string |
|
| Status | Type and when |
|---|---|
400 |
|
401 |
|
402 |
|
404 |
|
409 |
|
413 |
|
429 |
|
503 |
|
Every error has the same shape; see Errors.
Examples
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" }}'{ "model_id": "scm_01M4XRC000RT2GZSKYPD8J86G9", "score_id": "pay_88213", "score": 874, "request_id": "req_01M4YF1068X8B4C458ENPD4JHT"}