Creates a new line item. Returns the newly created line item if successful. YouTube & Partners line items cannot be created or updated using the API.

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-create ...

Required Scalar Argument

  • <advertiser-id> (string)
    • Output only. The unique ID of the advertiser the line item belongs to.

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=clita
    • Output only. The unique ID of the advertiser the line item belongs to.
  • bid-strategy.fixed-bid bid-amount-micros=vero

    • 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=invidunt

    • 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.
  • 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. For example, 1500000 represents 1.5 standard units of the currency.
  • performance-goal-type=erat
    • 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.
  • raise-bid-for-deals=true

    • Whether the strategy takes deal floor prices into account.
  • ..performance-goal-auto-bid custom-bidding-algorithm-id=voluptua.

    • 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.
  • max-average-cpm-bid-amount-micros=eos
    • 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.
  • performance-goal-amount-micros=duo
    • 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 is BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC, upper bound is 1000.00 USD. * when performance_goal_type is BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM, upper bound is 1000.00 USD. * when performance_goal_type is BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO, upper bound is 1000.00 and lower bound is 0.01. Example: If set to BIDDING_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.
  • performance-goal-type=elitr

    • 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.
  • ...budget budget-allocation-type=consetetur

    • 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.
  • budget-unit=et
    • 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=clita

    • 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.
  • .. campaign-id=sit

    • Output only. The unique ID of the campaign that the line item belongs to.
  • conversion-counting post-view-count-percentage-millis=-59

    • 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=erat

    • The IDs of the creatives associated with the line item.
    • Each invocation of this argument appends the given value to the array.
  • display-name=diam
    • Required. The display name of the line item. Must be UTF-8 encoded with a maximum size of 240 bytes.
  • entity-status=nonumy
    • 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 to ENTITY_STATUS_ACTIVE after creation. * A line item cannot be changed back to ENTITY_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 is ENTITY_STATUS_ACTIVE.
  • 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=9
    • 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=9
    • Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
  • year=8

    • Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  • ..start-date day=83

    • 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=84
    • Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
  • year=17

    • Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  • ... flight-date-type=ipsum

    • Required. The type of the line item's flight dates.
  • trigger-id=ea

    • 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.
  • ..frequency-cap max-impressions=74

    • 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.
  • time-unit=sit
    • The time unit in which the frequency cap will be applied. Required when unlimited is false.
  • time-unit-count=3
    • 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
  • unlimited=false

    • Whether unlimited frequency capping is applied. When this field is set to true, the remaining frequency cap fields are not applicable.
  • .. insertion-order-id=stet

    • Required. Immutable. The unique ID of the insertion order that the line item belongs to.
  • integration-details details=duo
    • Additional details of the entry in string format. Must be UTF-8 encoded with a length of no more than 1000 characters.
  • integration-code=elitr

    • 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=aliquyam

    • 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=erat
    • Output only. The unique ID of the line item. Assigned by the system.
  • line-item-type=ut
    • Required. Immutable. The type of the line item.
  • mobile-app app-id=et
    • 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 as 422689480.
  • display-name=lorem
    • Output only. The app name.
  • platform=rebum.
    • Output only. The app platform.
  • publisher=et

    • Output only. The app publisher.
  • .. name=sed

    • Output only. The resource name of the line item.
  • pacing daily-max-impressions=stet
    • Maximum number of impressions to serve every day. Applicable when the budget is impression based. Must be greater than 0.
  • daily-max-micros=aliquyam
    • 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=kasd
    • 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.
  • pacing-type=lorem

    • Required. The type of pacing that defines how the budget amount will be spent across the pacing_period.
  • ..partner-revenue-model markup-amount=sit

    • 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 be PARTNER_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 be PARTNER_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).
  • markup-type=kasd

    • Required. The markup type of the partner revenue model.
  • .. reservation-type=tempor

    • Output only. The reservation type of the line item.
  • targeting-expansion exclude-first-party-audience=true
    • 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 to true 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.
  • targeting-expansion-level=amet

    • 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 to LEAST_EXPANSION. NO_EXPANSION will be the default value for the field and will be automatically assigned if you do not set the field.
  • .. update-time=sit

    • Output only. The timestamp when the line item was last updated. Assigned by the system.
  • warning-messages=rebum.
    • 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.

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").