> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Line Item

> Creates a DV360 line item under an insertion order with type, flight, budget, pacing, frequency cap, bid strategy, and partner revenue model

Creates a DV360 line item under an insertion order with type, flight, budget, pacing, frequency cap, bid strategy, and partner revenue model. Budget and spend amounts are entered in the advertiser's currency; the raw bid\_strategy and partner\_revenue\_model objects use raw micros as in the DV360 API. YouTube & Partners line items cannot be created via the API. Created as a draft; activate with dv360\_update\_line\_item\_status.

|                       |                          |
| --------------------- | ------------------------ |
| **App**               | DV360                    |
| **Operation ID**      | `dv360_create_line_item` |
| **Type**              | Action                   |
| **Connection**        | `dv360` (required)       |
| **Credits per run**   | 2                        |
| **Agent / MCP tool**  | Yes                      |
| **Requires approval** | Yes (write operation)    |

## Inputs

| Field                           | Type                                                    | Required | Default                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------- | ------------------------------------------------------- | -------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`                       | DynamicAccount                                          | Yes      | -                                                                 | Select the DV360 advertiser that owns the insertion order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `insertion_order_id`            | string or SelectItem                                    | Yes      | -                                                                 | ID of the DV360 insertion order the line item belongs to.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `line_item_name`                | string                                                  | Yes      | -                                                                 | Display name of the line item. Max 240 bytes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `line_item_type`                | string or SelectableOption                              | Yes      | -                                                                 | Line item type: DISPLAY\_DEFAULT, DISPLAY\_MOBILE\_APP\_INSTALL, VIDEO\_DEFAULT, VIDEO\_MOBILE\_APP\_INSTALL, AUDIO\_DEFAULT, VIDEO\_OVER\_THE\_TOP, or DEMAND\_GEN. YouTube & Partners and out-of-home types cannot be created via the DV360 API.                                                                                                                                                                                                                                                                                                        |
| `flight_date_type`              | string or SelectableOption                              | No       | `{'value': 'INHERITED', 'label': 'Inherit from insertion order'}` | INHERITED (default) uses the parent insertion order's flight dates; CUSTOM uses start\_date and end\_date.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `start_date`                    | string                                                  | No       | -                                                                 | Flight start date as YYYY-MM-DD. Required when flight\_date\_type is CUSTOM.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `end_date`                      | string                                                  | No       | -                                                                 | Flight end date as YYYY-MM-DD. Required when flight\_date\_type is CUSTOM.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `budget_allocation_type`        | string or SelectableOption                              | No       | `{'value': 'FIXED', 'label': 'Fixed'}`                            | FIXED (default) uses max\_budget\_amount; AUTOMATIC requires automatic budget allocation on the parent insertion order; UNLIMITED has no budget limit. Demand Gen line items must use FIXED.                                                                                                                                                                                                                                                                                                                                                              |
| `max_budget_amount`             | number                                                  | No       | -                                                                 | Maximum budget in the advertiser's currency; converted to DV360 micros automatically. Required when budget\_allocation\_type is FIXED.                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `pacing_period`                 | string or SelectableOption                              | No       | `{'value': 'DAILY', 'label': 'Daily'}`                            | Budget spending window: DAILY (default) or FLIGHT.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `pacing_type`                   | string or SelectableOption                              | No       | `{'value': 'EVEN', 'label': 'Even'}`                              | Spending speed: EVEN (default), AHEAD (flight pacing only), or ASAP (with daily pacing, requires daily\_max\_spend).                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `daily_max_spend`               | number                                                  | No       | -                                                                 | Daily maximum spend in the advertiser's currency; converted to micros automatically. With daily pacing, provide this or daily\_max\_impressions, not both.                                                                                                                                                                                                                                                                                                                                                                                                |
| `daily_max_impressions`         | integer                                                 | No       | -                                                                 | Daily maximum impressions. With daily pacing, provide this or daily\_max\_spend, not both.                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `bid_strategy`                  | object or string                                        | Yes      | -                                                                 | Official DV360 BidStrategy object as JSON, sent as-is with raw micros. Exactly one of: fixedBid, maximizeSpendAutoBid, or performanceGoalAutoBid. Examples: \{"fixedBid": \{"bidAmountMicros": "1500000"}} for a fixed \$1.50 bid; \{"maximizeSpendAutoBid": \{"performanceGoalType": "BIDDING\_STRATEGY\_PERFORMANCE\_GOAL\_TYPE\_CPC"}}; \{"performanceGoalAutoBid": \{"performanceGoalType": "BIDDING\_STRATEGY\_PERFORMANCE\_GOAL\_TYPE\_CPA", "performanceGoalAmountMicros": "10000000"}}.                                                           |
| `partner_revenue_model`         | object or string                                        | Yes      | -                                                                 | Official DV360 PartnerRevenueModel object as JSON, sent as-is. Keys: markupType (PARTNER\_REVENUE\_MODEL\_MARKUP\_TYPE\_CPM or PARTNER\_REVENUE\_MODEL\_MARKUP\_TYPE\_TOTAL\_MEDIA\_COST\_MARKUP) and markupAmount (raw units: micros of the advertiser currency for CPM, for example 1500000 = 1.5; millis of percent for markup types, for example 100 = 0.1%). Demand Gen line items must use TOTAL\_MEDIA\_COST\_MARKUP. For no markup use \{"markupType": "PARTNER\_REVENUE\_MODEL\_MARKUP\_TYPE\_TOTAL\_MEDIA\_COST\_MARKUP", "markupAmount": "0"}. |
| `conversion_counting`           | object or string                                        | No       | -                                                                 | Optional official DV360 ConversionCountingConfig object as JSON, sent as-is (postViewCountPercentageMillis and floodlightActivityConfigs with raw millis values).                                                                                                                                                                                                                                                                                                                                                                                         |
| `mobile_app_id`                 | string                                                  | No       | -                                                                 | App platform ID (for example com.example.app for Android or 422689480 for iOS). Required for DISPLAY\_MOBILE\_APP\_INSTALL and VIDEO\_MOBILE\_APP\_INSTALL line items; sent as mobileApp.appId.                                                                                                                                                                                                                                                                                                                                                           |
| `creative_ids`                  | array of string (also accepts a comma-separated string) | No       | -                                                                 | Optional DV360 creative IDs to assign, as a list or comma-separated text.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `unlimited_frequency_cap`       | boolean                                                 | No       | `True`                                                            | When true (default), no line-item frequency cap. Set false to cap impressions per user with the frequency\_cap\_\* fields.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `frequency_cap_max_impressions` | integer                                                 | No       | -                                                                 | Maximum impressions per user for the chosen time window. Required when unlimited\_frequency\_cap is false.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `frequency_cap_time_unit`       | string or SelectableOption                              | No       | -                                                                 | Frequency cap window unit: LIFETIME, MONTHS, WEEKS, DAYS, HOURS, or MINUTES. Required when unlimited\_frequency\_cap is false.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `frequency_cap_time_unit_count` | integer                                                 | No       | -                                                                 | How many time units the window lasts. Required when unlimited\_frequency\_cap is false, except for LIFETIME.                                                                                                                                                                                                                                                                                                                                                                                                                                              |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `Dict`

Returns the created DV360 line item details.

**Fields**: `line_item_id`, `line_item_name`, `entity_status`, `insertion_order_id`, `advertiser_id`, `line_item`
