自
2025 年 9 月 8 日起,每個新委刊項都必須聲明是否會放送歐盟政治廣告。如果透過 Display & Video 360 API 和 SDF 上傳的檔案未提供聲明,系統就會失敗。如要進一步瞭解如何更新整合服務以進行這項聲明,請參閱
淘汰項目頁面。
Method: advertisers.lineItems.bulkUpdate
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
更新多個委刊項。
更新相同委刊項時,無法同時發出下列要求:
您無法使用 API 建立或更新 YouTube 與合作夥伴委刊項。
HTTP 要求
POST https://displayvideo.googleapis.com/v3/advertisers/{advertiserId}/lineItems:bulkUpdate
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
advertiserId |
string (int64 format)
必要欄位。這個委刊項所屬廣告主的 ID。
|
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"lineItemIds": [
string
],
"targetLineItem": {
object (LineItem )
},
"updateMask": string
} |
欄位 |
lineItemIds[] |
string (int64 format)
必要欄位。要更新的委刊項 ID。
|
targetLineItem |
object (LineItem )
必要欄位。委刊項物件,內含要更新的欄位,以及要指派給 lineItemIds 中所有委刊項的新值。
|
updateMask |
string (FieldMask format)
必要欄位。欄位遮罩,用於識別要更新的欄位。 目前僅支援下列欄位:
這是以半形逗號分隔的完整欄位名稱清單。範例:"user.displayName,photo" 。
|
回應主體
LineItemService.BulkUpdateLineItems 的回應訊息。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"updatedLineItemIds": [
string
],
"failedLineItemIds": [
string
],
"skippedLineItemIds": [
string
],
"errors": [
{
object (Status )
}
]
} |
欄位 |
updatedLineItemIds[] |
string (int64 format)
成功更新的委刊項 ID。
|
failedLineItemIds[] |
string (int64 format)
無法更新的委刊項 ID。
|
skippedLineItemIds[] |
string (int64 format)
系統略過更新的委刊項 ID。舉例來說,如果變更委刊項後沒有實際效果,系統就會略過不必要的變動,並在此追蹤對應的委刊項 ID。
|
errors[] |
object (Status )
無法更新的委刊項傳回的錯誤。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/display-video
詳情請參閱OAuth 2.0 Overview。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-21 (世界標準時間)。
[null,null,["上次更新時間:2025-08-21 (世界標準時間)。"],[[["\u003cp\u003eBulk updates multiple existing line items with specified values using a \u003ccode\u003ePOST\u003c/code\u003e request.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing a list of line item IDs, the target line item object for updates, and an update mask.\u003c/p\u003e\n"],["\u003cp\u003eThe response indicates successfully updated, failed, and skipped line items, along with any errors encountered.\u003c/p\u003e\n"],["\u003cp\u003eYouTube & Partners line items cannot be updated using this endpoint.\u003c/p\u003e\n"],["\u003cp\u003eConcurrent requests updating the same line item as other specific operations are not allowed.\u003c/p\u003e\n"]]],["This content describes how to update multiple line items via a bulk update operation. This is done through a `POST` HTTP request to a specific endpoint using a required `advertiserId`. The request body must include `lineItemIds` for the items to be updated, a `targetLineItem` object containing the new values, and an `updateMask` specifying which fields to modify. Concurrent updates with specific targeting options or patching requests are restricted. The response indicates which line items were successfully updated, failed, or skipped, and includes any encountered errors. YouTube & Partners line items can't be created or updated using this API.\n"],null,["# Method: advertisers.lineItems.bulkUpdate\n\n| Display \\& Video 360 API is deprecated and will sunset on **October 7, 2025** . Migrate to [Display \\& Video 360 API v4](/display-video/api/reference/rest/v4) before sunset to avoid an interruption in service.\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BulkUpdateLineItemsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates multiple line items.\n\nRequests to this endpoint cannot be made concurrently with the following requests updating the same line item:\n\n- [lineItems.bulkEditAssignedTargetingOptions](/display-video/api/reference/rest/v3/advertisers.lineItems/bulkEditAssignedTargetingOptions#google.ads.displayvideo.v3.LineItemAssignedTargetingOptionsService.BulkEditAssignedTargetingOptions)\n- [lineItems.patch](/display-video/api/reference/rest/v3/advertisers.lineItems/patch#google.ads.displayvideo.v3.LineItemService.UpdateLineItem)\n- [assignedTargetingOptions.create](/display-video/api/reference/rest/v3/advertisers.lineItems.targetingTypes.assignedTargetingOptions/create#google.ads.displayvideo.v3.LineItemAssignedTargetingOptionsService.CreateLineItemAssignedTargetingOption)\n- [assignedTargetingOptions.delete](/display-video/api/reference/rest/v3/advertisers.lineItems.targetingTypes.assignedTargetingOptions/delete#google.ads.displayvideo.v3.LineItemAssignedTargetingOptionsService.DeleteLineItemAssignedTargetingOption)\n\nYouTube \\& Partners line items cannot be created or updated using the API.\n\n### HTTP request\n\n`POST https://displayvideo.googleapis.com/v3/advertisers/{advertiserId}/lineItems:bulkUpdate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| `advertiserId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the advertiser this line item belongs to. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"lineItemIds\": [ string ], \"targetLineItem\": { object (/display-video/api/reference/rest/v3/advertisers.lineItems#LineItem) }, \"updateMask\": string } ``` |\n\n| Fields ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `lineItemIds[]` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. IDs of line items to update. |\n| `targetLineItem` | `object (`[LineItem](/display-video/api/reference/rest/v3/advertisers.lineItems#LineItem)`)` Required. A line item object containing the fields to be updated and the new values to assign to all line items specified in [lineItemIds](/display-video/api/reference/rest/v3/advertisers.lineItems/bulkUpdate#body.request_body.FIELDS.line_item_ids).\" |\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. A field mask identifying which fields to update. Only the following fields are currently supported: - [entityStatus](/display-video/api/reference/rest/v3/advertisers.lineItems#LineItem.FIELDS.entity_status) - [containsEuPoliticalAds](/display-video/api/reference/rest/v3/advertisers.lineItems#LineItem.FIELDS.contains_eu_political_ads) This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Response body\n\nResponse message for LineItemService.BulkUpdateLineItems.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"updatedLineItemIds\": [ string ], \"failedLineItemIds\": [ string ], \"skippedLineItemIds\": [ string ], \"errors\": [ { object (/display-video/api/reference/rest/v3/sdfdownloadtasks.operations#Operation.Status) } ] } ``` |\n\n| Fields ||\n|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updatedLineItemIds[]` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The IDs of successfully updated line items. |\n| `failedLineItemIds[]` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The IDs of line items that failed to update. |\n| `skippedLineItemIds[]` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The IDs of line items that are skipped for updates. For example, unnecessary mutates that will result in effectively no changes to line items will be skipped and corresponding line item IDs can be tracked here. |\n| `errors[]` | `object (`[Status](/display-video/api/reference/rest/v3/sdfdownloadtasks.operations#Operation.Status)`)` Errors returned by line items that failed to update. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/display-video`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]