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

获取模板发送统计数据 - GetUSMSTemplateSendStatistics

简介

获取模板发送统计数据

定义

公共参数

参数名类型描述信息必填
Actionstring对应的 API 指令名称,当前 API 为 GetUSMSTemplateSendStatisticsYes
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
TemplateIdstring短信模板IDNo

响应字段

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

数据模型

StatisticsData

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

TemplateStatisticsDataInfo

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

示例

请求示例

https://api.an-link.com/?Action=GetUSMSTemplateSendStatistics &ProjectId=NisAYPmv &Page=5 &NumPerPage=5 &OrderBy=jOdlouXH &OrderType=umirvnPn &StartDate=pkwNCtsO &EndDate=fOEqzdNm &Domestic=5 &BrevityCode=sXFqlpJN &TemplateId=frUFWoVs

响应示例

{ "Action": "GetUSMSTemplateSendStatisticsResponse", "Data": [ { "BrevityCode": "kbBFlxEg", "CostCount": 1, "Count": 9, "FailedCostCount": 3, "FailedCount": 7, "SendDate": "aGQopQIl", "SubmitFailedCostCount": 1, "SubmitFailedCount": 7, "SuccessCostCount": 4, "SuccessCount": 4, "TemplateId": "JelSfPNU", "UnknownCostCount": 6, "UnknownCount": 3 } ], "Message": "iCneNUGy", "RetCode": 0, "StatisticsData": {}, "Total": 2 }