數據統計
最新更新: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
}
]
}
# 聚合數據,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
}
]
}
# 聚合數據,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,則返回所有維度聚合的數據。 |
提示:
- 査詢天數不超過三個月。
- 当
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."
}
此代碼塊在浮窗中顯示