# DealTerms

- [JSON representation](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#SCHEMA_REPRESENTATION)
- [BrandingType](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#BrandingType)
- [Price](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Price)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Price.SCHEMA_REPRESENTATION)
- [PricingType](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricingType)
- [Money](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Money)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Money.SCHEMA_REPRESENTATION)
- [GuaranteedFixedPriceTerms](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#GuaranteedFixedPriceTerms)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#GuaranteedFixedPriceTerms.SCHEMA_REPRESENTATION)
- [PricePerBuyer](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricePerBuyer)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricePerBuyer.SCHEMA_REPRESENTATION)
- [ReservationType](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#ReservationType)
- [NonGuaranteedFixedPriceTerms](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#NonGuaranteedFixedPriceTerms)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#NonGuaranteedFixedPriceTerms.SCHEMA_REPRESENTATION)
- [NonGuaranteedAuctionTerms](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#NonGuaranteedAuctionTerms)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#NonGuaranteedAuctionTerms.SCHEMA_REPRESENTATION)

The deal terms specify the details of a Product/deal. They specify things like price per buyer, the type of pricing model (for example, fixed price, auction) and expected impressions from the publisher.

| JSON representation ||
|---|---|
| ``` { "description": string, "brandingType": enum (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#BrandingType`), "estimatedGrossSpend": { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Price`) }, "estimatedImpressionsPerDay": string, "sellerTimeZone": string, // Union field `pricing_terms` can be only one of the following: "guaranteedFixedPriceTerms": { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#GuaranteedFixedPriceTerms`) }, "nonGuaranteedFixedPriceTerms": { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#NonGuaranteedFixedPriceTerms`) }, "nonGuaranteedAuctionTerms": { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#NonGuaranteedAuctionTerms`) } // End of list of possible types for union field `pricing_terms`. } ``` |

| Fields ||
|---|---|---|
| `description` | `string` Publisher provided description for the terms. |
| `brandingType` | ``enum (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#BrandingType`)`` Visibility of the URL in bid requests. (default: BRANDED) |
| `estimatedGrossSpend` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Price`)`` Non-binding estimate of the estimated gross spend for this deal. Can be set by buyer or seller. |
| `estimatedImpressionsPerDay` | `string (https://developers.google.com/discovery/v1/type-format format)` Non-binding estimate of the impressions served per day. Can be set by buyer or seller. |
| `sellerTimeZone` | `string` The time zone name. For deals with Cost Per Day billing, defines the time zone used to mark the boundaries of a day. It should be an IANA TZ name, such as "America/Los_Angeles". For more information, see <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>. |
| Union field `pricing_terms`. Specifies the pricing terms for a deal. `pricing_terms` can be only one of the following: |||
| `guaranteedFixedPriceTerms` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#GuaranteedFixedPriceTerms`)`` The terms for guaranteed fixed price deals. |
| `nonGuaranteedFixedPriceTerms` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#NonGuaranteedFixedPriceTerms`)`` The terms for non-guaranteed fixed price deals. |
| `nonGuaranteedAuctionTerms` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#NonGuaranteedAuctionTerms`)`` The terms for non-guaranteed auction deals. |

## BrandingType

Specifies the branding type for the deal.

| Enums ||
|---|---|
| `BRANDING_TYPE_UNSPECIFIED` | A placeholder for an undefined branding type. |
| `BRANDED` | Full URL is included in bid requests. |
| `SEMI_TRANSPARENT` | A TopLevelDomain or masked URL is sent in bid requests rather than the full one. |

## Price

Represents a price and a pricing type for a product / deal.

| JSON representation ||
|---|---|
| ``` { "pricingType": enum (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricingType`), "amount": { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Money`) } } ``` |

| Fields ||
|---|---|
| `pricingType` | ``enum (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricingType`)`` The pricing type for the deal/product. (default: CPM) |
| `amount` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Money`)`` The actual price with currency specified. |

## PricingType

Specifies the pricing type for a deal.

| Enums ||
|---|---|
| `PRICING_TYPE_UNSPECIFIED` | A placeholder for an undefined pricing type. If the pricing type is unpsecified, `COST_PER_MILLE` will be used instead. |
| `COST_PER_MILLE` | Cost per thousand impressions. |
| `COST_PER_DAY` | Cost per day |

## Money

Represents an amount of money with its currency type.

| JSON representation ||
|---|---|
| ``` { "currencyCode": string, "units": string, "nanos": integer } ``` |

| Fields ||
|---|---|
| `currencyCode` | `string` The three-letter currency code defined in ISO 4217. |
| `units` | `string (https://developers.google.com/discovery/v1/type-format format)` The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
| `nanos` | `integer` Number of nano (10\^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |

## GuaranteedFixedPriceTerms

Terms for Programmatic Guaranteed Deals.

| JSON representation ||
|---|---|
| ``` { "guaranteedLooks": string, "guaranteedImpressions": string, "fixedPrices": [ { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricePerBuyer`) } ], "minimumDailyLooks": string, "reservationType": enum (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#ReservationType`), "impressionCap": string, "percentShareOfVoice": string } ``` |

| Fields ||
|---|---|
| `guaranteedLooks` | `string (https://developers.google.com/discovery/v1/type-format format)` Count of guaranteed looks. Required for deal, optional for product. |
| `guaranteedImpressions` | `string (https://developers.google.com/discovery/v1/type-format format)` Guaranteed impressions as a percentage. This is the percentage of guaranteed looks that the buyer is guaranteeing to buy. |
| `fixedPrices[]` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricePerBuyer`)`` Fixed price for the specified buyer. |
| `minimumDailyLooks` | `string (https://developers.google.com/discovery/v1/type-format format)` Daily minimum looks for CPD deal types. |
| `reservationType` | ``enum (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#ReservationType`)`` The reservation type for a Programmatic Guaranteed deal. This indicates whether the number of impressions is fixed, or a percent of available impressions. If not specified, the default reservation type is STANDARD. |
| `impressionCap` | `string (https://developers.google.com/discovery/v1/type-format format)` The lifetime impression cap for CPM sponsorship deals. The deal will stop serving when the cap is reached. |
| `percentShareOfVoice` | `string (https://developers.google.com/discovery/v1/type-format format)` For sponsorship deals, this is the percentage of the seller's eligible impressions that the deal will serve until the cap is reached. |

## PricePerBuyer

Used to specify pricing rules for buyers/advertisers. Each PricePerBuyer in a product can become 0 or 1 deals. To check if there is a PricePerBuyer for a particular buyer or buyer/advertiser pair, we look for the most specific matching rule - we first look for a rule matching the buyer and advertiser, next a rule with the buyer but an empty advertiser list, and otherwise look for a matching rule where no buyer is set.

| JSON representation ||
|---|---|
| ``` { "price": { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Price`) }, "buyer": { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/Buyer`) }, "advertiserIds": [ string ] } ``` |

| Fields ||
|---|---|
| `price` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#Price`)`` The specified price. |
| `buyer` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/Buyer`)`` The buyer who will pay this price. If unset, all buyers can pay this price (if the advertisers match, and there's no more specific rule matching the buyer). |
| `advertiserIds[]` | `string` The list of advertisers for this price when associated with this buyer. If empty, all advertisers with this buyer pay this price. |

## ReservationType

The reservation type for a Programmatic Guaranteed deal.

| Enums ||
|---|---|
| `RESERVATION_TYPE_UNSPECIFIED` | An unspecified reservation type. |
| `STANDARD` | Non-sponsorship deal. |
| `SPONSORSHIP` | Sponsorship deals don't have impression goal (guaranteedLooks) and they are served based on the flight dates. For CPM Sponsorship deals, impressionCap is the lifetime impression limit. |

## NonGuaranteedFixedPriceTerms

Terms for Preferred Deals.

| JSON representation ||
|---|---|
| ``` { "fixedPrices": [ { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricePerBuyer`) } ] } ``` |

| Fields ||
|---|---|
| `fixedPrices[]` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricePerBuyer`)`` Fixed price for the specified buyer. |

## NonGuaranteedAuctionTerms

Terms for Private Auctions. Note that Private Auctions can be created only by the seller, but they can be returned in a get or list request.

| JSON representation ||
|---|---|
| ``` { "reservePricesPerBuyer": [ { object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricePerBuyer`) } ], "autoOptimizePrivateAuction": boolean } ``` |

| Fields ||
|---|---|
| `reservePricesPerBuyer[]` | ``object (`https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/DealTerms#PricePerBuyer`)`` Reserve price for the specified buyer. |
| `autoOptimizePrivateAuction` | `boolean` True if open auction buyers are allowed to compete with invited buyers in this private auction. |