预排期推广推文

GET accounts/:account_id/scheduled_promoted_tweets

检索与当前账号关联的部分或所有预排期推广推文的详细信息。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/scheduled_promoted_tweets

参数

名称 说明
account_id
必需

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

类型:string

示例:18ce54d4x5t

count
可选

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

类型:int

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

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

类型:string

示例:8x7v00oow

line_item_ids
可选

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

类型:string

示例:8xdpe

scheduled_promoted_tweet_ids
可选

通过指定以逗号分隔的标识符列表,将响应范围限定为所需的预排期推广推文。最多可提供 200 个 ID。

类型:string

示例:1xboq

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/10/accounts/18ce54d4x5t/scheduled_promoted_tweets?scheduled_promoted_tweet_ids=1xboq

响应示例

{
  "request": {
    "params": {
      "scheduled_promoted_tweet_ids": [
        "1xboq"
      ],
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "line_item_id": "8xdpe",
      "id": "1xboq",
      "created_at": "2017-06-01T19:53:32Z",
      "updated_at": "2017-06-01T20:00:06Z",
      "scheduled_tweet_id": "870366669373194240",
      "tweet_id": "870369382207070208",
      "deleted": false
    }
  ]
}

GET accounts/:account_id/scheduled_promoted_tweets/:scheduled_promoted_tweet_id

检索与当前账号关联的特定预排期推广推文。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/scheduled_promoted_tweets/:scheduled_promoted_tweet_id

参数

名称 说明
account_id
必需

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

类型:string

示例:18ce54d4x5t

scheduled_promoted_tweet_id
必需

请求中对正在操作的预排期推广推文的引用。

类型:string

示例:1xboq

with_deleted
可选

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

类型:boolean

默认值:false
可能值:truefalse

请求示例

GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/scheduled_promoted_tweets/1xboq

响应示例

{
  "request": {
    "params": {
      "scheduled_promoted_tweet_id": "1xboq",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "8xdpe",
    "id": "1xboq",
    "created_at": "2017-06-01T19:53:32Z",
    "updated_at": "2017-06-01T20:00:06Z",
    "scheduled_tweet_id": "870366669373194240",
    "tweet_id": "870369382207070208",
    "deleted": false
  }
}

POST accounts/:account_id/scheduled_promoted_tweets

将预排期推文与指定行项目相关联。

注意:无法更新 (PUT) 预排期推广推文实体。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/scheduled_promoted_tweets

参数

名称 说明
account_id
必需

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

类型:string

示例:18ce54d4x5t

line_item_id
必需

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

类型:string

示例:8xdpe

scheduled_tweet_id
必需

请求中对正在操作的预排期推文的引用。

类型:long

示例:870358555227860992

请求示例

POST https://ads-api.twitter.com/10/accounts/18ce54d4x5t/scheduled_promoted_tweets?line_item_id=8xdpe&scheduled_tweet_id=870358555227860992

响应示例

{
  "data": {
    "line_item_id": "8xdpe",
    "id": "1xtfl",
    "created_at": "2017-06-08T07:25:26Z",
    "updated_at": "2017-06-08T07:25:26Z",
    "scheduled_tweet_id": "870358555227860992",
    "tweet_id": null,
    "deleted": false
  },
  "request": {
    "params": {
      "line_item_id": "8xdpe",
      "scheduled_tweet_id": 870358555227860992,
      "account_id": "18ce54d4x5t"
    }
  }
}

DELETE accounts/:account_id/scheduled_promoted_tweets/:scheduled_promoted_tweet_id

取消预排期推文与指定行项目的关联。

注意scheduled_promoted_tweets 只能在预排期推文 scheduled_at 时间之前删除。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/scheduled_tweets/:scheduled_tweet_id

参数

名称 说明
account_id
必需

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

类型:string

示例:18ce54d4x5t

scheduled_promoted_tweet_id
必需

请求中对正在操作的预排期推广推文的引用。这是来自 GET accounts/:account_id/scheduled_promoted_tweets 响应对象的 id 属性。

类型:string

示例:1xtfl

请求示例

DELETE https://ads-api.twitter.com/10/accounts/18ce54d4x5t/scheduled_promoted_tweets/1xtfl

响应示例

{
  "data": {
    "line_item_id": "8xdpe",
    "id": "1xtfl",
    "created_at": "2017-06-08T07:25:26Z",
    "updated_at": "2017-06-15T05:14:12Z",
    "scheduled_tweet_id": "870358555227860992",
    "tweet_id": null,
    "deleted": true
  },
  "request": {
    "params": {
      "scheduled_promoted_tweet_id": "1xtfl",
      "account_id": "18ce54d4x5t"
    }
  }
}