短信黑名单接口说明文档.md 2.2 KB

短信黑名单接口说明文档

接口1: 黑名单查询接口

POST HTTP://127.0.0.1:12120/sms/blacklist/api/query/
Content-Type: application/json

{
    "phone": "13231899751",
    "fromSystem": "test"
}
{
  "success": true,
  "code": 200,
  "message": "成功",
  "data": {
    "querySuccess": true,
    "queryMessage": "当前在黑名单",
    "queryResult": {
      "reason": "1",
      "startTime": "20220702173144",
      "endTime": "20220801173144",
      "describe": "主叫流量:达到加黑阈值100条/3600秒,最低被叫用户数0;安全系数1.0,实际发送100,实际被叫用户数100",
      "allowToDel": true
    }
  }
}

返回参数说明

querySuccess是否在黑
queryMessage在黑情况:(1)无加黑记录(2)曾在黑名单,已解黑(3)当前在黑名单
reason入黑名单原因
startTime开始时间
endTime结束时间
describe命中策略说明
allowToDel是否允许解黑

接口2: 黑名单解除接口

  • 本地访问 18631137650

    POST HTTP://127.0.0.1:12120/sms/blacklist/api/remove/
    Content-Type: application/json
    
    {
    "phone": "18631137650",
    "fromSystem": "test",
    "operator": "test01"
    }
    
  • 正式环境

    POST HTTP://133.96.94.108:12120/sms/blacklist/api/remove/
    Content-Type: application/json
    
    {
    "phone": "13739798862",
    "fromSystem": "test",
    "operator": "test01"
    }
    
    HTTP/1.1 200 
    Content-Type: application/json
    Transfer-Encoding: chunked
    Date: Mon, 01 Aug 2022 02:18:48 GMT
    Connection: close
    
    {
    "success": true,
    "code": 200,
    "message": "成功",
    "data": {
    "delBlkSuccess": true,
    "delBlkMessage": "成功解除黑名单"
    }
    }
    
    HTTP/1.1 200 
    Content-Type: application/json
    Transfer-Encoding: chunked
    Date: Wed, 03 Aug 2022 01:10:35 GMT
    Connection: close
    
    {
    "success": true,
    "code": 200,
    "message": "成功",
    "data": {
    "delBlkSuccess": false,
    "delBlkMessage": "解除黑名单失败"
    }
    }