TargetingPresetService (v202402)

Service for interacting with Targeting Presets.


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

getTargetingPresetsByStatement

Gets a TargetingPresetPage of TargetingPreset objects that satisfy the given Statement.query. The following fields are supported for filtering:

PQL Property Object Property
id TargetingPreset.id
name TargetingPreset.name

Parameters

Field Type Description
filterStatement Statement

Response

Field Type Description
rval TargetingPresetPage

Errors

Error Reasons
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.
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
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.
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.
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.
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.
KEY_DISPLAY_NAME_INVALID_LENGTH
CustomTargetingKey.displayName is too long.
KEY_STATUS_NOT_ACTIVE
Key is not active.
VALUE_NOT_FOUND
Requested CustomTargetingValue is not found.
GET_VALUES_BY_STATEMENT_MUST_CONTAIN_KEY_ID
The WHERE clause in the Statement.query must always contain CustomTargetingValue.customTargetingKeyId as one of its columns in a way that it is AND'ed with the rest of the query.
VALUE_COUNT_FOR_KEY_TOO_LARGE
The number of CustomTargetingValue objects associated with a CustomTargetingKey exceeds the network limit. This is only applicable for keys of type CustomTargetingKey.Type#PREDEFINED.
VALUE_NAME_DUPLICATE
CustomTargetingValue with the same CustomTargetingValue.name already exists.
VALUE_NAME_EMPTY
CustomTargetingValue.name is empty.
VALUE_NAME_INVALID_LENGTH
CustomTargetingValue.name is too long.
VALUE_NAME_INVALID_CHARS
CustomTargetingValue.name contains unsupported or reserved characters.
VALUE_DISPLAY_NAME_INVALID_LENGTH
CustomTargetingValue.displayName is too long.
VALUE_MATCH_TYPE_NOT_ALLOWED
Only Ad Manager 360 networks can have CustomTargetingValue.matchType other than CustomTargetingValue.MatchType.EXACT.
VALUE_MATCH_TYPE_NOT_EXACT_FOR_PREDEFINED_KEY
You can only create CustomTargetingValue objects with match type CustomTargetingValue.MatchType.EXACT when associating with CustomTargetingKey objects of type CustomTargetingKey.Type.PREDEFINED
SUFFIX_MATCH_TYPE_NOT_ALLOWED
CustomTargetingValue object cannot have match type of CustomTargetingValue.MatchType.SUFFIX when adding a CustomTargetingValue to a line item.
CONTAINS_MATCH_TYPE_NOT_ALLOWED
CustomTargetingValue object cannot have match type of CustomTargetingValue.MatchType.CONTAINS when adding a CustomTargetingValue to targeting expression of a line item.
VALUE_STATUS_NOT_ACTIVE
Value is not active.
KEY_WITH_MISSING_VALUES
The CustomTargetingKey does not have any CustomTargetingValue associated with it.
INVALID_VALUE_FOR_KEY
The CustomTargetingKey has a CustomTargetingValue specified for which the value is not a valid child.
CANNOT_OR_DIFFERENT_KEYS
CustomCriteriaSet.LogicalOperator.OR operation cannot be applied to values with different keys.
INVALID_TARGETING_EXPRESSION
Targeting expression is invalid. This can happen if the sequence of operators is wrong, or a node contains invalid number of children.
DELETED_KEY_CANNOT_BE_USED_FOR_TARGETING
The key has been deleted. CustomCriteria cannot have deleted keys.
DELETED_VALUE_CANNOT_BE_USED_FOR_TARGETING
The value has been deleted. CustomCriteria cannot have deleted values.
VIDEO_BROWSE_BY_KEY_CANNOT_BE_USED_FOR_CUSTOM_TARGETING
The key is set as the video browse-by key, which cannot be used for custom targeting.
CANNOT_DELETE_CUSTOM_KEY_USED_IN_CONTENT_METADATA_MAPPING
Only active custom-criteria keys are supported in content metadata mapping.
CANNOT_DELETE_CUSTOM_VALUE_USED_IN_CONTENT_METADATA_MAPPING
Only active custom-criteria values are supported in content metadata mapping.
CANNOT_DELETE_CUSTOM_KEY_USED_IN_PARTNER_ASSIGNMENT_TARGETING
Cannot delete a custom criteria key that is targeted by an active partner assignment.
CANNOT_DELETE_CUSTOM_VALUE_USED_IN_PARTNER_ASSIGNMENT_TARGETING
Cannot delete a custom criteria value that is targeted by an active partner assignment.
CANNOT_TARGET_AUDIENCE_SEGMENT
AudienceSegment object cannot be targeted.
CANNOT_TARGET_THIRD_PARTY_AUDIENCE_SEGMENT
Third party AudienceSegment cannot be targeted.
CANNOT_TARGET_INACTIVE_AUDIENCE_SEGMENT
Inactive AudienceSegment object cannot be targeted.
INVALID_AUDIENCE_SEGMENTS
Targeted AudienceSegment object is not valid.
CANNOT_TARGET_MAPPED_METADATA
Mapped metadata key-values are deprecated and cannot be targeted.
ONLY_APPROVED_AUDIENCE_SEGMENTS_CAN_BE_TARGETED
Targeted AudienceSegment objects have not been approved.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
DateTimeRangeTargetingError Lists all date time range errors caused by associating a line item with a targeting expression.
Enumerations
EMPTY_RANGES
No targeted ranges exists.
NOT_SPONSORSHIP_LINEITEM
Type of lineitem is not sponsorship.
NOT_SPONSORSHIP_OR_STANDARD_LINEITEM
Type of lineitem is not sponsorship or standard.
UNSUPPORTED_LINEITEM_RESERVATION_TYPE
Line item must have a reservation type of sponsorship, standard or preferred deal to use date time range targeting.
PAST_RANGES_CHANGED
Past ranges are changed.
RANGES_OVERLAP
Targeted date time ranges overlap.
FIRST_DATE_TIME_DOES_NOT_MATCH_START_TIME
First date time does not match line item's start time.
LAST_DATE_TIME_DOES_NOT_MATCH_END_TIME
Last date time does not match line item's end time.
RANGES_OUT_OF_LINEITEM_ACTIVE_PERIOD
Targeted date time ranges fall out the active period of lineitem.
START_TIME_IS_NOT_START_OF_DAY
Start time of range (except the earliest range) is not at start of day. Start of day is 00:00:00.
END_TIME_IS_NOT_END_OF_DAY
End time of range (except the latest range) is not at end of day. End of day is 23:59:59.
START_DATE_TIME_IS_IN_PAST
Start date time of earliest targeted ranges is in past.
MODIFY_START_DATE_TIME_TO_PAST
Cannot modify the start date time for date time targeting to the past.
RANGE_END_TIME_BEFORE_START_TIME
The end time of range is before the start time. Could happen when start type is IMMEDIATE or ONE_HOUR_LATER.
END_DATE_TIME_IS_TOO_LATE
End date time of latest targeted ranges is too late.
LIMITED_RANGES_IN_UNLIMITED_LINEITEM
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
DayPartTargetingError Lists all errors associated with day-part targeting for a line item.
Enumerations
INVALID_HOUR
Hour of day must be between 0 and 24, inclusive.
INVALID_MINUTE
Minute of hour must be one of 0, 15,30, 45.
END_TIME_NOT_AFTER_START_TIME
The DayPart.endTime cannot be after DayPart.startTime.
TIME_PERIODS_OVERLAP
Cannot create day-parts that overlap.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
EntityChildrenLimitReachedError Lists errors relating to having too many children on an entity.
Enumerations
LINE_ITEM_LIMIT_FOR_ORDER_REACHED
The number of line items on the order exceeds the max number of line items allowed per order in the network.
CREATIVE_ASSOCIATION_LIMIT_FOR_LINE_ITEM_REACHED
The number of creatives associated with the line item exceeds the max number of creatives allowed to be associated with a line item in the network.
AD_UNIT_LIMIT_FOR_PLACEMENT_REACHED
The number of ad units on the placement exceeds the max number of ad units allowed per placement in the network.
TARGETING_EXPRESSION_LIMIT_FOR_LINE_ITEM_REACHED
The number of targeting expressions on the line item exceeds the max number of targeting expressions allowed per line item in the network.
TARGETING_EXPRESSION_SIZE_LIMIT_REACHED
The size of a single targeting expression tree exceeds the max size allowed by the network.
CUSTOM_TARGETING_VALUES_FOR_KEY_LIMIT_REACHED
The number of custom targeting values for the free-form or predefined custom targeting key exceeds the max number allowed.
TARGETING_EXPRESSION_LIMIT_FOR_CREATIVES_ON_LINE_ITEM_REACHED
The total number of targeting expressions on the creatives for the line item exceeds the max number allowed per line item in the network.
ATTACHMENT_LIMIT_FOR_PROPOSAL_REACHED
The number of attachments added to the proposal exceeds the max number allowed per proposal in the network.
PROPOSAL_LINE_ITEM_LIMIT_FOR_PROPOSAL_REACHED
The number of proposal line items on the proposal exceeds the max number allowed per proposal in the network.
PRODUCT_LIMIT_FOR_PRODUCT_PACKAGE_REACHED
The number of product package items on the product package exceeds the max number allowed per product package in the network.
PRODUCT_TEMPLATE_AND_PRODUCT_BASE_RATE_LIMIT_FOR_RATE_CARD_REACHED
The number of product template and product base rates on the rate card (including excluded product base rates) exceeds the max number allowed per rate card in the network.
PRODUCT_PACKAGE_ITEM_BASE_RATE_LIMIT_FOR_RATE_CARD_REACHED
The number of product package item base rates on the rate card exceeds the max number allowed per rate card in the network.
PREMIUM_LIMIT_FOR_RATE_CARD_REACHED
The number of premiums of the rate card exceeds the max number allowed per rate card in the network.
AD_UNIT_LIMIT_FOR_AD_EXCLUSION_RULE_TARGETING_REACHED
The number of ad units on AdExclusionRule.inventoryTargeting exceeds the max number of ad units allowed per ad exclusion rule inventory targeting in the network.
NATIVE_STYLE_LIMIT_FOR_NATIVE_AD_FORMAT_REACHED
The number of native styles under the native creative template exceeds the max number of native styles allowed per native creative template in the network.
TARGETING_EXPRESSION_LIMIT_FOR_PRESENTATION_ASSIGNMENT_REACHED
The number of targeting expressions on the native style exceeds the max number of targeting expressions allowed per native style in the network.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
FeatureError Errors related to feature management. If you attempt using a feature that is not available to the current network you'll receive a FeatureError with the missing feature as the trigger.
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.
GenericTargetingError Targeting validation errors that can be used by different targeting types.
Enumerations
CONFLICTING_INCLUSION_OR_EXCLUSION_OF_SIBLINGS
Both including and excluding sibling criteria is disallowed.
INCLUDING_DESCENDANTS_OF_EXCLUDED_CRITERIA
Including descendants of excluded criteria is disallowed.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
GeoTargetingError Lists all errors associated with geographical targeting for a LineItem.
Enumerations
TARGETED_LOCATIONS_NOT_EXCLUDABLE
A location that is targeted cannot also be excluded.
EXCLUDED_LOCATIONS_CANNOT_HAVE_CHILDREN_TARGETED
Excluded locations cannot have any of their children targeted.
POSTAL_CODES_CANNOT_BE_EXCLUDED
Postal codes cannot be excluded.
UNTARGETABLE_LOCATION
Indicates that location targeting is not allowed.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
InternalApiError Indicates that a server-side error has occured. InternalApiErrors 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.
InventoryTargetingError Lists all inventory errors caused by associating a line item with a targeting expression.
Enumerations
AT_LEAST_ONE_PLACEMENT_OR_INVENTORY_UNIT_REQUIRED
At least one placement or inventory unit is required
INVENTORY_CANNOT_BE_TARGETED_AND_EXCLUDED
The same inventory unit or placement cannot be targeted and excluded at the same time
INVENTORY_UNIT_CANNOT_BE_TARGETED_IF_ANCESTOR_IS_TARGETED
A child inventory unit cannot be targeted if its ancestor inventory unit is also targeted.
INVENTORY_UNIT_CANNOT_BE_TARGETED_IF_ANCESTOR_IS_EXCLUDED
A child inventory unit cannot be targeted if its ancestor inventory unit is excluded.
INVENTORY_UNIT_CANNOT_BE_EXCLUDED_IF_ANCESTOR_IS_EXCLUDED
A child inventory unit cannot be excluded if its ancestor inventory unit is also excluded.
EXPLICITLY_TARGETED_INVENTORY_UNIT_CANNOT_BE_TARGETED
An explicitly targeted inventory unit cannot be targeted.
EXPLICITLY_TARGETED_INVENTORY_UNIT_CANNOT_BE_EXCLUDED
An explicitly targeted inventory unit cannot be excluded.
SELF_ONLY_INVENTORY_UNIT_NOT_ALLOWED
A landing page-only ad unit cannot be targeted.
SELF_ONLY_INVENTORY_UNIT_WITHOUT_DESCENDANTS
A landing page-only ad unit cannot be targeted if it doesn't have any children.
YOUTUBE_AUDIENCE_SEGMENTS_CAN_ONLY_BE_TARGETED_WITH_YOUTUBE_SHARED_INVENTORY
Audience segments shared from YouTube can only be targeted with inventory shared from YouTube for cross selling.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
MobileApplicationTargetingError Lists all errors related to mobile application targeting for a line item.
Enumerations
CANNOT_TARGET_UNLINKED_APPLICATION
Only applications that are linked to a store entry may be targeted.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
NotNullError Caused by supplying a null value for an attribute that cannot be null.
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.
ParseError Lists errors related to parsing.
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.
PermissionError Errors related to incorrect permission.
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.
PublisherQueryLanguageContextError An error that occurs while executing a PQL query contained in a Statement object.
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.
PublisherQueryLanguageSyntaxError An error that occurs while parsing a PQL query contained in a Statement object.
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.
QuotaError Describes a client-side error on which a user is attempting to perform an action to which they have no quota remaining.
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.
RequestPlatformTargetingError Errors related to request platform targeting.
Enumerations
REQUEST_PLATFORM_TYPE_NOT_SUPPORTED_BY_LINE_ITEM_TYPE
The line item type does not support the targeted request platform type.
REQUEST_PLATFORM_TYPE_NOT_SUPPORTED_BY_ENVIRONMENT_TYPE
The line item environment type does not support the targeted request platform type.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
RequiredCollectionError A list of all errors to be used for validating sizes of collections.
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.
RequiredError Errors due to missing required field.
Enumerations
REQUIRED
Missing required field.
ServerError Errors related to the server.
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.
StatementError An error that occurs while parsing Statement objects.
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.
StringFormatError A list of error code for reporting invalid content of input strings.
Enumerations
UNKNOWN
ILLEGAL_CHARS
The input string value contains disallowed characters.
INVALID_FORMAT
The input string value is invalid for the associated field.
StringLengthError Errors for Strings which do not meet given length constraints.
Enumerations
TOO_LONG
TOO_SHORT
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
TechnologyTargetingError Technology targeting validation errors.
Enumerations
MOBILE_LINE_ITEM_CONTAINS_WEB_TECH_CRITERIA
Mobile line item cannot target web-only targeting criteria.
WEB_LINE_ITEM_CONTAINS_MOBILE_TECH_CRITERIA
Web line item cannot target mobile-only targeting criteria.
MOBILE_CARRIER_TARGETING_FEATURE_NOT_ENABLED
The mobile carrier targeting feature is not enabled.
DEVICE_CAPABILITY_TARGETING_FEATURE_NOT_ENABLED
The device capability targeting feature is not enabled.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
UniqueError An error for a field which must satisfy a uniqueness constraint
UserDomainTargetingError Lists all errors related to user domain targeting for a line item.
Enumerations
INVALID_DOMAIN_NAMES
Invalid domain names. Domain names must be at most 67 characters long. And must contain only alphanumeric characters and hyphens.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
VideoPositionTargetingError Lists all errors related to VideoPositionTargeting.
Enumerations
CANNOT_MIX_BUMPER_AND_NON_BUMPER_TARGETING
Video position targeting cannot contain both bumper and non-bumper targeting values.
INVALID_BUMPER_TARGETING
The bumper video position targeting is invalid.
CAN_ONLY_TARGET_CUSTOM_AD_SPOTS
Only custom spot AdSpot objects can be targeted.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.