Skip to Content
短信服务 USMS获取发送统计数据 - GetUSMSSendStatistics

获取发送统计数据 - GetUSMSSendStatistics

简介

获取发送统计数据

定义

公共参数

参数名类型描述信息必填
Actionstring对应的 API 指令名称,当前 API 为 GetUSMSSendStatisticsYes
PublicKeystring用户公钥,可从 控制台 获取Yes
Signaturestring根据公钥及 API 指令生成的用户签名,参见 签名算法Yes

请求参数

参数名类型描述信息必填
ProjectIdstring项目ID,不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口
Yes
Pageint页编号,从0开始Yes
NumPerPageint每页记录个数Yes
OrderBystring排序字段,如BrevityCode表示按照BrevityCode排列,配合OrderType使用。目前支持SendDate、BrevityCodeYes
OrderTypestring排序方式,asc-正序 desc-倒序Yes
StartDatestring开始日期,格式为YYYY-MM-DDYes
EndDatestring结束日期,格式为YYYY-MM-DDYes
Domesticint国内标记,0-国际短信 1-国内短信Yes
BrevityCodestring国际简码,如CN表示中国,当需要查询多个国家时,使用-分割,如CN-ID。No
Purposeint短信类型,1-验证码 2-通知类 3-营销类No

响应字段

字段名类型描述信息必填
RetCodeint返回状态码,为 0 则为成功返回,非 0 为失败Yes
Actionstring操作指令名称Yes
Messagestring返回错误消息,当 RetCode 非 0 时提供详细的描述信息No
Totalint返回记录数No
StatisticsDataStatisticsData符合查询条件的发送数据统计求和集,具体字段信息见StatisticsData模型No
Dataarray[StatisticsDataInfo]以天为统计维度的发送数据统计集合,每天的统计数据字段详见StatisticsDataInfo模型No

数据模型

StatisticsData

字段名类型描述信息必填
UnknownCountint状态未知数(提交条数)Yes
SuccessCountint发送成功数(提交条数)Yes
SendCostCountint发送总数(拆分条数)Yes
FailCountint发送失败数(提交条数)Yes
SendCountint发送总数(提交条数)Yes
SuccessCostCountint发送成功数(拆分条数)Yes
FailCostCountint发送失败数(拆分条数)Yes
UnknownCostCountint状态未知数(拆分条数)Yes
SubmitFailCountint提交失败数(提交条数)Yes
SubmitFailCostCountint提交失败数(拆分条数)Yes

StatisticsDataInfo

字段名类型描述信息必填
Countint发送总数(提交条数)Yes
FailedCostCountint发送失败数(拆分条数)Yes
BrevityCodestring国际/地区标识码Yes
CostCountint发送总数(拆分条数)Yes
SendDatestring发送时间Yes
FailedCountint发送失败数(提交条数)Yes
SuccessRatefloat发送成功率Yes
SuccessCountint发送成功数(提交条数)Yes
UnknownCountint状态未知数(提交条数)Yes
SuccessCostCountint发送成功数(拆分条数)Yes
UnknownCostCountint状态未知数(拆分条数)Yes
UserIdstringUserIdYes
SubmitFailedCountint提交失败数(提交条数)Yes
SubmitFailedCostCountint提交失败数(拆分条数)Yes

示例

请求示例

https://api.tnqacloud.com/?Action=GetUSMSSendStatistics &Region=cn-zj &Zone=cn-zj-01 &Page=2 &NumPerPage=2 &Order=GwQuSnMR &StartDate=yPETXquo &EndDate=vkmOkLMy &Domestic=2 &BrevityCode=hwYqXpyR &Purpose=9 &OrderType=ghVSXsjL &Download=1 &Removed=5 &ProjectId=TfFeiEbC

响应示例

{ "Action": "GetUSMSSendStatisticsResponse", "Data": [ { "BrevityCode": "soqoREYM", "CostCount": 8, "Count": 4, "FailedCostCount": 4, "FailedCount": 5, "SendDate": "psXUJfzi", "SuccessCostCount": "TYVTPEdC", "SuccessCount": 7, "SuccessRate": 6.23654, "UnknownCostCount": "MvPkzmxR", "UnknownCount": "XebrtyfY" } ], "Message": "EXorXtNv", "RetCode": 0, "StatisticsData": {}, "Total": 9 }