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

InventoryService (v201905)

Provides operations for creating, updating and retrieving AdUnit objects.

Line items connect a creative with its associated ad unit through targeting.

An ad unit represents a piece of inventory within a publisher. It contains all the settings that need to be associated with the inventory in order to serve ads. For example, the ad unit contains creative size restrictions and AdSense settings.


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

createAdUnits

Creates new AdUnit objects.

Parameters

Field Type Description
adUnits AdUnit[] the ad units to create

Response

Field Type Description
rval AdUnit[] the created ad units, with their IDs filled in

getAdUnitSizesByStatement

Returns a set of all relevant AdUnitSize objects.

The given Statement is currently ignored but may be honored in future versions.

Parameters

Field Type Description
filterStatement Statement currently ignored but may be honored in future versions

Response

Field Type Description
rval AdUnitSize[] the ad unit sizes

getAdUnitsByStatement

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

PQL Property Object Property
adUnitCode AdUnit.adUnitCode
id AdUnit.id
name AdUnit.name
parentId AdUnit.parentId
status AdUnit.status
lastModifiedDateTime AdUnit.lastModifiedDateTime

Parameters

Field Type Description
filterStatement Statement a Publisher Query Language statement used to filter a set of ad units

Response

Field Type Description
rval AdUnitPage the ad units that match the given filter

performAdUnitAction

Performs actions on AdUnit objects that match the given Statement.query.

Parameters

Field Type Description
adUnitAction
  1. AdUnitAction
    1. ActivateAdUnits
    2. ArchiveAdUnits
    3. DeactivateAdUnits
the action to perform
filterStatement Statement a Publisher Query Language statement used to filter a set of ad units

Response

Field Type Description
rval UpdateResult the result of the action performed

updateAdUnits

Updates the specified AdUnit objects.

Parameters

Field Type Description
adUnits AdUnit[] the ad units to update

Response

Field Type Description
rval AdUnit[] the updated ad units

Errors

Error Reasons
AdSenseAccountError Error for AdSense related API calls.
Enumerations
ASSOCIATE_ACCOUNT_API_ERROR
An error occurred while trying to associate an AdSense account with Ad Manager. Unable to create an association with AdSense or Ad Exchange account.
GET_AD_SLOT_API_ERROR
An error occured while trying to get an associated web property's ad slots. Unable to retrieve ad slot information from AdSense or Ad Exchange account.
GET_CHANNEL_API_ERROR
An error occurred while trying to get an associated web property's ad channels.
GET_BULK_ACCOUNT_STATUSES_API_ERROR
An error occured while trying to retrieve account statues from AdSense API. Unable to retrieve account status information. Please try again later.
RESEND_VERIFICATION_EMAIL_ERROR
An error occured while trying to resend the account association verification email. Error resending verification email. Please try again.
UNEXPECTED_API_RESPONSE_ERROR
An error occured while trying to retrieve a response from the AdSense API. There was a problem processing your request. Please try again later.
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.
AdUnitHierarchyError Caused by creating an AdUnit object with an invalid hierarchy.
Enumerations
INVALID_DEPTH
The depth of the AdUnit in the inventory hierarchy is greater than is allowed. The maximum allowed depth is two below the effective root ad unit for Ad Manager 360 accounts and is one level below the effective root ad unit for Ad Manager accounts.
INVALID_PARENT
The only valid AdUnit.parentId for an Ad Manager account is the Network.effectiveRootAdUnitId, Ad Manager 360 accounts can specify an ad unit hierarchy with more than two levels.
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.
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.
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.
CompanyError A list of all errors associated with companies.
Enumerations
CANNOT_SET_THIRD_PARTY_COMPANY_DUE_TO_TYPE
Indicates that an attempt was made to set a third party company for a company whose type is not the same as the third party company.
CANNOT_UPDATE_COMPANY_TYPE
Indicates that an invalid attempt was made to change a company's type.
INVALID_COMPANY_TYPE
Indicates that this type of company is not supported.
PRIMARY_CONTACT_DOES_NOT_BELONG_TO_THIS_COMPANY
Indicates that an attempt was made to assign a primary contact who does not belong to the specified company.
THIRD_PARTY_STATS_PROVIDER_IS_WRONG_ROLE_TYPE
Indicates that the user specified as the third party stats provider is of the wrong role type. The user must have the third party stats provider role.
INVALID_LABEL_ASSOCIATION
Labels can only be applied to Company.Type.ADVERTISER, Company.Type.HOUSE_ADVERTISER, and Company.Type.AD_NETWORK company types.
INVALID_COMPANY_TYPE_FOR_DEFAULT_BILLING_SETTING
Indicates that the Company.Type does not support default billing settings.
INVALID_DEFAULT_BILLING_SETTING
Indicates that the format of the default billing setting is wrong.
COMPANY_HAS_ACTIVE_SHARE_ASSIGNMENTS
Cannot remove the cross selling config from a company that has active share assignments.
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
CreativeWrapperError Errors specific to creative wrappers.
Enumerations
LABEL_ALREADY_ASSOCIATED_WITH_CREATIVE_WRAPPER
The label is already associated with a CreativeWrapper.
INVALID_LABEL_TYPE
The label type of a creative wrapper must be LabelType.CREATIVE_WRAPPER.
UNRECOGNIZED_MACRO
A macro used inside the snippet is not recognized.
NEITHER_HEADER_NOR_FOOTER_SPECIFIED
When creating a new creative wrapper, either header or footer should exist.
CANNOT_USE_CREATIVE_WRAPPER_TYPE
The network has not been enabled for creating labels of type LabelType.CREATIVE_WRAPPER.
CANNOT_UPDATE_LABEL_ID
Cannot update CreativeWrapper.labelId.
CANNOT_APPLY_TO_AD_UNIT_WITH_VIDEO_SIZES
Cannot apply LabelType.CREATIVE_WRAPPER labels to an ad unit if it has no descendants with AdUnit.adUnitSizes of AdUnitSize#environmentType as EnvironmentType.BROWSER.
CANNOT_APPLY_TO_MOBILE_AD_UNIT
Cannot apply LabelType.CREATIVE_WRAPPER labels to an ad unit if AdUnit.targetPlatform is of type TargetPlatform#MOBILE
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.
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.
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 rate