# TeamService (v202602)

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

Teams are used to group users in order to define access to
entities such as companies, inventory and orders.

*** ** * ** ***

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

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

Operations
:
    - [createTeams](https://developers.google.com/ad-manager/api/reference/v202602/TeamService#createTeams)
    - [getTeamsByStatement](https://developers.google.com/ad-manager/api/reference/v202602/TeamService#getTeamsByStatement)
    - [performTeamAction](https://developers.google.com/ad-manager/api/reference/v202602/TeamService#performTeamAction)
    - [updateTeams](https://developers.google.com/ad-manager/api/reference/v202602/TeamService#updateTeams)

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

## createTeams


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

The following fields are required:

- [Team.name](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team#name)

### Parameters

| Field | Type | Description |
|---|---|---|
| `teams` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team[]` `` |   |

### Response

| Field | Type | Description |
|---|---|---|
| `rval` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team[]` `` |   |

## getTeamsByStatement

Gets a `TeamPage` of `Team` objects that satisfy the given [Statement.query](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Statement#query).
The following fields are supported for filtering:

| PQL Property | Object Property |
|---|---|
| `id` | [Team.id](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team#id) |
| `name` | [Team.name](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team#name) |
| `description` | [Team.description](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team#description) |

<br />

### Parameters

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

### Response

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

## performTeamAction

Performs actions on [Team](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team) objects that match the given [Statement.query](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Statement#query).

### Parameters

| Field | Type | Description |
|---|---|---|
| `teamAction` | `` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/TeamService.TeamAction ` 1. ` https://developers.google.com/ad-manager/api/reference/v202602/TeamService.ActivateTeams ` 2. ` https://developers.google.com/ad-manager/api/reference/v202602/TeamService.DeactivateTeams ` `` |   |
| `filterStatement` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Statement ` `` |   |

### Response

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

## updateTeams

Updates the specified [Team](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team) objects.

### Parameters

| Field | Type | Description |
|---|---|---|
| `teams` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team[]` `` |   |

### Response

| Field | Type | Description |
|---|---|---|
| `rval` | `` ` https://developers.google.com/ad-manager/api/reference/v202602/TeamService.Team[]` `` |   |

## Errors

| Error | Reasons |
|---|---|
| [`ApiVersionError`](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.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`](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.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/TeamService.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/TeamService.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. |
| [`EntityLimitReachedError`](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.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/TeamService.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/TeamService.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/TeamService.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. |
| [`NullError`](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.NullError) | Errors associated with violation of a NOT NULL check. *** ** * ** *** **Enumerations** `NULL_CONTENT` :   Specified list/container must not contain any null elements |
| [`OrderError`](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.OrderError) | Lists all errors associated with orders. *** ** * ** *** **Enumerations** `UPDATE_CANCELED_ORDER_NOT_ALLOWED` :   Updating a canceled order is not allowed. `UPDATE_PENDING_APPROVAL_ORDER_NOT_ALLOWED` :   Updating an order that has its approval pending is not allowed. `UPDATE_ARCHIVED_ORDER_NOT_ALLOWED` :   Updating an archived order is not allowed. `CANNOT_MODIFY_PROPOSAL_ID` :   DSM can set the proposal ID only at the time of creation of order. Setting or changing proposal ID at the time of order update is not allowed. `PRIMARY_USER_REQUIRED` :   Cannot have secondary user without a primary user. `PRIMARY_USER_CANNOT_BE_SECONDARY` :   Primary user cannot be added as a secondary user too. `ORDER_TEAM_NOT_ASSOCIATED_WITH_ADVERTISER` :   A team associated with the order must also be associated with the advertiser. `USER_NOT_ON_ORDERS_TEAMS` :   The user assigned to the order, like salesperson or trafficker, must be on one of the order's teams. `AGENCY_NOT_ON_ORDERS_TEAMS` :   The agency assigned to the order must belong to one of the order's teams. `INVALID_FIELDS_SET_FOR_NON_PROGRAMMATIC_ORDER` :   Programmatic info fields should not be set for a non-programmatic order. `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/TeamService.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/TeamService.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/TeamService.PublisherQueryLanguageContextError) | An error that occurs while executing a PQL query contained in a [Statement](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.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/TeamService.PublisherQueryLanguageSyntaxError) | An error that occurs while parsing a PQL query contained in a [Statement](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.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/TeamService.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/TeamService.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/TeamService.RequiredError) | Errors due to missing required field. *** ** * ** *** **Enumerations** `REQUIRED` :   Missing required field. |
| [`ServerError`](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.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/TeamService.StatementError) | An error that occurs while parsing [Statement](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.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/TeamService.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/TeamService.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. |
| [`TeamError`](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.TeamError) | Errors related to a Team. *** ** * ** *** **Enumerations** `ENTITY_NOT_ON_USERS_TEAMS` :   User cannot use this entity because it is not on any of the user's teams. `AD_UNITS_NOT_ON_ORDER_TEAMS` :   The targeted or excluded ad unit must be on the order's teams. `PLACEMENTS_NOT_ON_ORDER_TEAMS` :   The targeted placement must be on the order's teams. `MISSING_USERS_TEAM` :   Entity cannot be created because it is not on any of the user's teams. `ALL_TEAM_ASSOCIATION_NOT_ALLOWED` :   A team that gives access to all entities of a given type cannot be associated with an entity of that type. `INVALID_TEAM_ASSIGNMENT` :   The assignment of team to entities is invalid. `CANNOT_UPDATE_INACTIVE_TEAM` :   Cannot modify or create a team with an inactive status. `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/TeamService.TypeError) | An error for a field which is an invalid type. |
| [`UniqueError`](https://developers.google.com/ad-manager/api/reference/v202602/TeamService.UniqueError) | An error for a field which must satisfy a uniqueness constraint |