行项目应用

GET accounts/:account_id/line_item_apps

检索与当前账号下行项目关联的部分或所有应用的详细信息。

资源 URL

https://ads-api.twitter.com/8/accounts/:account_id/line_item_apps

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

count
可选

指定每个不同请求尝试检索的记录数量。

类型:int

默认值:200
最小值、最大值:11000
cursor
可选

指定光标以获取下一页结果。参阅分页了解更多信息。

类型:string

示例:8x7v00oow

line_item_ids
可选

通过指定以逗号分隔的标识符列表,将响应范围限定为与指定行项目关联的应用。最多可提供 200 个 ID。

类型:string

示例:6syda

line_item_app_ids
可选

通过指定以逗号分隔的标识符列表,将响应范围限定为所需的行项目应用。最多可提供 200 个 ID。

类型:string

示例:1eegy

sort_by
可选

根据支持的属性,按升序或降序排序。参阅排序了解更多信息。

类型:string

示例:created_at-asc

with_deleted
可选

在请求中包含已删除的结果。

类型:boolean

默认值:false
可能值:truefalse
with_total_count
可选

包含 total_count 响应属性。

注意:不包含此参数和 cursor

注意:包含 total_count 的请求速率限制较低,目前设置为每 15 分钟 200 次。

类型:boolean

默认值:false
可能值:truefalse

请求示例

GET https://ads-api.twitter.com/8/accounts/18ce54d4x5t/line_item_apps?line_item_app_ids=1eegy

响应示例

{
  "data": [
    {
      "line_item_id": "6syda",
      "app_store_identifier": "com.twitter.android",
      "id": "1eegy",
      "created_at": "2016-11-18T18:20:18Z",
      "updated_at": "2016-11-18T18:20:18Z",
      "os_type": "Android",
      "deleted": false
    }
  ],
  "next_cursor": null,
  "request": {
    "params": {
      "line_item_app_ids": [
        "1eegy"
      ],
      "account_id": "18ce54d4x5t"
    }
  }
}

GET accounts/:account_id/line_item_apps/:line_item_app_id

检索移动应用关联的指定行项目。

资源 URL

https://ads-api.twitter.com/8/accounts/:account_id/line_item_apps/:line_item_app_id

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

line_item_app_id
必需

对请求中操作的行项目的引用。

类型:string

示例:vbbj

with_deleted
可选

在请求中包含已删除的结果。

类型:boolean

默认值:false
可能值:truefalse

请求示例

GET https://ads-api.twitter.com/8/accounts/hkk5/line_items_apps/vbbj

响应示例

{
  "data": {
    "line_item_id": "4w9x5",
    "app_store_identifier": "87654321",
    "id": "vbbj",
    "created_at": "2016-04-10T01:46:33Z",
    "updated_at": "2016-04-10T01:46:33Z",
    "os_type": "iOS",
    "deleted": false
  },
  "request": {
    "params": {
      "line_item_app_id": "vbbj",
      "account_id": "hkk5"
    }
  }
}

POST accounts/:account_id/line_item_apps

将移动应用与指定的行项目关联,从而在 Twitter 受众平台上实现移动应用推广。

注意:无法更新 (PUT) 行项目应用。

资源 URL

https://ads-api.twitter.com/8/accounts/:account_id/line_item_apps

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

app_store_identifier
必需

应用商店标识符。

类型:string

示例:com.twitter.android

line_item_id
必需

对请求中操作的行项目的引用。

类型:string

示例:6syld

os_type
必需

操作系统类型。

类型:enum

可能值:ANDROIDIOS

请求示例

POST https://ads-api.twitter.com/8/accounts/18ce54d4x5t/line_item_apps?line_item_id=6syld&app_store_identifier=com.twitter.android&os_type=ANDROID

响应示例

{
  "data": {
    "line_item_id": "6syld",
    "app_store_identifier": "com.twitter.android",
    "id": "1x153",
    "created_at": "2017-08-23T19:41:33Z",
    "updated_at": "2017-08-23T19:41:33Z",
    "os_type": "Android",
    "deleted": false
  }
}

DELETE accounts/:account_id/line_item_apps/:line_item_app_id

取消移动应用与指定行项目的关联。

资源 URL

https://ads-api.twitter.com/8/accounts/:account_id/line_item_apps/:line_item_app_id

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

line_item_app_id
必需

对请求中操作的行项目的引用。

类型:string

示例:1wu1i

请求示例

DELETE https://ads-api.twitter.com/8/accounts/18ce54d4x5t/line_item_apps/1wu1i

响应示例

{
  "data": {
    "line_item_id": "9pl99",
    "app_store_identifier": "com.twitter.android",
    "id": "1wu1i",
    "created_at": "2017-08-17T15:51:19Z",
    "updated_at": "2017-08-23T19:11:49Z",
    "os_type": "Android",
    "deleted": true
  },
  "request": {
    "params": {
      "line_item_app_id": "1wu1i",
      "account_id": "18ce54d4x5t"
    }
  }
}