Link your Google My Business account

To provide local inventory to the Merchant Center, you must first specify which locations the Merchant Center will be responsible for. You can get the list of possible location sets from the GMB account via the Content API, but you'll need to request access to the GMB account first.

Request access to a Google My Business account

To request access to your GMB account, use the Liasettings.requestgmbaccess method:

POST https://www.googleapis.com/content/v2/12345/liasettings/67890/requestgmbaccess?gmbEmail=admin@example.com

As this example shows, the gmbEmail query parameter specifies the email address of the administrator for the GMB account.

After you call this method, the specified administrator will receive an email asking them to accept or reject the access request. This request expires after 7 days if no action is taken by the administrator.

List the available sets of locations

Once access has been permitted, you can see which locations are available by calling the Liasettings.getaccessiblegmbaccounts method:

GET https://www.googleapis.com/content/v2/12345/liasettings/67890/accessiblegmbaccounts

Response:
200 OK
{
  "kind": "content#liasettingsGetAccessibleGmbAccountsResponse",
  "accountId": 67890,
  "gmbAccounts": [{
    "type" : "user",
    "email" : "admin@example.com",
    "name" : "admin@example.com",
    "listingCount": 82
  },
  {
    "type" : "business",
    "email" : "california@example.com",
    "name" : "Golden-State",
    "listingCount" : 20
  },
  {
    "type" : "business",
    "email" : "florida@example.com",
    "name" : "Sunshine-State",
    "listingCount" : 15
  },
  {
    "type" : "business",
    "email" : "newyork@example.com",
    "name" : "Empire-State",
    "listingCount" : 25
  }]
}

Specify the location set for the Merchant Center account

Now that you have a list of possible location sets, you need to set the googleMyBusinessLink field in the Accounts resource associated with the Merchant Center account to the desired one. For example, if Merchant Center 67890 will contain products for California-based locations, you can use Accounts.patch to set that information:

PATCH https://www.googleapis.com/content/v2/12345/accounts/67890
{
  "googleMyBusinessLink" : {
    "gmbEmail": "california@example.com"
  }
}

Response:
200 OK
{
  "kind": "content#account",
  "id": 67890,
  "googleMyBusinessLink" : {
    "gmbEmail": "california@example.com",
    "status" : "active"
  }
}

Setting the googleMyBusinessLink field does not require any manual verification, so the status of the link will be reflected immediately.

Submit Product and inventory data

Now that the Merchant Center is associated with a set of locations, you can provide local product and local product inventory data for those locations. For this, you use the same methods, such as Products.insert or Inventory.set, that you use to upload online products and inventory data. For Products.insert, you'll specify a channel of local instead of online. For Inventory.set, you'll specify the numeric storeCode of the location for which you're setting specific inventory information.

Send feedback about...

Content API for Shopping