- Resource: LineItem
- LineItemDeliveryForecastSource
- CustomPacingCurve
- CustomPacingGoalUnit
- CustomPacingGoal
- LineItemDiscount
- DiscountType
- LineItemStats
- LineItemReservationStatus
- ExclusionScope
- LineItemDealInfo
- ChildContentEligibility
- CreativeTargeting
- Methods
Resource: LineItem
A LineItem contains information about how specific ad creatives are intended to serve to your website or app along with pricing and other delivery details.
| JSON representation |
|---|
{ "name": string, "frequencyCaps": [ { object ( |
| Fields | |
|---|---|
name |
Identifier. The resource name of the |
frequencyCaps[] |
Optional. The set of frequency capping units for this LineItem. |
creativePlaceholders[] |
Required. Details about the creatives that are expected to serve through this LineItem. |
appliedLabels[] |
Optional. The set of labels applied directly to this line item. |
effectiveAppliedLabels[] |
Output only. Contains the set of labels inherited from the order that contains this line item and the advertiser that owns the order. If a label has been negated, only the negated label is returned. |
customFieldValues[] |
Optional. The values of the custom fields associated with this line item. |
secondaryGoals[] |
Optional. The secondary goals that this LineItem is associated with. This is required and meaningful only if the |
viewabilityProviderCompanies[] |
Optional. Optional IDs of the Company that provide ad verification for this line item. |
creativeTargetings[] |
Optional. A list of CreativeTargeting objects that can be used to specify creative level targeting for this line item. Creative level targeting is specified in a |
allowedFormats[] |
Optional. The set of allowed formats for this line item. If empty, all formats are allowed. This property only applies to programmatic video line items. |
order |
Required. Immutable. The ID of the Order to which the LineItem belongs. Format: |
displayName |
Required. The name of the line item. This attribute has a maximum length of 255 characters. |
externalLineItemId |
Optional. An identifier for the LineItem that is meaningful to the publisher. This attribute has a maximum length of 255 characters. |
orderDisplayName |
Output only. The name of the Order. |
startTime |
Required. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
targetEndTime |
Optional. The target end time of the line item. This attribute is required unless Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
Output only. The timestamp when the LineItem will stop serving. This attribute includes auto extension days. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
autoExtensionDays |
Optional. The number of days to allow a line item to deliver past its |
endTimeUnlimited |
Optional. Non-empty default. Specifies whether or not the LineItem has an end time. This attribute defaults to false. It can be be set to true for only line items of type SPONSORSHIP, NETWORK, PRICE_PRIORITY and HOUSE. |
creativeRotationType |
Required. The strategy used for displaying multiple Creative objects that are associated with the LineItem. |
deliveryRateType |
Optional. Non-empty default. The strategy for delivering ads over the course of the line item's duration. This attribute defaults to EVENLY or FRONTLOADED depending on the network's configuration. |
deliveryForecastSource |
Optional. Non-empty default. Strategy for choosing forecasted traffic shapes to pace line items. This field defaults to HISTORICAL. |
customPacingCurve |
Optional. The curve that is used to pace the line item's delivery. This field is required if and only if the delivery forecast source is CUSTOM_PACING_CURVE. |
roadblockingType |
Optional. Non-empty default. The strategy for serving roadblocked creatives, that is, instances where multiple creatives must be served together on a single web page. This attribute defaults to ONE_OR_MORE. |
skippableAdType |
Optional. Non-empty default. The nature of the line item's creatives' skippability. This attribute is only applicable for video line items, and defaults to NOT_SKIPPABLE. |
lineItemType |
Required. Indicates the line item type of a LineItem. The line item type determines the default priority of the line item. More information can be found at https://support.google.com/admanager/answer/177279. |
priority |
Optional. Non-empty default. The priority for the line item. Valid values range from 1 to 16. This field defaults to the default priority of the LineItemType. The following list shows the default, minimum, and maximum priority values are for each line item type: - LineItemType: default priority (minimum priority, maximum priority) - SPONSORSHIP: 4 (2, 5) - STANDARD: 8 (6, 10) - NETWORK: 12 (11, 14) - BULK: 12 (11, 14) - PRICE_PRIORITY: 12 (11, 14) - HOUSE: 16 (15, 16) - CLICK_TRACKING: 16 (1, 16) - AD_EXCHANGE: 12 (1, 16) - ADSENSE: 12 (1, 16) - BUMPER: 16 (15, 16) - ADMOB: 21 (1, 16) - PREFERRED_DEAL: 12 (12, 12) This field can only be edited by certain networks, otherwise a PermissionError will occur. |
rate |
Required. The amount of money to spend per impression or click. |
valueCpm |
Optional. Non-empty default. An amount to help the adserver rank inventory. |
costType |
Required. The method used for billing this LineItem. |
discount |
Optional. Discount information for the line item. |
contractedUnitsBought |
Optional. This attribute is only applicable for certain line item types and acts as an "FYI" or note, which does not impact adserving or other backend systems. For SPONSORSHIP line items, this represents the minimum quantity, which is a lifetime impression volume goal for reporting purposes only. For STANDARD line items, this represent the contracted quantity, which is the number of units specified in the contract the advertiser has bought for this LineItem. This field is just a "FYI" for traffickers to manually intervene with the LineItem when needed. This attribute is only available for STANDARD line items if you have this feature enabled on your network. |
environmentType |
Optional. Non-empty default. The environment that the LineItem is targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, then this line item can only target AdUnits that have AdUnitSizes whose environmentType is also VIDEO_PLAYER. |
companionDeliveryOption |
Optional. The delivery option for companions. Setting this field is only meaningful if the following conditions are met: - The "Guaranteed roadblocks" feature is enabled on your network. - One of the following is true (both cannot be true, these are mutually exclusive). - The environmentType is VIDEO_PLAYER. - The roadblockingType is CREATIVE_SET. This field defaults to OPTIONAL if the conditions are met. In all other cases it defaults to UNKNOWN and is not meaningful. |
allowOverbook |
Input only. The flag indicates whether overbooking should be allowed when creating or updating reservations of line item types SPONSORSHIP and STANDARD. When true, operations on this line item will never trigger a ForecastError, which corresponds to an overbook warning in the UI. The default value is false. Note: this field won't persist on the line item itself, and the value will only affect the current request. |
skipInventoryCheck |
Input only. The flag indicates whether the inventory check should be skipped when creating or updating a line item. The default value is false. Note: this field won't persist on the line item itself, and the value will only affect the current request. |
skipCrossSellingRuleWarningChecks |
Input only. True to skip checks for warnings from rules applied to line items targeting inventory shared by a distributor partner for cross selling when performing an action on this line item. The default is false. Note: this field won't persist on the line item itself, and the value will only affect the current request. |
reserveOnCreation |
Input only. The flag indicates whether inventory should be reserved when creating a line item of types SPONSORSHIP and STANDARD in an unapproved Order. The default value is false. |
stats |
Output only. Contains trafficking statistics for the line item. This will be empty in case there are no statistics for a line item yet. |
deliveryIndicator |
Output only. Indicates how well the line item has been performing. This will be empty if the delivery indicator information is not available due to one of the following reasons: - The line item is not delivering. - The line item has an unlimited goal or cap. - The line item has a percentage based goal or cap. |
budget |
Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly. |
status |
Output only. The status of the LineItem. |
reservationStatus |
Output only. Describes whether or not inventory has been reserved for the LineItem. |
archived |
Output only. The archival status of the LineItem. |
webPropertyCode |
Optional. The web property code used for dynamic allocation line items. This web property is only required with line item types AD_EXCHANGE and ADSENSE. |
sameAdvertiserExceptionEnabled |
Optional. If a line item has a series of competitive exclusions on it, it could be blocked from serving with line items from the same advertiser. Setting this to true will allow line items from the same advertiser to serve regardless of the other competitive exclusion labels being applied. |
updateSource |
Output only. The application that last modified this line item. |
notes |
Optional. Provides any additional notes that may annotate the LineItem. This attribute has a maximum length of 65,535 characters. |
competitiveConstraintScope |
Optional. Non-empty default. The CompetitiveConstraintScope for the competitive exclusion labels assigned to this line item. This field defaults to POD. |
updateTime |
Output only. The time this line item was last modified. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
createTime |
Output only. The time this line item was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
missingCreatives |
Output only. Indicates if a LineItem is missing any Creative creatives for the creativePlaceholders specified. Creative Creatives can be considered missing for several reasons including: - Not enough Creative creatives of a certain size have been uploaded, as determined by |
thirdPartyMeasurementSettings |
Optional. Third party auto-pixeling settings for cross-sell Partners. |
youtubeKidsRestricted |
Optional. Designates this line item as intended for YT Kids app. If true, all creatives associated with this line item must be reviewed and approved. See the help center article for more information: https://support.google.com/yt-partner-sales/answer/10015534. |
maxVideoCreativeDuration |
Optional. The max duration of a video creative associated with this LineItem. This attribute is only meaningful for video line items. This attribute is required for video line items and must be greater than 0. A duration in seconds with up to nine fractional digits, ending with ' |
goal |
Optional. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting. |
grpSettings |
Optional. Contains the information for a line item which has a target GRP demographic. |
dealInfo |
Optional. The deal information associated with this line item, if it is programmatic. |
childContentEligibility |
Optional. Non-empty default. Child content eligibility designation for this line item. This field defaults to DISALLOWED. |
customVastExtension |
Optional. Custom XML to be rendered in a custom VAST response at serving time. |
sponsorshipExclusivityEnabled |
Optional. Whether the line item is enabled for sponsorship exclusivity. If true, only exclusive sponsorships can be served on inventory targeted by this LineItem. This control should only be available for 100% video sponsorships. |
repeatedCreativeServingEnabled |
Optional. Indicates whether repeated creative serving is enabled for this line item. |
targeting |
Required. Contains the targeting criteria for the ad campaign. |
allocationDeliveryProfile |
Optional. The allocation delivery profile for the line item. |
LineItemDeliveryForecastSource
Strategies for choosing forecasted traffic shapes to pace line items.
| Enums | |
|---|---|
LINE_ITEM_DELIVERY_FORECAST_SOURCE_UNSPECIFIED |
Default value. This value is unused. |
CUSTOM_PACING_CURVE |
A user specified custom pacing curve will be used to pace line item delivery. |
FORECASTING |
The line item's projected future traffic will be used to pace line item delivery. |
HISTORICAL |
The line item's historical traffic shape will be used to pace line item delivery. |
CustomPacingCurve
A curve consisting of CustomPacingGoal objects that is used to pace line item delivery.
| JSON representation |
|---|
{ "customPacingGoals": [ { object ( |
| Fields | |
|---|---|
customPacingGoals[] |
Required. The list of goals that make up the custom pacing curve. |
customPacingGoalUnit |
Required. The unit of the |
CustomPacingGoalUnit
Options for the unit of the custom pacing goal amounts.
| Enums | |
|---|---|
CUSTOM_PACING_GOAL_UNIT_UNSPECIFIED |
Default value. This value is unused. |
ABSOLUTE |
The custom pacing goal amounts represent absolute numbers corresponding to the line item's Goal.unitType. |
MILLI_PERCENT |
The custom pacing goal amounts represent a millipercent. For example, 15000 millipercent equals 15%. |
CustomPacingGoal
An interval of a CustomPacingCurve. A custom pacing goal contains a start time and an amount. The goal will apply until either the next custom pacing goal's getStartTime or the line item's end time if it is the last goal.
| JSON representation |
|---|
{ "startTime": string, "useLineItemStartTime": boolean, "amount": string } |
| Fields | |
|---|---|
startTime |
Optional. The start date and time of the goal. This field is required unless Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
useLineItemStartTime |
Optional. Input only. Whether the |
amount |
Optional. The amount associated with the goal. This field is required. |
LineItemDiscount
Discount information for a LineItem.
| JSON representation |
|---|
{
"discountType": enum ( |
| Fields | |
|---|---|
discountType |
Optional. The type of discount being applied to a |
discount |
Optional. The number here is either a percentage or an absolute value depending on the |
DiscountType
Describes the possible discount types on the cost of booking a line item.
| Enums | |
|---|---|
DISCOUNT_TYPE_UNSPECIFIED |
No value specified |
ABSOLUTE_VALUE |
An absolute value will be discounted from the line item's cost. |
PERCENTAGE |
A percentage of the cost will be discounted for booking the line item. |
LineItemStats
Contains trafficking statistics for LineItem.
| JSON representation |
|---|
{ "deliveryData": [ string ], "impressionsDelivered": string, "clicksDelivered": string, "videoCompletionsDelivered": string, "videoStartsDelivered": string, "viewableImpressionsDelivered": string } |
| Fields | |
|---|---|
deliveryData[] |
Output only. Clicks or impressions delivered for each of the last 7 days. Values are in chronological order (oldest to newest). |
impressionsDelivered |
Output only. The number of impressions delivered. |
clicksDelivered |
Output only. The number of clicks delivered |
videoCompletionsDelivered |
Output only. The number of video completions delivered. |
videoStartsDelivered |
Output only. The number of video starts delivered. |
viewableImpressionsDelivered |
Output only. The number of viewable impressions delivered. |
LineItemReservationStatus
Defines the different reservation statuses of a line item.
| Enums | |
|---|---|
LINE_ITEM_RESERVATION_STATUS_UNSPECIFIED |
No value specified |
RESERVED |
Indicates that inventory has been reserved for the line item. |
UNRESERVED |
Indicates that inventory has not been reserved for the line item. |
ExclusionScope
The scope to which the exclusion label applies.
| Enums | |
|---|---|
EXCLUSION_SCOPE_UNSPECIFIED |
No value specified. |
PAGE |
The exclusion label applies to the entire page. |
STREAM |
The exclusion label applies to the entire stream of content. |
POD |
The exclusion label applies to the entire pod (or group). |
LineItemDealInfo
Data transfer object for the exchange deal info of a line item.
| JSON representation |
|---|
{ "externalDealId": string } |
| Fields | |
|---|---|
externalDealId |
Optional. The external deal ID shared between seller and buyer. This field is only present if the deal has been finalized. |
ChildContentEligibility
Child content eligibility designation.
| Enums | |
|---|---|
CHILD_CONTENT_ELIGIBILITY_UNSPECIFIED |
Default value. This value is unused. |
ALLOWED |
This line item is eligible to serve on requests that are child-directed. |
DISALLOWED |
This line item is not eligible to serve on any requests that are child-directed. |
CreativeTargeting
Represents the creative targeting criteria for a LineItem.
| JSON representation |
|---|
{
"creativeTargetingDisplayName": string,
"targeting": {
object ( |
| Fields | |
|---|---|
creativeTargetingDisplayName |
Required. The name of this creative targeting. This attribute is required. |
targeting |
Required. The Targeting criteria of this creative targeting. This attribute is required. |
Methods |
|
|---|---|
|
Batch activates LineItem objects. |
|
Batch archives LineItem objects. |
|
Creates LineItem objects. |
|
Batch deletes LineItem objects. |
|
Batch pauses LineItem objects. |
|
Batch releases LineItem objects. |
|
Batch reserves LineItem objects. |
|
Batch reserves and overbooks LineItem objects. |
|
Batch resumes LineItem objects. |
|
Batch resumes and overbooks LineItem objects. |
|
Batch unarchives LineItem objects. |
|
Batch updates LineItem objects. |
|
Creates a LineItem object. |
|
Retrieves a LineItem object. |
|
Lists LineItem objects. |
|
Updates a LineItem object. |