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.
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.