line_items
Manage individual line items in Google Ad Manager with CRUD operations, targeting updates, duplication, verification, and creation of programmatic types like Ad Exchange, Open Bidding, and Preferred Deals.
Instructions
Non-lifecycle Line Item operations — get, list, update, duplicate, verify, and create programmatic types.
MODE: mixed (read + write) AUTH: OAuth 2.0 required CREDITS: Reads = 0. Writes = 0.5 credits. OUTPUT: Returns LineItem objects with id, name, type, startDateTime, endDateTime, costType, unitsBought, targeting, and deliveryIndicator. WHEN TO USE: Use line_items for individual line item CRUD and programmatic line item creation. Use campaign for full campaign orchestration. Use line_item_lifecycle for status transitions (activate/pause/archive). NOT the same as line_item_lifecycle: line_items handles data updates; line_item_lifecycle handles status transitions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Sub-operation to perform: • get: Get a single line item by ID. Read-only. • list_by_order: List all line items under an order. Read-only. Requires order_id. • update: Update a line item's name, targeting, dates, or budget. Write. • update_targeting: Update only the targeting of a line item. Write. More efficient than full update for targeting-only changes. • duplicate: Duplicate a line item to create a copy. Write. • verify: Verify that a line item configuration is valid before activation. Read-only. • approve: Approve a line item for delivery. Write. • archive: Archive a line item. Destructive write. • create_batch: Create multiple standard line items under an order. Write. • activate_batch: Activate multiple line items in one call. Write. • pause_batch: Pause multiple line items in one call. Write. • create_adexchange: Create an Ad Exchange line item. Write. Requires adExchangeEnvironment and targeting. • create_open_bidding: Create an Open Bidding line item. Write. Requires yieldGroupIds. • create_preferred_deal: Create a Preferred Deal line item. Write. Requires fixedCpm and buyerId. • list_private_deals: List Private Marketplace deals associated with line items. Read-only. | |
| network_code | No | GAM network code (e.g. 12345678). Required for all network-scoped operations. Obtain via select_gam_network or list_accessible_networks. | |
| line_item_id | No | GAM Line Item ID (required for single-entity operations). | |
| order_id | No | GAM Order ID (required for list_by_order and create_batch). |