Sending Response
Query
List of message status. You can query message status in the list.
URL
https://api.sendcloud.net/smsapi/status/query
HTTP Request Method
post get
Parameter Description
parameter | type | required or not | description |
---|---|---|---|
smsUser | string | yes | smsUser |
phones | string | no | multiple phone numbers; separated by semicolons |
smsIds | string | no | sms ID returned when message was successfully sent; multiple IDs are separated by semicolons |
days | string | * | stats in the past days (days=1 means today) |
startDate | string | * | format of start date is yyyy-MM-dd |
endDate | string | * | format of end date is yyyy-MM-dd |
msgTypeStr | string | no | message type: 0 means domestic SMS, 1 means MMS, 2 means international SMS, 3 means VOICE SMS |
templateId | string | no | template ID |
templateName | string | no | template name |
start | string | no | start position, [0-], defaults to 0 |
limit | string | no | amount, [0-100], defaults to 100 |
signature | string | yes | signature, validity verification |
labelIdsStr | string | no | label id list,eg: labelIdsStr=123456;456789 |
Tips:
- Specified time span is required when obtaining stats; startDate and endDate, or days is required.
- Time span cannot be longer than 30 days.
- Defaults to searching 100 records each time. You need to specify “limit” and “start” if the records exceeds 100.
- Number of phones cannot exceed 100.
- Each query record will be cached for 10 minutes.
Request Example
https://api.sendcloud.net/smsapi/status/query?smsUser=***&days=***&msgTypeStr=***&signature=***
Returned Value Description
parameter | description |
---|---|
msgType | message type |
smsId | returned smsId after a message was sent successfully |
statusCode | message status |
receiver | message recipient |
requestTime | request time |
sendLog | sending logs |
status | status, including requesting, sent, processing failed, sending failed |
templateId | template ID |
templateName | template name |
updateTime | update time |
Note:
- Description of returned statusCode: statusCode in 400-499 means “processing failed”; statusCode in 500-599 means “sending failed”
Return Code Example
{
"info": {
"voList": [{
"smsId":"***_**_**_**_**$**",
"msgType": "国内短信",
"receiver": "0000000000",
"requestTime": "2017-02-19 00:21:20",
"sendLog": "发送成功",
"smsUser": "*****",
"status": "送达",
"statusCode":200,
"templateId": "000",
"templateName": "SendCloud验证码",
"updateTime": "2017-02-19 00:21:21"
}, {
"smsId":"***_**_**_**_**$**",
"msgType": "国内短信",
"receiver": "0000000000",
"requestTime": "2017-02-19 00:00:04",
"sendLog": "smsworker:address in local bounce list",
"smsUser": "*****",
"status": "处理失败-局部拦截列表",
"statusCode":420,
"templateId": "000",
"templateName": "Ifaxin验证码",
"updateTime": "2017-02-19 00:00:05"
}, {
"smsId":"***_**_**_**_**$**",
"msgType": "国内短信",
"receiver": "0000000000",
"requestTime": "2017-02-19 00:00:01",
"sendLog": "发送成功",
"statusCode":200,
"smsUser": "*****",
"status": "送达",
"templateId": "000",
"templateName": "SendCloud余额提醒",
"updateTime": "2017-02-19 00:00:02"
}
],
"voListSize": 3,
"total": "103"
},
"message": "请求成功",
"result": true,
"statusCode": 200
}
}