Method: advertisers.lineItems.generateDefault
创建一个新的订单项,其中包含从广告订单和 ENTITY_STATUS_DRAFT
entityStatus
继承的设置(包括定位)。如果成功,则返回新创建的订单项。以下是基于这三个字段的默认值:
您无法使用 API 创建或更新 YouTube 及合作伙伴订单项。
HTTP 请求
POST https://displayvideo.googleapis.com/v3/advertisers/{advertiserId}/lineItems:generateDefault
网址采用 gRPC 转码语法。
路径参数
参数 |
advertiserId |
string (int64 format)
必需。此订单项所属广告客户的 ID。
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"insertionOrderId": string,
"displayName": string,
"lineItemType": enum (LineItemType ),
"mobileApp": {
object (MobileApp )
}
} |
字段 |
insertionOrderId |
string (int64 format)
必需。订单项所属的广告订单的唯一 ID。
|
displayName |
string
必需。订单项的显示名称。 必须采用 UTF-8 编码,大小不得超过 240 字节。
|
lineItemType |
enum (LineItemType )
必需。订单项的类型。
|
mobileApp |
object (MobileApp )
订单项宣传的移动应用。 仅当 lineItemType 为 LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL 或 LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL 时,此方法才适用。
|
响应正文
如果成功,则响应正文包含一个 LineItem
实例。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/display-video
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-25。
[null,null,["最后更新时间 (UTC):2025-02-25。"],[[["Creates a new line item with settings inherited from the insertion order and an `ENTITY_STATUS_DRAFT` entity status."],["YouTube & Partners line items cannot be created or updated using the API."],["The request requires specifying the advertiser ID, insertion order ID, display name, and line item type."],["A successful response returns the created line item."],["Requires authorization with the `https://www.googleapis.com/auth/display-video` scope."]]],["This outlines how to create a new line item by sending a POST request to `https://displayvideo.googleapis.com/v3/advertisers/{advertiserId}/lineItems:generateDefault`. The request body requires the `insertionOrderId`, `displayName`, and `lineItemType`. The advertiser ID is specified in the path. Optionally `mobileApp` object can be included. Default settings are derived from the insertion order's type and automation type and specified `lineItemType`. The response returns the newly created line item, with `ENTITY_STATUS_DRAFT`, upon success.\n"]]