ข้ามไปยังเนื้อหา

คำขอที่ตั้งเวลาไว้

หากต้องการรับการตอบกลับสำหรับคำขอที่ตั้งเวลาไว้ทุกรายการ จะต้องส่ง /getResults หลังจากคำขอหลัก เมธอด API สถิติและการวิเคราะห์ส่วนใหญ่จำเป็นต้องส่ง /getResults เพื่อรับไฟล์สถิติหรือ JSON:

getResults

Anchor link to

POST https://api.pushwoosh.com/json/1.3/getResults

ดึงข้อมูลผลลัพธ์ของคำขอที่ตั้งเวลาไว้

เนื้อหาของคำขอ (Request Body)

Anchor link to
ชื่อประเภทคำอธิบาย
auth*stringโทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
request_id*stringID คำขอที่ส่งคืนโดยเมธอดที่ตั้งเวลาไว้
ตัวอย่าง
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H", // จำเป็น โทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
"request_id": "REQUEST_ID" // จำเป็น ID คำขอที่ส่งคืนโดยเมธอดที่ตั้งเวลาไว้
}
}

การตอบกลับจะขึ้นอยู่กับคำขอที่คุณกำลังดึงผลลัพธ์ ดังนั้นอาจมีลักษณะแตกต่างกันไป ด้านล่างนี้คือตัวอย่างการตอบกลับสำหรับคำขอ /getMsgStats:

ตัวอย่างการตอบกลับ
{
"status_code": 200,
"status_message": "OK",
"response": {
"formatter": "hourly",
"rows": [{
"datetime": "2020-05-13 08:00:00",
"action": "send",
"count": 6
}, {
"datetime": "2020-05-13 08:00:00",
"action": "inboxopen",
"count": 0
}, {
"datetime": "2020-05-13 08:00:00",
"action": "delivery",
"count": 1
}, {
"datetime": "2020-05-13 08:00:00",
"action": "open",
"count": 0
}],
"conversion": {
"send": 6,
"delivery": 1,
"open": 0,
"events": []
}
}
}