create_scoring_model

POST /v1/scoring_models creates a scoring model from its criteria or from labeled examples, and returns its model_id and a job to wait for.

Up to 100 new scoring models per organization per day. Created from labeled examples, a scoring model is calibrated from the start; created from its criteria alone, it scores with estimated weights until you calibrate it. See Creating a scoring model. To add questions of your own, send add_questions (Changing questions).

POST
/v1/scoring_models

Creates a scoring model and returns 202 at once with its model_id and a job_id. Wait for the job, then score records. Create it from:

  • Its name and criteria alone. Finic writes its questions from the criteria and estimates how much each one counts. It's ready in less than a minute and scores any record; calibrate it later with labeled examples or outcomes to fit it to your data.
  • Labeled examples in data: past records whose outcomes you know. It's calibrated to them from the start, in about two minutes. For what to send, see Example data.

To try it here, open the playground and pick the 300 sample payments example: they're synthetic card payments in the same shape as the score example (also as sample-payments.csv). A scoring model built on sample data is only for trying Finic out.

Request body

multipart/form-data or application/json

FieldTypeDescription
dataarray of object or string

Optional. The examples: a JSON array of objects, or CSV text with a header row. Every row needs is_bad: true when the outcome was bad, false when good (also 1/0). At least 100 rows with 20 or more of each outcome; up to 2,000 are used. Row rules are under Rules. Without data, send criteria.

namerequiredstring

Required. A few words for people to recognize the scoring model by, such as "Card-not-present payment fraud".

criteriastring

What the decision is and what a bad outcome (is_bad) means, such as "Card-not-present payments. Bad: charged back as fraud within 90 days." Required without data, since Finic writes the questions from it; with data, optional context.

add_questionsarray of string

Optional. Your own yes/no questions about a record, used alongside Finic's, such as "Was the account opened less than a week before the payment?". Created from examples, the scoring model uses the ones that help, and the others are listed as not used on its page in the Finic Portal; created from criteria alone, it uses them all, with weights Finic estimates. Up to 20 at a time, and 50 per scoring model.

Responses

The scoring model is being created.

FieldTypeDescription
model_idstring

The scoring model's id, scm_…, for scoring and calibrating.

job_idstring

The job creating it, job_….

request_idstring

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

Examples

curl -X POST 'https://api.finic.ai/v1/scoring_models' \  -H "Authorization: Bearer $FINIC_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "name": "Card-not-present payment fraud",  "criteria": "Card-not-present payments at an online store. Bad: the payment was charged back as fraud within 90 days."}'
Example Response
{  "model_id": "scm_01M4XRC000RT2GZSKYPD8J86G9",  "job_id": "job_01M4XZXNCRZBPXV30MSF7RN5H3",  "request_id": "req_01M4Y7FASG9DB7MMWCS672J0JD"}