create_score
POST /v1/scores creates a score from labeled examples and returns its model_id and a job to wait for.
Up to 100 new scores per organization per day.
Creates a score from past records whose outcomes you know, and returns 202 at once with its model_id and a job_id. Creating takes about 5 to 10 minutes: wait for the job, then score records. 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 score built on sample data is only for trying Finic out.
Request body
multipart/form-data or application/json
| Field | Type | Description |
|---|---|---|
datarequired | array of object or string | The examples: a JSON array of objects, or CSV text with a header row. Every row needs |
description | string | Optional. What the decision is and what |
| Field | Type | Description |
|---|---|---|
filerequired | string | The examples, as CSV with a header row or a JSON array, every row with |
description | string | Optional. What the decision is and what |
Responses
The score is being created.
| Field | Type | Description |
|---|---|---|
model_id | string | The score's id, |
job_id | string | The job creating it, |
request_id | string |
|
| Status | Type and when |
|---|---|
400 |
|
401 |
|
413 |
|
429 |
|
503 |
|
Every error has the same shape; see Errors.
Examples
curl -X POST 'https://api.finic.ai/v1/scores' \ -H "Authorization: Bearer $FINIC_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "description": "Card-not-present payments. is_bad: the payment was charged back as fraud within 90 days.", "data": [ { "amount_usd": 2400, "merchant_category": "electronics", "account_age_days": 19, "new_device": true, "billing_country": "US", "ip_country": "NG", "is_bad": true }, { "amount_usd": 58.12, "merchant_category": "grocery", "account_age_days": 1260, "new_device": false, "billing_country": "US", "ip_country": "US", "is_bad": false } ]}'{ "model_id": "scm_01M4XRC000RT2GZSKYPD8J86G9", "job_id": "job_01M4XZXNCRZBPXV30MSF7RN5H3", "request_id": "req_01M4Y7FASG9DB7MMWCS672J0JD"}