{
"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"
}
]
}创建批量评分任务
创建异步批量评分任务(组合评分):主体会预先校验,批次进入队列, 后台 worker 为每个有效条目生成一份完整的 Qscore 报告。发送 subjects(JSON 数组,1 至 5000 条)或 subjects_csv(带有表头 doc_id[,subject_type] 的 CSV 字符串)——两者必须且只能提供其一。文档号无效(invalid_doc_id) 或批次内文档重复 (duplicate_in_batch,以其规范化形式报告)的行会在创建时被拒绝,并在 rejected_items 中报告; 批次只处理有效行。省略或未识别的 subject_type 绝不是错误:对于 CL,系统会从 RUT 序列推断(首位数字 5–9 → company,其他 → person)。如果所有行都被拒绝,请求将以 no_valid_items 失败,且不会 创建任何内容。幂等性为强制:使用相同的 idempotency_key 重试会返回原始批次并 带有 idempotency_hit: true,绝不会重复批次或重复扣费。每个条目在处理时收取 独立报告费用(risk_report_person / risk_report_company),最终失败的条目会 自动退款。estimated_fee_usdt 是针对有效条目的预先估算。批次完成后,您会收到 一个 risk_batch_completed webhook 和一封电子邮件——各个报告不会发出自己的 webhook 或电子邮件。
{
"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"
}
]
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
响应
幂等重放——原始批次,带有 idempotency_hit: true。