# REST Resource: adUnits

- [Resource: AdUnit](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#AdUnit)
  - [JSON representation](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#AdUnit.SCHEMA_REPRESENTATION)
- [AdUnitAttribute](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#AdUnitAttribute)
- [AdUnitState](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#AdUnitState)
- [OutOfHomeVenue](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#OutOfHomeVenue)
- [ImpressionDataRange](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#ImpressionDataRange)
  - [JSON representation](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#ImpressionDataRange.SCHEMA_REPRESENTATION)
- [ImpressionDataUnit](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#ImpressionDataUnit)
  - [JSON representation](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#ImpressionDataUnit.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#METHODS_SUMMARY)

## Resource: AdUnit

A single ad unit.

| JSON representation |
|---|
| ``` { "name": string, "externalId": string, "displayName": string, "description": string, "labels": { string: string, ... }, "attributes": [ enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#AdUnitAttribute`) ], "creatives": [ { object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/CreativeSpecification`) } ], "createTime": string, "updateTime": string, "state": enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#AdUnitState`), "rejectedReason": string, "location": { object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/Shared.Types/LatLng`) }, "directionSet": boolean, "direction": integer, "elevationMetersSet": boolean, "elevationMeters": number, "physicalWidthMetersSet": boolean, "physicalWidthMeters": number, "physicalHeightMetersSet": boolean, "physicalHeightMeters": number, "venue": enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#OutOfHomeVenue`), "fixedLocation": boolean, "indoors": boolean, "impressionDataRanges": [ { object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#ImpressionDataRange`) } ], "photoUrls": [ string ], "products": [ string ] } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name of the ad unit in the format: `adUnits/{id}`. For example `adUnits/adUnit123`. |
| `externalId` | `string` Optional. Seller managed ID presumably in their own system. Once set unlikely to change. It should not be used internally and constraints are not enforced. |
| `displayName` | `string` Required. The display name of the ad unit. Must be UTF-8 encoded with a maximum size of 240 bytes. |
| `description` | `string` Optional. Additional freeform field to describe the ad unit. |
| `labels` | `map (key: string, value: string)` Optional. The set of freeform labels to describe this ad unit. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `attributes[]` | ``enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#AdUnitAttribute`)`` Optional. Attributes to further define this ad unit. |
| `creatives[]` | ``object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/CreativeSpecification`)`` Optional. List of permissible creatives that can be served for this ad unit. This can also be defined at the Product level. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Creation timestamp for ad unit. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Last updated timestamp for ad unit. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `state` | ``enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#AdUnitState`)`` Output only. The state of the ad unit. If AD_UNIT_STATE_REJECTED the rejectedReason will contain the reason. |
| `rejectedReason` | `string` Output only. If approval_status is AD_UNIT_APPROVAL_STATUS_REJECTED this field will contain the reason. |
| `location` | ``object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/Shared.Types/LatLng`)`` Required. Immutable. The latitude and longitude of the ad unit in signed degrees format. |
| `directionSet` | `boolean` Required. True if direction is set. |
| `direction` | `integer` Optional. Immutable. The cardinal direction in degrees with north representing 0. \[0-360). |
| `elevationMetersSet` | `boolean` Required. True if elevationMeters is set. |
| `elevationMeters` | `number` Optional. Immutable. The distance from the bottom of the ad unit to the ground in meters. |
| `physicalWidthMetersSet` | `boolean` Required. True if physicalWidthMeters is set. |
| `physicalWidthMeters` | `number` Optional. Immutable. The physical width of the ad unit in meters. |
| `physicalHeightMetersSet` | `boolean` Required. True if physicalHeightMeters is set. |
| `physicalHeightMeters` | `number` Optional. Immutable. The physical height of the ad unit in meters. |
| `venue` | ``enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#OutOfHomeVenue`)`` Optional. The out of home venue type based on DPAA standards. This is an informational field which can be presented to advertisers and can also be used to filter ad units. |
| `fixedLocation` | `boolean` Optional. Whether the ad is in the fixed location (billboard) or moving (taxi). |
| `indoors` | `boolean` Required. Whether the ad unit is indoors. |
| `impressionDataRanges[]` | ``object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#ImpressionDataRange`)`` Required. The impression data ranges associated with this ad unit. Date ranges are not expected to overlap. Impression data is required for the ad unit to be eligible for buying. |
| `photoUrls[]` | `string` Optional. Photo URLs of the ad unit. |
| `products[]` | `string` Required. The resource names of products associated with this ad unit in the format: `products/{id}`. For example `products/product123`. |

## AdUnitAttribute

Possible attributes used to further define the ad unit.

| Enums ||
|---|---|
| `AD_UNIT_ATTRIBUTE_UNSPECIFIED` | Default value when Ad Unit Attribute is not specified or is unknown in this version. |
| `AD_UNIT_ATTRIBUTE_ILLUMINATED` | Is the ad unit visible in the dark if in the physical world. |
| `AD_UNIT_ATTRIBUTE_DIGITAL` | A digital ad unit, if not included classic physical is implied. |
| `AD_UNIT_ATTRIBUTE_PHYSICAL` | The ad unit exists as an object in the physical world. |

## AdUnitState

State of an ad unit from a seller's perspective.

| Enums ||
|---|---|
| `AD_UNIT_STATE_UNSPECIFIED` | Default value when Ad Unit State is not specified or is unknown in this version. |
| `AD_UNIT_STATE_PENDING` | Ad unit is pending approval. |
| `AD_UNIT_STATE_APPROVED` | Ad unit is approved. |
| `AD_UNIT_STATE_REJECTED` | Ad unit is rejected. |
| `AD_UNIT_STATE_DELETED` | Ad unit is deleted. |

## OutOfHomeVenue

List of out of home venue types based on DPAA Standards.

| Enums ||
|---|---|
| `OOH_VENUE_UNSPECIFIED` | Default value when OOH Venue is not specified or is unknown in this version. |
| `OOH_VENUE_AIRBORNE` | Out of home venue categorized as airborne. |
| `OOH_VENUE_AIRPORTS_GENERAL` | Out of home venue categorized as airports general. |
| `OOH_VENUE_AIRPORTS_BAGGAGE_CLAIM` | Out of home venue categorized as airports baggage claim. |
| `OOH_VENUE_AIRPORTS_TERMINAL` | Out of home venue categorized as airports terminal. |
| `OOH_VENUE_AIRPORTS_LOUNGES` | Out of home venue categorized as airports lounges. |
| `OOH_VENUE_ATMS` | Out of home venue categorized as ATMs. |
| `OOH_VENUE_BACKLIGHTS` | Out of home venue categorized as backlights. |
| `OOH_VENUE_BARS` | Out of home venue categorized as bars. |
| `OOH_VENUE_BENCHES` | Out of home venue categorized as benches. |
| `OOH_VENUE_BIKE_RACKS` | Out of home venue categorized as bike racks. |
| `OOH_VENUE_BULLETINS` | Out of home venue categorized as bulletins. |
| `OOH_VENUE_BUSES` | Out of home venue categorized as buses. |
| `OOH_VENUE_CAFES` | Out of home venue categorized as cafes. |
| `OOH_VENUE_CASUAL_DINING_RESTAURANTS` | Out of home venue categorized as casual dining restaurants. |
| `OOH_VENUE_CHILD_CARE` | Out of home venue categorized as child care. |
| `OOH_VENUE_CINEMA` | Out of home venue categorized as cinema. |
| `OOH_VENUE_CITY_INFORMATION_PANELS` | Out of home venue categorized as city information panels. |
| `OOH_VENUE_CONVENIENCE_STORES` | Out of home venue categorized as convenience stores. |
| `OOH_VENUE_DEDICATED_WILD_POSTING` | Out of home venue categorized as dedicated wild posting. |
| `OOH_VENUE_DOCTORS_OFFICES_GENERAL` | Out of home venue categorized as doctors offices general. |
| `OOH_VENUE_DOCTORS_OFFICES_OBSTETRICS` | Out of home venue categorized as doctors offices obstetrics. |
| `OOH_VENUE_DOCTORS_OFFICES_PEDIATRICS` | Out of home venue categorized as doctors offices pediatrics. |
| `OOH_VENUE_FAMILY_ENTERTAINMENT` | Out of home venue categorized as family entertainment. |
| `OOH_VENUE_FERRIES` | Out of home venue categorized as ferries. |
| `OOH_VENUE_FINANCIAL_SERVICES` | Out of home venue categorized as financial services. |
| `OOH_VENUE_GAS_STATIONS` | Out of home venue categorized as gas stations. |
| `OOH_VENUE_GOLF_COURSES` | Out of home venue categorized as golf courses. |
| `OOH_VENUE_GYMS` | Out of home venue categorized as gyms. |
| `OOH_VENUE_HOSPITALS` | Out of home venue categorized as hospitals. |
| `OOH_VENUE_HOTELS` | Out of home venue categorized as hotels. |
| `OOH_VENUE_JUNIOR_POSTERS` | Out of home venue categorized as junior posters. |
| `OOH_VENUE_KIOSKS` | Out of home venue categorized as kiosks. |
| `OOH_VENUE_MALLS_GENERAL` | Out of home venue categorized as malls general. |
| `OOH_VENUE_MALLS_FOOD_COURTS` | Out of home venue categorized as malls food courts. |
| `OOH_VENUE_MARINE` | Out of home venue categorized as marine. |
| `OOH_VENUE_MOBILE_BILLBOARDS` | Out of home venue categorized as mobile billboards. |
| `OOH_VENUE_MOVIE_THEATER_LOBBIES` | Out of home venue categorized as movie theater lobbies. |
| `OOH_VENUE_NEWSSTANDS` | Out of home venue categorized as newsstands. |
| `OOH_VENUE_OFFICE_BUILDINGS` | Out of home venue categorized as office buildings. |
| `OOH_VENUE_PHONE_KIOSKS` | Out of home venue categorized as phone kiosks. |
| `OOH_VENUE_POSTERS` | Out of home venue categorized as posters. |
| `OOH_VENUE_QSR` | Out of home venue categorized as qsr. |
| `OOH_VENUE_RAIL` | Out of home venue categorized as rail. |
| `OOH_VENUE_RECEPTACLES` | Out of home venue categorized as receptacles. |
| `OOH_VENUE_RESORTS` | Out of home venue categorized as resorts. |
| `OOH_VENUE_RETAIL` | Out of home venue categorized as retail. |
| `OOH_VENUE_SALONS` | Out of home venue categorized as salons. |
| `OOH_VENUE_SHELTERS` | Out of home venue categorized as shelters. |
| `OOH_VENUE_SPORTS_ARENAS` | Out of home venue categorized as sports arenas. |
| `OOH_VENUE_SUBWAY` | Out of home venue categorized as subway. |
| `OOH_VENUE_TAXIS` | Out of home venue categorized as taxis. |
| `OOH_VENUE_TRUCKSIDE` | Out of home venue categorized as truckside. |
| `OOH_VENUE_UNIVERSITIES` | Out of home venue categorized as universities. |
| `OOH_VENUE_URBAN_PANELS` | Out of home venue categorized as urban panels. |
| `OOH_VENUE_VETERINARIAN_OFFICES` | Out of home venue categorized as veterinarian offices. |
| `OOH_VENUE_WALLS` | Out of home venue categorized as walls. |
| `OOH_VENUE_OTHER` | Out of home venue categorized as other. |

## ImpressionDataRange

Impression data for a date range.

| JSON representation |
|---|
| ``` { "impressionDataStartTime": string, "impressionDataEndTime": string, "impressionDataUnits": [ { object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#ImpressionDataUnit`) } ] } ``` |

| Fields ||
|---|---|
| `impressionDataStartTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Required. Start of the interval when the impression data is valid (inclusive). A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `impressionDataEndTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Required. End of the interval when the impression data is valid (exclusive). A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `impressionDataUnits[]` | ``object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits#ImpressionDataUnit`)`` Required. Impression data for the specified date range. |

## ImpressionDataUnit

Impression data for a given day of week and hours of day.

| JSON representation |
|---|
| ``` { "dayOfWeek": enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/Shared.Types/DayOfWeek`), "hourOfDay": integer, "impressions": string } ``` |

| Fields ||
|---|---|
| `dayOfWeek` | ``enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/Shared.Types/DayOfWeek`)`` Required. Day of week the impression data represents. |
| `hourOfDay` | `integer` Required. Hours of day the impression data represents in 24 hour format. Should be from 0 to 23. |
| `impressions` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Number of impressions on the specified day of week at the specified hours of day. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits/create` | Creates a new ad unit. |
| ### `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits/delete` | Deletes an existing ad unit. |
| ### `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits/get` | Retrieves an individual ad unit. |
| ### `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits/list` | Lists ad units. |
| ### `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/adUnits/patch` | Updates an existing ad unit. |