รายการโฆษณาใหม่ทุกรายการต้องประกาศว่าจะแสดงโฆษณาทางการเมืองในสหภาพยุโรปหรือไม่ การอัปโหลด API ของ Display & Video 360 และ SDF ที่ไม่ได้ระบุการประกาศจะล้มเหลว ดูรายละเอียดเพิ่มเติมได้ที่
หน้าการเลิกใช้งาน
Method: advertisers.lineItems.duplicate
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ทำซ้ำรายการโฆษณา แสดงผลรหัสของรายการโฆษณาที่สร้างขึ้นหากสำเร็จ
สร้างหรืออัปเดตรายการโฆษณา YouTube และพาร์ทเนอร์โดยใช้ API ไม่ได้
วิธีนี้มักมีเวลาในการตอบสนองสูง เราขอแนะนำให้เพิ่มระยะหมดเวลาเริ่มต้นเพื่อหลีกเลี่ยงข้อผิดพลาด
คำขอ HTTP
POST https://displayvideo.googleapis.com/v4/advertisers/{advertiserId}/lineItems/{lineItemId}:duplicate
URL ใช้ไวยากรณ์การแปลงรหัส gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
advertiserId |
string (int64 format)
ต้องระบุ รหัสของผู้ลงโฆษณาที่รายการโฆษณานี้เป็นของ
|
lineItemId |
string (int64 format)
ต้องระบุ รหัสของสินค้าในรายการสั่งซื้อที่จะทำซ้ำ
|
เนื้อความของคำขอ
เนื้อหาของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
targetDisplayName |
string
ชื่อที่แสดงของรายการโฆษณาใหม่ ต้องเข้ารหัส UTF-8 โดยมีขนาดสูงสุด 240 ไบต์
|
containsEuPoliticalAds |
enum (EuPoliticalAdvertisingStatus )
รายการโฆษณานี้จะแสดงโฆษณาทางการเมืองในสหภาพยุโรปหรือไม่ หากตั้งค่า containsEuPoliticalAds เป็น DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING ในผู้ลงโฆษณาหลัก ระบบจะกำหนดค่า DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING ให้ช่องนี้หากไม่ได้ระบุไว้เป็นอย่างอื่น จากนั้นจะอัปเดตฟิลด์นี้ได้โดยใช้ UI, API หรือไฟล์ Structured Data ต้องกำหนดฟิลด์นี้เมื่อสร้างรายการโฆษณาใหม่ ไม่เช่นนั้น คำขอ advertisers.lineItems.create จะไม่สำเร็จ
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"duplicateLineItemId": string
} |
ช่อง |
duplicateLineItemId |
string (int64 format)
รหัสของรายการโฆษณาที่สร้างขึ้น
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/display-video
ดูข้อมูลเพิ่มเติมได้ที่OAuth 2.0 Overview
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-09-09 UTC
[null,null,["อัปเดตล่าสุด 2025-09-09 UTC"],[],["The Display & Video 360 API v4 (beta) allows line item duplication via a POST request to `https://displayvideo.googleapis.com/v4/advertisers/{advertiserId}/lineItems/{lineItemId}:duplicate`. It requires `advertiserId` and `lineItemId` path parameters. The request body must include a `targetDisplayName` for the new item. The successful response provides a `duplicateLineItemId`. YouTube & Partners line items cannot be managed and high latency is common. The authorization scope needed is `https://www.googleapis.com/auth/display-video`.\n"],null,["- [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.DuplicateLineItemResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDuplicates a line item. Returns the ID of the created line item if successful.\n\nYouTube \\& Partners line items cannot be created or updated using the API.\n\n**This method regularly experiences high latency.** We recommend [increasing your default timeout](/display-video/api/guides/best-practices/timeouts#client_library_timeout) to avoid errors.\n\nHTTP request\n\n`POST https://displayvideo.googleapis.com/v4/advertisers/{advertiserId}/lineItems/{lineItemId}:duplicate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath 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| `lineItemId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The ID of the line item to duplicate. |\n\nRequest body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"targetDisplayName\": string, \"containsEuPoliticalAds\": enum (/display-video/api/reference/rest/v4/EuPoliticalAdvertisingStatus) } ``` |\n\n| Fields ||\n|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `targetDisplayName` | `string` The display name of the new line item. Must be UTF-8 encoded with a maximum size of 240 bytes. |\n| `containsEuPoliticalAds` | `enum (`[EuPoliticalAdvertisingStatus](/display-video/api/reference/rest/v4/EuPoliticalAdvertisingStatus)`)` Whether this line item will serve European Union political ads. If [containsEuPoliticalAds](/display-video/api/reference/rest/v4/advertisers#Advertiser.FIELDS.contains_eu_political_ads) has been set to `DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING` in the parent advertiser, then this field will be assigned `DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING` if not otherwise specified. This field can then be updated using the UI, API, or Structured Data Files. This field must be assigned when creating a new line item. Otherwise, **the `advertisers.lineItems.create` request will fail**. |\n\nResponse body If successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------|\n| ``` { \"duplicateLineItemId\": string } ``` |\n\n| Fields ||\n|-----------------------|----------------------------------------------------------------------------------------------------------------------|\n| `duplicateLineItemId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The ID of the created line item. |\n\nAuthorization 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)."]]