Note: Version v201811 will be sunset soon. All users of those versions must migrate to a newer one.

ForecastService (v201902)

Provides methods for estimating traffic (clicks/impressions) for line items. Forecasts can be provided for LineItem objects that exist in the system or which have not had an ID set yet.

Test network behavior

Test networks are unable to provide forecasts that would be comparable to the production environment because forecasts require traffic history. For test networks, a consistent behavior can be expected for forecast requests, according to the following rules:

Inputs
(LineItem Fields)
Outputs
(Forecast Fields)
lineItemType unitsBought availableUnits forecastUnits (matchedUnits) deliveredUnits Exception
Sponsorship 13 –– –– –– NO_FORECAST_YET
Sponsorship 20 –– –– –– SERVER_NOT_AVAILABLE
Sponsorship 50 1,200,000 6,000,000 600,000
For prospective: 0
––
Sponsorship != 20 and
!= 50
1,200,000 1,200,000 600,000
For prospective: 0
––
Not Sponsorship <= 500,000 3 * unitsBought / 2 unitsBought * 6 600,000
For prospective: 0
––
Not Sponsorship > 500,000 and <= 1,000,000 unitsBought / 2 unitsBought * 6 600,000
For prospective: 0
––
Not Sponsorship > 1,000,000 and <= 1,500,000 unitsBought / 2 3 * unitsBought / 2 600,000
For prospective: 0
––
Not Sponsorship > 1,500,000 unitsBought / 4 3 * unitsBought / 2 600,000
For prospective: 0
––

Production WSDL
https://ads.google.com/apis/ads/publisher/v201902/ForecastService?wsdl
Namespace
https://www.google.com/apis/ads/publisher/v201902
Operations
Errors

getAvailabilityForecast

Gets the availability forecast for a ProspectiveLineItem. An availability forecast reports the maximum number of available units that the line item can book, and the total number of units matching the line item's targeting.

Parameters

Field Type Description
lineItem ProspectiveLineItem the prospective line item (new or existing) to be forecasted for availability
forecastOptions AvailabilityForecastOptions options controlling the forecast

Response

Field Type Description
rval AvailabilityForecast

getAvailabilityForecastById

Gets an AvailabilityForecast for an existing LineItem object. An availability forecast reports the maximum number of available units that the line item can be booked with, and also the total number of units matching the line item's targeting.

Only line items having type LineItemType.SPONSORSHIP or LineItemType.STANDARD are valid. Other types will result in ReservationDetailsError.Reason.LINE_ITEM_TYPE_NOT_ALLOWED.

Parameters

Field Type Description
lineItemId xsd:long the ID of a LineItem to run the forecast on.
forecastOptions AvailabilityForecastOptions options controlling the forecast

Response

Field Type Description
rval AvailabilityForecast

getDeliveryForecast

Gets the delivery forecast for a list of ProspectiveLineItem objects in a single delivery simulation with line items potentially contending with each other. A delivery forecast reports the number of units that will be delivered to each line item given the line item goals and contentions from other line items.

Parameters

Field Type Description
lineItems ProspectiveLineItem[] line items to be forecasted for delivery
forecastOptions DeliveryForecastOptions options controlling the forecast

Response

Field Type Description
rval DeliveryForecast

getDeliveryForecastByIds

Gets the delivery forecast for a list of existing LineItem objects in a single delivery simulation. A delivery forecast reports the number of units that will be delivered to each line item given the line item goals and contentions from other line items.

Parameters

Field Type Description
lineItemIds xsd:long[] the IDs of line items to be forecasted for delivery
forecastOptions DeliveryForecastOptions options controlling the forecast

Response

Field Type Description
rval DeliveryForecast

Errors

Error Reasons
AdRuleSlotError Errors related to ad rule slots.
Enumerations
DIFFERENT_STATUS_THAN_AD_RULE
Has a different status than the ad rule to which it belongs.
INVALID_VIDEO_AD_DURATION_RANGE
Min video ad duration is greater than max video ad duration.
INVALID_VIDEO_MIDROLL_FREQUENCY_TYPE
Video mid-roll frequency type other than NONE for pre-roll or post-roll.
MALFORMED_VIDEO_MIDROLL_FREQUENCY_CSV
Invalid format for video mid-roll frequency when expecting a CSV list of numbers. Valid formats are the following:
  • empty
  • comma-separated list of numbers (time milliseconds or cue points)
  • a single number (every n milliseconds or cue points, or one specific time / cue point)
MALFORMED_VIDEO_MIDROLL_FREQUENCY_SINGLE_NUMBER
Invalid format for video mid-roll frequency when expecting a single number only, e.g., every n seconds or every n cue points.
INVALID_OVERLAY_AD_DURATION_RANGE
Min overlay ad duration is greater than max overlay ad duration.
INVALID_OVERLAY_MIDROLL_FREQUENCY_TYPE
Overlay mid-roll frequency type other than NONE for pre-roll or post-roll.
MALFORMED_OVERLAY_MIDROLL_FREQUENCY_CSV
Invalid format for overlay mid-roll frequency for list of numbers. See valid formats above.
MALFORMED_OVERLAY_MIDROLL_FREQUENCY_SINGLE_NUMBER
Invalid format for overlay mid-roll frequency for a single number.
INVALID_BUMPER_MAX_DURATION
Non-positive bumper duration when expecting a positive number.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
AdUnitCodeError Lists the generic errors associated with AdUnit.adUnitCode.
Enumerations
INVALID_CHARACTERS
For AdUnit.adUnitCode, only alpha-numeric characters, underscores, hyphens, periods, asterisks, double quotes, back slashes, forward slashes, exclamations, left angle brackets, colons and parentheses are allowed.
INVALID_CHARACTERS_WHEN_UTF_CHARACTERS_ARE_ALLOWED
For AdUnit.adUnitCode, only letters, numbers, underscores, hyphens, periods, asterisks, double quotes, back slashes, forward slashes, exclamations, left angle brackets, colons and parentheses are allowed.
INVALID_CHARACTERS_FOR_LEGACY_AD_EXCHANGE_TAG
For AdUnit.adUnitCode representing slot codes, only alphanumeric characters, underscores, hyphens, periods and colons are allowed.
LEADING_FORWARD_SLASH
For AdUnit.adUnitCode, forward slashes are not allowed as the first character.
RESERVED_CODE
Specific codes matching ca-*pub-*-tag are reserved for "Web Property IUs" generated as part of the SlotCode migration.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
ApiVersionError Errors related to the usage of API versions.
Enumerations
UPDATE_TO_NEWER_VERSION
Indicates that the operation is not allowed in the version the request was made in.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
AudienceExtensionError Errors associated with audience extension enabled line items
Enumerations
FREQUENCY_CAPS_NOT_SUPPORTED
Frequency caps are not supported by audience extension line items
INVALID_TARGETING
Audience extension line items can only target geography
INVENTORY_UNIT_TARGETING_INVALID
Audience extension line items can only target audience extension inventory units
INVALID_CREATIVE_ROTATION
Audience extension line items do not support CreativeRotationType.SEQUENTIAL.
INVALID_EXTERNAL_ENTITY_ID
The given ID of the external entity is not valid
INVALID_LINE_ITEM_TYPE
Audience extension line items only support LineItemType.STANDARD.
INVALID_MAX_BID
Audience extension max bid is invalid when it is greater then the max budget.
AUDIENCE_EXTENSION_BULK_UPDATE_NOT_ALLOWED
Bulk update for audience extension line items is not allowed.
UNEXPECTED_AUDIENCE_EXTENSION_ERROR
An unexpected error occurred.
MAX_DAILY_BUDGET_AMOUNT_EXCEEDED
The value entered for the maximum daily budget on an audience extension line item exceeds the maximum allowed.
EXTERNAL_CAMPAIGN_ALREADY_EXISTS
Creating a campaign for a line item that already has an associated campaign is not allowed.
AUDIENCE_EXTENSION_WITHOUT_FEATURE
Audience extension was specified on a line item but the feature was not enabled.
AUDIENCE_EXTENSION_WITHOUT_LINKED_ACCOUNT
Audience extension was specified on a line item but no audience extension account has been linked.
CANNOT_OVERRIDE_CREATIVE_SIZE_WITH_AUDIENCE_EXTENSION
Assocation creative size overrides are not allowed with audience extension.
CANNOT_OVERRIDE_FIELD_WITH_AUDIENCE_EXTENSION
Some association overrides are not allowed with audience extension.
ONLY_ONE_CREATIVE_PLACEHOLDER_ALLOWED
Only one creative placeholder is allowed for an audience extension line item.
MULTIPLE_AUDIENCE_EXTENSION_LINE_ITEMS_ON_ORDER
Only one audience extension line item can be associated with a given order.
CANNOT_COPY_AUDIENCE_EXTENSION_LINE_ITEMS_AND_CREATIVES_TOGETHER
Audience extension line items must be copied separately from their associated creatives.
FEATURE_DEPRECATED
Audience extension is no longer supported and cannot be used.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
AudienceSegmentError Errors that could occur on audience segment related requests.
Enumerations
FIRST_PARTY_AUDIENCE_SEGMENT_NOT_SUPPORTED
First party audience segment is not supported.
ONLY_RULE_BASED_FIRST_PARTY_AUDIENCE_SEGMENTS_CAN_BE_CREATED
Only rule-based first-party audience segments can be created.
AUDIENCE_SEGMENT_ID_NOT_FOUND
Audience segment for the given id is not found.
INVALID_AUDIENCE_SEGMENT_RULE
Audience segment rule is invalid.
AUDIENCE_SEGMENT_RULE_TOO_LONG
Audience segment rule contains too many ad units and/or custom criteria.
INVALID_AUDIENCE_SEGMENT_NAME
Audience segment name is invalid.
DUPLICATE_AUDIENCE_SEGMENT_NAME
Audience segment with this name already exists.
INVALID_AUDIENCE_SEGMENT_DESCRIPTION
Audience segment description is invalid.
INVALID_AUDIENCE_SEGMENT_PAGEVIEWS
Audience segment pageviews value is invalid. It must be between 1 and 12.
INVALID_AUDIENCE_SEGMENT_RECENCY
Audience segment recency value is invalid. It must be between 1 and 90 if pageviews > 1.
INVALID_AUDIENCE_SEGMENT_MEMBERSHIP_EXPIRATION
Audience segment membership expiration value is invalid. It must be between 1 and 180.
INVALID_AUDIENCE_SEGMENT_CUSTOM_KEY_NAME
The given custom key cannot be part of audience segment rule due to unsupported characters.
INVALID_AUDIENCE_SEGMENT_CUSTOM_VALUE_NAME
The given custom value cannot be part of audience segment rule due to unsupported characters.
INVALID_AUDIENCE_SEGMENT_CUSTOM_VALUE_MATCH_TYPE
Broad-match custom value cannot be part of audience segment rule.
INVALID_NESTED_FIRST_PARTY_AUDIENCE_SEGMENT
Audience segment rule cannot contain itself.
INVALID_NESTED_THIRD_PARTY_AUDIENCE_SEGMENT
Audience segment rule cannot contain a nested third-party segment.
INACTIVE_NESTED_AUDIENCE_SEGMENT
Audience segment rule cannot contain a nested inactive segment.
AUDIENCE_SEGMENT_GLOBAL_LICENSE_ERROR
An error occured when purchasing global licenses.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
AuthenticationError An error for an exception that occurred when authenticating.
Enumerations
AMBIGUOUS_SOAP_REQUEST_HEADER
The SOAP message contains a request header with an ambiguous definition of the authentication header fields. This means either the authToken and oAuthToken fields were both null or both were specified. Exactly one value should be specified with each request.
INVALID_EMAIL
The login provided is invalid.
AUTHENTICATION_FAILED
Tried to authenticate with provided information, but failed.
INVALID_OAUTH_SIGNATURE
The OAuth provided is invalid.
INVALID_SERVICE
The specified service to use was not recognized.
MISSING_SOAP_REQUEST_HEADER
The SOAP message is missing a request header with an authToken and optional networkCode.
MISSING_AUTHENTICATION_HTTP_HEADER
The HTTP request is missing a request header with an authToken
MISSING_AUTHENTICATION
The request is missing an authToken
NOT_WHITELISTED_FOR_API_ACCESS
The customer is not whitelisted for API access.
NO_NETWORKS_TO_ACCESS
The user is not associated with any network.
NETWORK_NOT_FOUND
No network for the given networkCode was found.
NETWORK_CODE_REQUIRED
The user has access to more than one network, but did not provide a networkCode.
CONNECTION_ERROR
An error happened on the server side during connection to authentication service.
GOOGLE_ACCOUNT_ALREADY_ASSOCIATED_WITH_NETWORK
The user tried to create a test network using an account that already is associated with a network.
UNDER_INVESTIGATION
The account is blocked and under investigation by the collections team. Please contact Google for more information.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
ClickTrackingLineItemError Click tracking is a special line item type with a number of unique errors as described below.
Enumerations
TYPE_IMMUTABLE
The line item type cannot be changed once created.
INVALID_TARGETING_TYPE
Click tracking line items can only be targeted at ad unit inventory, all other types are invalid, as well as placements.
INVALID_ROADBLOCKING_TYPE
Click tracking line items do not allow us to control creative delivery so are by nature one or more as entered by the third party.
INVALID_CREATIVEROTATION_TYPE
Click tracking line items do not support the CreativeRotationType.OPTIMIZED creative rotation type.
INVALID_DELIVERY_RATE_TYPE
Click tracking line items do not allow us to control line item delivery so we can not control the rate at which they are served.
UNSUPPORTED_FIELD
Not all fields are supported by the click tracking line items.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
CollectionSizeError Error for the size of the collection being too large
Enumerations
TOO_LARGE
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
CommonError A place for common errors that can be used across services.
Enumerations
NOT_FOUND
Indicates that an attempt was made to retrieve an entity that does not exist.
ALREADY_EXISTS
Indicates that an attempt was made to create an entity that already exists.
NOT_APPLICABLE
Indicates that a value is not applicable for given use case.
DUPLICATE_OBJECT
Indicates that two elements in the collection were identical.
CANNOT_UPDATE
Indicates that an attempt was made to change an immutable field.
CONCURRENT_MODIFICATION
Indicates that another request attempted to update the same data in the same network at about the same time. Please wait and try the request again.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
CompanyCreditStatusError Lists all errors due to Company.creditStatus.
Enumerations
COMPANY_CREDIT_STATUS_CHANGE_NOT_ALLOWED
The user's role does not have permission to change Company.creditStatus from the default value. The default value is Company.CreditStatus.ACTIVE for the Basic credit status setting and Company.CreditStatus.ON_HOLD for the Advanced credit status setting.
CANNOT_USE_CREDIT_STATUS_SETTING
The network has not been enabled for editing credit status settings for companies.
CANNOT_USE_ADVANCED_CREDIT_STATUS_SETTING
The network has not been enabled for the Advanced credit status settings for companies. Company.creditStatus must be either ACTIVE or INACTIVE.
UNACCEPTABLE_COMPANY_CREDIT_STATUS_FOR_ORDER
An order cannot be created or updated because the Order.advertiserId or the Order.agencyId it is associated with has Company.creditStatus that is not ACTIVE or ON_HOLD.
UNACCEPTABLE_COMPANY_CREDIT_STATUS_FOR_LINE_ITEM
A line item cannot be created for the order because the Order.advertiserId or {Order#agencyId} it is associated with has Company.creditStatus that is not ACTIVE or ON_HOLD.
CANNOT_BLOCK_COMPANY_TOO_MANY_APPROVED_ORDERS
The company cannot be blocked because there are more than 200 approved orders of the company. Archive some, so that there are less than 200 of them.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
ContentMetadataTargetingError Lists all errors related to ContentMetadataTargeting.
Enumerations
VALUES_DO_NOT_BELONG_TO_A_HIERARCHY
One or more of the values specified in a ContentMetadataHierarchyTargeting do not belong to the keys defined in any of the hierarchies on the network.
CONTENT_METADATA_TARGETING_DEPRECATED
Content metadata targeting is deprecated.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
CreativeError Lists all errors associated with creatives.
Enumerations
FLASH_AND_FALLBACK_URL_ARE_SAME
FlashRedirectCreative.flashUrl and FlashRedirectCreative.fallbackUrl are the same. The fallback URL is used when the flash URL does not work and must be different from it.
INVALID_INTERNAL_REDIRECT_URL
The internal redirect URL was invalid. The URL must have the following syntax http://ad.doubleclick.net/ad/sitename/;sz=size.
DESTINATION_URL_REQUIRED
HasDestinationUrlCreative.destinationUrl is required.
DESTINATION_URL_NOT_EMPTY
HasDestinationUrlCreative.destinationUrl must be empty when its type is DestinationUrlType.NONE.
DESTINATION_URL_TYPE_NOT_SUPPORTED
The provided DestinationUrlType is not supported for the creative type it is being used on.
CANNOT_CREATE_OR_UPDATE_LEGACY_DFP_CREATIVE
Cannot create or update legacy DART For Publishers creative.
CANNOT_CREATE_OR_UPDATE_LEGACY_DFP_MOBILE_CREATIVE
Cannot create or update legacy mobile creative.
MISSING_FEATURE
The user is missing a necessary feature.
INVALID_COMPANY_TYPE
Company type should be one of Advertisers, House Advertisers and Ad Networks.
INVALID_ADSENSE_CREATIVE_SIZE
Invalid size for AdSense dynamic allocation creative. Only valid AFC sizes are allowed.
INVALID_AD_EXCHANGE_CREATIVE_SIZE
Invalid size for Ad Exchange dynamic allocation creative. Only valid Ad Exchange sizes are allowed.
DUPLICATE_ASSET_IN_CREATIVE
Assets associated with the same creative must be unique.
CREATIVE_ASSET_CANNOT_HAVE_ID_AND_BYTE_ARRAY
A creative asset cannot contain an asset ID and a byte array.
CANNOT_CREATE_OR_UPDATE_UNSUPPORTED_CREATIVE
Cannot create or update unsupported creative.
CANNOT_CREATE_PROGRAMMATIC_CREATIVES
Cannot create programmatic creatives.
INVALID_SIZE_FOR_THIRD_PARTY_IMPRESSION_TRACKER
A creative must have valid size to use the third-party impression tracker.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
CrossSellError Lists all errors associated with cross selling.
Enumerations
COMPANY_IS_NOT_DISTRIBUTION_PARTNER
A company for cross-sell partner must be of type Company.Type.PARTNER.
CHANGING_PARTNER_NETWORK_IS_NOT_SUPPORTED
The network code of a cross-sell partner cannot be changed.
MISSING_DISTRIBUTOR_PARTNER_NAME
A cross-sell partner must have a partner name.
DISTRIBUTOR_NETWORK_MISSING_PUBLISHER_FEATURE
The cross-sell distributor publisher feature must be enabled.
CONTENT_PROVIDER_NETWORK_MISSING_PUBLISHER_FEATURE
The cross-sell content provider publisher feature must be enabled on the partner's network.
INVALID_DISTRIBUTOR_PARTNER_NAME
The cross-sell partner name conflicts with an ad unit name on the partner's network.
INVALID_CONTENT_PROVIDER_NETWORK
The network code of a cross-sell partner is invalid.
CONTENT_PROVIDER_NETWORK_CANNOT_BE_ACTIVE_NETWORK
The content provider network must be different than the distributor network.
CONTENT_PROVIDER_NETWORK_ALREADY_ENABLED_FOR_CROSS_SELLING
The same network code was already enabled for cross-sell in a different company.
DISTRIBUTOR_RULE_VIOLATION_ERROR
A rule defined by the cross selling distributor has been violated by a line item targeting a shared ad unit. Violating this rule is an error.
DISTRIBUTOR_RULE_VIOLATION_WARNING
A rule defined by the cross selling distributor has been violated by a line item targeting a shared ad unit. Violating this rule is a warning.

By setting LineItem.skipCrossSellingRuleWarningChecks, the content partner can suppress the warning (and create or save the line item).

This flag is available beginning in V201411.

UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
CustomFieldValueError Errors specific to editing custom field values
Enumerations
CUSTOM_FIELD_NOT_FOUND
An attempt was made to modify or create a CustomFieldValue for a CustomField that does not exist.
CUSTOM_FIELD_INACTIVE
An attempt was made to create a new value for a custom field that is inactive.
CUSTOM_FIELD_OPTION_NOT_FOUND
An attempt was made to modify or create a CustomFieldValue corresponding to a CustomFieldOption that could not be found.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
CustomTargetingError Lists all errors related to CustomTargetingKey and CustomTargetingValue objects.
Enumerations
KEY_NOT_FOUND
Requested CustomTargetingKey is not found.
KEY_COUNT_TOO_LARGE
Number of CustomTargetingKey objects created exceeds the limit allowed for the network.
KEY_NAME_DUPLICATE
CustomTargetingKey with the same CustomTargetingKey.name already exists.
KEY_NAME_EMPTY
CustomTargetingKey.name is empty.
KEY_NAME_INVALID_LENGTH
CustomTargetingKey.name is too long.
KEY_NAME_INVALID_CHARS
CustomTargetingKey.name contains unsupported or reserved characters.
KEY_NAME_RESERVED
CustomTargetingKey.name matches one of the reserved custom targeting key names.