# REST Resource: accounts.accountLinks

- [Resource: AccountLink](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLink)
  - [JSON representation](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLink.SCHEMA_REPRESENTATION)
- [AccountLinkStatus](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLinkStatus)
- [AccountLinkTarget](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLinkTarget)
  - [JSON representation](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLinkTarget.SCHEMA_REPRESENTATION)
- [HotelList](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#HotelList)
  - [JSON representation](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#HotelList.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#METHODS_SUMMARY)

## Resource: AccountLink

An account link. Represents the link between a Google Ads customer and a Hotel Ads (Hotel Center) account. An account link defines the set of hotels under the Hotel Center account that is linked to the Google Ads customer.

| JSON representation |
|---|
| ``` { "name": string, "googleAdsCustomerName": string, "status": enum (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLinkStatus`), "accountLinkTarget": { object (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLinkTarget`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name for the account link in the format `accounts/{account_id}/accountLinks/{account_link_id}`. |
| `googleAdsCustomerName` | `string` Required for CREATE requests. The value representing the Google Ads customer ID in the format `customers/{google_ads_customer_id}`. For example: `customers/0123456789`. Note that the `googleAdsCustomerName` field is not returned in responses to GET requests. |
| `status` | ``enum (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLinkStatus`)`` The current status of the account link. |
| `accountLinkTarget` | ``object (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#AccountLinkTarget`)`` Required for CREATE requests. The properties in the Hotel Center account that can be managed using the linked Google Ads account. |

## AccountLinkStatus

Possible current statuses of the account link. New values might be added in the future.

| Enums ||
|---|---|
| `ACCOUNT_LINK_STATUS_UNSPECIFIED` | Default value. |
| `ACCOUNT_LINK_STATUS_UNKNOWN` | The account link status is not recognized by this API version. |
| `REQUESTED_FROM_HOTEL_CENTER` | The account link was initiated through Hotel Center and has not yet been approved in Google Ads. |
| `REQUESTED_FROM_GOOGLE_ADS` | The account link was initiated through Google Ads and has not yet been approved in Hotel Center. |
| `APPROVED` | The account link has been approved. |

## AccountLinkTarget

Defines whether all properties or a subset of properties in the Hotel Center account can be managed with the linked Google Ads account. If a subset, the specific properties are specified.

| JSON representation |
|---|
| ``` { // Union field `targets_oneof` can be only one of the following: "allHotels": boolean, "hotelList": { object (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#HotelList`) } // End of list of possible types for union field `targets_oneof`. } ``` |

| Fields ||
|---|---|
| Union field `targets_oneof`. Either all properties or a list of properties under the Hotel Center account that is made available to the account link. `targets_oneof` can be only one of the following: ||
| `allHotels` | `boolean` True if all properties under the Hotel Center account are made available to the account link. The default is `false`. |
| `hotelList` | ``object (`https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks#HotelList`)`` List of properties that is made available to the account link. |

## HotelList

The properties in the Hotel Center account that can be managed with the Google Ads account.

| JSON representation |
|---|
| ``` { "partnerHotelIds": [ string ] } ``` |

| Fields ||
|---|---|
| `partnerHotelIds[]` | `string` Hotel IDs. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks/create` | Creates a new account link between a Hotel Center account and a Google Ads account. |
| ### `https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks/delete` | Deletes an account link. |
| ### `https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks/get` | Returns the `AccountLink` instance associated with the account link resource name specified in the request URL. |
| ### `https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks/list` | Returns the account links for a Hotel Center account. |
| ### `https://developers.google.com/hotels/hotel-prices/api-reference/rest/v3/accounts.accountLinks/patch` | Updates the account link target of an account link. |