PNS API list - nxtele/http-api-document GitHub Wiki

接口说明,查询当前号码绑定关系列表

请求url

https://api.nxcloud.com/v1/api/pns/

请求头

参数名 类型 必填 说明
accessKey string 用户的accessKey
action string 请求方法,示例:getAXBList
bizType string 业务类型,固定为5,代表隐私号服务
ts string 毫秒级时间戳,示例:1670479632933
sign string 签名,签名算法

请求体

参数名 类型 必填 说明
limit uint 取值范围[0,1k],0代表不限制(获取所有),最大只允许获取1k条数据,关于=0时候超过1k条的问题,只会返回1k条
offset uint 偏移值,取值范围为[0,MAX],0代表从第一条开始

返回参数

参数名 类型 说明
code int 返回码,0代表成功,其他失败
msg string 返回码描述
requestId string 请求id
data Object 请求数据

data返回参数详情:

参数名 类型 说明
bindList []Object 返回绑定列表
total int 返回绑定关系数

bind_list中返回参数详情:

参数名 类型 说明
customerId string 客户id
businessId string 业务id(比如这个did集合是做打车的,做快递的等等)
bindId string 绑定时候,隐私号服务返回的绑定id
customerBindId string 客户自定义的绑定id(由客户决定,需要保证唯一,customerBindId和bindId二选一即可)
phoneA string A的号码
phoneB string B的号码,A、B号码的国码须保持一致
did string pns的绑定虚拟号码
flag int 其他标识,比特组合,0:none,1:录音
expireAt uint 过期秒数,若是为0,代表不过期
extension string 仅用于分机号功能,

请求示例

请求url

https://api.nxcloud.com/v1/api/pns/

Header

KEY VALUE
accessKey xxxxxxxxxxxx
ts 1670479632933
bizType 5
action getAXBList
sign faxxxxxxxxxxxxxxxxxxxxxxxxxxxxd4

Body

{
    "limit":10,
    "offset":0
}

返回示例

{
  "code": 0,
  "msg": "success",
  "requestId": "1602262837283131392",
  "data": {
    "bindList": [
      {
        "customerId": "cus_1",
        "businessId": "busi_1",
        "bindId": "b8c2aaf940d534d3c9ed8b780757f94e",
        "customerBindId": "1",
        "phoneA": "85211111114",
        "phoneB": "85222222222",
        "did": "85235753352",
        "flag": 0,
        "expireAt": 1670845212,
        "extension": "101"
      }
    ],
    "total": 1
  }
}