Statistics
Statistics of SMS data (daily)
Daily SMS statistics data
URL
https://api.sendcloud.net/smsapi/data/sendDay
HTTP Request Method
post get
Parameter Description
| parameter | type | required or not | description |
|---|---|---|---|
| smsUser | string | yes | smsUser |
| days | string | * | statistics data in the past [days] days (days=1 means today) |
| startDate | string | * | start date, formatted with yyyy-MM-dd |
| endDate | string | * | end date, formatted with yyyy-MM-dd |
| msgTypeStr | string | no | SMS type; 0: domestic SMS, 1: MMS, 2: international SMS, 3: Voice SMS |
| templateIdsStr | string | no | multiple template IDs, separated by semicolons, for example, templateIdsStr=1;2;3 |
| aggregate | string | no | aggregate or not; 0: not aggregate, 1: aggregate, defaults to 0 |
| signature | string | yes | signature, validity verification |
| labelIdsStr | string | no | label id list,eg: labelIdsStr=123456;456789 |
Tips:
- You need to designate time span when searching for statistics data. Note: startDate and endDate, or days is required
- Time span cannot be longer than 100 days
- Aggregation means adding all data together
Request Example
https://api.sendcloud.net/smsapi/data/sendDay?smsUser=***&days=***&msgTypeStr=***&templateIdsStr=***&aggregate=***&signature=***
Returned value description
| parameter | description |
|---|---|
| sendDate | send date |
| templateId | template ID |
| msgType | SMS type |
| requestNum | total requests |
| sendNum | number of sent messages |
| processFailedNum | number of process failures |
| sendFailedNum | number of send failures |
| billingNum | count of billing |
| sendRatio | ratio of sent messages |
| processFailedRatio | ratio of process failures |
| sendFailedRatio | ratio of send failures |
Returned value example
When not aggregated
{
"result" : true,
"statusCode" : 200,
"message" : "请求成功",
"info" : {
"dataList" : [{
"billingNum" : "2",
"msgType" : "0",
"processFailedNum" : "0",
"processFailedRatio" : "0.00",
"requestNum" : "1",
"sendDate" : "2016-09-27",
"sendFailedNum" : "1",
"sendFailedRatio" : "100.00",
"sendNum" : "0",
"sendRatio" : "0.00",
"templateId" : "2"
}, {
"billingNum" : "1",
"msgType" : "0",
"processFailedNum" : "0",
"processFailedRatio" : "0.00",
"requestNum" : "1",
"sendDate" : "2016-09-14",
"sendFailedNum" : "0",
"sendFailedRatio" : "0.00",
"sendNum" : "1",
"sendRatio" : "100.00",
"templateId" : "2"
}
],
"dataListSize" : 2
}
}
When aggregated
{
"message" : "请求成功",
"result" : true,
"statusCode" : 200,
"info" : {
"total" : {
"billingNum" : "42",
"msgType" : "None",
"processFailedNum" : "6",
"processFailedRatio" : "13.95",
"requestNum" : "43",
"sendDate" : "2016-09-01到2016-09-30",
"sendFailedNum" : "11",
"sendFailedRatio" : "25.58",
"sendNum" : "26",
"sendRatio" : "60.47",
"templateId" : "None"
}
}
}
Statistics of process failures
Query statistics of process failures
URL
https://api.sendcloud.net/smsapi/data/processFailed
HTTP Request Method
post get
Parameter Description
| parameter | type | required or not | description |
|---|---|---|---|
| smsUser | string | yes | smsUser |
| days | string | * | statistics data in the past days (days=1 means today) |
| startDate | string | * | start date, formatted with yyyy-MM-dd |
| endDate | string | * | end date, formatted with yyyy-MM-dd |
| msgTypeStr | string | no | SMS type; 0: domestic SMS, 1: MMS, 2: international SMS, 3: Voice SMS |
| templateIdsStr | string | no | multiple template IDs, separated by semicolons, for example, templateIdsStr=1;2;3 |
| aggregate | string | no | aggregate or not; 0: not aggregate, 1: aggregate, defaults to 0 |
| signature | string | yes | signature, validity verification |
| labelIdsStr | string | no | label id list,eg: labelIdsStr=123456;456789 |
Tips:
- You need to designate time span when searching for statistics data. Note: startDate and endDate, or days is required
- Time span cannot be longer than 100 days
- Aggregation means adding all data together
Request Example
https://api.sendcloud.net/smsapi/data/processFailed?smsUser=***&days=***&msgTypeStr=***&templateIdsStr=***&aggregate=***&signature=***
Returned value description
| parameter | description |
|---|---|
| sendDate | send date |
| templateId | template ID |
| msgType | SMS type |
| globalBlackListNum | number of global blacklists |
| userBlackListNum | number of user blacklists |
| unsubscribleNum | number of unsubscribes |
| keyWordFilterNum | number of key word filters |
| errorVarsNum | number of substitution variable errors |
| varsContentTooLongNum | number of variables with length over limit |
| encodingExceptionNum | number of encoding exceptions |
| sendTypeUnsupportedNum | number of messages with unsupported types |
Returned value example
When not aggregated
{
"result" : true,
"statusCode" : 200,
"message" : "请求成功",
"info" : {
"count" : 2,
"voList" : [{
"encodingExceptionNum" : "0",
"errorVarsNum" : "0",
"globalBlackListNum" : "0",
"keyWordFilterNum" : "0",
"msgType" : "0",
"sendDate" : "2016-09-09",
"sendTypeUnsupportedNum" : "0",
"templateId" : "2",
"unsubscribleNum" : "0",
"userBlackListNum" : "0",
"varsContentTooLongNum" : "0"
}, {
"encodingExceptionNum" : "0",
"errorVarsNum" : "0",
"globalBlackListNum" : "0",
"keyWordFilterNum" : "0",
"msgType" : "0",
"sendDate" : "2016-09-27",
"sendTypeUnsupportedNum" : "0",
"templateId" : "2",
"unsubscribleNum" : "0",
"userBlackListNum" : "0",
"varsContentTooLongNum" : "0"
}
]
}
}
When aggregated
{
"result" : true,
"statusCode" : 200,
"message" : "请求成功",
"info" : {
"total" : {
"encodingExceptionNum" : "0",
"errorVarsNum" : "0",
"globalBlackListNum" : "6",
"keyWordFilterNum" : "0",
"msgType" : "None",
"sendDate" : "2016-07-28到2016-11-04",
"sendTypeUnsupportedNum" : "0",
"templateId" : "None",
"unsubscribleNum" : "0",
"userBlackListNum" : "0",
"varsContentTooLongNum" : "0"
}
}
}
Statistics of send failures
Query statistics of send failures
URL
https://api.sendcloud.net/smsapi/data/sendFailed
HTTP Request Method
post get
Parameter Description
| parameter | type | required or not | description |
|---|---|---|---|
| smsUser | string | yes | smsUser |
| days | string | * | statistics data in the past days (days=1 means today) |
| startDate | string | * | start date, formatted with yyyy-MM-dd |
| endDate | string | * | end date, formatted with yyyy-MM-dd |
| msgTypeStr | string | no | SMS type; 0: domestic SMS, 1: MMS, 2: international SMS, 3: Voice SMS |
| templateIdsStr | string | no | multiple template IDs, separated by semicolons, for example, templateIdsStr=1;2;3 |
| aggregate | string | no | aggregate or not; 0: not aggregate, 1: aggregate, defaults to 0 |
| signature | string | yes | signature, validity verification |
| labelIdsStr | string | no | label id list,eg: labelIdsStr=123456;456789 |
Tips:
- You need to designate time span when searching for statistics data. Note: startDate and endDate, or days is required
- Time span cannot be longer than 100 days
- Aggregation means adding all data together
Request Example
https://api.sendcloud.net/smsapi/data/processFailed?smsUser=***&days=***&msgTypeStr=***&templateIdsStr=***&signature=***
Returned value description
| parameter | description |
|---|---|
| sendDate | send date |
| templateId | template ID |
| msgType | SMS type |
| emptyPhoneNumberNum | numbers that do not exist |
| outOfServiceNum | numbers out of service |
| complaintsNum | count of complaints |
| busyNum | count of busy lines |
| noAnswerNum | count of no answers |
| interceptNum | count of intercepts |
| breakDownNum | count of breakdowns |
| notInServiceNum | count of not-in- services |
| shutDownNum | count of shutdowns |
| othersNum | others |
Returned value example
When not aggregated
{
"result" : true,
"statusCode" : 200,
"message" : "请求成功",
"info" : {
"count" : 2,
"voList" : [{
"breakDownNum" : "0",
"busyNum" : "0",
"complaintsNum" : "0",
"emptyPhoneNumberNum" : "0",
"interceptNum" : "3",
"msgType" : "0",
"noAnswerNum" : "0",
"notInServiceNum" : "0",
"othersNum" : "0",
"outOfServiceNum" : "0",
"sendDate" : "2016-09-09",
"shutDownNum" : "0",
"templateId" : "2"
}, {
"breakDownNum" : "0",
"busyNum" : "0",
"complaintsNum" : "0",
"emptyPhoneNumberNum" : "0",
"interceptNum" : "0",
"msgType" : "0",
"noAnswerNum" : "0",
"notInServiceNum" : "0",
"othersNum" : "1",
"outOfServiceNum" : "0",
"sendDate" : "2016-09-27",
"shutDownNum" : "0",
"templateId" : "2"
}
]
}
}
When aggregated
{
"result" : true,
"statusCode" : 200,
"message" : "请求成功",
"info" : {
"total" : {
"breakDownNum" : "0",
"busyNum" : "0",
"complaintsNum" : "0",
"emptyPhoneNumberNum" : "5",
"interceptNum" : "3",
"msgType" : "None",
"noAnswerNum" : "2",
"notInServiceNum" : "0",
"othersNum" : "2",
"outOfServiceNum" : "0",
"sendDate" : "2016-08-07到2016-11-04",
"shutDownNum" : "0",
"templateId" : "None"
}
}
}