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

Tags API

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

สร้างแท็กในบัญชีของคุณ

Request body

Anchor link to
ชื่อประเภทคำอธิบาย
auth*stringAPI access token จาก Pushwoosh Control Panel
tag*objectพารามิเตอร์ของแท็ก
tag.name*stringชื่อแท็ก
tag.type*integerประเภทแท็ก ดูค่าที่เป็นไปได้ด้านล่าง
tag.user_specificbooleanเมื่อเป็น true ค่าแท็กจะถูกจัดเก็บในระดับผู้ใช้และแชร์ไปยังอุปกรณ์ทั้งหมดของผู้ใช้เมื่อตั้งค่าโดย UserID เมื่อเป็น false (ค่าเริ่มต้น) แท็กจะเป็นระดับอุปกรณ์และตั้งค่าต่อ 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 = แท็กระดับผู้ใช้ (แชร์ในอุปกรณ์ทั้งหมด); false = แท็กระดับอุปกรณ์ (ค่าเริ่มต้น)
}
}
}

ประเภทค่าแท็กที่เป็นไปได้:

  • 1 - Integer
  • 2 - String
  • 3 - List
  • 4 - Date
  • 5 - Boolean
  • 6 - Decimal เช่น: 19.95
  • 7 - Version เช่น: “1.0.0.0”

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

ลบแท็กพร้อมข้อมูลที่เกี่ยวข้องทั้งหมดออกจากฐานข้อมูลอย่างสมบูรณ์

Request body

Anchor link to
ชื่อประเภทคำอธิบาย
auth*stringAPI access token จาก Pushwoosh Control Panel
tag*objectพารามิเตอร์ของแท็ก
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" // จำเป็นต้องมี ชื่อของแท็กที่จะลบ
}
}
}

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

ดึงรายการแท็กในบัญชี

Request body

Anchor link to
ชื่อประเภทคำอธิบาย
auth*stringAPI 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
}
}

ประเภทแท็ก:

  • 1 - Integer
  • 2 - String
  • 3 - List
  • 4 - Date
  • 5 - Boolean
  • 6 - Decimal เช่น: 19.95
  • 7 - Version เช่น: “1.0.0.0”