สถิติข้อความ
messages:list
Anchor link toแสดงรายการข้อความที่ส่งแล้ว
POST https://api.pushwoosh.com/api/v2/messages:list
ส่วนหัว (Headers)
Anchor link to| ชื่อ | จำเป็น | คำอธิบาย |
|---|---|---|
Authorization | ใช่ | Server API token ต้องระบุในรูปแบบต่อไปนี้: Authorization: Api <Server Key> |
พารามิเตอร์ของเนื้อหาคำขอ (Request body parameters)
Anchor link to| ชื่อ | จำเป็น | ประเภท | คำอธิบาย |
|---|---|---|---|
platforms | ไม่ | Array | แพลตฟอร์มข้อความ ค่าที่เป็นไปได้: "IOS", "ANDROID", "OSX", "WINDOWS", "AMAZON", "SAFARI", "CHROME", "FIREFOX", "IE", "EMAIL", "HUAWEI_ANDROID", "SMS" |
date_range | ไม่ | Object | ช่วงเวลาการรายงาน กรองตามวันที่สร้างข้อความ date_from และ date_to ต้องเป็นไปตามรูปแบบ YYYY-MM-DD (เช่น "2000-01-01") ทั้งสองวันจะถูกรวมไว้ทั้งหมด ดังนั้น date_from และ date_to ที่ตั้งค่าเป็นวันเดียวกันจะส่งคืนข้อมูลทั้งวันนั้น วันที่จะถูกตีความในรูปแบบ UTC ไม่ใช่ในเขตเวลาของบัญชีของคุณ |
campaign | ไม่ | String | รหัสแคมเปญ (Campaign code) |
filters | ใช่ | Object | ตัวกรองข้อความ |
source | ไม่ | String | แหล่งที่มาของข้อความ ตัวอย่างเช่น: AB_TEST, API, AUTO_PUSH, CP, CSV, CUSTOMER_JOURNEY, EMAIL_API, EMAIL_CP, GEO_ZONE, PUSH_ON_EVENT, RSS |
messages_codes | ไม่ | Array | รหัสข้อความ (Message codes) ที่ได้รับจากการตอบกลับของ /createMessage API |
messages_ids | ไม่ | Array | ID ข้อความที่ได้รับจากประวัติข้อความ |
message_type | ไม่ | String | ตัวกรองประเภทการไหลของข้อความ ค่าที่เป็นไปได้: "TRANSACTIONAL", "BROADCAST", "ALL" หากไม่ระบุ ค่าเริ่มต้นคือ "ALL" |
params | ไม่ | Object | ระบุว่าจะแสดงรายละเอียดข้อความและเมตริกหรือไม่ ตั้งค่า with_details: true เพื่อรวมอ็อบเจกต์ "details" และ with_metrics: true เพื่อรวมอ็อบเจกต์ "metrics" ในการตอบกลับ |
application | ใช่ | String | รหัสแอปพลิเคชัน Pushwoosh (Pushwoosh application code) |
per_page | ไม่ | Integer | จำนวนผลลัพธ์ต่อหน้า 1 ถึง 499 ละเว้นพารามิเตอร์เพื่อรับขนาดหน้าเริ่มต้นที่ 500 ผลลัพธ์ การส่งค่า 500 หรือมากกว่าอย่างชัดเจนจะถูกปฏิเสธด้วยรหัส 400 |
page | ไม่ | Integer | หมายเลขหน้าที่เริ่มต้นจากศูนย์สำหรับการแบ่งหน้า ดูขีดจำกัดการแบ่งหน้าแบบลึกด้านล่าง |
message_type ยังกำหนดด้วยว่าคำขอที่ไม่ระบุวันที่จะย้อนกลับไปได้ไกลแค่ไหน
ตัวอย่างคำขอ
Anchor link to{ "filters": { "platforms": [], // IOS, ANDROID, OSX, WINDOWS, AMAZON, SAFARI, CHROME, FIREFOX, IE, EMAIL, HUAWEI_ANDROID, SMS "date_range": { "date_from": "string", // Required format: 2000-01-01 "date_to": "string" // Required format: 2000-01-01 }, "source": "API", // AB_TEST, API, AUTO_PUSH, CP, CSV, CUSTOMER_JOURNEY, EMAIL_API, EMAIL_CP, GEO_ZONE, PUSH_ON_EVENT, RSS "campaign": "string", // Campaign code "messages_ids": [], // Message IDs "messages_codes": [], // Message codes "message_type": "ALL", // TRANSACTIONAL, BROADCAST, ALL (default) "application": "string" // Pushwoosh application code }, "params": { "with_details": true, // Add message details to the response ("details" object) "with_metrics": true // Add message metrics to the response ("metrics" object) }, "per_page": 20, // <= 499 "page": 0}รหัสการตอบกลับและตัวอย่าง
{ "total": 0, "items": [{ "id": 0, "code": "string", "created_date": "string", "send_date": "string", "status": "string", "platforms": [], "source": "string", "push_info": { "details": { "title": "string", "filter_name": "string", "filter_code": "string", "content": { "key": "value" }, "platform_parameters": { "android_header": "string", "android_root_params": { "key": "value" }, "ios_title": "string", "ios_subtitle": "string", "ios_root_params": { "key": "value" }, "chrome_header": "string", "chrome_root_params": { "key": "value" }, "firefox_header": "string", "firefox_root_params": { "key": "value" }, "conditions": [ // tag conditions (see /developer/api-reference/messages-api/#tag-conditions) TAG_CONDITION1, TAG_CONDITION2, ..., TAG_CONDITIONN ], "conditions_operator": "AND", // logical operator for conditions arrays; possible values: AND, OR "data": { "key": "value" } }, "follow_user_timezone": true }, "metrics": [{ "sends": 0, "opens": 0, "deliveries": 0, "inbox_opens": 0, "unshowable_sends": 0, "errors": 0, "platform": 0 }] }, "email_info": { "details": { "template": "string", "filter_name": "string", "filter_code": "string", "subject": { "key": "value" }, "from_name": "string", "from_email": "string", "reply_name": "string", "reply_email": "string", "follow_user_timezone": true, "conditions": [ // tag conditions (see Messages-api - tag-conditions) TAG_CONDITION1, TAG_CONDITION2, ..., TAG_CONDITIONN ], "conditions_operator": "AND" // logical operator for conditions arrays; possible values: AND, OR }, "metrics": [{ "sends": 0, "opens": 0, "deliveries": 0, "hard_bounces": 0, "soft_bounces": 0, "rejects": 0, "confirmed_sends": 0, "unsubs": 0, "complaints": 0, "errors": 0 }] } }]}date_range ครอบคลุมระยะเวลามากกว่า 30 วัน:
{ "error": "exceeded the maximum date interval. Max interval: 30 days"}page × per_page เกินขีดจำกัดการแบ่งหน้าแบบลึก:
{ "error": "requested result window is too large, narrow the date range"}{ "error": "account not found"}totalsByIntervals
Anchor link toส่งคืนข้อมูลเมตริกและ conversion ตามรหัสข้อความ โดยรวบรวมเป็นรายชั่วโมง
POST https://api.pushwoosh.com/api/v2/statistics/messages/totalsByIntervals
การให้สิทธิ์ (Authorization)
Anchor link toการให้สิทธิ์จะถูกจัดการผ่าน API Access Token ในส่วนหัวของคำขอ
พารามิเตอร์ของเนื้อหาคำขอ (Request body parameters)
Anchor link to| ชื่อพารามิเตอร์ | ประเภท | คำอธิบาย | จำเป็น |
|---|---|---|---|
message_code | string | รหัสข้อความ (Message code) ที่ได้รับจากการตอบกลับของ /createMessage API | ใช่ |
platforms | [int] | แพลตฟอร์ม (Platforms) | ไม่ |
ตัวอย่างคำขอ
Anchor link to{ "message_code": "XXXXX-XXXXXXXXX-XXXXXXXX", // required. Unique message identifier "platforms": [1, 3, 7, 10, 11, 12] // optional. List of platform codes}ฟิลด์การตอบกลับ (Response fields)
Anchor link to| ชื่อ | ประเภท | คำอธิบาย |
|---|---|---|
metrics | array | ประกอบด้วยอาร์เรย์ของเมตริกข้อความ |
timestamp | string | เวลาของเมตริก |
platform | int | รหัสแพลตฟอร์ม (เช่น iOS, Android) |
sends | string | จำนวนข้อความที่ส่ง |
opens | string | จำนวนข้อความที่เปิด |
deliveries | string | จำนวนข้อความที่ส่งถึง |
inbox_opens | string | จำนวนการเปิดกล่องข้อความ |
unshowable_sends | string | จำนวนข้อความที่ยอมรับสำหรับอุปกรณ์ที่ปิดการแจ้งเตือนในการตั้งค่า OS จะไม่มีแบนเนอร์แสดง แต่ข้อความยังคงไปถึงแอป และจะปรากฏใน Message Inbox หากการส่งนั้นเปิดใช้งาน Save message to Inbox นับเป็นการส่งที่สำเร็จ ไม่ใช่ข้อผิดพลาด |
errors | string | จำนวนข้อผิดพลาด |
conversion | object | ประกอบด้วยข้อมูล conversion |
sends | string | จำนวนข้อความที่ส่งทั้งหมด |
opens | string | จำนวนข้อความที่เปิดทั้งหมด |
events | array | อาร์เรย์ของเหตุการณ์พร้อมสถิติ |
name | string | ชื่อของเหตุการณ์ (เช่น cart add) |
hits | string | จำนวนครั้งที่เกิดเหตุการณ์ |
conversion | float | อัตรา conversion เทียบกับการเปิด |
revenue | float | รายได้ (เฉพาะเหตุการณ์ที่มีแอตทริบิวต์ __amount และ __currency) |
ตัวอย่างการตอบกลับ
Anchor link to{ "metrics": [{ "timestamp": "2024-08-03 15:00:00", // Timestamp of the metrics in "YYYY-MM-DD HH:MM:SS" format "platform": 3, // Platform code "sends": "55902", // Number of messages sent "opens": "382", // Number of messages opened "deliveries": "22931", // Number of messages delivered "inbox_opens": "0", // Number of messages opened in the inbox "unshowable_sends": "2", // Sent to devices with notifications turned off, no banner shown "errors": "0" // Number of errors encountered }], "conversion": { "sends": "55902", // Total number of messages sent "opens": "772", // Total number of messages opened "events": [{ "name": "cart_add", // Name of the event "hits": "96", // Number of hits for the event "conversion": 0.12, // Conversion rate relative to opens "revenue": 0 // Revenue generated by the event (only for events with amount/currency attributes) }] }}Delivery funnel
Anchor link toใช้ delivery funnel เพื่อดูว่าข้อความหรือแคมเปญสูญเสียกลุ่มเป้าหมายในขั้นตอนใด (ข้อผิดพลาด ไม่มีการส่งถึง ไม่มีการเปิด) และเพราะเหตุใด ต่างจาก totalsByIntervals ซึ่งส่งคืนยอดรวมรายชั่วโมง funnel จะแบ่งกลุ่มเป้าหมายตามขั้นตอนและสาเหตุการหลุดออก โดยหนึ่งรายการต่อหนึ่งช่องทาง พร้อมการแบ่งตามแพลตฟอร์ม ลำดับขั้นตอนจะแตกต่างกันไปตามช่องทาง: ดู stage ภายใต้ ฟิลด์ GetDeliveryFunnelResponse ด้านล่างเพื่อดูว่าแต่ละช่องทางมีขั้นตอนใดบ้าง ทั้งสองเมธอดต้องใช้ server API token
ทั้งสองเมธอดส่งคืนรูปแบบการตอบกลับเดียวกันคือ GetDeliveryFunnelResponse ซึ่งอธิบายไว้เพียงครั้งเดียวด้านล่าง
getDeliveryFunnel
Anchor link toส่งคืน funnel ของข้อความหนึ่งรายการ
POST https://api.pushwoosh.com/api/v2/statistics/messages/getDeliveryFunnel
Headers
Anchor link to| ชื่อ | จำเป็น | คำอธิบาย |
|---|---|---|
Authorization | ใช่ | Server API token ต้องระบุในรูปแบบต่อไปนี้: Authorization: Api <Server Key> |
พารามิเตอร์ในเนื้อหาคำขอ
Anchor link to| ชื่อ | จำเป็น | ประเภท | คำอธิบาย |
|---|---|---|---|
message_code | ใช่ | String | รหัสข้อความ ที่ได้จากการตอบกลับของ API /createMessage |
platforms | ไม่ | Array ของ integer | รหัสแพลตฟอร์ม เพื่อกรอง funnel เว้นว่างไว้เพื่อส่งคืนทุกแพลตฟอร์มที่ส่งข้อความไป |
ตัวอย่างคำขอ
Anchor link to{ "message_code": "A444-AAABBBCC-00112233", // รหัสข้อความจาก /createMessage "platforms": [1, 14] // ไม่บังคับ iOS, Email}ฟิลด์ GetDeliveryFunnelResponse
Anchor link to| ชื่อ | ประเภท | คำอธิบาย |
|---|---|---|
channels | Array | หนึ่งรายการต่อแต่ละช่องทางที่ส่งข้อความไป |
window_from, window_to | String หรือ null | ช่วงเวลาที่ funnel ครอบคลุม โดยขึ้นอยู่กับข้อมูลที่มีอยู่ เป็น null เมื่อ funnel_state ไม่ใช่ FUNNEL_STATE_READY |
funnel_state | String | FUNNEL_STATE_READY: funnel ด้านล่างมีข้อมูลครบถ้วน FUNNEL_STATE_NO_EVENTS: ยังไม่มีอะไรเกิดขึ้นกับข้อความนี้ FUNNEL_STATE_EXPIRED: ข้อความถูกส่งมานานเกินไป ข้อมูล funnel ของมันไม่พร้อมใช้งานอีกต่อไป channels จะว่างเปล่าในทั้งสองกรณีที่ไม่ใช่ READY message_code ที่ไม่รู้จัก เป็นของบัญชีอื่น หรือถูกลบไปแล้ว จะไม่ใช่สถานะเหล่านี้ ดูการตอบกลับ 404 ด้านล่าง |
channels[]
| ชื่อ | ประเภท | คำอธิบาย |
|---|---|---|
channel | String | CHANNEL_MOBILE_PUSH (iOS, macOS, Android, Amazon, Huawei), CHANNEL_WEB_PUSH (Safari, Chrome, Firefox), CHANNEL_EMAIL, CHANNEL_OTHER (SMS, แอปแชท, Wallet, Windows, Baidu, Xiaomi), CHANNEL_APP_INBOX |
funnel | Array | ขั้นตอนของ funnel สำหรับช่องทางนี้ ดู funnel[] ด้านล่าง |
deliveries_form | String | ขั้นตอน STAGE_DELIVERIES มีการแบ่งแบบใด: DELIVERIES_FORM_PER_DEVICE (สี่แถวที่ไม่ทับซ้อนกัน แบ่งตามว่าอุปกรณ์จะแสดง alert หรือไม่ และยืนยันแล้วหรือไม่) หรือ DELIVERIES_FORM_BASIC (สองแถว ไม่มีการแบ่งตามสถานะ alert) |
basic_form_reason | String | มีความหมายเฉพาะเมื่อ deliveries_form เป็น DELIVERIES_FORM_BASIC: BASIC_FORM_REASON_RETENTION (ข้อความเก่าเกินไปสำหรับการแบ่งตามอุปกรณ์), BASIC_FORM_REASON_UNAVAILABLE (การแบ่งตามอุปกรณ์ไม่พร้อมใช้งานสำหรับบัญชีหรือข้อความนี้ เช่น ข้อความของระบบ), BASIC_FORM_REASON_NO_DELIVERIES (ยังไม่มีการยอมรับ), BASIC_FORM_REASON_NOT_APPLICABLE (ช่องทางนี้ไม่มีสถานะ alert เลย เช่น email หรือ App Inbox) มิฉะนั้นจะเป็น BASIC_FORM_REASON_UNSPECIFIED: ให้ละเว้นฟิลด์นี้เว้นแต่ deliveries_form เป็น DELIVERIES_FORM_BASIC |
confirmed_deliveries | Object | count และการแบ่งตาม platforms ของการส่งถึงที่ยืนยันแล้ว ไม่ถูกจำกัดด้วยจำนวนของ STAGE_DELIVERIES จึงอาจแตกต่างจากมันได้ |
funnel[] (หนึ่งขั้นตอน)
| ชื่อ | ประเภท | คำอธิบาย |
|---|---|---|
stage | String | STAGE_AUDIENCE (ทุกคนที่ข้อความกำหนดเป้าหมาย), STAGE_SENT (ได้รับการยอมรับจาก push service หรือผู้ให้บริการอีเมล), STAGE_ERRORS (ถูกปฏิเสธก่อนที่จะได้รับการยอมรับ), STAGE_DELIVERIES (ได้รับการยอมรับ แบ่งตามการยืนยัน), STAGE_OPENED (อุปกรณ์ที่ไม่ซ้ำกันซึ่งเปิด หรือสำหรับ App Inbox คือรายการที่ผู้ใช้แตะเปิด), STAGE_INTERACTIONS (เฉพาะอีเมล: คลิก ยกเลิกการสมัคร ร้องเรียน), STAGE_REACHED/STAGE_READ (เฉพาะ App Inbox แทนที่ STAGE_DELIVERIES) |
count | String | ยอดรวมของขั้นตอน เป็น string ตัวเลข |
pieces | Array | การแบ่งของขั้นตอนนั้นเอง ว่างเปล่าใน STAGE_ERRORS ซึ่งใช้ errors แทน แต่ละส่วนมี kind (KIND_PASSED ผ่านไปยังขั้นตอนถัดไป, KIND_REASON ไม่ผ่าน, KIND_SUBSET ทับซ้อนกับอีกสองอย่างและไม่เคยถูกนำมารวม), category (ดูรายการค่าด้านล่างของแต่ละขั้นตอน), count และการแบ่งตาม platforms |
errors | Array | เฉพาะ STAGE_ERRORS: category (ดูรายการค่าด้านล่าง), count, platforms และ codes: รหัสข้อผิดพลาดดิบจากผู้ให้บริการที่จัดกลุ่มไว้ในหมวดหมู่นี้ (platform, code, name, count) |
platforms | Array | ยอดรวมของขั้นตอน แบ่งตามแพลตฟอร์ม |
ค่าของ category
STAGE_AUDIENCE:
ELIGIBLE_AUDIENCE(ผ่าน): ไม่ถูกยกเว้นด้วยเหตุผลใดๆ ด้านล่างFREQUENCY_CAPPING: ถูกข้ามเนื่องจากการจำกัดความถี่CONTROL_GROUP: ถูกกันไว้เป็น control groupUNSUBSCRIBED: ผู้รับได้ยกเลิกการสมัครแล้วBOUNCED: ที่อยู่ของผู้รับเคย bounce มาก่อนCOMPLAINT: ผู้รับเคยทำเครื่องหมายข้อความว่าเป็นสแปมมาก่อนFILTERED_BY_CATEGORY: ผู้รับได้ opt-out จากหมวดหมู่ของข้อความนี้
STAGE_ERRORS:
NO_TOKEN: อุปกรณ์ไม่มี push token หรือที่อยู่สำหรับส่งNO_DEVICE: ไม่พบอุปกรณ์ที่ตรงกันPLATFORM_DISABLED: แพลตฟอร์มนี้ถูกปิดใช้งานสำหรับแอปนี้INVALID_TOKEN: ผู้ให้บริการปฏิเสธ token หรือที่อยู่ของอุปกรณ์ว่าไม่ถูกต้องQUOTA_EXCEEDED: ผู้ให้บริการจำกัดอัตราการส่งINVALID_CONTENT: ไม่สามารถส่งข้อความตามที่ประกอบขึ้นได้ ส่วนใหญ่มักเป็นเพราะเทมเพลตเองสร้างไม่สำเร็จ เช่น บล็อก Connected Content หรือ Liquid ที่เสีย มากกว่าที่จะถูกผู้ให้บริการปฏิเสธINVALID_CONFIGURATION: การตั้งค่าผู้ให้บริการของบัญชีเองมีปัญหา เช่น ข้อมูลรับรองไม่ถูกต้อง โปรเจกต์ Firebase ที่ถูกลบ หรือ topic ของ APNs ที่ไม่ได้รับอนุญาตPROVIDER_ERROR: ผู้ให้บริการส่งคืนข้อผิดพลาดที่อยู่นอกเหนือหมวดหมู่ข้างต้นINTERNAL_ERROR: Pushwoosh ไม่สามารถประมวลผลการส่งได้UNCLASSIFIED_ERROR: การหลุดออกที่ไม่ตรงกับหมวดหมู่ใดข้างต้น คาดว่าจะพบได้น้อย
STAGE_DELIVERIES, DELIVERIES_FORM_PER_DEVICE:
DISPLAYABLE_CONFIRMED(ผ่าน): อุปกรณ์แสดง alert และยืนยันการได้รับแล้วDISPLAYABLE_NO_CONFIRMATION: อุปกรณ์จะแสดง alert แต่ยังไม่ยืนยันการได้รับNOT_DISPLAYABLE_CONFIRMED(ผ่าน): silent push ยืนยันการได้รับแล้วNOT_DISPLAYABLE_NO_CONFIRMATION: silent push ยังไม่ยืนยันการได้รับ
STAGE_DELIVERIES, DELIVERIES_FORM_BASIC:
CONFIRMED_BY_DEVICE(ผ่าน): อุปกรณ์ยืนยันการได้รับแล้วNO_CONFIRMATION: ยังไม่ได้รับการยืนยัน
อีเมลยังเพิ่มเติม เป็น subset ที่ทับซ้อนกับ CONFIRMED_BY_DEVICE:
BOUNCED_HARD(subset): ที่อยู่ไม่สามารถส่งถึงได้อย่างถาวรBOUNCED_SOFT(subset): ที่อยู่ไม่สามารถส่งถึงได้ชั่วคราว เช่น กล่องจดหมายเต็ม
BOUNCED_HARD อาจแบ่งย่อยเป็นแถว subset เหล่านี้ได้อีก:
BOUNCED_HARD_GENERAL: ไม่สามารถส่งถึงได้อย่างถาวร ไม่มีเหตุผลที่ชัดเจนกว่านี้BOUNCED_HARD_MAILBOX_FULL: กล่องจดหมายของผู้รับเต็มBOUNCED_HARD_MAILBOX_INACTIVE: กล่องจดหมายของผู้รับไม่มีอยู่แล้วBOUNCED_HARD_SUPPRESSED: ผู้ให้บริการได้ขึ้นบัญชีดำที่อยู่นี้ไว้BOUNCED_HARD_UNDETERMINED: ไม่สามารถส่งถึงได้อย่างถาวร ไม่ทราบสาเหตุ
BOUNCED_SOFT อาจแบ่งย่อยเป็นแถว subset เหล่านี้ได้อีก:
BOUNCED_SOFT_GENERAL: ไม่สามารถส่งถึงได้ชั่วคราว ไม่มีเหตุผลที่ชัดเจนกว่านี้BOUNCED_SOFT_MAILBOX_FULL: กล่องจดหมายของผู้รับเต็มในขณะที่ส่งBOUNCED_SOFT_CONTENT_REJECTED: เมลเซิร์ฟเวอร์ของผู้รับปฏิเสธเนื้อหาของข้อความBOUNCED_SOFT_SPAM: เมลเซิร์ฟเวอร์ของผู้รับทำเครื่องหมายข้อความว่าเป็นสแปมBOUNCED_SOFT_MESSAGE_TOO_LARGE: ข้อความมีขนาดใหญ่เกินไปสำหรับกล่องจดหมายของผู้รับBOUNCED_SOFT_ATTACHMENT_REJECTED: เมลเซิร์ฟเวอร์ของผู้รับปฏิเสธไฟล์แนบBOUNCED_SOFT_CUSTOM_TIMEOUT_EXCEEDED: เมลเซิร์ฟเวอร์ของผู้รับใช้เวลาตอบสนองนานเกินไปBOUNCED_SOFT_UNDETERMINED: ไม่สามารถส่งถึงได้ชั่วคราว ไม่ทราบสาเหตุBOUNCED_UNDETERMINED: เซิร์ฟเวอร์ของผู้รับยอมรับอีเมลแต่ไม่เคยยืนยันการส่งถึง ผลลัพธ์ไม่ทราบแน่ชัดและที่อยู่นี้ไม่ได้ถูกระงับ นับเป็น soft bounce
BOUNCED_UNCLASSIFIED คือ bounce ไม่ว่าจะ hard หรือ soft ที่ไม่ตรงกับ subtype ใดข้างต้น คาดว่าจะพบได้น้อย และไม่ใช่ค่าที่ควรนำไปสร้างตรรกะการทำงาน
STAGE_OPENED เฉพาะอีเมล (ช่องทางอื่นรายงาน count ของขั้นตอนโดยไม่มี pieces):
OPENED_BY_RECIPIENT(ผ่าน): เปิดโดยบุคคลจริงMACHINE_OPENS_ONLY: เปิดโดยสแกนเนอร์อัตโนมัติเท่านั้นOPEN_TYPE_UNKNOWN: ไม่สามารถจัดประเภทได้ว่าเป็นบุคคลหรือสแกนเนอร์MACHINE_OPENS_AMPP(subset): แทนที่สามแถวข้างต้นเมื่อไม่มีข้อมูลแบ่งบุคคล/สแกนเนอร์สำหรับข้อความนี้ โดยจะนับจำนวนการเปิดอัตโนมัติของ Apple Mail Privacy Protection เองแทน และทับซ้อนกับยอดรวมของขั้นตอน
STAGE_INTERACTIONS เฉพาะอีเมล:
CLICKED_ONLY(ผ่าน): คลิกลิงก์ ยังคงสมัครอยู่CLICKED_AND_UNSUBSCRIBED: คลิกลิงก์และยกเลิกการสมัครCLICKED_AND_COMPLAINED: คลิกลิงก์และทำเครื่องหมายข้อความว่าเป็นสแปมUNSUBSCRIBED_WITHOUT_CLICK: ยกเลิกการสมัครโดยไม่คลิกCOMPLAINED_WITHOUT_CLICK: ทำเครื่องหมายข้อความว่าเป็นสแปมโดยไม่คลิก
STAGE_REACHED เฉพาะ App Inbox:
REACHED(ผ่าน): แอปดึงรายการนี้มาแล้วอย่างน้อยหนึ่งครั้งNOT_FETCHED_YET: ยังไม่ถูกดึงมา
STAGE_READ เฉพาะ App Inbox:
READ(ผ่าน): ถูกทำเครื่องหมายว่าอ่านแล้วDISMISSED_UNREAD: ผู้ใช้ลบโดยไม่ได้อ่านUNREAD: ยังคงอยู่ในกล่องข้อความโดยไม่ได้อ่านEXPIRED_UNREAD: เหมือนกับUNREADแต่รายการนี้หมดอายุและหลุดออกจากกล่องข้อความไปแล้วDISMISSED(subset): ทุกรายการที่ถูกลบ ไม่ว่าจะอ่านแล้วหรือไม่ ทับซ้อนกับREADและDISMISSED_UNREAD
รหัสการตอบกลับ
{ "channels": [{ "channel": "CHANNEL_MOBILE_PUSH", "funnel": [ { "stage": "STAGE_AUDIENCE", "count": "10000", "pieces": [ { "kind": "KIND_PASSED", "category": "ELIGIBLE_AUDIENCE", "count": "10000", "platforms": [{ "platform": 1, "count": "10000" }] } ], "errors": [], "platforms": [{ "platform": 1, "count": "10000" }] }, { "stage": "STAGE_SENT", "count": "9820", "pieces": [], "errors": [], "platforms": [{ "platform": 1, "count": "9820" }] }, { "stage": "STAGE_ERRORS", "count": "180", "pieces": [], "errors": [ { "category": "INVALID_TOKEN", "count": "180", "platforms": [{ "platform": 1, "count": "180" }], "codes": [ { "platform": 1, "code": 1002, "name": "BadDeviceToken", "count": "180" } ] } ], "platforms": [{ "platform": 1, "count": "180" }] }, { "stage": "STAGE_DELIVERIES", "count": "9820", "pieces": [ { "kind": "KIND_PASSED", "category": "DISPLAYABLE_CONFIRMED", "count": "8000", "platforms": [{ "platform": 1, "count": "8000" }] }, { "kind": "KIND_REASON", "category": "DISPLAYABLE_NO_CONFIRMATION", "count": "820", "platforms": [{ "platform": 1, "count": "820" }] }, { "kind": "KIND_PASSED", "category": "NOT_DISPLAYABLE_CONFIRMED", "count": "900", "platforms": [{ "platform": 1, "count": "900" }] }, { "kind": "KIND_REASON", "category": "NOT_DISPLAYABLE_NO_CONFIRMATION", "count": "100", "platforms": [{ "platform": 1, "count": "100" }] } ], "errors": [], "platforms": [{ "platform": 1, "count": "9820" }] }, { "stage": "STAGE_OPENED", "count": "3120", "pieces": [], "errors": [], "platforms": [{ "platform": 1, "count": "3120" }] } ], "deliveries_form": "DELIVERIES_FORM_PER_DEVICE", "basic_form_reason": "BASIC_FORM_REASON_UNSPECIFIED", "confirmed_deliveries": { "count": "8900", "platforms": [{ "platform": 1, "count": "8900" }] } }], "window_from": "2026-09-01T00:00:00Z", "window_to": "2026-09-01T00:05:00Z", "funnel_state": "FUNNEL_STATE_READY"}array channels ที่ว่างเปล่าพร้อม funnel_state: "FUNNEL_STATE_NO_EVENTS" หมายความว่ายังไม่มีอะไรเกิดขึ้นกับข้อความนี้ นี่ไม่ใช่ข้อผิดพลาด message_code ที่ถูกส่งมานานเกินไปจนข้อมูล funnel ไม่พร้อมใช้งานก็จะส่งคืน 200 เช่นกัน พร้อม array channels ว่างเปล่าและ funnel_state: "FUNNEL_STATE_EXPIRED"
message_code ที่ไม่รู้จัก เป็นของบัญชีอื่น หรือถูกลบไปแล้ว:
{ "error": "message not found"}{ "error": "invalid auth token"}getCampaignDeliveryFunnel
Anchor link toรวม getDeliveryFunnel ของทุกข้อความในแคมเปญเข้าด้วยกัน จำนวนที่ไม่ซ้ำกันจะถูกคำนวณแยกตามแต่ละข้อความ: ผู้สมัครที่ถูกส่งถึงโดยหลายข้อความในแคมเปญจะถูกนับหนึ่งครั้งสำหรับแต่ละข้อความ
POST https://api.pushwoosh.com/api/v2/statistics/messages/getCampaignDeliveryFunnel
Headers
Anchor link to| ชื่อ | จำเป็น | คำอธิบาย |
|---|---|---|
Authorization | ใช่ | Server API token ต้องระบุในรูปแบบต่อไปนี้: Authorization: Api <Server Key> |
พารามิเตอร์ในเนื้อหาคำขอ
Anchor link to| ชื่อ | จำเป็น | ประเภท | คำอธิบาย |
|---|---|---|---|
campaign_code | ใช่ | String | รหัสแคมเปญ |
platforms | ไม่ | Array ของ integer | รหัสแพลตฟอร์ม เพื่อกรอง funnel เว้นว่างไว้เพื่อส่งคืนทุกแพลตฟอร์มที่ส่งแคมเปญไป |
ตัวอย่างคำขอ
Anchor link to{ "campaign_code": "AAAAA-XXXXX", // รหัสแคมเปญ "platforms": [1, 14] // ไม่บังคับ iOS, Email}การตอบกลับ
Anchor link toรูปแบบเดียวกับ GetDeliveryFunnelResponse ด้านบน
รหัสการตอบกลับ
กลุ่มเป้าหมายที่ว่างเปล่าสำหรับ campaign_code และ platforms ที่ระบุก็จะส่งคืน 200 เช่นกัน พร้อม array channels ว่างเปล่าและ funnel_state: "FUNNEL_STATE_NO_EVENTS" แคมเปญที่ถูกส่งมานานเกินไปจนข้อมูล funnel ไม่พร้อมใช้งานก็จะส่งคืน 200 เช่นกัน พร้อม array channels ว่างเปล่าและ funnel_state: "FUNNEL_STATE_EXPIRED" ทั้งสองกรณีไม่ใช่ข้อผิดพลาด
campaign_code ที่ไม่รู้จัก เป็นของบัญชีอื่น หรือข้อความทั้งหมดถูกลบไปแล้ว แคมเปญที่มีเพียงบางข้อความถูกลบจะไม่ได้รับผลกระทบ: ข้อความที่ถูกลบยังคงถูกนับรวมใน funnel ของแคมเปญนั้น
{ "error": "campaign not found"}{ "error": "invalid auth token"}getMessageLog
Anchor link toแสดงข้อมูลโดยละเอียดเกี่ยวกับข้อความที่ส่ง
POST https://api.pushwoosh.com/api/v2/statistics/getMessageLog
ส่วนหัว (Headers)
Anchor link to| ชื่อ | จำเป็น | คำอธิบาย |
|---|---|---|
Authorization | จำเป็น | API access token จาก Pushwoosh Control Panel |
พารามิเตอร์ของเนื้อหาคำขอ (Request body parameters)
Anchor link to| ชื่อ | จำเป็น | ประเภท | คำอธิบาย |
|---|---|---|---|
message_id | ไม่ | Integer | เลือกเหตุการณ์ข้อความตาม Message ID ที่ได้รับจากประวัติข้อความ ตัวอย่าง: 12345678900 |
message_code | ไม่ | String | เลือกเหตุการณ์ข้อความตาม รหัสข้อความ (Message code) ที่ได้รับจากการตอบกลับของ /createMessage API ตัวอย่าง: "A444-AAABBBCC-00112233" |
campaign_code | ไม่ | String | เลือกเหตุการณ์ข้อความตาม รหัสแคมเปญ (Campaign code) ที่ระบุใน payload ของข้อความของคุณ ตัวอย่าง: "AAAAA-XXXXX" |
hwid | ไม่ | String or Array | เลือกเหตุการณ์ข้อความตาม HWID (Hardware ID) หรืออาร์เรย์ของ HWIDs |
date_from | จำเป็นหากไม่ได้ระบุ message_id, message_code, หรือ campaign_code | Datetime | วันที่เริ่มต้นสำหรับการกรองข้อความ รูปแบบ: "YYYY-MM-DD HH:MM:SS" ตัวอย่าง: "2000-01-25 00:00:00" |
date_to | จำเป็นหากไม่ได้ระบุ message_id, message_code, หรือ campaign_code | Datetime | วันที่สิ้นสุดสำหรับการกรองข้อความ รูปแบบ: "YYYY-MM-DD HH:MM:SS" ตัวอย่าง: "2000-01-26 00:00:00" |
limit | ไม่ | Integer | จำนวนเหตุการณ์ข้อความสูงสุดที่ส่งคืนในการตอบกลับครั้งเดียว ค่าสูงสุด: 100000 |
pagination_token | ไม่ | String | โทเค็นการแบ่งหน้าที่ได้รับจากการตอบกลับ /getMessageLog ก่อนหน้า ใช้เพื่อดึงผลลัพธ์เพิ่มเติม |
user_id | ไม่ | String | เลือกเหตุการณ์ข้อความตาม User ID ที่กำหนดเอง ดู /registerUser สำหรับรายละเอียดเพิ่มเติม |
application_code | ใช่ | String | เลือกเหตุการณ์ข้อความตาม รหัสแอปพลิเคชัน Pushwoosh (Pushwoosh application code) |
actions | ไม่ | Array | กรองผลลัพธ์ตามการกระทำของข้อความที่ระบุ ค่าที่เป็นไปได้: "sent", "delivered", "opened", "reject", "create", "inbox_delivered", "inbox_read", "inbox_opened", "inbox_deleted" เหตุการณ์ "create" จะถูกยกเว้นจากการตอบกลับโดยค่าเริ่มต้น รวม "create" ในอาร์เรย์นี้เพื่อดูเหตุการณ์เหล่านั้น เหตุการณ์ "delivered" ต้องการให้เปิดใช้งานสถิติการส่งมอบในบัญชีเพิ่มเติม |
platforms | ไม่ | Array | อาร์เรย์ของแพลตฟอร์มเป้าหมายเพื่อกรองผลลัพธ์ ค่าที่เป็นไปได้: "unknown", "ios", "blackberry", "android", "windows phone", "osx", "windows", "amazon", "safari", "chrome", "firefox", "ie", "email", "fb messenger", "baidu android", "huawei android", "sms", "xiaomi", "web", "whatsapp", "line", "kakao", "telegram", "apple wallet", "google wallet", "viber" |
message_type | ไม่ | String | กรองผลลัพธ์ตามโฟลว์ของข้อความ "all" (ค่าเริ่มต้นหากละเว้น) จะส่งคืนทุกอย่าง "broadcast" จะส่งคืนเฉพาะข้อความจำนวนมาก (message_id != 0) "transactional" จะส่งคืนเฉพาะข้อความที่มี message_id = 0 รวมถึงข้อความที่ส่งจาก Customer Journey |
ตัวอย่างคำขอ
Anchor link tocurl --location --request POST 'https://api.pushwoosh.com/api/v2/statistics/getMessageLog' \--header 'Authorization: Key API_ACCESS_TOKEN' \--header 'Content-Type: application/json' \--data-raw '{ "pagination_token": "PAGINATION_TOKEN_FROM_PREVIOUS_RESPONSE", // optional, token for pagination "limit": 1000, // optional, the max number of entries for a single response "application_code": "XXXXX-XXXXX", // Pushwoosh app code "message_code": "A444-AAABBBCC-00112233", // optional, message code obtained from /createMessaage request "message_id": 1234567890, // optional, message ID obtained from Pushwoosh Control Panel "campaign_code": "AAAAA-XXXXX", // optional, code of a campaign to get the log for "hwid": "aaazzzqqqqxxx", // optional, hardware ID of a specific device targeted with a message "user_id": "user_123", // optional, ID of a user targeted with the message "date_from": "2000-01-25 00:00:00", // optional, start of the stats period "date_to": "2000-02-10 23:59:59", // optional, end of the stats period "actions": ["opened", "inbox_opened"], // optional, used for results filtration. Possible values: "sent", "delivered", "opened", "reject", "create", "inbox_delivered", "inbox_read", "inbox_opened", "inbox_deleted". The response will include all the messages with the specified action(s). "platforms": ["ios", "chrome"], // optional, used for results filtration, lowercase only. Possible values: "unknown", "ios", "blackberry", "android", "windows phone", "osx", "windows", "amazon", "safari", "chrome", "firefox", "ie", "email", "fb messenger", "baidu android", "huawei android", "sms", "xiaomi", "web", "whatsapp", "line", "kakao", "telegram", "apple wallet", "google wallet", "viber" "message_type": "broadcast" // optional, "all" (default), "broadcast" (message_id != 0), or "transactional" (message_id = 0, includes Customer Journey sends)}'รหัสการตอบกลับและตัวอย่าง
{ "pagination_token": "PAGINATION_TOKEN_FOR_NEXT_REQUEST", "data": [{ "timestamp": "2000-01-25T11:18:47Z", "application_code": "XXXXX-XXXXX", "message_id": 12345678900, "message_code": "A444-AAABBBCC-00112233", "campaign_code": "AAAAA-XXXXX", "hwid": "aaazzzqqqqxxx", "user_id": "user_123", "platform": "android", "action": "sent", "status": "success", "push_alerts_enabled": "true" }, { "timestamp": "2000-01-25T11:18:49Z", "application_code": "XXXXX-XXXXX", "message_id": 12345678900, "message_code": "A444-AAABBBCC-00112233", "campaign_code": "AAAAA-XXXXX", "hwid": "aaazzzqqqqxxx", "user_id": "user_123", "platform": "android", "action": "delivered", "push_alerts_enabled": "true" }, { "timestamp": "2000-01-25T11:19:23Z", "application_code": "XXXXX-XXXXX", "message_id": 12345678900, "message_code": "A444-AAABBBCC-00112233", "campaign_code": "AAAAA-XXXXX", "hwid": "aaazzzqqqqxxx", "user_id": "user_123", "platform": "android", "action": "opened", "push_alerts_enabled": "true" }, { "timestamp": "2000-01-25T11:19:30Z", "application_code": "XXXXX-XXXXX", "message_id": 12345678900, "message_code": "A444-AAABBBCC-00112233", "campaign_code": "AAAAA-XXXXX", "hwid": "aaazzzqqqqxxx", "user_id": "user_123", "platform": "android", "action": "reject", "status": "failed", "error_reason": "invalid device token", "payload": "SOME_PAYLOAD_STRING" }]}{ "error": "exceeded the maximum date interval. Max interval: 30 days"}{ "error": "account not found"}แต่ละรายการใน data ยังมี error_reason (string, ซึ่งจะถูกเติมด้วยเหตุผลของความล้มเหลวเมื่อ status เป็น "failed") และ payload (string) ที่เป็นทางเลือก
หน้าการตอบกลับอาจสั้นกว่า limit ที่ร้องขอ ซึ่งไม่ได้หมายความว่าการส่งออกเสร็จสิ้นแล้ว
สถิติอีเมล
Anchor link tolinksInteractions
Anchor link toแสดงสถิติการคลิกลิงก์ในอีเมล
POST https://api.pushwoosh.com/api/v2/statistics/emails/linksInteractions
ส่วนหัว (Headers)
Anchor link to| ชื่อ | จำเป็น | คำอธิบาย |
|---|---|---|
Authorization | ใช่ | API access token จาก Pushwoosh Control Panel |
พารามิเตอร์ของเนื้อหาคำขอ (Request body parameters)
Anchor link to| ชื่อ | จำเป็น | ประเภท | คำอธิบาย |
|---|---|---|---|
date_range | ไม่ | Object | กำหนดช่วงเวลาการรายงาน ประกอบด้วย date_from และ date_to |
filters | ใช่ | Object | ตัวกรองอีเมล |
application | ใช่ | String | รหัสแอปพลิเคชัน Pushwoosh (Pushwoosh application code) (หรือระบุ campaign, messages_ids, หรือ message_codes แทน) |
messages_codes | ใช่ | Array | รหัสข้อความ (Message codes) (หรือระบุ application, campaign, หรือ messages_ids แทน) |
campaign | ใช่ | String | รหัสแคมเปญ (Campaign code) (หรือระบุ application, messages_ids, หรือ message_codes แทน) |
messages_ids | ใช่ | Array | ID ข้อความ (หรือระบุ application, campaign, หรือ message_codes แทน) |
link_template | จำเป็นหากระบุ application หรือ campaign | String | กรองการโต้ตอบกับลิงก์อีเมลด้วยคีย์เวิร์ด เฉพาะลิงก์ที่มีข้อความที่ระบุใน URL เท่านั้นที่จะถูกส่งคืนในการตอบกลับของ API ตัวอย่างเช่น หากอีเมลของคุณมีลิงก์เช่น https://example.com/news และ https://example.com/shop การตั้งค่า “link_template”: “shop” จะส่งคืนการโต้ตอบสำหรับ https://example.com/shop เท่านั้น |
email_content_code | ไม่ | String | ตัวระบุที่ไม่ซ้ำกันสำหรับเนื้อหาอีเมล (Unique identifier for the email content) |
params | ไม่ | Object | กำหนดตัวเลือกการตอบกลับเพิ่มเติม รวมถึง with_full_links ซึ่งจะเพิ่มรายการลิงก์เต็มพร้อมสถิติ |
ตัวอย่างคำขอ
Anchor link tocurl --location --request POST 'https://api.pushwoosh.com/api/v2/statistics/emails/linksInteractions' \--header 'Authorization: Api API_ACCESS_TOKEN' \--header 'Content-Type: application/json' \--data-raw '{ "filters": { "date_range": { "date_from": "string", // Required format: 2000-01-01 "date_to": "string" // Required format: 2000-01-01 }, "campaign": "string", // Campaign code (you can specify application, messages_ids, or message_codes instead) "application": "string", // Application code (you can specify campaign, messages_ids, or message_codes instead) "messages_ids": [], // Message IDs (you can specify application, campaign, or message_codes instead) "messages_codes": [], // Message codes (you can specify application, campaign, or message_ids instead) "link_template": "string", // Link template (required if application or campaign is specified) "email_content_code": "string" // Unique identifier for the email content. }, "params": { "with_full_links": true // Specify whether to show detailed statistics. A list of full links with statistics will be passed in the full_links array. }}'รหัสการตอบกลับและตัวอย่าง
Anchor link to{ "items": [{ "template": "string", "link": "string", "title": "string", "clicks": 0, "full_links": [{ "full_link": "string", "clicks": 0 }] }]}{ "error": "exceeded the maximum date interval. Max interval: 30 days"}{ "error": "account not found"}linksInteractionsDevices
Anchor link toแสดงผู้ใช้ที่คลิกลิงก์ในอีเมล
POST https://api.pushwoosh.com/api/v2/statistics/emails/linksInteractionsDevices
ส่วนหัว (Headers)
Anchor link to| ชื่อ | จำเป็น | คำอธิบาย |
|---|---|---|
Authorization | ใช่ | API access token จาก Pushwoosh Control Panel |
พารามิเตอร์ของเนื้อหาคำขอ (Request body parameters)
Anchor link to| ชื่อ | จำเป็น | ประเภท | คำอธิบาย |
|---|---|---|---|
date_range | ไม่ | Object | กำหนดช่วงเวลาการรายงาน ประกอบด้วย date_from และ date_to |
filters | ใช่ | Object | ตัวกรองอีเมล |
application | ใช่ | String | รหัสแอปพลิเคชัน Pushwoosh (Pushwoosh application code) (หรือระบุ campaign, messages_ids, หรือ message_codes แทน) |
messages_codes | ใช่ | Array | รหัสข้อความ (Message codes) (หรือระบุ application, campaign, หรือ messages_ids แทน) |
campaign | ใช่ | String | รหัสแคมเปญ (Campaign code) (หรือระบุ application, messages_ids, หรือ message_codes แทน) |
messages_ids | ใช่ | Array | ID ข้อความ (หรือระบุ application, campaign, หรือ message_codes แทน) |
link_template | จำเป็นหากระบุ application หรือ campaign | String | กรองการโต้ตอบกับลิงก์อีเมลด้วยคีย์เวิร์ด เฉพาะลิงก์ที่มีข้อความที่ระบุใน URL เท่านั้นที่จะถูกส่งคืนในการตอบกลับของ API ตัวอย่างเช่น หากอีเมลของคุณมีลิงก์เช่น https://example.com/news และ https://example.com/shop การตั้งค่า “link_template”: “shop” จะส่งคืนการโต้ตอบสำหรับ https://example.com/shop เท่านั้น |
email_content_code | ไม่ | String | ตัวระบุที่ไม่ซ้ำกันสำหรับเนื้อหาอีเมล (Unique identifier for the email content) |
page | ไม่ | Integer | หมายเลขหน้าสำหรับการแบ่งหน้า |
per_page | ไม่ | Integer | จำนวนผลลัพธ์ต่อหน้า (≤ 1000) |
ตัวอย่างคำขอ
Anchor link tocurl --location --request POST 'https://api.pushwoosh.com/api/v2/statistics/emails/linksInteractionsDevices' \--header 'Authorization: Api API_ACCESS_TOKEN' \--header 'Content-Type: application/json' \--data-raw '{ "filters": { "date_range": { "date_from": "string", // Required format: 2000-01-01 "date_to": "string" // Required format: 2000-01-01 }, "campaign": "string", // Campaign code (you can specify application, messages_ids, or message_codes instead) "application": "string", // Application code (you can specify campaign, messages_ids, or message_codes instead) "messages_ids": [], // Message IDs (you can specify application, campaign, or message_codes instead) "messages_codes": [], // Message codes (you can specify application, campaign, or message_ids instead) "link_template": "string", // Link template (required if application or campaign is specified) "email_content_code": "string" // Unique identifier for the email content. }, "per_page": 100, "page": 0}'รหัสการตอบกลับและตัวอย่าง
Anchor link to{ "total": 0, "items": [{ "timestamp": "string", "link": "string", "hwid": "string" }]}{ "error": "exceeded the maximum date interval. Max interval: 30 days"}{ "error": "account not found"}bouncedEmails
Anchor link toPOST https://api.pushwoosh.com/api/v2/statistics/emails/bouncedEmails
ให้ข้อมูลเกี่ยวกับการร้องเรียนทางอีเมล, soft bounces, และ hard bounces รวมถึงวันที่, ที่อยู่อีเมล, และเหตุผลของแต่ละการตีกลับ
การให้สิทธิ์ (Authorization)
Anchor link toการให้สิทธิ์จะถูกจัดการผ่าน API Access Token ในส่วนหัวของคำขอ
พารามิเตอร์ของเนื้อหาคำขอ (Request body parameters)
Anchor link to| ชื่อพารามิเตอร์ | ประเภท | คำอธิบาย | จำเป็น |
|---|---|---|---|
application | string | รหัสแอปพลิเคชัน Pushwoosh (Pushwoosh application code) | ใช่ |
message_code | string | รหัสข้อความ (Message code) | จำเป็นหากไม่ได้ระบุ date range หรือ campaign |
campaign | string | รหัสแคมเปญ (Campaign code) | จำเป็นหากไม่ได้ระบุ message_code หรือ date range |
date_from | string | วันที่เริ่มต้นสำหรับข้อมูลในรูปแบบ YYYY-MM-DDTHH:MM:SS.000Z (มาตรฐาน ISO 8601) | จำเป็นหากไม่ได้ระบุ message_code หรือ campaign |
date_to | string | วันที่สิ้นสุดสำหรับข้อมูลในรูปแบบ YYYY-MM-DDTHH:MM:SS.000Z (มาตรฐาน ISO 8601) | จำเป็นหากไม่ได้ระบุ message_code หรือ campaign |
per_page | int | จำนวนแถวต่อหน้า สูงสุด 5000 | ใช่ |
page | int | หมายเลขหน้า เริ่มต้นจากศูนย์ | ใช่ |
type | string | ประเภทของการตีกลับ: Complaint, Softbounce, Hardbounce | ไม่ |
ตัวอย่างคำขอ
Anchor link to{ "application": "XXXXX-XXXXX", // required. Pushwoosh app code "message_code": "XXXXX-XXXXXXXXX-XXXXXXXX", // required if campaign or date range is not provided. // Unique message identifier "campaign": "XXXXX-XXXXX", // required if message_code or date range is not provided. // Campaign code "date_from": "2024-07-20T00:00:00.000Z", // required if message_code or campaign is not provided. // Start date in ISO 8601 format "YYYY-MM-DDTHH:MM:SS.SSSZ" "date_to": "2024-07-20T00:00:00.000Z", // required if message_code or campaign is not provided. // End date in ISO 8601 format "YYYY-MM-DDTHH:MM:SS.SSSZ" "per_page": 1000, // required. Number of results per page, maximum 5000 "page": 5, // optional. Page number, starting from zero "type": "Softbounce" // optional. The type of bounce: Complaint, Softbounce, Hardbounce}ฟิลด์การตอบกลับ (Response fields)
Anchor link to| ชื่อฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
total | int | จำนวนแถวทั้งหมด |
bounced_emails | array | อาร์เรย์ของรายละเอียดอีเมลที่ตีกลับ |
├── email | string | ที่อยู่อีเมลที่ตีกลับ |
├── date | string | วันที่ของการตีกลับ (รูปแบบ: YYYY-MM-DDTHH:MM:SS.000Z) |
├── reason | string | เหตุผลของการตีกลับ |
└── type | string | ประเภทของการตีกลับ: Complaint, Softbounce, Hardbounce |
ตัวอย่างการตอบกลับ
Anchor link to{ "total": 25, // Total count of rows. "bounced_emails": [{ "email": "example@example.com", // Email address that bounced "date": "2024-07-20T00:00:00.000Z", // Bounce date in ISO 8601 format "reason": "Invalid recipient address", // Reason for the bounce "type": "Hardbounce" // Type of bounce: Complaint, Softbounce, Hardbounce }]}