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

ProductTemplateService (v201905)

Provides methods for creating, updating and retrieving ProductTemplate objects.

A product template is used to generate a set of products. Products allow inventory managers to control what salespeople can sell.

To use this service, you need to have the new sales management solution enabled on your network. If you do not see a "Sales" tab in DoubleClick for Publishers (DFP), you will not be able to use this service.


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

createProductTemplates

Creates new ProductTemplate objects.

Parameters

Field Type Description
productTemplates ProductTemplate[] the productTemplates to create

Response

Field Type Description
rval ProductTemplate[] the persisted product templates with their Ids filled in

getProductTemplatesByStatement

Gets a ProductTemplatePage of ProductTemplate objects that satisfy the filtering criteria specified by given Statement.query. The following fields are supported for filtering:

PQL Property Object Property
id ProductTemplate.id
name ProductTemplate.name
nameMacro ProductTemplate.nameMacro
description ProductTemplate.description
status ProductTemplate.status
lastModifiedDateTime ProductTemplate.lastModifiedDateTime
lineItemType LineItemType
productType ProductType
rateType RateType

Parameters

Field Type Description
statement Statement a Publisher Query Language statement which specifies the filtering criteria over productTemplates

Response

Field Type Description
rval ProductTemplatePage the productTemplates that match the given statement

performProductTemplateAction

Performs action on ProductTemplate objects that satisfy the given Statement.query.

Parameters

Field Type Description
action
  1. ProductTemplateAction
    1. ActivateProductTemplates
    2. ArchiveProductTemplates
    3. DeactivateProductTemplates
    4. UnarchiveProductTemplates
the action to perform
filterStatement Statement a Publisher Query Language statement used to filter a set of product templates

Response

Field Type Description
rval UpdateResult the result of the action performed

updateProductTemplates

Updates the specified ProductTemplate objects.

Parameters

Field Type Description
productTemplates ProductTemplate[] the product templates to update

Response

Field Type Description
rval ProductTemplate[] the updated product templates

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
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.
BaseRateError An error having to do with BaseRate.
Enumerations
INVALID_CURRENCY_CODE
The currency code is invalid.
PRODUCT_TEMPLATE_ARCHIVED
Cannot create or activate a base rate if the product template is archived.
PRODUCT_PACKAGE_ITEM_ARCHIVED
Cannot create or activate a product package item base rate if the product package item is archived.
CANNOT_QUERY_ON_MULTIPLE_TYPES
The PQL statement can only contain one of productTemplateId, productId or productPackageItemId.
PRODUCT_PACKAGE_RATE_CARD_ASSOCIATION_MISSING
Product package must be associated with the rate card of the product package item base rate.

See ProductPackage.rateCardIds.

UNSUPPORTED_OPERATION
Indicates that the requested operation is not supported.
PRODUCT_PACKAGE_ACTIVE
Cannot delete a product package item base rate when its product package is active.
PRODUCT_TEMPLATE_BASE_RATE_NOT_FOUND
Cannot create a base rate to a product if its product template does not have a base rate on this rate card.
PRODUCT_BASE_RATE_EXISTS
Cannot delete a base rate on a product template if its products still have base rates on this rate card.
INVALID_RATE_CARD_CHANNEL
Marketplace rate cards should only have Marketplace Product/ProductTemplate base rates. Non-Marketplace rate cards should use traditional base rates.
ZERO_MARKETPLACE_RATE_NOT_SUPPORTED
Marketplace does not support base rates with zero-value rates.
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.
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.
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.
KEY_DISPLAY_NAME_INVALID_LENGTH
CustomTargetingKey.displayName is too long.
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_