数据统计

最新更新:2023-03-14

发送数据统计 (每天)

按天统计的邮件数据

URL

https://email.api.engagelab.cc/v1/stats_day
          https://email.api.engagelab.cc/v1/stats_day

        
此代码块在浮窗中显示

HTTP 请求方式

GET
          GET

        
此代码块在浮窗中显示

请求 Headers

Header 类型 必须 说明
Authorization String true Basic base64(api_user:api_key)

Query 参数说明

参数 类型 必须 说明
time_zone string 时区。默认时区:+8
start_date string 开始日期, 格式为yyyy-MM-dd
end_date string 结束日期, 格式为yyyy-MM-dd
api_users string 获取指定 API_USER 的统计数据, 多个 API_USER 用;分开, 如:api_users=a;b;c
label_ids string 获取指定标签下的统计数据, 多个标签用;分开, 如:label_ids=a;b;c
domain_names string 获取指定接收域下的统计数据, 多个域名用;分开, 如:domain_names=a;b;c
aggregate_by int 默认为0不聚合。 如果为1, 则返回所有维度聚合的数据。

提示:
查询的间隔不超过三个自然月。

请求示例

curl "https://email.api.engagelab.cc/v1/stats_day?start_date=2015-02-01&end_date=2015-02-28&api_users=***;***" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>" curl "https://email.api.engagelab.cc/v1/stats_day?start_date=2015-02-01&end_date=2015-02-28&api_users=***;***&aggregate_by=1" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          
curl "https://email.api.engagelab.cc/v1/stats_day?start_date=2015-02-01&end_date=2015-02-28&api_users=***;***" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>" 

curl "https://email.api.engagelab.cc/v1/stats_day?start_date=2015-02-01&end_date=2015-02-28&api_users=***;***&aggregate_by=1" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
此代码块在浮窗中显示

响应说明

字段 说明
send_date 发送日期
api_user API_USER
domain 收信域名
label_id 标签ID
label_name 标签名
targets 目标总数,请求数。
sent 发送数量
delivered 送达数量
invalid_email 无效邮件数量
soft_bounce 软退信数量
report_spam 垃圾举报数量
total_clicks 总点击数量
total_opens 总阅读数量
opens 已读数量
clicks 点击数量
unsubscribe 取消订阅数量
delivered_percent 送达比例
invalid_email_percent 无效邮件比例
soft_bounce_percent 软退信比例
report_spam_percent 垃圾举报比例
total_click_percent 总点击比例
total_open_percent 总阅读比例
open_percent 阅读比例
click_percent 点击比例
unsubscribe_percent 取消订阅比例

响应示例

Response-success

HTTP Status: 200

{ "result": [ { "send_date": "2022-10-25", "api_user": "test1212", "domain": "qq.com", "label_id": 0, "label_name": "", "targets": 1, "delivered": 0, "sent":1, "total_clicks": 0, "total_opens": 0, "soft_bounce": 0, "report_spam": 0, "unsubscribe": 0, "opens": 0, "clicks": 0, "invalid_email": 1, "delivered_percent": 0.0, "total_click_percent": 0.0, "total_open_percent": 0.0, "soft_bounce_percent": 0.0, "report_spam_percent": 0.0, "unsubscribe_percent": 0.0, "opens_percent": 0.0, "click_percent": 0.0, "invalid_email_percent": 100.0 } ], count:1, total:10 } # 聚合数据, aggregate_by = 1 { "result": { "targets": 146013, "sent":13322, "delivered": 2, "total_clicks": 0, "total_opens": 0, "soft_bounce": 0, "report_spam": 0, "unsubscribe": 0, "opens": 0, "clicks": 0, "invalid_email": 146011, "delivered_percent": 0.0, "total_click_percent": 0.0, "total_open_percent": 0.0, "soft_bounce_percent": 0.0, "report_spam_percent": 0.0, "unsubscribe_percent": 0.0, "open_percent": 0.0, "click_percent": 0.0, "invalid_email_percent": 100.0 } }
          {
    "result": [
        {
            "send_date": "2022-10-25",
            "api_user": "test1212",
            "domain": "qq.com",
            "label_id": 0,
            "label_name": "",
            "targets": 1,
            "delivered": 0,
            "sent":1,
            "total_clicks": 0,
            "total_opens": 0,
            "soft_bounce": 0,
            "report_spam": 0,
            "unsubscribe": 0,
            "opens": 0,
            "clicks": 0,
            "invalid_email": 1,
            "delivered_percent": 0.0,
            "total_click_percent": 0.0,
            "total_open_percent": 0.0,
            "soft_bounce_percent": 0.0,
            "report_spam_percent": 0.0,
            "unsubscribe_percent": 0.0,
            "opens_percent": 0.0,
            "click_percent": 0.0,
            "invalid_email_percent": 100.0
        }
    ],
    count:1,
    total:10
}

# 聚合数据, aggregate_by = 1
{
    "result": {
        "targets": 146013,
        "sent":13322,
        "delivered": 2,
        "total_clicks": 0,
        "total_opens": 0,
        "soft_bounce": 0,
        "report_spam": 0,
        "unsubscribe": 0,
        "opens": 0,
        "clicks": 0,
        "invalid_email": 146011,
        "delivered_percent": 0.0,
        "total_click_percent": 0.0,
        "total_open_percent": 0.0,
        "soft_bounce_percent": 0.0,
        "report_spam_percent": 0.0,
        "unsubscribe_percent": 0.0,
        "open_percent": 0.0,
        "click_percent": 0.0,
        "invalid_email_percent": 100.0
    }
}

        
此代码块在浮窗中显示

Response-error

HTTP Status :401

{ "code": 30000, "message": "Authentication failed." }
          {
    "code": 30000,
    "message": "Authentication failed."
}

        
此代码块在浮窗中显示

发送数据统计 (每小时)

按小时统计的邮件数据

URL

https://email.api.engagelab.cc/v1/stats_hour
          https://email.api.engagelab.cc/v1/stats_hour

        
此代码块在浮窗中显示

HTTP 请求方式

GET
          GET

        
此代码块在浮窗中显示

请求 Headers

Header 类型 必须 说明
Authorization String true Basic base64(api_user:api_key)

Query 参数说明

参数 类型 必须 说明
time_zone string 时区。默认时区+8
send_date string 请求发信日期, 格式为yyyy-MM-dd
api_users string 获取指定 API_USER 的统计数据, 多个 API_USER 用;分开, 如:api_users=a;b;c
label_ids string 获取指定标签下的统计数据, 多个标签用;分开, 如:label_ids=a;b;c

请求示例

curl "https://email.api.engagelab.cc/v1/stats_hour?send_date=2022-11-21" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          curl "https://email.api.engagelab.cc/v1/stats_hour?send_date=2022-11-21" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
此代码块在浮窗中显示

响应说明

字段 说明
send_date 发送日期
send_hour 某小时, 取值区间 [0-23]
api_user API_USER
label_id 标签ID
targets 目标总数,请求数。
sent 发送数量
delivered 送达数量
invalid_email 无效邮件数量
soft_bounce 软退信数量
report_spam 垃圾举报数量
total_clicks 总点击数量
total_opens 总阅读数量
opens 已读数量
clicks 点击数量
unsubscribe 取消订阅数量
delivered_percent 送达比例
invalid_email_percent 无效邮件比例
soft_bounce_percent 软退信比例
report_spam_percent 垃圾举报比例
total_click_percent 总点击比例
total_open_percent 总阅读比例
open_percent 阅读比例
click_percent 点击比例
unsubscribe_percent 取消订阅比例

响应示例

Response-success

HTTP Status: 200

# sendHour 没有返回的时间点, 表示那个小时没有数据 { "result": [ { "send_date": "2022-08-25", "api_user": "zymtest4", "label_id": 598121, "label_name":"jd", "send_hour": 11, "targets": 1, "sent":1, "delivered": 1, "total_clicks": 0, "total_opens": 0, "soft_bounce": 0, "report_spam": 0, "unsubscribe": 0, "opens": 0, "clicks": 0, "invalid_emails": 0, "delivered_percent": 0.0, "total_click_percent": 0.0, "total_open_percent": 0.0, "soft_bounce_percent": 0.0, "report_spam_percent": 0.0, "unsubscribe_percent": 0.0, "open_percent": 0.0, "click_percent": 0.0, "invalid_email_percent": 0.0 }, { "send_date": "2022-08-25", "api_user": "gaolei", "label_id": 598125, "send_hour": 15, "targets": 1, "sent":1, "delivered": 0, "total_clicks": 0, "total_opens": 0, "soft_bounce": 0, "report_spam": 0, "unsubscribe": 0, "opens": 0, "clicks": 0, "invalid_email": 1, "delivered_percent": 0.0, "total_click_percent": 0.0, "total_open_percent": 0.0, "soft_bounce_percent": 0.0, "report_spam_percent": 0.0, "unsubscribe_percent": 0.0, "open_percent": 0.0, "click_percent": 0.0, "invalid_email_percent": 0.0 } ] }
          # sendHour 没有返回的时间点, 表示那个小时没有数据
{
    "result": [
        {
            "send_date": "2022-08-25",
            "api_user": "zymtest4",
            "label_id": 598121,
            "label_name":"jd",
            "send_hour": 11,
            "targets": 1,
            "sent":1,
            "delivered": 1,
            "total_clicks": 0,
            "total_opens": 0,
            "soft_bounce": 0,
            "report_spam": 0,
            "unsubscribe": 0,
            "opens": 0,
            "clicks": 0,
            "invalid_emails": 0,
            "delivered_percent": 0.0,
            "total_click_percent": 0.0,
            "total_open_percent": 0.0,
            "soft_bounce_percent": 0.0,
            "report_spam_percent": 0.0,
            "unsubscribe_percent": 0.0,
            "open_percent": 0.0,
            "click_percent": 0.0,
            "invalid_email_percent": 0.0
        },
        {
            "send_date": "2022-08-25",
            "api_user": "gaolei",
            "label_id": 598125,
            "send_hour": 15,
            "targets": 1,
            "sent":1,
            "delivered": 0,
            "total_clicks": 0,
            "total_opens": 0,
            "soft_bounce": 0,
            "report_spam": 0,
            "unsubscribe": 0,
            "opens": 0,
            "clicks": 0,
            "invalid_email": 1,
            "delivered_percent": 0.0,
            "total_click_percent": 0.0,
            "total_open_percent": 0.0,
            "soft_bounce_percent": 0.0,
            "report_spam_percent": 0.0,
            "unsubscribe_percent": 0.0,
            "open_percent": 0.0,
            "click_percent": 0.0,
            "invalid_email_percent": 0.0
        }
    ]
}

        
此代码块在浮窗中显示

Response-error

HTTP Status :401

{ "code": 30000, "message": "Authentication failed." }
          {
    "code": 30000,
    "message": "Authentication failed."
}

        
此代码块在浮窗中显示

无效邮件统计(每天)

查询无效邮件的分类统计信息

URL

https://email.api.engagelab.cc/v1/stats_invalid
          https://email.api.engagelab.cc/v1/stats_invalid

        
此代码块在浮窗中显示

HTTP 请求方式

GET
           GET

        
此代码块在浮窗中显示

请求 Headers

Header 类型 必须 说明
Authorization String true Basic base64(api_user:api_key)

Query 参数说明

参数 类型 必须 说明
time_zone string 时区。默认时区+8
start_date string 开始日期, 格式为yyyy-MM-dd
end_date string 结束日期, 格式为yyyy-MM-dd
api_users string 获取指定 API_USER 的统计数据, 多个 API_USER 用;分开, 如:api_users=a;b;c
label_ids string 获取指定标签下的统计数据, 多个标签用;分开, 如:label_ids=a;b;c
domain_names string 获取指定接收域下的统计数据, 多个域名用;分开, 如:domain_names=a;b;c
aggregate_by int 默认为0不聚合。 如果为1, 则返回所有维度聚合的数据。

提示:

  1. 查询天数不超过三个月。
  2. aggregate_by为 1 时, 会将所有维度的数据聚合累加。

请求示例

curl "https://email.api.engagelab.cc/v1/stats_invalid" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          curl "https://email.api.engagelab.cc/v1/stats_invalid" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
此代码块在浮窗中显示

响应说明

字段 说明
send_date 发送日期,格式为yyyy-MM-dd
api_user API_USER
domain 收信域名
label_id 标签ID
label_name 标签名称
blacklists 黑名单的个数
unsubscribes 在取消订阅列表的个数
server_errors 服务器不可达的个数
format_errors 收件人格式错误的个数
ip_domain_rejecteds ip或者域名被拒个数
not_exists 收件人不存在个数
spams 垃圾邮件个数
sender_recipient_rejecteds 发信人或者收件人被拒个数
others 其他

响应示例

Response-success

HTTP Status: 200

{ "result": [ { "send_date": "2022-12-01", "api_user": "1224_xjm", "label_id": 0, "label_name": null, "domain": "qq.com", "blacklists": 0, "unsubscribes": 0, "server_errors": 0, "format_errors": 0, "not_exists": 0, "spams": 0, "sender_recipient_rejecteds": 0, "others": 1 } ] } # 聚合数据, aggregate_by = 1 { "result": { "blacklists": 0, "unsubscribes": 0, "server_errors": 88387, "format_errors": 0, "not_exists": 0, "spams": 0, "sender_recipient_rejecteds": 0, "others": 57624 } }
          {
    "result": [
        {
            "send_date": "2022-12-01",
            "api_user": "1224_xjm",
            "label_id": 0,
            "label_name": null,
            "domain": "qq.com",
            "blacklists": 0,
            "unsubscribes": 0,
            "server_errors": 0,
            "format_errors": 0,
            "not_exists": 0,
            "spams": 0,
            "sender_recipient_rejecteds": 0,
            "others": 1
        }
    ]
}

# 聚合数据, aggregate_by = 1
{
    "result": {
        "blacklists": 0,
        "unsubscribes": 0,
        "server_errors": 88387,
        "format_errors": 0,
        "not_exists": 0,
        "spams": 0,
        "sender_recipient_rejecteds": 0,
        "others": 57624
    }
}

        
此代码块在浮窗中显示

Response-error

HTTP Status :401

{ "code": 30000, "message": "Authentication failed." }
          {
    "code": 30000,
    "message": "Authentication failed."
}

        
此代码块在浮窗中显示
在文档中心打开
icon
联系销售