בכל פריט חדש להזמנת שטחי פרסום צריך להצהיר אם הוא יציג מודעות פוליטיות באיחוד האירופי. העלאות של קובצי SDF ושל Display & Video 360 API שלא כוללות הצהרות ייכשלו. לפרטים נוספים אפשר לעיין ב
דף ההוצאות משימוש.
Method: advertisers.lineItems.duplicate
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
משכפל פריט. אם הפעולה בוצעה ללא שגיאות, הפונקציה מחזירה את המזהה של פריט ההזמנה שנוצר.
אי אפשר ליצור או לעדכן פריטים מקמפיינים של YouTube והשותפים באמצעות ה-API.
בשיטה הזו יש בדרך כלל זמן אחזור ארוך. כדי להימנע משגיאות, מומלץ להגדיל את זמן הקצוב לתפוגה שמוגדר כברירת מחדל.
בקשת HTTP
POST https://displayvideo.googleapis.com/v4/advertisers/{advertiserId}/lineItems/{lineItemId}:duplicate
כתובת ה-URL כתובה בתחביר של gRPC Transcoding.
פרמטרים של נתיב
פרמטרים |
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 אם לא צוין ערך אחר. אחרי כן אפשר לעדכן את השדה הזה באמצעות ממשק המשתמש, API או קובצי נתונים מובנים. צריך להקצות את השדה הזה כשיוצרים פריט חדש. אחרת, הבקשה לadvertisers.lineItems.create תיכשל.
|
גוף התשובה
אם הפעולה מצליחה, גוף התגובה מכיל נתונים במבנה הבא:
ייצוג ב-JSON |
{
"duplicateLineItemId": string
} |
שדות |
duplicateLineItemId |
string (int64 format)
המזהה של פריט הקו שנוצר.
|
היקפי הרשאה
נדרש היקף ההרשאות הבא של OAuth:
https://www.googleapis.com/auth/display-video
ניתן למצוא מידע נוסף כאן: OAuth 2.0 Overview.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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)."]]