Providers who offer listing management directly on their platform can verify a merchant's business within their site. This eliminates the need to redirect the merchant into the Business Profile UI.
Get current state
Users can call locations.getVoiceOfMerchantState
on a location to retrieve its current status. If the
hasVoiceOfMerchant
boolean is true
, then the location is already in good standing and no additional action is required. Otherwise, if the gain_voice_of_merchant
action in the response contains verify
, you must complete verification. Follow the instructions below for more information.
Fetch verification options
Providers can use the
locations.fetchVerificationOptions
method to prompt merchants to choose a preferred contact method from a list of available
verification methods.
To fetch the verification options, use the following:
POST https://mybusinessverifications.googleapis.com/v1/{locationId}:fetchVerificationOptions { "languageCode": "en" }
Initiate the verification process
After you choose a verification method, initiate the verification process with
locations.verify
.
As a result of this call, the location moves to a verified state or an error status is returned.
POST https://mybusinessverifications.googleapis.com/v1/locations/{locationId} :verify // Use only one of the below verification methods // For postcard verification: { "method": "ADDRESS", "languageCode": "en", "addressInput": { "mailerContactName": "Ann Droyd" } } // For phone verification: { "method": "PHONE_CALL", "languageCode": "en", "phoneInput": { "phoneNumber": "800-555-0136" } } // For SMS verification: { "method": "SMS", "languageCode": "en", "phoneInput": { "phoneNumber": "800-555-0136" } } // For email verification: { "method": "EMAIL", "languageCode": "en", "emailInput": { "emailAddress": "ex@google.com" } }
Retrieve current verifications
The
locations.verifications.list
call retrieves the history of verification requests along with their status for the location specified in the call.
To retrieve all verification requests, use the following:
GET https://mybusinessverifications.googleapis.com/v1/locations/{locationId} /verifications
Complete a pending verification
A PIN code and the
locations.verifications.complete
method is usually required to complete the verification of a business.
To complete a pending verification, use the following:
POST https://mybusinessverifications.googleapis.com/v1/locations/{locationId} /verifications/{verificationId}:complete { "pin": "123456" }
Best practices for GBP verification using API
Location creation
With the GBP Business Information API, you can embed your platform to provide location creation functionality. When you ask merchants to add a new location, make sure to follow these steps:
Collect location information such as business name, address, category from the merchant.
- Call the
googleLocations.search
endpoint. - Provide location data, such as business name, category, address, phone number and website within the API request.
Alternatively, perform a search for potential matching location by following these steps:
- Query possible location matches.
- Ask the merchant to choose the correct location.
- If
requestAdminRightsUrl
exists in the location response, help the merchant request access and ownership for that location on Google Business Profile. - If
requestAdminRightsUrl
doesn't exist, create a new location with the Place ID in the location response. - Verify the new location.
Note: If you don't get any possible location matches from your initial query, use a blank Place ID to create a new location. Then, verify that new location.
Location verification
To start the verification process using the GBP API, please follow these steps:
- Call the
accounts.locations.list
method to list all locations for a Google Account. - Select a location to verify.
- Call the
GetVoiceOfMerchant
API method to confirm whether that location requires verification. - If the response returns verify, call
fetchVerificationOptions
to get a list of methods available to verify that location. - Double-check that the
verificationOption
data includes the correct address, phone number and email address. - After the mechant selects the best-available verification option, call the
locations.verify
method to initiate the appropriate verification. To confirm that the initiation is in progress, call thelocations.verifications.list.
- Call the
locations.verification.complete
method with the merchant's pin. - Call the
GetVoiceOfMerchant
API method. IfHasVoiceOfMerchant = true
, you have successfully verified the location.
Note: If AUTO
verification is available for the location, the merchant need not perform any verification steps
For further information on GBP verification, please refer to our help center support article.