- [HTTP request](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#body.request_body)
  - [JSON representation](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#body.response_body)
  - [JSON representation](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#body.RunDeliveryForecastResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#body.aspect)
- [ExistingLineItemList](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ExistingLineItemList)
  - [JSON representation](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ExistingLineItemList.SCHEMA_REPRESENTATION)
- [ForecastingLineItemList](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ForecastingLineItemList)
  - [JSON representation](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ForecastingLineItemList.SCHEMA_REPRESENTATION)
- [DeliveryForecastOptions](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#DeliveryForecastOptions)
  - [JSON representation](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#DeliveryForecastOptions.SCHEMA_REPRESENTATION)
- [DeliveryForecastResult](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#DeliveryForecastResult)
  - [JSON representation](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#DeliveryForecastResult.SCHEMA_REPRESENTATION)
- [LineItemDeliveryForecast](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#LineItemDeliveryForecast)
  - [JSON representation](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#LineItemDeliveryForecast.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#try-it)

Runs a delivery simulation forecast for existing or prospective line items. A delivery forecast reports the number of units that will be delivered to each line item given the line item goals. The simulation considers contentions from other line items, including the other prospective line items in the request.

### HTTP request

`POST https://admanager.googleapis.com/v1/{parent}:runDeliveryForecast`

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Format: `networks/{networkCode}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "deliveryForecastOptions": { object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#DeliveryForecastOptions`) }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "existingLineItems": { object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ExistingLineItemList`) }, "forecastingLineItems": { object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ForecastingLineItemList`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `deliveryForecastOptions` | ``object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#DeliveryForecastOptions`)`` Required. The delivery forecast options. |
| The line items to be forecasted. Only one of the following fields can be set. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `existingLineItems` | ``object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ExistingLineItemList`)`` Optional. The resource names of the `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#LineItem` to be forecasted. |
| `forecastingLineItems` | ``object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ForecastingLineItemList`)`` Optional. The `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/ForecastingLineItem` to be forecasted. |
| End of mutually exclusive fields. ||

### Response body

Response object for `networks.runDeliveryForecast` method.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "deliveryForecastResult": { object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#DeliveryForecastResult`) } } ``` |

| Fields ||
|---|---|
| `deliveryForecastResult` | ``object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#DeliveryForecastResult`)`` The delivery forecast result. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/admanager`
- `https://www.googleapis.com/auth/admanager.readonly
  `

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## ExistingLineItemList

`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ExistingLineItemList` is a wrapper around a repeated field of string representing a `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#LineItem` resource name.

| JSON representation |
|---|
| ``` { "lineItems": [ string ] } ``` |

| Fields ||
|---|---|
| `lineItems[]` | `string` Required. The list of `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#LineItem` resource names to be forecasted. Format: `networks/{networkCode}/lineItems/{lineItemId}` |

## ForecastingLineItemList

`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#ForecastingLineItemList` is a wrapper around a repeated field of `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/ForecastingLineItem` objects.

| JSON representation |
|---|
| ``` { "forecastingLineItems": [ { object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/ForecastingLineItem`) } ] } ``` |

| Fields ||
|---|---|
| `forecastingLineItems[]` | ``object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/ForecastingLineItem`)`` Required. The list of `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/ForecastingLineItem` objects. |

## DeliveryForecastOptions

Forecasting options for line item delivery forecasts.

| JSON representation |
|---|
| ``` { "ignoredLineItems": [ string ] } ``` |

| Fields ||
|---|---|
| `ignoredLineItems[]` | `string` Optional. The resource names of line items to be ignored while performing the delivery simulation. Format: `networks/{networkCode}/lineItems/{lineItemId}` |

## DeliveryForecastResult

The forecast of delivery for a list of \[ProposalLineItem\]\[\] or `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#LineItem` objects to be reserved at the same time.

| JSON representation |
|---|
| ``` { "lineItemDeliveryForecasts": [ { object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#LineItemDeliveryForecast`) } ] } ``` |

| Fields ||
|---|---|
| `lineItemDeliveryForecasts[]` | ``object (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks/runDeliveryForecast#LineItemDeliveryForecast`)`` The delivery forecasts of the forecasted line items. |

## LineItemDeliveryForecast

The forecasted delivery of a \[ProposalLineItem\]\[\] or `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#LineItem`.

| JSON representation |
|---|
| ``` { "lineItem": string, "order": string, "unitType": enum (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#UnitType`), "predictedDeliveryUnits": string, "deliveredUnits": string, "matchedUnits": string } ``` |

| Fields ||
|---|---|
| `lineItem` | `string` Uniquely identifies this line item delivery forecast. This value is read-only and will be either the resource name of the `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#LineItem` resource it represents, or unset if the forecast represents a prospective line item. Format: `networks/{networkCode}/lineItems/{lineItemId}` |
| `order` | `string` The resource name of the `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.orders#Order` object that this line item belongs to, or null if the forecast represents a prospective line item without an `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#LineItem.FIELDS.order` set. Format: `networks/{networkCode}/orders/{orderId}` |
| `unitType` | ``enum (`https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#UnitType`)`` The unit with which the goal or cap of the LineItem is defined. Will be the same value as `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#Goal.FIELDS.unit_type` for both a set line item or a prospective one. |
| `predictedDeliveryUnits` | `string (https://developers.google.com/discovery/v1/type-format format)` The number of units, defined by `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#Goal.FIELDS.unit_type`, that will be delivered by the line item. Delivery of existing line items that are of same or lower priorities may be impacted. |
| `deliveredUnits` | `string (https://developers.google.com/discovery/v1/type-format format)` The number of units, defined by `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#Goal.FIELDS.unit_type`, that have already been served if the reservation is already running. |
| `matchedUnits` | `string (https://developers.google.com/discovery/v1/type-format format)` The number of units, defined by `https://developers.google.com/ad-manager/api/beta/reference/rest/v1/networks.lineItems#Goal.FIELDS.unit_type`, that match the specified LineItem#targeting and delivery settings. |