This service provides operations for retrieving and approving SuggestedAdUnit objects.
Publishers may create ad tags that lack a corresponding ad unit defined in DFP, in order to gather information about potential ads without needing to create dummy ad units and make them available for targeting in line items. Any undefined ad unit to receive more than ten serving requests in the past week is treated as a 'suggested ad unit'. These can be queried by the client and selectively approved. Approval causes a new ad unit to be created based on the suggested ad unit. Unapproved suggested ad units cease to exist whenever their corresponding ad tag has been served fewer than ten times in the past seven days.
This service is only available to Premium publishers. Before use, suggested ad units must be enabled for the client's network. This can be done in the UI: in the Inventory tab, click "Network settings" in the left-hand panel, then enable the checkbox "Get suggestions for new ad units." If suggested ad units are not enabled, then getSuggestedAdUnitsByStatement will always return an empty page.
- Production WSDL
-
https://ads.google.com/apis/ads/publisher/v202405/SuggestedAdUnitService?wsdl
- Namespace
-
https://www.google.com/apis/ads/publisher/v202405
- Operations
- Errors
-
- ApiVersionError
- AuthenticationError
- CollectionSizeError
- CommonError
- EntityLimitReachedError
- FeatureError
- InternalApiError
- InventoryUnitSizesError
- LabelEntityAssociationError
- NotNullError
- ParseError
- PermissionError
- PublisherQueryLanguageContextError
- PublisherQueryLanguageSyntaxError
- QuotaError
- RequiredCollectionError
- RequiredError
- ServerError
- StatementError
- StringFormatError
- StringLengthError
- TypeError
- UniqueError
getSuggestedAdUnitsByStatement
Gets a SuggestedAdUnitPage of SuggestedAdUnit objects that satisfy the filter query. There is a system-enforced limit of 1000 on the number of suggested ad units that are suggested at any one time.
PQL Property | Object Property |
---|---|
id
|
SuggestedAdUnit.id |
numRequests
|
SuggestedAdUnit.numRequests |
Note:After API version 201311, the id
field will only be
numerical.
Parameters
Field | Type | Description |
---|---|---|
filterStatement
|
|
Response
Field | Type | Description |
---|---|---|
rval
|
|
performSuggestedAdUnitAction
Performs actions on SuggestedAdUnit objects that match the given Statement.query . The following fields are supported for filtering:
PQL Property | Object Property |
---|---|
id
|
SuggestedAdUnit.id |
numRequests
|
SuggestedAdUnit.numRequests |
Parameters
suggestedAdUnitAction
filterStatement
Response
Field | Type | Description |
---|---|---|
rval
|
|
Errors
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.
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
andoAuthToken
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 optionalnetworkCode
. -
MISSING_AUTHENTICATION_HTTP_HEADER
- The HTTP request is missing a request header with an
authToken
-
MISSING_AUTHENTICATION
- The request is missing an
authToken
-
NETWORK_API_ACCESS_DISABLED
- The network does not have API access enabled.
-
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.
Enumerations
-
TOO_LARGE
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
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.
-
UNSUPPORTED_OPERATION
- Indicates that the requested operation is not supported.
-
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.
Enumerations
-
CUSTOM_TARGETING_VALUES_LIMIT_REACHED
- The number of custom targeting values exceeds the max number allowed in the network.
-
AD_EXCLUSION_RULES_LIMIT_REACHED
- The number of ad exclusion rules exceeds the max number allowed in the network.
-
FIRST_PARTY_AUDIENCE_SEGMENTS_LIMIT_REACHED
- The number of first party audience segments exceeds the max number allowed in the network.
-
PLACEMENTS_LIMIT_REACHED
- The number of active placements exceeds the max number allowed in the network.
-
LINE_ITEMS_LIMIT_REACHED
- The number of line items excceeds the max number allowed in the network.
-
ACTIVE_LINE_ITEMS_LIMIT_REACHED
- The number of active line items exceeds the max number allowed in the network.
-
DAI_ENCODING_PROFILES_LIMIT_REACHED
- The number of not-archived encoding profiles exceeds the max number allowed in the network.
-
TRAFFIC_FORECAST_SEGMENTS_LIMIT_REACHED
- The number of traffic forecast segments exceeds the max number allowed in the network.
-
FORECAST_ADJUSTMENTS_LIMIT_REACHED
- The number of forecast adjustments exceeds the max number allowed in the network.
-
ACTIVE_EXPERIMENTS_LIMIT_REACHED
- The number of active experiments exceeds the max number allowed in the network.
-
SITES_LIMIT_REACHED
- The number of sites exceeds the max number allowed in the network.
-
USER_TEAMS_LIMIT_REACHED
- The number of teams on the user exceeds the max number allowed.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
MISSING_FEATURE
- A feature is being used that is not enabled on the current network.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
InternalApiError
s
are generally not the result of an invalid request or message sent by the
client.Enumerations
-
UNEXPECTED_INTERNAL_API_ERROR
- API encountered an unexpected internal error.
-
TRANSIENT_ERROR
- A temporary error occurred during the request. Please retry.
-
UNKNOWN
- The cause of the error is not known or only defined in newer versions.
-
DOWNTIME
- The API is currently unavailable for a planned downtime.
-
ERROR_GENERATING_RESPONSE
- Mutate succeeded but server was unable to build response. Client should not retry mutate.
Enumerations
-
INVALID_SIZES
- A size in the ad unit is too large or too small.
-
INVALID_SIZE_FOR_PLATFORM
- A size is an aspect ratio, but the ad unit is not a mobile ad unit.
-
VIDEO_FEATURE_MISSING
- A size is video, but the video feature is not enabled.
-
VIDEO_MOBILE_LINE_ITEM_FEATURE_MISSING
- A size is video in a mobile ad unit, but the mobile video feature is not enabled.
-
INVALID_SIZE_FOR_MASTER
- A size that has companions must have an environment of VIDEO_PLAYER.
-
INVALID_SIZE_FOR_COMPANION
- A size that is a companion must have an environment of BROWSER.
-
DUPLICATE_MASTER_SIZES
- Duplicate video master sizes are not allowed.
-
ASPECT_RATIO_NOT_SUPPORTED
- A size is an aspect ratio, but aspect ratio sizes are not enabled.
-
VIDEO_COMPANIONS_NOT_SUPPORTED
- A video size has companions, but companions are not allowed for the network
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
DUPLICATE_ASSOCIATION
- The label has already been attached to the entity.
-
INVALID_ASSOCIATION
- A label is being applied to an entity that does not support that entity type.
-
NEGATION_NOT_ALLOWED
- Label negation cannot be applied to the entity type.
-
DUPLICATE_ASSOCIATION_WITH_NEGATION
- The same label is being applied and negated to the same entity.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
ARG1_NULL
- Assuming that a method will not have more than 3 arguments, if it does, return NULL
-
ARG2_NULL
-
ARG3_NULL
-
NULL
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
UNPARSABLE
- Indicates an error in parsing an attribute.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
PERMISSION_DENIED
- User does not have the required permission for the request.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
UNEXECUTABLE
- Indicates that there was an error executing the PQL.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
UNPARSABLE
- Indicates that there was a PQL syntax error.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
EXCEEDED_QUOTA
- The number of requests made per second is too high and has exceeded
the allowable limit. The recommended approach to handle this error
is to wait about 5 seconds and then retry the request. Note that
this does not guarantee the request will succeed. If it fails
again, try increasing the wait time.
Another way to mitigate this error is to limit requests to 8 per second for Ad Manager 360 accounts, or 2 per second for Ad Manager accounts. Once again this does not guarantee that every request will succeed, but may help reduce the number of times you receive this error.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
-
REPORT_JOB_LIMIT
- This user has exceeded the allowed number of new report requests
per hour (this includes both reports run via the UI and reports run
via ReportService.runReportJob
). The recommended approach to handle this error
is to wait about 10 minutes and then retry the request. Note that
this does not guarantee the request will succeed. If it fails
again, try increasing the wait time.
Another way to mitigate this error is to limit the number of new report requests to 250 per hour per user. Once again, this does not guarantee that every request will succeed, but may help reduce the number of times you receive this error.
-
SEGMENT_POPULATION_LIMIT
- This network has exceeded the allowed number of identifiers uploaded within a 24 hour period. The recommended approach to handle this error is to wait 30 minutes and then retry the request. Note that this does not guarantee the request will succeed. If it fails again, try increasing the wait time.
Enumerations
-
REQUIRED
- A required collection is missing.
-
TOO_LARGE
- Collection size is too large.
-
TOO_SMALL
- Collection size is too small.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
REQUIRED
- Missing required field.
Enumerations
-
SERVER_ERROR
- Indicates that an unexpected error occured.
-
SERVER_BUSY
- Indicates that the server is currently experiencing a high load. Please wait and try your request again.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
VARIABLE_NOT_BOUND_TO_VALUE
- A bind variable has not been bound to a value.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
Enumerations
-
UNKNOWN
-
ILLEGAL_CHARS
- The input string value contains disallowed characters.
-
INVALID_FORMAT
- The input string value is invalid for the associated field.
Enumerations
-
TOO_LONG
-
TOO_SHORT
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.