概述
该接口批量向多员工的手机通讯录推送并创建多个通讯录联系人信息
请求URL
http://api-hub.mobilegate.net/pushContactList
请求方式
POST
请求参数
参数名 |
备注 |
enterpriseId
|
企业账号ID(详见管理控制台->开发信息) |
pushContents - phoneId
|
工作手机账号ID |
pushContents - contactInfo - contactName
|
通讯录联系人名称 |
pushContents - contactInfo - contactPhoneNumber
|
通讯录联系人手机号码 |
pushContents - contactInfo - contactCompanyName
|
通讯录联系人公司名 |
pushContents - contactInfo - contactPosition
|
通讯录联系人职位 |
pushContents - contactInfo - contactMail
|
通讯录联系人电邮 |
pushContents - contactInfo - recordNo
|
通讯录联系人唯一标识,可自行创建,确保唯一即可。本变量主要用于在接口返回中标注推送失败的记录。 |
requestToken
|
签名(详见 参数签名) |
请求包体格式
JSON
请求包体示例
{
"enterpriseId": "589083",
"pushContents": [{
"phoneId": "15900159000",
"contactInfo": [{
"contactName": "Alice",
"contactPhoneNumber": "18900189000",
"contactCompanyName": "SAIC",
"contactPosition": "VP",
"contactMail": "",
"recordNo": "xxxxxx"
},
{
"contactName": "Tommy",
"contactPhoneNumber": "18900189001",
"contactCompanyName": "SAIC",
"contactPosition": "SVP",
"contactMail": "tommy@saic.com",
"recordNo": "xxxxxx"
}
]
}, {
"phoneId": "15900159001",
"contactInfo": [{
"contactName": "Rubby",
"contactPhoneNumber": "18900189002",
"contactCompanyName": "GM",
"contactPosition": "VP",
"contactMail": "",
"recordNo": "xxxxxx"
},
{
"contactName": "Tommy",
"contactPhoneNumber": "18900189003",
"contactCompanyName": "GM",
"contactPosition": "SVP",
"contactMail": "tommy@gm.com",
"recordNo": "xxxxxx"
}
]
}],
"requestToken": "xxxxxxxxxxxxxxxx"
}
返回结果
参数名 |
备注 |
result
|
返回结果 |
details
|
推送失败的工作手机账号账号ID,数组类型 |
result
字符串“1” 代表全部推送成功, “0”代表存在不成功的推送,其他请参考下方错误码;
details
当存在推送失败的情形时,以数组方式返回推送失败的工作手机账号账号ID;
返回格式
JSON
返回示例
{
"result": "1",
"details": []
}
异常返回
存在推送失败的情形
{
"result": "0",
"details": [{
"recordNo": "12321",
"errorMessage": "xxxxxxxx"
}, {
"recordNo": "12322",
"errorMessage": "xxxxxxxx"
}]
}
输入参数错误
{"Result": "-1"}
参数含有非法字符
{"Result": "-2"}
enterpriseID未提供
{"Result": "-3"}
参数签名错误
{"Result": "-99"}