The Merchant API introduces a dedicated
[`Homepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage)
resource. This resource provides new methods for managing your homepage claim,
offering capabilities beyond the classic Content API for Shopping.

Accessing features for your online store is a two-step process: first verifying
ownership, then claiming the site for your account. To complete the final step,
use the
[`accounts.homepage.claim`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/claim).

## Key differences

Merchant API makes several homepage-related changes as compared to Content API
for Shopping:

- **Dedicated resource** : Merchant API provides a distinct `Homepage` resource ([`accounts.homepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage)) for all homepage-related operations. (In Content API for Shopping, you used `accounts.claimwebsite` to perform the claim action, the homepage URL (`website_url`) was part of the `Account` resource, and the claim status (`website_claimed`) was part of the `AccountStatus` resource.)
- **Granular methods** : Merchant API offers specific methods to:
  - Retrieve homepage details: [`accounts.homepage.getHomepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/getHomepage)
  - Update the homepage URI: [`accounts.homepage.updateHomepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/updateHomepage)
  - Claim the homepage: [`accounts.homepage.claim`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/claim)
  - Disclaim the homepage: [`accounts.homepage.unclaim`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/unclaim) Content API for Shopping used `accounts.claimwebsite` for the claim action, `accounts.update` to set the URL (and effectively disclaim by setting an empty URL), and `accounts.get`/`accountstatuses.get` to retrieve URL and claim status respectively.
- **Centralized information** : The Merchant API `Homepage` resource contains both the `uri` (homepage URL) and the `claimed` status directly. All methods operating on the `Homepage` resource return this resource, providing immediate feedback on the current state. In Content API for Shopping, `accounts.claimwebsite` did not return the updated status; separate calls were needed.
- **Explicit disclaim** : In Content API for Shopping, disclaiming was typically achieved by updating the `Account.website_url` to an empty string. Merchant API provides a dedicated [`homepage.unclaim`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/unclaim) method.
- **Overwrite claim** : Both APIs support an `overwrite` parameter during the claim process to take over a claim from another account if ownership can be verified.

## Requests

Merchant API uses distinct RESTful endpoints for managing different aspects of
the homepage.

| Request description | Content API for Shopping for Shopping | Merchant API |
|---|---|---|
| Get the homepage details | `accounts.get` (to read `Account.website_url`), `accountstatuses.get` (to read `AccountStatus.website_claimed`) | `GET /accounts/v1/accounts/{account}/homepage` |
| Update the homepage URI | `accounts.update` (setting `Account.website_url`) | `PATCH /accounts/v1/accounts/{account}/homepage` |
| Claim or re-verify the homepage | `POST /content/v2.1/{merchantId}/accounts/{accountId}/claimwebsite` (acted on `Account.website_url` set using `accounts.update`) | `POST /accounts/v1/accounts/{account}/homepage:claim` |
| Disclaim the homepage | `accounts.update` (setting `Account.website_url` to an empty string) | `POST /accounts/v1/accounts/{account}/homepage:unclaim` |

## Identifiers

Resource identification has been streamlined in Merchant API.

| Identifier description | Content API for Shopping | Merchant API |
|---|---|---|
| Account identifier for resource access | `merchantId` (advanced account) and `accountId` (sub-account) in the path | `account` (part of the `name` field, such as, `accounts/{account_id}/homepage`) |
| Homepage resource identifier | Not applicable (implicit to `Account` resource) | `name`: `accounts/{account_id}/homepage` (identifies the `Homepage` sub-resource) |

## Methods

The `accounts.claimwebsite` method from Content API for Shopping, which was
focused on the action of claiming, is now part of a broader set of
functionalities within Merchant API's `Homepage` resource.

| Content API for Shopping Method | Merchant API Method | Availability \& Notes |
|---|---|---|
| `accounts.claimwebsite` | [`accounts.homepage.claim`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/claim) | Directly initiates or re-verifies a website claim. Acts on the `uri` previously set using `homepage.update`. Includes an `overwrite` parameter. Returns the `Homepage` resource with its current `uri` and `claimed` status. |
| `accounts.get` (to read `Account.website_url`), `accountstatuses.get` (to read `AccountStatus.website_claimed`) | [`accounts.homepage.getHomepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/getHomepage) | New dedicated method to retrieve the current homepage `uri` and its `claimed` status in a single call. |
| `accounts.update` (to set `Account.website_url`) | [`accounts.homepage.updateHomepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/updateHomepage) | New dedicated method to set or change the homepage `uri`. |
| `accounts.update` (setting `Account.website_url` to empty string as a workaround to unclaim) | [`accounts.homepage.unclaim`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/unclaim) | New dedicated method to explicitly unclaim a homepage. |

## Detailed field changes

The way homepage information is structured and accessed has changed
significantly, moving towards the explicit `Homepage` resource in Merchant API.

| Content API for Shopping | Merchant API | Description |
|---|---|---|
| `merchantId` (path parameter for `accounts.claimwebsite`) | `name` (path parameter for `Homepage` methods, format: `accounts/{account}/homepage`) | The `account` part of the `name` string in Merchant API corresponds to the `accountId` from Content API for Shopping. |
| `accountId` (path parameter for `accounts.claimwebsite`) | `name` (path parameter for `Homepage` methods, format: `accounts/{account}/homepage`) | The identifier for the specific account whose homepage is being managed. |
| `overwrite` (boolean in `ContentAccountsClaimwebsiteRequest` body and `AccountsCustomBatchRequestEntry`) | `ClaimHomepageRequest.overwrite` (boolean in [`homepage.claim`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/claim#request-body) request body) | Optional. If `true`, attempts to claim the website, potentially removing an existing claim from another account if ownership can be verified by the requesting account. |
| `Account.website_url` (field in `Account` resource, set using `accounts.update`, read using `accounts.get`) | `Homepage.uri` (field in [`Homepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage#Homepage) resource) | The URI (URL) of the store's homepage. In Merchant API, this is an explicit field within the `Homepage` resource. It's set using [`accounts.homepage.updateHomepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/updateHomepage) and returned by all `Homepage` methods. |
| `AccountStatus.website_claimed` (field in `AccountStatus` resource, read using `accountstatuses.get`) | `Homepage.claimed` (output_only boolean field in [`Homepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage#Homepage) resource) | Indicates if the `uri` is claimed and verified. This status is directly available in the `Homepage` resource returned by all its associated Merchant API methods. |
| N/A | `UpdateHomepageRequest.update_mask` [`accounts.homepage.updateHomepage`](https://developers.google.com/merchant/api/reference/rest/accounts_v1/accounts.homepage/updateHomepage) request body parameter) | An optional field mask for `homepage.update` to specify which fields (e.g., `uri`) of the `Homepage` resource are being updated. |