Tags API
addTag
Anchor link toPOST https://api.pushwoosh.com/json/1.3/addTag
สร้าง tag ในบัญชีของคุณ
Request body
Anchor link to| ชื่อ | ประเภท | คำอธิบาย |
|---|---|---|
| auth* | string | API access token จาก Pushwoosh Control Panel |
| tag* | object | พารามิเตอร์ของ Tag |
| tag.name* | string | ชื่อ Tag |
| tag.type* | integer | ประเภทของ Tag ดูค่าที่เป็นไปได้ด้านล่าง |
| tag.user_specific | boolean | เมื่อเป็น true ค่า tag จะถูกจัดเก็บในระดับผู้ใช้และแชร์ไปยังอุปกรณ์ทั้งหมดของผู้ใช้เมื่อตั้งค่าโดย UserID เมื่อเป็น false (ค่าเริ่มต้น) tag จะเป็นระดับอุปกรณ์และตั้งค่าต่อ HWID |
{ "status_code": 200, "status_message": "OK", "response": { "result": true }}{ "request": { "auth": "yxoPUlwqm…………pIyEX4H", // จำเป็นต้องมี API access token จาก Pushwoosh Control Panel "tag": { "name": "TAG_NAME", // จำเป็นต้องมี "type": 1, // จำเป็นต้องมี ดูค่าที่เป็นไปได้ด้านล่าง "user_specific": false // ไม่จำเป็น true = tag ระดับผู้ใช้ (แชร์ไปยังอุปกรณ์ทั้งหมด); false = tag ระดับอุปกรณ์ (ค่าเริ่มต้น) } }}ประเภทค่า tag ที่เป็นไปได้:
- 1 - Integer (จำนวนเต็ม)
- 2 - String (ข้อความ)
- 3 - List (รายการ)
- 4 - Date (วันที่)
- 5 - Boolean (ค่าตรรกะ)
- 6 - Decimal (ทศนิยม) เช่น: 19.95
- 7 - Version (เวอร์ชัน) เช่น: “1.0.0.0”
deleteTag
Anchor link toPOST https://api.pushwoosh.com/json/1.3/deleteTag
ลบ tag พร้อมข้อมูลที่เกี่ยวข้องทั้งหมดออกจากฐานข้อมูลอย่างสมบูรณ์
Request body
Anchor link to| ชื่อ | ประเภท | คำอธิบาย |
|---|---|---|
| auth* | string | API access token จาก Pushwoosh Control Panel |
| tag* | object | พารามิเตอร์ของ Tag |
| tag.name* | string | ชื่อของ tag ที่จะลบ |
{ "status_code": 200, "status_message": "OK", "response": { "result": true }}{ "request": { "auth": "yxoPUlwqm…………pIyEX4H", // จำเป็นต้องมี API access token จาก Pushwoosh Control Panel "tag": { "name": "TAG_NAME" // จำเป็นต้องมี ชื่อของ tag ที่จะลบ } }}listTags
Anchor link toPOST https://api.pushwoosh.com/json/1.3/listTags
ดึงรายการ tags ในบัญชี
Request body
Anchor link to| ชื่อ | ประเภท | คำอธิบาย |
|---|---|---|
| auth* | string | API access token จาก Pushwoosh Control Panel |
{ "status_code": 200, "status_message": "OK", "response": { "tags": [{ "name":"Language", "type":2 }, { "name":"List tag", "type":3 }] }}{ "request":{ "auth": "yxoPUlwqm…………pIyEX4H" // API access token จาก Pushwoosh Control Panel }}ประเภทของ Tag:
- 1 - Integer (จำนวนเต็ม)
- 2 - String (ข้อความ)
- 3 - List (รายการ)
- 4 - Date (วันที่)
- 5 - Boolean (ค่าตรรกะ)
- 6 - Decimal (ทศนิยม) เช่น: 19.95
- 7 - Version (เวอร์ชัน) เช่น: “1.0.0.0”