{
"batch_id": "b7f2c1a4-3e5d-4f8a-9c2b-1d0e6a8f4c5d",
"status": "processing",
"purpose": "credit_evaluation",
"country": "CL",
"lang": "es",
"total_items": 4,
"processed_items": 2,
"succeeded_items": 2,
"failed_items": 0,
"estimated_fee_usdt": "14.50",
"created_at": "2026-08-09T14:32:10Z",
"idempotency_hit": true
}{
"batch_id": "b7f2c1a4-3e5d-4f8a-9c2b-1d0e6a8f4c5d",
"status": "pending",
"purpose": "credit_evaluation",
"country": "CL",
"lang": "es",
"total_items": 4,
"processed_items": 0,
"succeeded_items": 0,
"failed_items": 0,
"estimated_fee_usdt": "14.50",
"created_at": "2026-08-09T14:32:10Z",
"rejected_count": 2,
"rejected_items": [
{
"line": 5,
"doc_id": "12.345.678-9",
"error_code": "invalid_doc_id",
"error": "doc_id is not valid for CL"
},
{
"line": 6,
"doc_id": "12345678-5",
"error_code": "duplicate_in_batch",
"error": "doc_id appears more than once in the batch"
}
]
}Create a batch scoring job
Creates an asynchronous batch scoring job (portfolio scoring): the subjects are validated upfront, the batch is queued, and a background worker issues one full Qscore report per valid item. Send subjects (JSON array, 1 to 5000 entries) or subjects_csv (a CSV string with header doc_id[,subject_type]) — exactly one of the two. Rows with an invalid document id (invalid_doc_id) or a document duplicated inside the batch (duplicate_in_batch, reported with its normalized form) are rejected at creation and reported in rejected_items; the batch only processes the valid ones. An omitted or unrecognized subject_type is never an error: for CL it is inferred from the RUT series (first digit 5–9 → company, anything else → person). If every row is rejected, the request fails with no_valid_items and nothing is created. Idempotency is mandatory: retrying with the same idempotency_key returns the original batch with idempotency_hit: true and never duplicates the batch or the charges. Each item is billed the standalone report fee (risk_report_person / risk_report_company) when processed, and a terminally failed item is automatically refunded. estimated_fee_usdt is the upfront estimate for the valid items. When the batch finishes you receive one risk_batch_completed webhook and one email — the individual reports do not emit their own webhook or email.
{
"batch_id": "b7f2c1a4-3e5d-4f8a-9c2b-1d0e6a8f4c5d",
"status": "processing",
"purpose": "credit_evaluation",
"country": "CL",
"lang": "es",
"total_items": 4,
"processed_items": 2,
"succeeded_items": 2,
"failed_items": 0,
"estimated_fee_usdt": "14.50",
"created_at": "2026-08-09T14:32:10Z",
"idempotency_hit": true
}{
"batch_id": "b7f2c1a4-3e5d-4f8a-9c2b-1d0e6a8f4c5d",
"status": "pending",
"purpose": "credit_evaluation",
"country": "CL",
"lang": "es",
"total_items": 4,
"processed_items": 0,
"succeeded_items": 0,
"failed_items": 0,
"estimated_fee_usdt": "14.50",
"created_at": "2026-08-09T14:32:10Z",
"rejected_count": 2,
"rejected_items": [
{
"line": 5,
"doc_id": "12.345.678-9",
"error_code": "invalid_doc_id",
"error": "doc_id is not valid for CL"
},
{
"line": 6,
"doc_id": "12345678-5",
"error_code": "duplicate_in_batch",
"error": "doc_id appears more than once in the batch"
}
]
}Authorizations
Session JWT (from register/login) or API key (pk_...).
X-API-Key: <token> is accepted as an alternative header.
Response
Idempotent replay — the original batch, with idempotency_hit: true.