logo

Statistics

อัพเดทล่าสุด :2023-04-10

Statistics of delivery data (per day)

SMS data counted by day

URL

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

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP Request Method

GET
          GET

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Request-Headers

Header Type Required Description
Authorization string true Basic base64(sms_user:sms_key)

Parameter Description

Parameter Type Required Description
time_zone string no time zone,example:+8
template_ids string no multiple template IDs, using; Separate, such as template_ ids=1; 2; 3. Supports up to 10
sms_users string no obtain specified SMS_ Statistical data for USER, multiple SMS_ Used for USER; Separate, such as SMS_ users=a; b; c. Up to 10 supported
label_ids string no list of SMS tag IDs, using; Separate, such as label_ ids=123456; 456789, supports up to 10
start_date string yes start_date, formatted with yyyy-MM-dd
end_date string yes end_date, formatted with yyyy-MM-dd
msg_type string no SMS type, 2 represents international SMS
aggregate_by string no defaults to 0; if aggregate=1, aggregated data will be returned

注意:

  1. The number of days to query should not exceed 90 days.
  2. When 'aggregate_by' is 1, data aggregation will be done according to 'msg_type'; When 'aggregate_by' is 0, no data aggregation is performed

Request Example

curl -X GET "https://sms.api.engagelab.cc/v1/data/stats_day?start_date=2022-11-20&msg_types=0" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          curl -X GET "https://sms.api.engagelab.cc/v1/data/stats_day?start_date=2022-11-20&msg_types=0" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Returned Value Description

Parameter Description
send_date send date
msg_type SMS type
sms_user SMS_USER
template_id ID of SMS template
label_id label ID
targets total targets,request numbers
sent total sent
process_failed number of process failed
delivered number of delivered
send_failed number of send failed
wait_result number of wait result
billing_count billing count
process_failed_percent percentage of process failed
delivered_percent percentage of delivered
send_failed_percent percentage of send failed
wait_result_percent percentage of wait result

Returned Value Example

aggregate_by=0

{ "result" : [{ "send_date" : "2016-09-27", "msg_type" : "2", "sms_user" : "sms_user", "template_id" : 11, "label_id" : 110, "targets" : 1, "sent" : 0, "process_failed" : 0, "delivered" : 1, "send_failed" : 0, "wait_result" : 0, "billing_count" : 2, "process_failed_percent" : 0.0, "delivered_percent" : 0, "send_failed_percent" : 0, "wait_result_percent" : 0 } ], count:1 }
          {
        "result" : [{
                "send_date" : "2016-09-27",
                "msg_type" : "2",
                "sms_user" : "sms_user",
                "template_id" : 11,
                "label_id" : 110,
                "targets" : 1,
                "sent" : 0,
                "process_failed" : 0,
                "delivered" : 1,
                "send_failed" : 0,
                "wait_result" : 0,
                "billing_count" : 2,
                "process_failed_percent" : 0.0,
                "delivered_percent" : 0,
                "send_failed_percent" : 0,
                "wait_result_percent" : 0
            }
        ],
        count:1
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

aggregate_by=1

{ "result" : { "msg_type" : "2", "targets" : 1, "sent" : 0, "process_failed" : 0, "delivered" : 1, "send_failed" : 0, "wait_result" : 0, "billing_count" : 2, "process_failed_percent" : 0.0, "delivered_percent" : 0.0, "send_failed_percent" : 0.0, "wait_result_percent" : 0.0 } } }
          {
    "result" : {
              "msg_type" : "2",
              "targets" : 1,
              "sent" : 0,
              "process_failed" : 0,
              "delivered" : 1,
              "send_failed" : 0,
              "wait_result" : 0,
              "billing_count" : 2,
              "process_failed_percent" : 0.0,
              "delivered_percent" : 0.0,
              "send_failed_percent" : 0.0,
              "wait_result_percent" : 0.0
        }
    }
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Process failed

classification statistics for failed query processing

URL

https://sms.api.engagelab.cc/v1/stats/process_failed
          https://sms.api.engagelab.cc/v1/stats/process_failed

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP Request Method

GET
          GET

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Request-Headers

Header Type Required Description
Authorization String true Basic base64(smsUser:smsKey)

Parameter Description

Parameter Type Required Description
time_zone string no time zone,example:+8
sms_users string no obtain specified SMS_ Statistical data for USER, multiple SMS_ Used for USER; Separate, such as SMS_ users=a; b; c. Up to 10 supported
start_date string yes start_date, formatted with yyyy-MM-dd
end_date string yes end_date, formatted with yyyy-MM-dd
msg_type string no SMS type, 2 represents international SMS
label_ids string no list of SMS tag IDs, using; Separate, such as label_ ids=123456; 456789, supports up to 10
template_ids string no multiple template IDs, using; Separate, such as template_ ids=1; 2; 3. Supports up to 10
aggregate_by string no defaults to 0; if aggregate=1, aggregated data will be returned

注意:

  1. The number of days to query should not exceed 90 days.
  2. When 'aggregate_by' is 1, data aggregation will be done according to 'msg_type'; When 'aggregate_by' is 0, no data aggregation is performed

Request Example

curl -X GET "https://sms.api.engagelab.cc/v1/stats/process_failed?start_date=2022-11-20&msgTypeStr=0" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          curl -X GET "https://sms.api.engagelab.cc/v1/stats/process_failed?start_date=2022-11-20&msgTypeStr=0" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Returned Value Description

Parameter Description
send_date send date
label_id label ID
msg_type SMS type
sms_user SMS_USER
template_id ID of SMS template
global_block number of global block
partial_block number of partial block
unsubscribe number of unsubscribe
keyword_block number of keyword block
variable_error number of variable error
content_error number of content error
frequency_overrun number of frequency overrun
other number of other

Returned Value Example

aggregate_by=0

{ "result" : [{ "send_date" : "2016-09-09", "label_id" : 110, "msg_type" : "2", "sms_user":"sms", "template_id" : 122, "global_block": 133 "partial_block" : 0, "unsubscribe" : 0, "keyword_block" : 0, "variable_error" : 0, "content_error" : 0, "frequency_overrun" : 0, "other" : 0 } ], count:1 }
          {
    "result" : [{
                "send_date" : "2016-09-09",
                "label_id" : 110,
                "msg_type" : "2",
                "sms_user":"sms",
                "template_id" : 122,
                "global_block": 133
                "partial_block" : 0,
                "unsubscribe" : 0,
                "keyword_block" : 0,
                "variable_error" : 0,
                "content_error" : 0,
                "frequency_overrun" : 0,
                "other" : 0
            }
        ],
        count:1
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

aggregate_by=1

{ "result" : { "msg_type" : "2", "global_block": 133 "partial_block" : 0, "unsubscribe" : 0, "keyword_block" : 0, "variable_error" : 0, "content_error" : 0, "frequency_overrun" : 0, "other" : 0 } }
          {
    "result" : {
                "msg_type" : "2",
                "global_block": 133
                "partial_block" : 0,
                "unsubscribe" : 0,
                "keyword_block" : 0,
                "variable_error" : 0,
                "content_error" : 0,
                "frequency_overrun" : 0,
                "other" : 0
        }
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Send failed

Query classification statistics for failed sending

URL

https://sms.api.engagelab.cc/v1/stats/send_failed
          https://sms.api.engagelab.cc/v1/stats/send_failed

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

HTTP Request Method

GET
          GET

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Request-Headers

Header Type Required Description
Authorization String true Basic base64(sms_user:sms_key)

Parameter Description

Parameter Type Required Description
time_zone string no time zone,example:+8
sms_users string no obtain specified SMS_ Statistical data for USER, multiple SMS_ Used for USER; Separate, such as SMS_ users=a; b; c. Up to 10 supported
start_date string yes start_date, formatted with yyyy-MM-dd
end_date string yes end_date, formatted with `yyyy-MM-dd
msg_type string no SMS type, 2 represents international SMS
label_ids string no list of SMS tag IDs, using; Separate, such as label_ ids=123456; 456789, supports up to 10
template_ids string no multiple template IDs, using; Separate, such as template_ ids=1; 2; 3. Supports up to 10
aggregate_by string no defaults to 0; if aggregate=1, aggregated data will be returned

Tips:

  1. The number of days to query should not exceed 90 days.
  2. When 'aggregate_by' is 1, data aggregation will be done according to 'msg_type'; When 'aggregate_by' is 0, no data aggregation is performed

Request Example

curl -X GET "https://sms.api.engagelab.cc/v1/data/sendFailed?start_date=2022-11-20&msg_type=0" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
          curl -X GET "https://sms.api.engagelab.cc/v1/data/sendFailed?start_date=2022-11-20&msg_type=0" 
--header "Authorization: Basic <<YOUR_API_KEY_HERE>>"

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

Returned Value Description

Parameter Description
send_date send date
label_id label ID
msg_type SMS type
sms_user SMS_USER
template_id ID of SMS template
empty number of empty
out_of_service number of out of service
blacklist number of blacklist
busy number of busy
no_answer number of no answer
interception number of interception
break_down number of break down
not_in_service number of not in service
power_off number of power off
other other

Returned Value Example

aggregate_by=0

{ "result" : [ { "send_date" : "2016-09-09", "label_id" : 110, "msg_type" : "2", "sms_user":"sms", "template_id" : 10, "empty" : 0, "out_of_service" : 3, "blacklist" : 0, "busy" : 0, "no_answer" : 0, "interception" : 0, "break_down" : 0, "not_in_service" : 0, "power_off" : 0, "other" : 2 } ], "count":1 } }
          {
    "result" :  [
       {
                "send_date" : "2016-09-09",
                "label_id" : 110,
                "msg_type" : "2",
                "sms_user":"sms",
                "template_id" : 10,
                "empty" : 0,
                "out_of_service" : 3,
                "blacklist" : 0,
                "busy" : 0,
                "no_answer" : 0,
                "interception" : 0,
                "break_down" : 0,
                "not_in_service" : 0,
                "power_off" : 0,
                "other" : 2
            }
        ],
        "count":1
    }
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย

aggregate_by=1

{ "result" : { "msg_type" : "2", "empty" : 0, "out_of_service" : 3, "blacklist" : 0, "busy" : 0, "no_answer" : 0, "interception" : 0, "break_down" : 0, "not_in_service" : 0, "power_off" : 0, "other" : 2 } }
          {
    "result" : {
                "msg_type" : "2",
                "empty" : 0,
                "out_of_service" : 3,
                "blacklist" : 0,
                "busy" : 0,
                "no_answer" : 0,
                "interception" : 0,
                "break_down" : 0,
                "not_in_service" : 0,
                "power_off" : 0,
                "other" : 2
        }
    
}

        
โค้ดนี้โชว์เป็นหน้าต่างลอย
在文档中心打开
icon
ติดต่อฝ่ายขาย