获取短信/彩信统计数据

SmsMmsMessageStatistics接口允许获取指定短信/彩信消息统计数据. 可以指定一个特定时间区间. 统计数据包含已发送,已送达,退信,链接及退订数量等

请求数据格式

请求URL参数:
参数 类型 描述
apiKey string 你的API Key, 需要验证. 必填.
ID int 短信/彩信ID. 要求以地址一部分的形式应用 (非GET参数). 见下例
startDate date 起始日期. 选填. 如未指定, 默认使用消息的创建日期 YYYY-MM-DD 格式.
endDate date 结束日期. 选填. 如未指定, 会采用当前日期. YYYY-MM-DD 格式.

示例:

https://api.esv2.com/v2/Api/SmsMmsMessageStatistics/123?apiKey=YOUR_API_KEY_HERE 

https://api.esv2.com/v2/Api/SmsMmsMessageStatistics/123?apiKey=YOUR_API_KEY_HERE&startDate=2017-05-20&endDate=2017-05-22

应答

应答数据元素:
元素/属性 类型 描述
Sent int 已发送消息数量
PartsSent int 已发送消息段落数量
Bounced int 弹回消息数量
Delivered int 已送达消息数量(已发送 – 弹回)
Clicks int 链接点击数量
Clickers int 独立点击任意链接的收件人数量
Unsubscribes int 退订数量

示例

请求:
GET 

https://api.esv2.com/v2/Api/SmsMmsMessageStatistics/764?apiKey=test_api_key1 HTTP/1.1 
Accept-Encoding: gzip,deflate 
User-Agent: Jakarta Commons-HttpClient/3.1 
Host: api.esv2.com
OK应答:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=conq5cmaq3mmpy455bkihvyd; path=/; HttpOnly
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 24 May 2010 13:03:04 GMT
Content-Length: 351

<ApiResponse xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
 <Data>
  <Sent>9</Sent>
  <PartsSent>13</PartsSent>
  <Bounced>2</Bounced>
  <Delivered>7</Delivered>
  <Clicks>12</Clicks>
  <Clickers>3</Clickers>
  <Unsubscribes>0</Unsubscribes>
 </Data>
</ApiResponse>