# AudienceSegmentService (v202602)

Provides operations for creating, updating and retrieving [AudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment) objects.

*** ** * ** ***

Production WSDL
:
    `
    https://ads.google.com/apis/ads/publisher/v202602/AudienceSegmentService?wsdl
    `

Namespace
:
    `https://www.google.com/apis/ads/publisher/v202602`

Operations
:
    - [createAudienceSegments](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#createAudienceSegments)
    - [getAudienceSegmentsByStatement](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#getAudienceSegmentsByStatement)
    - [performAudienceSegmentAction](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#performAudienceSegmentAction)
    - [updateAudienceSegments](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#updateAudienceSegments)

Errors
:
    - [ApiVersionError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#ApiVersionError)
    - [AudienceSegmentError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#AudienceSegmentError)
    - [AuthenticationError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#AuthenticationError)
    - [CollectionSizeError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#CollectionSizeError)
    - [CommonError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#CommonError)
    - [CustomTargetingError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#CustomTargetingError)
    - [EntityChildrenLimitReachedError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#EntityChildrenLimitReachedError)
    - [EntityLimitReachedError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#EntityLimitReachedError)
    - [FeatureError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#FeatureError)
    - [InternalApiError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#InternalApiError)
    - [NotNullError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#NotNullError)
    - [ParseError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#ParseError)
    - [PermissionError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#PermissionError)
    - [PublisherQueryLanguageContextError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#PublisherQueryLanguageContextError)
    - [PublisherQueryLanguageSyntaxError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#PublisherQueryLanguageSyntaxError)
    - [QuotaError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#QuotaError)
    - [RequiredCollectionError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#RequiredCollectionError)
    - [RequiredError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#RequiredError)
    - [ServerError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#ServerError)
    - [StatementError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#StatementError)
    - [StringFormatError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#StringFormatError)
    - [StringLengthError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#StringLengthError)
    - [TypeError](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService#TypeError)

## createAudienceSegments

Creates new [FirstPartyAudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment) objects.

### Parameters

| Field | Type | Description |
|---|---|---|
| `segments` | `` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment[]` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.NonRuleBasedFirstPartyAudienceSegment ` 2. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegmentSummary ` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegment ` `` |   |

### Response

| Field | Type | Description |
|---|---|---|
| `rval` | `` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment[]` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.NonRuleBasedFirstPartyAudienceSegment ` 2. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegmentSummary ` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegment ` `` |   |

## getAudienceSegmentsByStatement

Gets an [AudienceSegmentPage](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegmentPage) of [AudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment) objects that satisfy the given
[Statement.query](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.Statement#query). The following fields are supported for filtering:

| PQL Property | Object Property |
|---|---|
| `id` | [AudienceSegment.id](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment#id) |
| `name` | [AudienceSegment.name](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment#name) |
| `status` | [AudienceSegment.status](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment#status) |
| `type` | [AudienceSegment.type](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment#type) |
| `size` | [AudienceSegment.size](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment#size) |
| `dataProviderName` | [AudienceSegmentDataProvider.name](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegmentDataProvider#name) |
| `segmentType` | [AudienceSegment.type](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment#type) |
| `approvalStatus` | [ThirdPartyAudienceSegment.approvalStatus](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.ThirdPartyAudienceSegment#approvalStatus) |
| `cost` | [ThirdPartyAudienceSegment.cost](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.ThirdPartyAudienceSegment#cost) |
| `startDateTime` | [ThirdPartyAudienceSegment.startDateTime](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.ThirdPartyAudienceSegment#startDateTime) |
| `endDateTime` | [ThirdPartyAudienceSegment.endDateTime](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.ThirdPartyAudienceSegment#endDateTime) |

<br />

### Parameters

| Field | Type | Description |
|---|---|---|
| `filterStatement` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.Statement ` `` |   |

### Response

| Field | Type | Description |
|---|---|---|
| `rval` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegmentPage ` `` |   |

## performAudienceSegmentAction

Performs the given [AudienceSegmentAction](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegmentAction) on the set of segments identified by the given
statement.

### Parameters

| Field | Type | Description |
|---|---|---|
| `action` | `` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegmentAction ` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.ActivateAudienceSegments ` 2. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.ApproveAudienceSegments ` 3. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.DeactivateAudienceSegments ` 4. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.PopulateAudienceSegments ` 5. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RejectAudienceSegments ` `` |   |
| `filterStatement` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.Statement ` `` |   |

### Response

| Field | Type | Description |
|---|---|---|
| `rval` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.UpdateResult ` `` |   |

## updateAudienceSegments

Updates the given [FirstPartyAudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment) objects.

### Parameters

| Field | Type | Description |
|---|---|---|
| `segments` | `` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment[]` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.NonRuleBasedFirstPartyAudienceSegment ` 2. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegmentSummary ` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegment ` `` |   |

### Response

| Field | Type | Description |
|---|---|---|
| `rval` | `` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.FirstPartyAudienceSegment[]` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.NonRuleBasedFirstPartyAudienceSegment ` 2. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegmentSummary ` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RuleBasedFirstPartyAudienceSegment ` `` |   |

## Errors

| Error | Reasons |
|---|---|
| [`ApiVersionError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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. |
| [`AudienceSegmentError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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. `SHARED_SELLING_PARTNER_ROOT_CANNOT_BE_INCLUDED` :   Audience segment rule cannot contain shared selling inventory unit. `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 occurred when purchasing global licenses. `SEGMENT_VIOLATED_POLICY` :   Segment cannot be activated as it violates Google's Platform Policy. `UNKNOWN` :   The value returned if the actual value is not exposed by the requested API version. |
| [`AuthenticationError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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. `REQUEST_TOO_LARGE` :   Indicates that the request is too large to be processed. This error is thrown when internal system limits are exceeded due to the number of affected entities implied by the input parameters. Clients should reduce the number of affected entities and try again. `UNKNOWN` :   The value returned if the actual value is not exposed by the requested API version. |
| [`CustomTargetingError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomTargetingError) | Lists all errors related to [CustomTargetingKey](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey) and [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) objects. *** ** * ** *** **Enumerations** `KEY_NOT_FOUND` :   Requested [CustomTargetingKey](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey) is not found. `KEY_COUNT_TOO_LARGE` :   Number of [CustomTargetingKey](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey) objects created exceeds the limit allowed for the network. `KEY_NAME_DUPLICATE` : [CustomTargetingKey](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey) with the same [CustomTargetingKey.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey#name) already exists. `KEY_NAME_EMPTY` : [CustomTargetingKey.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey#name) is empty. `KEY_NAME_INVALID_LENGTH` : [CustomTargetingKey.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey#name) is too long. `KEY_NAME_INVALID_CHARS` : [CustomTargetingKey.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey#name) contains unsupported or reserved characters. `KEY_NAME_RESERVED` : [CustomTargetingKey.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey#name) matches one of the reserved custom targeting key names. `KEY_DISPLAY_NAME_INVALID_LENGTH` : [CustomTargetingKey.displayName](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey#displayName) is too long. `KEY_STATUS_NOT_ACTIVE` :   Key is not active. `VALUE_NOT_FOUND` :   Requested [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) is not found. `GET_VALUES_BY_STATEMENT_MUST_CONTAIN_KEY_ID` :   The `WHERE` clause in the [Statement.query](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.Statement#query) must always contain [CustomTargetingValue.customTargetingKeyId](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.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](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) objects associated with a [CustomTargetingKey](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey) exceeds the network limit. This is only applicable for keys of type `CustomTargetingKey.Type#PREDEFINED`. `VALUE_NAME_DUPLICATE` : [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) with the same [CustomTargetingValue.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue#name) already exists. `VALUE_NAME_EMPTY` : [CustomTargetingValue.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue#name) is empty. `VALUE_NAME_INVALID_LENGTH` : [CustomTargetingValue.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue#name) is too long. `VALUE_NAME_INVALID_CHARS` : [CustomTargetingValue.name](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue#name) contains unsupported or reserved characters. `VALUE_DISPLAY_NAME_INVALID_LENGTH` : [CustomTargetingValue.displayName](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue#displayName) is too long. `VALUE_MATCH_TYPE_NOT_ALLOWED` :   Only Ad Manager 360 networks can have [CustomTargetingValue.matchType](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue#matchType) other than [CustomTargetingValue.MatchType.EXACT](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue.MatchType#EXACT). `VALUE_MATCH_TYPE_NOT_EXACT_FOR_PREDEFINED_KEY` :   You can only create [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) objects with match type [CustomTargetingValue.MatchType.EXACT](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue.MatchType#EXACT) when associating with [CustomTargetingKey](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey) objects of type [CustomTargetingKey.Type.PREDEFINED](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey.Type#PREDEFINED) `SUFFIX_MATCH_TYPE_NOT_ALLOWED` : [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) object cannot have match type of [CustomTargetingValue.MatchType.SUFFIX](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue.MatchType#SUFFIX) when adding a [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) to a line item. `CONTAINS_MATCH_TYPE_NOT_ALLOWED` : [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) object cannot have match type of [CustomTargetingValue.MatchType.CONTAINS](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue.MatchType#CONTAINS) when adding a [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) to targeting expression of a line item. `VALUE_STATUS_NOT_ACTIVE` :   Value is not active. `KEY_WITH_MISSING_VALUES` :   The [CustomTargetingKey](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey) does not have any [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) associated with it. `INVALID_VALUE_FOR_KEY` :   The [CustomTargetingKey](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingKey) has a [CustomTargetingValue](https://developers.google.com/ad-manager/api/reference/v202602/CustomTargetingService.CustomTargetingValue) specified for which the value is not a valid child. `CANNOT_OR_DIFFERENT_KEYS` : [CustomCriteriaSet.LogicalOperator.OR](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.CustomCriteria) cannot have deleted keys. `DELETED_VALUE_CANNOT_BE_USED_FOR_TARGETING` :   The value has been deleted. [CustomCriteria](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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_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](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment) object cannot be targeted. `CANNOT_TARGET_THIRD_PARTY_AUDIENCE_SEGMENT` :   Third party [AudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment) cannot be targeted. `CANNOT_TARGET_INACTIVE_AUDIENCE_SEGMENT` :   Inactive [AudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment) object cannot be targeted. `INVALID_AUDIENCE_SEGMENTS` :   Targeted [AudienceSegment](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.AudienceSegment) objects have not been approved. `UNKNOWN` :   The value returned if the actual value is not exposed by the requested API version. |
| [`EntityChildrenLimitReachedError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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. |
| [`EntityLimitReachedError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.EntityLimitReachedError) | An error that occurs when creating an entity if the limit on the number of allowed entities for a network has already been reached. *** ** * ** *** **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. `ACTIVE_TARGETING_PRESETS_LIMIT_REACHED` :   The count of active targeting presets exceeds the limit. `UNKNOWN` :   The value returned if the actual value is not exposed by the requested API version. |
| [`FeatureError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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. |
| [`InternalApiError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.InternalApiError) | Indicates that a server-side error has occured. `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. |
| [`NotNullError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.PublisherQueryLanguageContextError) | An error that occurs while executing a PQL query contained in a [Statement](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.PublisherQueryLanguageSyntaxError) | An error that occurs while parsing a PQL query contained in a [Statement](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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](https://developers.google.com/ad-manager/api/reference/v202602/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. |
| [`RequiredCollectionError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.RequiredError) | Errors due to missing required field. *** ** * ** *** **Enumerations** `REQUIRED` :   Missing required field. |
| [`ServerError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.StatementError) | An error that occurs while parsing [Statement](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.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. |
| [`TypeError`](https://developers.google.com/ad-manager/api/reference/v202602/AudienceSegmentService.TypeError) | An error for a field which is an invalid type. |