PATCH

Update Google Location


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates a location's Business Profile in Google.

This changes the profile the public sees on Google. It doesn't change the location stored for the site: to update serviceAreaPostalAddress, call Update Location.

fieldMask is required, and only these top-level fields can be updated: title, storeCode, primaryPhone, additionalPhones, primaryCategory, additionalCategories, storefrontAddress, websiteUri, regularHours, serviceArea, latLng, openInfo, profile.

Anything else, including a nested path such as profile.description or an empty mask, fails with INVALID_UPDATE_MASK before Google is called. languageCode can't be updated: Google treats it as read-only.

Categories and phone numbers replace the whole set

Google doesn't allow categories or phone numbers to be updated one at a time, so each pair behaves as a single value and Google replaces everything in it. Read this before updating either, because omitting a value deletes it.

For categories:

  • Specify primaryCategory and additionalCategories together in fieldMask. A mask with only one of them fails with INVALID_UPDATE_MASK.
  • Specify the complete set you want the location to end up with, including a primary category. A set without one fails with INVALID_CATEGORIES.
  • Any additional category you leave out is removed, so resend the ones you want to keep.

For phone numbers:

  • Specify primaryPhone and additionalPhones together in fieldMask. A mask with only one of them fails with INVALID_UPDATE_MASK.
  • Specify the complete set of numbers you want the location to end up with. Any number you leave out is removed.
  • Unlike categories, no primary is required. Masking both and specifying none removes every phone number.

Errors

  • INVALID_UPDATE_MASK: the mask is empty, or names a field that can't be updated, or masks only one half of the categories or phone numbers pair. Google isn't called.
  • GOOGLE_LOCATION_VALIDATION_FAILED: Google rejected the details, for example an invalid phone number or address, or a listing that needs a postcard PIN. The specific reasons are in the error payload and are worth surfacing: they tell the site owner what to correct.
  • GOOGLE_API_CALL_FAILED: the call to Google failed for any other reason. Google's status and response are in the error payload.
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage SEO Settings
Learn more about app permissions.
Endpoint
PATCH
https://www.wixapis.com/gbp/v1/locations/{locationId}/google

Errors
400Invalid Argument

There is 1 error with this status code.

428Failed Precondition

There is 1 error with this status code.

500Internal

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?