以 CSV 格式上傳委刊項。YouTube 和系統不支援夥伴委刊項。 立即試用。
要求
HTTP 要求
POST https://www.googleapis.com/doubleclickbidmanager/v1.1/lineitems/uploadlineitems
授權
此要求需要具有下列範圍的授權:
| 範圍 |
|---|
https://www.googleapis.com/auth/doubleclickbidmanager |
詳情請參閱「驗證與授權」網頁。
要求主體
在要求主體中,提供具有以下結構的資料:
{
"lineItems": string,
"format": string,
"dryRun": boolean
}| 屬性名稱 | 值 | 說明 | 附註 |
|---|---|---|---|
lineItems |
string |
以 CSV 格式上傳的委刊項。如要進一步瞭解檔案格式,請參閱實體寫入檔案格式相關說明。 | |
format |
string |
委刊項目前的格式。預設值為 CSV。
可接受的值為:
|
|
dryRun |
boolean |
設為「true」即可在不實際保留委刊項的情況下取得上傳狀態。 |
回應
如果成功的話,這個方法會傳回回應內文,其結構如下:
{
"uploadStatus": {
"errors": [
string
],
"rowStatus": [
{
"rowNumber": integer,
"entityId": long,
"entityName": string,
"changed": boolean,
"persisted": boolean,
"errors": [
string
]
}
]
}
}| 屬性名稱 | 值 | 說明 | 附註 |
|---|---|---|---|
uploadStatus |
nested object |
上傳狀態。 | |
uploadStatus.errors[] |
list |
無法完成上傳的原因。 | |
uploadStatus.rowStatus[] |
list |
每列的上傳狀態。 | |
uploadStatus.rowStatus[].rowNumber |
integer |
資料列編號。 | |
uploadStatus.rowStatus[].entityId |
long |
實體 ID。 | |
uploadStatus.rowStatus[].entityName |
string |
實體名稱。 | |
uploadStatus.rowStatus[].changed |
boolean |
儲存的實體是否在上傳後變更。 | |
uploadStatus.rowStatus[].persisted |
boolean |
實體是否仍為保留狀態。 | |
uploadStatus.rowStatus[].errors[] |
list |
無法上傳實體的原因。 |
試試看!
使用下方的 APIs Explorer,針對即時資料呼叫這個方法,看看會有什麼結果。 您也可以改用 獨立式 Explorer。