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-02-25 (世界標準時間)。
[null,null,["上次更新時間:2025-02-25 (世界標準時間)。"],[[["Bulk updates multiple existing line items with specified values using a `POST` request."],["Requires providing a list of line item IDs, the target line item object for updates, and an update mask."],["The response indicates successfully updated, failed, and skipped line items, along with any errors encountered."],["YouTube & Partners line items cannot be updated using this endpoint."],["Concurrent requests updating the same line item as other specific operations are not allowed."]]],["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"]]