1.1. 向任务中导入客户接口(同步)

1.2. 请求地址

  • POST /v1/autoCallTasks/syncNumber

1.3. 请求参数

参数 类型 是否可空 描述
timestamp Long false 时间戳(例:当前秒数,1533092860)
sign String false 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey&timestamp))
email String false 邮箱
outboundTaskId int false 任务ID
dealType int false 重复处理类型(1全局2所有任务3当前任务4不查重)
numberList Array false 号码数组
numberList[].name String false 姓名
numberList[].mobile String false 号码
numberList[].remark String true 备注
numberList[].variates Array true 自定义变量(格式:[{"key":"weather","type":"string","value":"北京"}])

1.4. 响应参数

参数 类型 是否可空 描述
code String false 返回码
message String false 返回消息
visible boolean false 是否可见(暂不使用)
data Object true 结果
data.successCount int false 成功导入的号码数量
data.failedCount int false 导入失败的号码数量
data.failedNumberList Array true 导入失败的号码数组
data.failedNumberList[].name String true 姓名
data.failedNumberList[].mobile String true 号码
data.failedNumberList[].remark String true 备注
data.failedNumberList[].variates Array true 自定义变量(格式:[{"key":"天气","type":"string","value":"北京"}])
data.failedNumberList[].failedReason String true 失败原因

1.5. 请求示例

$ curl 'http://localhost:8080/v1/autoCallTasks/syncNumber?email=1@test.cn&timestamp=1542187160&sign=123' -i -X POST -H 'Content-Type: application/json' -d '{
    "outboundTaskId": 1,
    "numberList": [
        {
          "name": "zhoukai",
          "mobile": "13935107603",
          "remark": "",
          "variates": null
        },
        {
          "name": "zhoukai1",
          "mobile": "13935107604",
          "remark": "",
          "variates": null
        }
    ]
  }'

1.6. 响应示例

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
  "code" : 200,
  "message" : "OK",
  "visible" : false,
  "data": {
        "successCount": 2,
        "failedCount": 0,
        "failedNumberList": null
      }
}

results matching ""

    No results matching ""