calibrate

POST /v1/calibrate sends the outcomes of records you scored, so the score improves over time.

Up to 10 calibrations per score per day. See Calibration.

POST
/v1/calibrate

Sends the outcomes of records you scored, matched by score_id, and updates the score with them. Returns 202 with a job_id; score calls after the job completes use the updated score. One calibration at a time per score. Rows whose score_id wasn't sent to this score are skipped; sending an outcome again replaces it. A failed request records none of its outcomes.

Request body

application/json or multipart/form-data

FieldTypeDescription
model_idrequiredstring

The score these outcomes are for.

datarequiredarray of object or string

The outcomes: a JSON array of rows, or CSV text with a header row. A model_id in a row must match; other row fields are ignored.

FieldTypeDescription
score_idrequiredstring or number

The score_id you sent to POST /v1/score, once per request.

is_badrequiredboolean or number or string

true when the outcome was bad. Also 1/0 or "yes"/"no".

Responses

The calibration is running.

FieldTypeDescription
job_idstring

The calibration's job, job_….

matchedinteger

Rows that matched a call to this score.

unmatchedinteger

Rows skipped.

request_idstring

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

Examples

Example Request
curl -X POST 'https://api.finic.ai/v1/calibrate' \  -H "Authorization: Bearer $FINIC_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "model_id": "scm_01M4XRC000RT2GZSKYPD8J86G9",  "data": [    {      "score_id": "pay_88213",      "is_bad": true    },    {      "score_id": "pay_88214",      "is_bad": false    }  ]}'
Example Response
{  "job_id": "job_01M4YY4AZRJ8NR5QFRW628CJ5G",  "matched": 2,  "unmatched": 0,  "request_id": "req_01M4YPJNK0SZGEQS0A76EEND4N"}