跳到内容

Tags API

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

在您的帐户中创建一个 Tag。

Request body

Anchor link to
NameTypeDescription
auth*string来自 Pushwoosh 控制面板的 API Access Token
tag*objectTag 参数。
tag.name*stringTag 名称。
tag.type*integerTag 类型。查看下方的可能值。
tag.application_specificboolean定义 Tag 值是针对多个应用不同,还是在多个应用中相同。
{
"status_code": 200,
"status_message": "OK",
"response": {
"result": true
}
}
Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // 必填。来自 Pushwoosh 控制面板的 API Access Token
"tag": {
"name": "TAG_NAME", // 必填。
"type": 1, // 必填。查看下方的可能值
"application_specific": true, // 可选。定义 Tag 值是针对多个应用不同
// 还是在多个应用中相同
"user_specific": true // 可选。用于 application_specific tags
}
}
}

可能的 Tag 值类型:

  • 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

从数据库中完全移除一个 Tag 及其所有相关信息。

Request body

Anchor link to
NameTypeDescription
auth*string来自 Pushwoosh 控制面板的 API Access Token
tag*objectTag 参数。
tag.name*string要删除的 Tag 的名称。
{
"status_code": 200,
"status_message": "OK",
"response": {
"result": true
}
}
Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // 必填。来自 Pushwoosh 控制面板的 API Access Token
"tag": {
"name": "TAG_NAME" // 必填。要删除的 Tag 名称
}
}
}

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

检索帐户上的 Tag 列表。

Request body

Anchor link to
NameTypeDescription
auth*string来自 Pushwoosh 控制面板的 API Access Token
{
"status_code": 200,
"status_message": "OK",
"response": {
"tags": [{
"name":"Language",
"type":2,
"isApplicationSpecific": false
}, {
"name":"List tag",
"type":3,
"isApplicationSpecific": false
}]
}
}
Example
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H" // 来自 Pushwoosh 控制面板的 API Access Token
}
}

Tag 类型

  • 1 - Integer (整数)
  • 2 - String (字符串)
  • 3 - List (列表)
  • 4 - Date (日期)
  • 5 - Boolean (布尔值)
  • 6 - Decimal (小数)。例如:19.95
  • 7 - Version (版本)。例如:“1.0.0.0”