Skip to content

Statistics

Statistics provides an operation to get statistics about sent emails.

This API provided by management console.For access point host please refer to Common Specifications.

List

Statistics/list provides an operation to get statistics about sent emails.

Request

/transaction/v2/statistics/list.[json|xml]

Access Control

Item Value
Role API group administrator, API user
Authorization Data reference permission

Parameter

Parameter Required Data Type Description
api_user Yes ASCII Specifies the ID used for user authentication.
api_key Yes ASCII Specifies the secret key used for user authentication.
server_composition No UTF-8 Specifies the name of the server configuration that will be operated.
year Yes INTEGER Specifies the year (yyyy format) you want to get statistics for.
month Yes INTEGER Specifies the month (mm format) you want to get statistics for.
total No BOOLEAN If 'true' is specified, the summary data of the year and month specified by 'year' and 'month' will be returned in one record.The character string "total" is output for the 'date' parameter of the response message.

Response

{
"statistics": [
    {
    "date": "2015-12-01",
    "queued": 7833,
    "succeeded": 7800,
    "failed": 33,
    "blocked": 0,
    "valid": 7833
    },
    {
    "date": "2015-12-02",
    "queued": 649,
    "succeeded": 605,
    "failed": 40,
    "blocked": 4,
    "valid": 645
    },
    ...
]
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statistics>
<statistic>
    <date>2015-12-01</date>
    <queued>7833</queued>
    <succeeded>7800</succeeded>
    <failed>33</failed>
    <blocked>0</blocked>
    <valid>7833</valid>
</statistic>
<statistic>
    <date>2015-12-02</date>
    <queued>649</queued>
    <succeeded>605</succeeded>
    <failed>40</failed>
    <blocked>4</blocked>
    <valid>645</valid>
</statistic>
....
<statistics>
Property Description
date aggregation date of the statistical data (YYYY-MM-DD format)
queued Number of emails received on the aggregation date
succeeded Number of successfull emails sent on the aggregation date.
failed Number of emails with sending error on the aggregation date.
blocked Number of emails that were suppressed from being sent because they matched the blocked list
valid Number of valid emails = succeeded + failed

Error Message

Field Error Code Message (en) Message (ja)
server_composition 10-002 Specified server configuration {0} does not exist. 指定されたサーバ構成 {0} は存在しません。
status 13-001 Specified {0} status is undefined. 指定されたステータス {0} は定義されていません。
year 13-002 Future date cannot be specified. 将来の日付は指定できません。
month 13-002 Future date cannot be specified. 将来の日付は指定できません。

Request Example

curl -X POST -d 'api_user=testuser' -d 'api_key=password' -d 'server_composition=sandbox' -d 'year=2020' -d 'month=01' https://api.smtps.jp/transaction/v2/statistics/list.json