Skip to content

Number Check API query

GiuFLim edited this page Sep 14, 2023 · 16 revisions

概要

  • 号码检测查询接口[分页查询]

请求URL

http://api2.nxcloud.com/api/number/query

请求方式

  • Method: POST
  • Content-Type: application/json

鉴权机制

鉴权规则请参考地址:API接口调用约定

image

请求Header

参数名称 参数类型 是否必填 示例值 参数描述
accessKey String fme2na3kdi3ki 用户身份标识
ts String 1655710885431 当前请求的时间戳(单位是毫秒),牛信服务端允许用户端请求最大时间误差为60秒
bizType String 1 [业务类型] 固定值 用来标识号码检测
action String numbercheck 固定值 用来标识号码检测
sign String 6e9506557d1f289501d333ee2c365826 API入参参数签名,签名算法

请求Body

参数名 必选 类型 说明
page integer 当前页号
pageSize integer 当前页数 ,每页最多100条
date string 日期 yyyy-MM-dd ,最多查询14天内的检测记录
requestId string 查询检测结果的requestId,业务id, 客户回执中推送 [精确查找]
batchNo string 批次号,批次号batchNo和requestId不能同时为空 [批量查找]
phone string 手机号
appkey string 应用appkey

批次号batchNo和requestId不能同时为空

请求示例

{
    "requestId": "fa019f186b4c4419ba3b264dd5f1b3b2",
    "date": "2023-09-14",
    "pageSize": 10,
    "page": 1
}

返回参数说明

参数名 类型 说明
data object 请求结果 说明如下
msg string 请求结果说明
code integer 结果编码

data

参数名 类型 说明
page integer 当前页号
pageSize integer 当前页数
totalPage integer 总页数
totalSize integer 总条数
result array[object] 检测结果 说明如下

result

参数名 类型 说明
messageId string 消息id 最大长度为64位
batchNo string 批次号
phone string 手机号
checkLevel integer 检测类型 1: 基础版; 4: 呼叫版 ; 5:HLR版
preCheck string 格式检查是否通过。 YES:通过; NO:未通过
regionCode string 区号 iso
countryCode string 国码
nationalNumber string 本地格式
standNumber string 标准格式
numberType integer 号码类型。
0: 其它类型
1: 固定电话
2: 移动号码
3: 免费电话
4: VOIP号码
5: 机构/企业电话
6: 特殊私人号码
7: 语音信箱
8: 特殊限制号码
carrier string 运营商
price number 费用。精确到四位小数
currency string 币种

HRL检测额外字段返回

参数名 类型 说明
validity string 号码是否有效。 "YES": 是; "NO": 否; "UNKNOWN": 未知
reachable string 设备是否在线。 "YES": 是; "NO": 否; "UNKNOWN": 未知
roaming string 是否漫游中。 "YES": 是; "NO": 否; "UNKNOWN": 未知

呼叫版检测额外字段返回

参数名 类型 说明
early string 是否响铃 "YES": 是; "NO": 否; "UNKNOWN": 未知
answered string 是否接听 "YES": 是; "NO": 否; "UNKNOWN": 未知
response string 响应状态。
bell: 响铃
music: 彩铃
busy: 用户忙
no_response: 用户无应答
invalid_number: 空号
not_available: 号码不可用
number_paused: 暂停使用
power_off: 关机
power_off_or_out_of_service: 关机或不在服务区
voicemail: 语音信箱
others: 暂时无法接通

成功返回1

{
    "code": 0,
    "message": "Success",
    "data": {
        "result": [
            {
                "country": "IN",
                "batchNo": "101601624663",
                "numberType": "mobile",
                "mnc": "98",
                "active": "YES",
                "mcc": "404",
                "operator": "Bharti Airtel - Gujarat (98)",
                "ported": "NO",
                "checkLevel": 5,
                "phone": "886968****",
                "requestId": "fa019f186b4c4419ba3b264dd5f1b3b2",
                "price": 0.2740,
                "currency": "USD"
            }
        ],
        "totalSize": 1,
        "totalPage": 1,
        "pageSize": 10,
        "page": 1
    }
}

成功返回2

{
    "code": 0,
    "message": "Success",
    "data": {
        "result": [],
        "totalSize": 0,
        "totalPage": 0,
        "pageSize": 10,
        "page": 1
    }
}

失败返回

{
    "code": 9000,
    "message": "date format incorrect [yyyy-MM-dd]"
}

错误代码

code msg
0 Success
-1 Failure
9000 date format incorrect [yyyy-MM-dd]
203 Appkey not available or incorrect

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally