Starting September 8, 2025, every new line item will need to declare whether or not they will serve Eurpoean Union (EU) political ads. Display & Video 360 API and SDF uploads that don't provide declarations will fail. See our deprecations page for more details on how to update your integration to make this declaration.
Creates a new line item with settings (including targeting) inherited from the insertion order and an ENTITY_STATUS_DRAFTentityStatus. Returns the newly created line item if successful. There are default values based on the three fields:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eDisplay & Video 360 API v1 is sunset and this documentation details the process to generate a new line item with inherited settings from the insertion order.\u003c/p\u003e\n"],["\u003cp\u003eThe new line item is created with an \u003ccode\u003eENTITY_STATUS_DRAFT\u003c/code\u003e status and default values based on insertion order type, automation type, and the given line item type.\u003c/p\u003e\n"],["\u003cp\u003eA successful request returns the newly created line item and requires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/display-video\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include the insertion order ID, display name, line item type, and optionally, details about a promoted mobile app.\u003c/p\u003e\n"]]],["This content outlines how to generate a default line item via the Display & Video API. It utilizes a `POST` request to `https://displayvideo.googleapis.com/v1/advertisers/{advertiserId}/lineItems:generateDefault`, requiring an `advertiserId`. The request body needs `insertionOrderId`, `displayName`, and `lineItemType`; `mobileApp` is needed if the `lineItemType` is for mobile app installs. This will generate the line item inherited from the insertion order and return a new line item with `ENTITY_STATUS_DRAFT` if successful. The operation needs the `https://www.googleapis.com/auth/display-video` authorization scope.\n"],null,["| Display \\& Video 360 API v1 has been sunset.\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- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a new line item with settings (including targeting) inherited from the insertion order and an `ENTITY_STATUS_DRAFT` [entityStatus](/display-video/api/reference/rest/v1/advertisers.lineItems#LineItem.FIELDS.entity_status). Returns the newly created line item if successful. There are default values based on the three fields:\n\n- The insertion order's [insertionOrderType](/display-video/api/reference/rest/v1/advertisers.insertionOrders#InsertionOrder.FIELDS.insertion_order_type)\n- The insertion order's [automationType](/display-video/api/reference/rest/v1/advertisers.insertionOrders#InsertionOrderBudget.FIELDS.automation_type)\n- The given [lineItemType](/display-video/api/reference/rest/v1/advertisers.lineItems/generateDefault#body.request_body.FIELDS.line_item_type)\n\nHTTP request\n\n`POST https://displayvideo.googleapis.com/v1/advertisers/{advertiserId}/lineItems:generateDefault`\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\nRequest body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"insertionOrderId\": string, \"displayName\": string, \"lineItemType\": enum (/display-video/api/reference/rest/v1/advertisers.lineItems#LineItemType), \"mobileApp\": { object (/display-video/api/reference/rest/v1/advertisers.lineItems#MobileApp) } } ``` |\n\n| Fields ||\n|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `insertionOrderId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The unique ID of the insertion order that the line item belongs to. |\n| `displayName` | `string` Required. The display name of the line item. Must be UTF-8 encoded with a maximum size of 240 bytes. |\n| `lineItemType` | `enum (`[LineItemType](/display-video/api/reference/rest/v1/advertisers.lineItems#LineItemType)`)` Required. The type of the line item. |\n| `mobileApp` | `object (`[MobileApp](/display-video/api/reference/rest/v1/advertisers.lineItems#MobileApp)`)` The mobile app promoted by the line item. This is applicable only when [lineItemType](/display-video/api/reference/rest/v1/advertisers.lineItems/generateDefault#body.request_body.FIELDS.line_item_type) is either `LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL` or `LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL`. |\n\nResponse body\n\nIf successful, the response body contains an instance of [LineItem](/display-video/api/reference/rest/v1/advertisers.lineItems#LineItem).\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](https://developers.google.com/identity/protocols/OAuth2)."]]