Query Sms - nxtele/http-api-document-en GitHub Wiki
Brief:
- Query SMS sending record。Ony support SMS sending within 31 days. For older SMS records, please develop your webhook, receive the callback and store it in your system.
URL:
http://api2.nxcloud.com/api/sms/getSmsCdr
Http Method:
- POST please using http forms, not json!!
Parameters:
| Name | Required | Type | Memo |
|---|---|---|---|
| appkey | Y | string | SMS app appkey |
| secretkey | Y | string | SMS app secretkey |
| date | Y | string | date, in yyyyMMdd format |
| page_size | Y | string | page size (less than 1000) |
| page | Y | string | start page |
| sort_type | N | string | 0 defualt asc, 1 desc |
Examples
{
"code": "0",
"info": {
"total": 1119,
"page": 112,
"pageSize": 2,
"rows": [
{
"senderid": "",
"body": "hello sms test 001.",
"phone": "62833935195",
"msgid": "5cd1397f-f3b2-95de-ed5e-27d5f39a230d",
"dr_status": "成功",
"billing_size": 2,
"billing_price": 0.09,
"date": "2019-06-15 23:40:00",
"dr_time": "2019-06-15 23:42:00",
"billing_status": "是",
"network": 893,
"dr":"DELIVRD"
},
{
"senderid": "",
"body": "hello sms test 002.",
"phone": "62844049494",
"msgid": "f76bc33281124f8aa8bca33ce54b01ad",
"dr_status": "成功",
"billing_size": 2,
"billing_price": 0.09,
"date": "2019-06-15 23:50:04",
"dr_time": "2019-06-15 23:53:00",
"billing_status": "是",
"network": 791,
"dr":"DELIVRD"
}
]
}
}
Reponse description
| Name | Type | Memo |
|---|---|---|
| code | string | response code |
| senderid | string | source address / senderid |
| body | string | content |
| phone | string | destination phone number |
| msgid | string | message id |
| dr_status | string | dr code in number |
| billing_size | number | billing size |
| billing_price | number | billing price |
| date | string | sending date |
| dr_time | string | dr |
| billing_status | string | billing status |
| network | string | operator |
| dr | string | dr text |
Description
- Error code
| code | description |
|---|---|
| 0 | success |
| 1 | params invalid |
| 2 | keys invalid |
| 3 | page_size or page_index invalid |
| 4 | page_size or page_index invalid |
| 5 | api request times invalid |