Google Local Listings
Channel ID: google
By default, NearSt fully automates the setup of any required Google properties required to run local listings (Free Local Listings and See What's In Store). This includes a NearSt-managed Google Merchant Center account, which is linked to a Google Business Profile you own.
Parameters
- string
locationId
: specify a Google Location ID to identify the correct Google Business Profile to link to. - string
storeCode
(optional): the store code for the GBP listing you are linking. If you leave this empty, NearSt will automatically generate and set a store code for the GBP listing once it gains access.
Providing access to GBP
There are several methods to provide NearSt with the required access to the Google Business Profile.
The most straightforward one is to add the Google Business Group that is returned by the NearSt API as a location manager or owner. This can be done through the Google Business Profile API (opens in a new tab), as shown in the example below.
Once completed, it might take up to 5 minutes before NearSt auto-accepts the invitation to the account.
Other methods are available upon request via our partnerships team. Note that a different ID than the one returned by the API is needed for allowing customers to give access through the Google Business management UI.
Examples
Setting up the channel
After creating a retailer and creating a store within the retailer account, you can enable the Google channel by executing a POST request to the /channels endpoint:
POST https://partner-api.near.st/retailers/{retailerId}/stores/{storeId}/channels
Content-Type: application/json
{
"type": "google",
"parameters": {
"locationId": "17036025138653420081",
"storeCode": "loc001"
}
}
This will respond with an object that contains the Google Business Group ID.
{
"status": "pending",
"warnings": [],
"parameters": {
"googleAccountId": "3456789666",
"locationId": "17036025138653420081",
"storeCode": "loc001"
},
"storefrontUrl": "https://example.com"
}
Giving NearSt access to GBP listing
POST https://mybusinessaccountmanagement.googleapis.com/v1/locations/<locationId>/admins
Content-Type: application/json
Authorization: ...
{
"account": "accounts/3456789666", // The NearSt Business Group ID returned by the setup call
"role": "MANAGER"
}
Checking setup status
After executing the above API call, the NearSt platform will start setting up the integration with Google. This on average takes around 4 days, but might take up to 14 days depending on the business location, the amount of products and the POS integration type.
To check the status, do a GET request on the /channels
endpoint:
GET https://partner-api.near.st/retailers/{retailerId}/stores/{storeId}/channels
[
{
"id": "google",
"channel": {
"id": "google",
"label": "Google Local Listings",
"description": "Show your products..."
},
"status": "pending",
"warnings": [
{
"id": "GoogleMerchantCenterPending",
"message": "We've now started..."
}
],
"parameters": {
"locationId": "17036025138653420081",
"storeCode": "loc001"
},
"storefrontUrl": "https://google.com/..."
}
]
Statuses and warnings
The following statuses can be returned for this channel:
connected
: the channel is active. See thestorefrontUrl
if you want to link directly to the store's Google hosted storefront.pending
: the channel is not yet active. See thewarnings
array for details.
The warnings array can have the following entries:
AwaitingGoogleBusinessAccess
"Waiting for access to Google Business Profile."GoogleMerchantCenterPending
"We've now started sending data to Google. It might take up to 5 days for products to start showing in Google."SwisWidgetNotSeenRecently
"Your Google See What's In Store Widget has not been seen in the last week. Check your GBP access and POS connection."