Inventories
Create, update, and query DoubleClick for Publishers Inventories.
Select
The following queries are processed server side by the Google Ads Manager APIs.
Retrieve a list of Inventories. For example:
SELECT * FROM [Inventories]
Additionally, you can specify the Id or filter by any other column.
SELECT * FROM [Inventories] WHERE Id = '21619885919'
Insert
To create a new Inventory, the ParentId and Name fields are required. Additionally, you can also set Description and TargetWindow.
INSERT INTO [Inventories] (ParentId, Name, Description, TargetWindow) VALUES ('45429123', 'Ad_Unit_122', 'Ad unit description.', 'BLANK')
Update
You can update any field not marked as read-only by specifying the Id column.
UPDATE [Inventories] SET Name = 'NewAdUnitName' WHERE Id = '45429003'
Delete
The DELETE operation is not supported for this table.
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
Uniquely identifies the AdUnit. This value is read-only and is assigned by Google when an ad unit is created. This attribute is required for updates. |
ParentId | String | False |
The ID of the ad unit's parent. Every ad unit has a parent except for the root ad unit, which is created by Google. This attribute is required when creating the ad unit. Once the ad unit is created, this value will be read-only. |
HasChildren | Boolean | True |
This field is set to true if the ad unit has any children. This attribute is read-only and is populated by Google. |
ParentPath | String | True |
The path to this ad unit in the ad unit hierarchy represented as a list from the root to this ad unit's parent. For root ad units, this list is empty. This attribute is read-only and is populated by Google. |
Name | String | False |
The name of the ad unit. This attribute is required and its maximum length is 255 characters. This attribute must also be case-insensitive unique. |
Description | String | False |
A description of the ad unit. This value is optional and its maximum length is 65,535 characters. |
TargetWindow | String | False |
The value to use for the HTML link's target attribute. This value is optional and will be interpreted as TargetWindow. The default value is TOP. The allowed values are TOP, BLANK. |
Status | String | True |
The status of this ad unit. It defaults to InventoryStatus.ACTIVE. This value cannot be updated directly using InventoryService.updateAdUnit. It can only be modified by performing actions via InventoryService.performAdUnitAction. The allowed values are ACTIVE, INACTIVE, ARCHIVED. |
AdUnitCode | String | False |
A string used to uniquely identify the ad unit for the purposes of serving the ad. This attribute is optional and can be set during ad unit creation. If it is not provided, it will be assigned by Google based off of the inventory unit ID. Once an ad unit is created, its adUnitCode cannot be changed. |
AdUnitSizes | String | False |
The permissible creative sizes that can be served inside this ad unit. This attribute is optional. This attribute replaces the sizes attribute. |
IsInterstitial | Boolean | False |
Whether this is an interstitial ad unit. |
IsNative | Boolean | False |
Whether this is a native ad unit. |
IsFluid | Boolean | False |
Whether this is a fluid ad unit. |
ExplicitlyTargeted | Boolean | False |
If this field is set to true, then the AdUnit will not be implicitly targeted when its parent is. Traffickers must explicitly target such an ad unit or else no line items will serve to it. This feature is only available for Ad Manager 360 accounts. |
AdSenseSettings | String | False |
AdSense specific settings. To overwrite this, set the adSenseSettingsSource to PropertySourceType.DIRECTLY_SPECIFIED when setting the value of this field. |
AdSenseSettingsSource | String | False |
Specifies the source of adSenseSettings value. To revert an overridden value to its default, set this field to PropertySourceType.PARENT. The allowed values are PARENT, DIRECTLY_SPECIFIED, UNKNOWN. |
AppliedLabelFrequencyCaps | String | False |
The set of label frequency caps applied directly to this ad unit. There is a limit of 10 label frequency caps per ad unit. |
EffectiveLabelFrequencyCaps | String | True |
Contains the set of labels applied directly to the ad unit as well as those inherited from parent ad units. This field is readonly and is assigned by Google. |
AppliedLabels | String | True |
The set of labels applied directly to this ad unit. |
EffectiveAppliedLabels | String | True |
Contains the set of labels applied directly to the ad unit as well as those inherited from the parent ad units. If a label has been negated, only the negated label is returned. This field is readonly and is assigned by Google. |
EffectiveTeamIds | String | True |
The IDs of all teams that this ad unit is on as well as those inherited from parent ad units. This value is read-only and is set by Google. |
AppliedTeamIds | String | False |
The IDs of all teams that this ad unit is on directly. |
LastModifiedDateTime | Datetime | False |
The date and time this ad unit was last modified. |
SmartSizeMode | String | False |
The smart size mode for this ad unit. This attribute is optional and defaults to SmartSizeMode.NONE for fixed sizes. The allowed values are UNKNOWN, NONE, SMART_BANNER, DYNAMIC_SIZE. |
RefreshRate | Int | False |
The interval in seconds which ad units in mobile apps automatically refresh. Valid values are between 30 and 120 seconds. This attribute is optional and only applies to ad units in mobile apps. If this value is not set, then the mobile app ad will not refresh. |
ExternalSetTopBoxChannelId | String | True |
Specifies an ID for a channel in an external set-top box campaign management system. This attribute is only meaningful if isSetTopBoxEnabled is true. This attribute is read-only. |
IsSetTopBoxEnabled | Boolean | True |
Flag that specifies whether this ad unit represents an external set-top box channel. This attribute is read-only. |
ApplicationId | Long | False |
The MobileApplication.applicationId for the CTV application that this ad unit is within. This attribute is optional. |