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

Campaigns API

createCampaign

Anchor link to

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

สร้างแคมเปญพุชภายในแอป

เนื้อหาของคำขอ

Anchor link to
ชื่อประเภทคำอธิบาย
auth*stringโทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
application*stringรหัสแอปพลิเคชัน Pushwoosh
name*stringชื่อแคมเปญ
descriptionstringคำอธิบายแคมเปญ
{
"status_code": 200,
"status_message": "OK",
"response": {
"campaign": "XXXXX-XXXXX"
}
}
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // จำเป็น โทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // จำเป็น รหัสแอปพลิเคชัน Pushwoosh
"name": "CAMPAIGN_NAME", // จำเป็น
"description": "CAMPAIGN_DESCRIPTION" // ไม่จำเป็น
}
}

deleteCampaign

Anchor link to

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

ลบแคมเปญที่ระบุ

เนื้อหาของคำขอ

Anchor link to
ชื่อประเภทคำอธิบาย
auth*stringโทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
campaign*stringID ของแคมเปญที่ต้องการลบ
{
"status_code": 200,
"status_message": "OK",
"response": null
}
Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // จำเป็น โทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
"campaign": "XXXXX-XXXXX" // จำเป็น ID ของแคมเปญที่ต้องการลบ
}
}

getCampaigns

Anchor link to

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

ดึงข้อมูลรายการแคมเปญสำหรับแอป

เนื้อหาของคำขอ

Anchor link to
ชื่อประเภทคำอธิบาย
auth*stringโทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
application*stringรหัสแอปพลิเคชัน Pushwoosh
cursorstringระบุแคมเปญสุดท้ายที่ดึงมาในคำขอก่อนหน้า
limitintegerจำนวนแคมเปญสูงสุดสำหรับการตอบกลับครั้งเดียว
{
"status_code": 200,
"status_message": "OK",
"response": {
"campaigns": [{
"code": "7CFF3-63A7B",
"name": "CAMPAIGN_NAME_1",
"description": "DESCRIPTION1"
}, {
"code": "C284C-33DD3",
"name": "CAMPAIGN_NAME_2",
"description": "DESCRIPTION2"
}],
"limit": 100,
"cursor": "+4PxJPhhwITD4PFsiKui1BA=="
}
}
Example
{
"request": {
"auth": "jLbec2UW........ztFSOf5Za", // จำเป็น โทเค็นการเข้าถึง API จาก Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // จำเป็น รหัสแอปพลิเคชัน Pushwoosh
"cursor": "+4PxJPhhwITD4PFsiKui1BA==", // ไม่จำเป็น ระบุแคมเปญสุดท้ายที่ดึงมาในคำขอก่อนหน้า
"limit": 100 // ไม่จำเป็น จำนวนแคมเปญสูงสุด
// สำหรับการตอบกลับครั้งเดียว
}
}