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

ForecastService (v201905)

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/v201905/ForecastService?wsdl
Namespace
https://www.google.com/apis/ads/publisher/v201905
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 cred