跳到主要内容

查询任务状态(轮询)

GET /api/openapi/task/{taskId}

创建任务后,通过本接口轮询任务进度。建议每 5–10 秒轮询一次,避免频繁请求。

返回示例

{
"code": 200,
"msg": "操作成功",
"data": {
"taskId": "TASK-20250906181051-1883",
"taskStatus": 1,
"effectiveQuantity": 1127,
"description": "美国202501..txt",
"orderId": "ORDER-20250906181051-1883",
"taskType": "wsExist",
"taskNumber": 5000,
"taskProgress": 100,
"countryCode": "US",
"price": 0.001500,
"accountExpend": 7.50,
"fileName": "美国202501..txt",
"createTime": "2025-09-06 18:10:51"
}
}

返回字段说明

字段类型说明
taskIdString任务 ID
taskStatusInteger任务状态:1=完成,0=排队中,2=进行中,3=已关闭,-1=失败
effectiveQuantityInteger有效数量(实际筛选出的数据量)
descriptionString任务描述
orderIdString订单 ID
taskTypeString任务类型
taskNumberInteger任务数量(上传的总数据量)
taskProgressInteger任务进度(0-100)
countryCodeString国家代码
priceBigDecimal单价
accountExpendBigDecimal余额扣费
fileNameString文件名称
createTimeString创建时间

任务状态说明

taskStatus状态说明
1完成任务处理完成,可以下载
0排队中任务在队列中等待处理
2进行中任务正在处理
3已关闭任务已被关闭
-1失败任务处理失败

taskStatus == 1 即可进入下载