enum AdUnitHierarchyError.Reason (v202411)
Stay organized with collections
Save and categorize content based on your preferences.
- Namespace
-
https://www.google.com/apis/ads/publisher/v202411
Enumeration |
Description |
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-06 UTC.
[null,null,["Last updated 2025-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eAdUnitHierarchyError.Reason\u003c/code\u003e outlines potential errors when setting up ad unit hierarchies in Google Ad Manager.\u003c/p\u003e\n"],["\u003cp\u003eErrors can arise from excessive ad unit depth, exceeding two levels below the effective root for Ad Manager 360 and one level for Ad Manager accounts.\u003c/p\u003e\n"],["\u003cp\u003eAnother potential error is specifying an invalid parent ID, which should be the \u003ccode\u003eNetwork.effectiveRootAdUnitId\u003c/code\u003e for Ad Manager accounts, while Ad Manager 360 allows for more complex hierarchies.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUNKNOWN\u003c/code\u003e reason is a fallback for errors not specifically defined in the current API version.\u003c/p\u003e\n"]]],["The core content details the `AdUnitHierarchyError.Reason` enumeration within the `InventoryService` of the Google Ad Manager API (v202411). It specifies three possible errors: `INVALID_DEPTH` indicates that an ad unit's depth in the hierarchy exceeds the allowed limit (two levels for Ad Manager 360, one for others). `INVALID_PARENT` denotes that an ad unit's parent is invalid, with the `effectiveRootAdUnitId` being the only valid parent for Ad Manager accounts. `UNKNOWN` represents an error not exposed by the API version.\n"],null,["# enum AdUnitHierarchyError.Reason (v202411)\n\n**Service** \n**InventoryService** [PublisherQueryLanguageService](/ad-manager/api/reference/v202411/PublisherQueryLanguageService.AdUnitHierarchyError.Reason) **Dependencies** \n[AdUnitHierarchyError](/ad-manager/api/reference/v202411/InventoryService.AdUnitHierarchyError) \n▼\n**AdUnitHierarchyError.Reason**\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202411`\n\n| Enumeration | Description |\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `INVALID_DEPTH` | The depth of the [AdUnit](/ad-manager/api/reference/v202411/InventoryService.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. |\n| `INVALID_PARENT` | The only valid [AdUnit.parentId](/ad-manager/api/reference/v202411/InventoryService.AdUnit#parentId) for an Ad Manager account is the [Network.effectiveRootAdUnitId](/ad-manager/api/reference/v202411/NetworkService.Network#effectiveRootAdUnitId), Ad Manager 360 accounts can specify an ad unit hierarchy with more than two levels. |\n| `UNKNOWN` | The value returned if the actual value is not exposed by the requested API version. |"]]