# REST Resource: buyers.finalizedDeals

- [Resource: FinalizedDeal](https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#FinalizedDeal)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#FinalizedDeal.SCHEMA_REPRESENTATION)
- [DealServingStatus](https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#DealServingStatus)
- [DealPausingInfo](https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#DealPausingInfo)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#DealPausingInfo.SCHEMA_REPRESENTATION)
- [RtbMetrics](https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#RtbMetrics)
  - [JSON representation](https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#RtbMetrics.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#METHODS_SUMMARY)

## Resource: FinalizedDeal

A finalized deal is a snapshot of the deal when both buyer and seller accept the deal. The buyer or seller can update the deal after it's been finalized and renegotiate on the deal targeting, terms and other fields, while at the same time the finalized snapshot of the deal can still be retrieved using this API. The finalized deal contains a copy of the deal as it existed when most recently finalized, as well as fields related to deal serving such as pause/resume status, RTB metrics, and more.

| JSON representation |
|---|
| ``` { "name": string, "deal": { object (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.proposals.deals#Deal`) }, "dealServingStatus": enum (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#DealServingStatus`), "dealPausingInfo": { object (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#DealPausingInfo`) }, "rtbMetrics": { object (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#RtbMetrics`) }, "readyToServe": boolean } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name of the finalized deal. Format: `buyers/{accountId}/finalizedDeals/{finalizedDealId}` |
| `deal` | ``object (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.proposals.deals#Deal`)`` A copy of the `https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.proposals.deals#Deal` made upon finalization. During renegotiation, this will reflect the last finalized deal before renegotiation was initiated. |
| `dealServingStatus` | ``enum (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#DealServingStatus`)`` Serving status of the deal. |
| `dealPausingInfo` | ``object (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#DealPausingInfo`)`` Information related to deal pausing for the deal. |
| `rtbMetrics` | ``object (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals#RtbMetrics`)`` Real-time bidding metrics for this deal. |
| `readyToServe` | `boolean` Whether the Programmatic Guaranteed deal is ready for serving. |

## DealServingStatus

Serving status.

| Enums ||
|---|---|
| `DEAL_SERVING_STATUS_UNSPECIFIED` | Unspecified. |
| `ACTIVE` | The deal is actively serving or ready to serve when the start date is reached. |
| `ENDED` | The deal serving has ended. |
| `PAUSED_BY_BUYER` | The deal serving is paused by buyer. |
| `PAUSED_BY_SELLER` | The deal serving is paused by seller. |

## DealPausingInfo

Information related to deal pausing.

| JSON representation |
|---|
| ``` { "pausingConsented": boolean, "pauseRole": enum (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/BuyerSellerRole`), "pauseReason": string } ``` |

| Fields ||
|---|---|
| `pausingConsented` | `boolean` Whether pausing is consented between buyer and seller for the deal. |
| `pauseRole` | ``enum (`https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/BuyerSellerRole`)`` The party that first paused the deal; unspecified for active deals. |
| `pauseReason` | `string` The reason for the pausing of the deal; empty for active deals. |

## RtbMetrics

Real-time bidding metrics. For what each metric means refer to [Report metrics](https://support.google.com/adxbuyer/answer/6115195#report-metrics)

| JSON representation |
|---|
| ``` { "bidRequests7Days": string, "bids7Days": string, "adImpressions7Days": string, "bidRate7Days": number, "filteredBidRate7Days": number, "mustBidRateCurrentMonth": number } ``` |

| Fields ||
|---|---|
| `bidRequests7Days` | `string (https://developers.google.com/discovery/v1/type-format format)` Bid requests in last 7 days. |
| `bids7Days` | `string (https://developers.google.com/discovery/v1/type-format format)` Bids in last 7 days. |
| `adImpressions7Days` | `string (https://developers.google.com/discovery/v1/type-format format)` Ad impressions in last 7 days. |
| `bidRate7Days` | `number` Bid rate in last 7 days, calculated by (bids / bid requests). |
| `filteredBidRate7Days` | `number` Filtered bid rate in last 7 days, calculated by (filtered bids / bids). |
| `mustBidRateCurrentMonth` | `number` Must bid rate for current month. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals/addCreative` | Add creative to be used in the bidding process for a finalized deal. |
| ### `https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals/get` | Gets a finalized deal given its name. |
| ### `https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals/list` | Lists finalized deals. |
| ### `https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals/pause` | Pauses serving of the given finalized deal. |
| ### `https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals/resume` | Resumes serving of the given finalized deal. |
| ### `https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/v1/buyers.finalizedDeals/setReadyToServe` | Sets the given finalized deal as ready to serve. |