{
"batch_id": "b7f2c1a4-3e5d-4f8a-9c2b-1d0e6a8f4c5d",
"status": "completed_with_errors",
"total_items": 4,
"succeeded_items": 3,
"failed_items": 1,
"country": "CL",
"purpose": "credit_evaluation"
}Qscore 批量评分已完成
使用 POST /v1/qscore/batches 创建的批量评分任务已完成对其所有 条目的处理。这是批次的唯一完成信号:各个报告不会发出自己的 risk_report_ready webhook(也不会按条目发送电子邮件)。status 在所有条目 成功时为 completed,在至少一个条目最终失败(其费用已退款)时为 completed_with_errors,在批次本身无法处理时为 failed。计数器始终一致: succeeded_items + failed_items = total_items。使用 GET /v1/qscore/batches/{id}/items 读取各条目结果,或使用 GET /v1/qscore/batches/{id}/results.csv 下载结果。
每次交付都包含 X-Webhook-Event、X-Webhook-Event-ID、 X-Webhook-Delivery-ID、X-Webhook-Timestamp 和 X-Webhook-Signature = hex(HMAC-SHA256(secret, timestamp + "." + body))。返回 2xx;最多 5 次尝试, 采用递增退避。
WEBHOOK
risk_batch_completed
{
"batch_id": "b7f2c1a4-3e5d-4f8a-9c2b-1d0e6a8f4c5d",
"status": "completed_with_errors",
"total_items": 4,
"succeeded_items": 3,
"failed_items": 1,
"country": "CL",
"purpose": "credit_evaluation"
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
请求体
application/json
响应
200
返回任何 2xx 以确认交付。