跳到内容

标签 API

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

在您的账户中创建一个标签。

请求正文

Anchor link to
名称类型描述
auth*string来自 Pushwoosh Control Panel 的 API access token
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", // 必需。来自 Pushwoosh Control Panel 的 API access token
"tag": {
"name": "TAG_NAME", // 必需。
"type": 1, // 必需。请参阅下面的可能值
"user_specific": false // 可选。true = 用户级标签(在所有设备间共享);false = 设备级标签(默认)
}
}
}

可能的标签值类型:

  • 1 - 整数
  • 2 - 字符串
  • 3 - 列表
  • 4 - 日期
  • 5 - 布尔值
  • 6 - 小数。例如:19.95
  • 7 - 版本。例如:“1.0.0.0”

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

从数据库中完全删除一个标签及其所有相关信息。

请求正文

Anchor link to
名称类型描述
auth*string来自 Pushwoosh Control Panel 的 API access token
tag*object标签参数。
tag.name*string要删除的 tag 的名称。
{
"status_code": 200,
"status_message": "OK",
"response": {
"result": true
}
}
示例
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // 必需。来自 Pushwoosh Control Panel 的 API access token
"tag": {
"name": "TAG_NAME" // 必需。要删除的标签名称
}
}
}

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

检索账户上的标签列表。

请求正文

Anchor link to
名称类型描述
auth*string来自 Pushwoosh Control Panel 的 API access token
{
"status_code": 200,
"status_message": "OK",
"response": {
"tags": [{
"name":"Language",
"type":2
}, {
"name":"List tag",
"type":3
}]
}
}
示例
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H" // 来自 Pushwoosh Control Panel 的 API access token
}
}

标签类型

  • 1 - 整数
  • 2 - 字符串
  • 3 - 列表
  • 4 - 日期
  • 5 - 布尔值
  • 6 - 小数。例如:19.95
  • 7 - 版本。例如:“1.0.0.0”