Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube & Partners line items cannot be created or updated using the API. This method regularly experiences high latency. We recommend increasing your default timeout to avoid errors.
Scopes
You will need authorization for the https://www.googleapis.com/auth/display-video scope to make a valid call.
If unset, the scope for this method defaults to https://www.googleapis.com/auth/display-video.
You can set the scope for this method like this: displayvideo1 --scope <scope> advertisers line-items-patch ...
Required Scalar Arguments
- <advertiser-id> (string)
- Output only. The unique ID of the advertiser the line item belongs to.
- <line-item-id> (string)
- Output only. The unique ID of the line item. Assigned by the system.
Required Request Value
The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.
For example, a structure like this:
LineItem:
advertiser-id: string
bid-strategy:
fixed-bid:
bid-amount-micros: string
maximize-spend-auto-bid:
custom-bidding-algorithm-id: string
max-average-cpm-bid-amount-micros: string
performance-goal-type: string
raise-bid-for-deals: boolean
performance-goal-auto-bid:
custom-bidding-algorithm-id: string
max-average-cpm-bid-amount-micros: string
performance-goal-amount-micros: string
performance-goal-type: string
budget:
budget-allocation-type: string
budget-unit: string
max-amount: string
campaign-id: string
conversion-counting:
post-view-count-percentage-millis: int64
creative-ids: [string]
display-name: string
entity-status: string
exclude-new-exchanges: boolean
flight:
date-range:
end-date:
day: integer
month: integer
year: integer
start-date:
day: integer
month: integer
year: integer
flight-date-type: string
trigger-id: string
frequency-cap:
max-impressions: integer
time-unit: string
time-unit-count: integer
unlimited: boolean
insertion-order-id: string
integration-details:
details: string
integration-code: string
inventory-source-ids: [string]
line-item-id: string
line-item-type: string
mobile-app:
app-id: string
display-name: string
platform: string
publisher: string
name: string
pacing:
daily-max-impressions: string
daily-max-micros: string
pacing-period: string
pacing-type: string
partner-revenue-model:
markup-amount: string
markup-type: string
reservation-type: string
targeting-expansion:
exclude-first-party-audience: boolean
targeting-expansion-level: string
update-time: string
warning-messages: [string]
can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.
-r . advertiser-id=sadipscing
- Output only. The unique ID of the advertiser the line item belongs to.
-
bid-strategy.fixed-bid bid-amount-micros=dolor
- The fixed bid amount, in micros of the advertiser's currency. For insertion order entity, bid_amount_micros should be set as 0. For line item entity, bid_amount_micros must be greater than or equal to billable unit of the given currency and smaller than or equal to the upper limit 1000000000. For example, 1500000 represents 1.5 standard units of the currency.
-
..maximize-spend-auto-bid custom-bidding-algorithm-id=dolor
- The ID of the Custom Bidding Algorithm used by this strategy. Only applicable when performance_goal_type is set to
BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO
.
- The ID of the Custom Bidding Algorithm used by this strategy. Only applicable when performance_goal_type is set to
max-average-cpm-bid-amount-micros=consetetur
- The maximum average CPM that may be bid, in micros of the advertiser's currency. Must be greater than or equal to a billable unit of the given currency. For example, 1500000 represents 1.5 standard units of the currency.
performance-goal-type=et
- Required. The type of the performance goal that the bidding strategy tries to minimize while spending the full budget.
BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM
is not supported for this strategy.
- Required. The type of the performance goal that the bidding strategy tries to minimize while spending the full budget.
-
raise-bid-for-deals=true
- Whether the strategy takes deal floor prices into account.
-
..performance-goal-auto-bid custom-bidding-algorithm-id=lorem
- The ID of the Custom Bidding Algorithm used by this strategy. Only applicable when performance_goal_type is set to
BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO
.
- The ID of the Custom Bidding Algorithm used by this strategy. Only applicable when performance_goal_type is set to
max-average-cpm-bid-amount-micros=nonumy
- The maximum average CPM that may be bid, in micros of the advertiser's currency. Must be greater than or equal to a billable unit of the given currency. Not applicable when performance_goal_type is set to
BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM
. For example, 1500000 represents 1.5 standard units of the currency.
- The maximum average CPM that may be bid, in micros of the advertiser's currency. Must be greater than or equal to a billable unit of the given currency. Not applicable when performance_goal_type is set to
performance-goal-amount-micros=diam
- Required. The performance goal the bidding strategy will attempt to meet or beat, in micros of the advertiser's currency or in micro of the ROAS (Return On Advertising Spend) value which is also based on advertiser's currency. Must be greater than or equal to a billable unit of the given currency and smaller or equal to upper bounds. Each performance_goal_type has its upper bound: * when performance_goal_type is
BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA
, upper bound is 10000.00 USD. * when performance_goal_type isBIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC
, upper bound is 1000.00 USD. * when performance_goal_type isBIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM
, upper bound is 1000.00 USD. * when performance_goal_type isBIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO
, upper bound is 1000.00 and lower bound is 0.01. Example: If set toBIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM
, the bid price will be based on the probability that each available impression will be viewable. For example, if viewable CPM target is $2 and an impression is 40% likely to be viewable, the bid price will be $0.80 CPM (40% of $2). For example, 1500000 represents 1.5 standard units of the currency or ROAS value.
- Required. The performance goal the bidding strategy will attempt to meet or beat, in micros of the advertiser's currency or in micro of the ROAS (Return On Advertising Spend) value which is also based on advertiser's currency. Must be greater than or equal to a billable unit of the given currency and smaller or equal to upper bounds. Each performance_goal_type has its upper bound: * when performance_goal_type is
-
performance-goal-type=ipsum
- Required. The type of the performance goal that the bidding strategy will try to meet or beat. For line item level usage, the value must be one of: *
BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA
*BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC
*BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM
*BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO
.
- Required. The type of the performance goal that the bidding strategy will try to meet or beat. For line item level usage, the value must be one of: *
-
...budget budget-allocation-type=invidunt
- Required. The type of the budget allocation.
LINE_ITEM_BUDGET_ALLOCATION_TYPE_AUTOMATIC
is only applicable when automatic budget allocation is enabled for the parent insertion order.
- Required. The type of the budget allocation.
budget-unit=stet
- Output only. The budget unit specifies whether the budget is currency based or impression based. This value is inherited from the parent insertion order.
-
max-amount=voluptua.
- The maximum budget amount the line item will spend. Must be greater than 0. When budget_allocation_type is: *
LINE_ITEM_BUDGET_ALLOCATION_TYPE_AUTOMATIC
, this field is immutable and is set by the system. *LINE_ITEM_BUDGET_ALLOCATION_TYPE_FIXED
, if budget_unit is: -BUDGET_UNIT_CURRENCY
, this field represents maximum budget amount to spend, in micros of the advertiser's currency. For example, 1500000 represents 1.5 standard units of the currency. -BUDGET_UNIT_IMPRESSIONS
, this field represents the maximum number of impressions to serve. *LINE_ITEM_BUDGET_ALLOCATION_TYPE_UNLIMITED
, this field is not applicable and will be ignored by the system.
- The maximum budget amount the line item will spend. Must be greater than 0. When budget_allocation_type is: *
-
.. campaign-id=at
- Output only. The unique ID of the campaign that the line item belongs to.
-
conversion-counting post-view-count-percentage-millis=-92
- The percentage of post-view conversions to count, in millis (1/1000 of a percent). Must be between 0 and 100000 inclusive. For example, to track 50% of the post-click conversions, set a value of 50000.
-
.. creative-ids=amet
- The IDs of the creatives associated with the line item.
- Each invocation of this argument appends the given value to the array.
display-name=at
- Required. The display name of the line item. Must be UTF-8 encoded with a maximum size of 240 bytes.
entity-status=eirmod
- Required. Controls whether or not the line item can spend its budget and bid on inventory. * For CreateLineItem method, only
ENTITY_STATUS_DRAFT
is allowed. To activate a line item, use UpdateLineItem method and update the status toENTITY_STATUS_ACTIVE
after creation. * A line item cannot be changed back toENTITY_STATUS_DRAFT
status from any other status. * If the line item's parent insertion order is not active, the line item can't spend its budget even if its own status isENTITY_STATUS_ACTIVE
.
- Required. Controls whether or not the line item can spend its budget and bid on inventory. * For CreateLineItem method, only
exclude-new-exchanges=false
- Whether to exclude new exchanges from automatically being targeted by the line item. This field is false by default.
flight.date-range.end-date day=53
- Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
month=28
- Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
-
year=77
- Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
-
..start-date day=10
- Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
month=28
- Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
-
year=64
- Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
-
... flight-date-type=voluptua.
- Required. The type of the line item's flight dates.
-
trigger-id=consetetur
- The ID of the manual trigger associated with the line item. * Required when flight_date_type is
LINE_ITEM_FLIGHT_DATE_TYPE_TRIGGER
. Must not be set otherwise. * When set, the line item's flight dates are inherited from its parent insertion order. * Active line items will spend when the selected trigger is activated within the parent insertion order's flight dates. Warning: Line Items using manual triggers no longer serve in Display & Video 360. This field will sunset on August 1, 2023. Read our feature deprecation announcement for more information.
- The ID of the manual trigger associated with the line item. * Required when flight_date_type is
-
..frequency-cap max-impressions=2
- The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is
false
and max_views is not set.
- The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is
time-unit=amet
- The time unit in which the frequency cap will be applied. Required when unlimited is
false
.
- The time unit in which the frequency cap will be applied. Required when unlimited is
time-unit-count=66
- The number of time_unit the frequency cap will last. Required when unlimited is
false
. The following restrictions apply based on the value of time_unit: *TIME_UNIT_LIFETIME
- this field is output only and will default to 1 *TIME_UNIT_MONTHS
- must be between 1 and 2 *TIME_UNIT_WEEKS
- must be between 1 and 4 *TIME_UNIT_DAYS
- must be between 1 and 6 *TIME_UNIT_HOURS
- must be between 1 and 23 *TIME_UNIT_MINUTES
- must be between 1 and 59
- The number of time_unit the frequency cap will last. Required when unlimited is
-
unlimited=true
- Whether unlimited frequency capping is applied. When this field is set to
true
, the remaining frequency cap fields are not applicable.
- Whether unlimited frequency capping is applied. When this field is set to
-
.. insertion-order-id=invidunt
- Required. Immutable. The unique ID of the insertion order that the line item belongs to.
integration-details details=sea
- Additional details of the entry in string format. Must be UTF-8 encoded with a length of no more than 1000 characters.
-
integration-code=duo
- An external identifier to be associated with the entry. The integration code will show up together with the entry in many places in the system, for example, reporting. Must be UTF-8 encoded with a length of no more than 500 characters.
-
.. inventory-source-ids=sea
- The IDs of the private inventory sources assigned to the line item.
- Each invocation of this argument appends the given value to the array.
line-item-id=stet
- Output only. The unique ID of the line item. Assigned by the system.
line-item-type=sadipscing
- Required. Immutable. The type of the line item.
mobile-app app-id=no
- Required. The ID of the app provided by the platform store. Android apps are identified by the bundle ID used by Android's Play store, such as
com.google.android.gm
. iOS apps are identified by a nine-digit app ID used by Apple's App store, such as422689480
.
- Required. The ID of the app provided by the platform store. Android apps are identified by the bundle ID used by Android's Play store, such as
display-name=tempor
- Output only. The app name.
platform=ipsum
- Output only. The app platform.
-
publisher=sea
- Output only. The app publisher.
-
.. name=sit
- Output only. The resource name of the line item.
pacing daily-max-impressions=amet.
- Maximum number of impressions to serve every day. Applicable when the budget is impression based. Must be greater than 0.
daily-max-micros=ipsum
- Maximum currency amount to spend every day in micros of advertiser's currency. Applicable when the budget is currency based. Must be greater than 0. For example, for 1.5 standard unit of the currency, set this field to 1500000. The value assigned will be rounded to whole billable units for the relevant currency by the following rules: any positive value less than a single billable unit will be rounded up to one billable unit and any value larger than a single billable unit will be rounded down to the nearest billable value. For example, if the currency's billable unit is 0.01, and this field is set to 10257770, it will round down to 10250000, a value of 10.25. If set to 505, it will round up to 10000, a value of 0.01.
pacing-period=at
- Required. The time period in which the pacing budget will be spent. When automatic budget allocation is enabled at the insertion order via automationType, this field is output only and defaults to
PACING_PERIOD_FLIGHT
.
- Required. The time period in which the pacing budget will be spent. When automatic budget allocation is enabled at the insertion order via automationType, this field is output only and defaults to
-
pacing-type=vero
- Required. The type of pacing that defines how the budget amount will be spent across the pacing_period.
-
..partner-revenue-model markup-amount=takimata
- Required. The markup amount of the partner revenue model. Must be greater than or equal to 0. * When the markup_type is set to be
PARTNER_REVENUE_MODEL_MARKUP_TYPE_CPM
, this field represents the CPM markup in micros of advertiser's currency. For example, 1500000 represents 1.5 standard units of the currency. * When the markup_type is set to bePARTNER_REVENUE_MODEL_MARKUP_TYPE_MEDIA_COST_MARKUP
, this field represents the media cost percent markup in millis. For example, 100 represents 0.1% (decimal 0.001). * When the markup_type is set to bePARTNER_REVENUE_MODEL_MARKUP_TYPE_TOTAL_MEDIA_COST_MARKUP
, this field represents the total media cost percent markup in millis. For example, 100 represents 0.1% (decimal 0.001).
- Required. The markup amount of the partner revenue model. Must be greater than or equal to 0. * When the markup_type is set to be
-
markup-type=gubergren
- Required. The markup type of the partner revenue model.
-
.. reservation-type=et
- Output only. The reservation type of the line item.
targeting-expansion exclude-first-party-audience=false
- Whether to exclude first-party audiences from use in targeting expansion. This field was deprecated with the launch of optimized targeting. This field will be set to
false
. If this field is set totrue
when deprecated, all positive first-party audience targeting assigned to this line item will be replaced with negative targeting of the same first-party audiences to ensure the continued exclusion of those audiences.
- Whether to exclude first-party audiences from use in targeting expansion. This field was deprecated with the launch of optimized targeting. This field will be set to
-
targeting-expansion-level=magna
- Required. Whether optimized targeting is turned on. This field supports the following values: *
NO_EXPANSION
: optimized targeting is turned off *LEAST_EXPANSION
: optimized targeting is turned on If this field is set to any other value, it will automatically be set toLEAST_EXPANSION
.NO_EXPANSION
will be the default value for the field and will be automatically assigned if you do not set the field.
- Required. Whether optimized targeting is turned on. This field supports the following values: *
-
.. update-time=sit
- Output only. The timestamp when the line item was last updated. Assigned by the system.
warning-messages=gubergren
- Output only. The warning messages generated by the line item. These warnings do not block saving the line item, but some may block the line item from running.
- Each invocation of this argument appends the given value to the array.
About Cursors
The cursor position is key to comfortably set complex nested structures. The following rules apply:
- The cursor position is always set relative to the current one, unless the field name starts with the
.
character. Fields can be nested such as in-r f.s.o
. - The cursor position is set relative to the top-level structure if it starts with
.
, e.g.-r .s.s
- You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify
-r struct.sub_struct=bar
. - You can move the cursor one level up by using
..
. Each additional.
moves it up one additional level. E.g....
would go three levels up.
Optional Output Flags
The method's return value a JSON encoded structure, which will be written to standard output by default.
- -o out
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
-
to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
Optional Method Properties
You may set the following properties to further configure the call. Please note that -p
is followed by one
or more key-value-pairs, and is called like this -p k1=v1 k2=v2
even though the listing below repeats the
-p
for completeness.
- -p update-mask=string
- Required. The mask to control which fields to update.
Optional General Properties
The following properties can configure any call, and are not specific to this method.
-
-p $-xgafv=string
- V1 error format.
-
-p access-token=string
- OAuth access token.
-
-p alt=string
- Data format for response.
-
-p callback=string
- JSONP
-
-p fields=string
- Selector specifying which fields to include in a partial response.
-
-p key=string
- API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
-
-p oauth-token=string
- OAuth 2.0 token for the current user.
-
-p pretty-print=boolean
- Returns response with indentations and line breaks.
-
-p quota-user=string
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
-
-p upload-type=string
- Legacy upload protocol for media (e.g. "media", "multipart").
-
-p upload-protocol=string
- Upload protocol for media (e.g. "raw", "multipart").