This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a Business Profile listing in Google and records it for the site.
Use this to add a location the Google account doesn't have yet. To record a listing that already exists, call Create Location instead.
Specify at least one of storefrontAddress or serviceArea. If neither is set,
the call fails with INVALID_LOCATION_PAYLOAD.
Both can be set together when serviceArea.businessType is
CUSTOMER_AND_BUSINESS_LOCATION, which is how a business that has premises and
also travels to customers is represented.
A Google account must be connected first. See the Connection API.
Set validateOnly to check the details without creating anything: Google
runs the same validation and returns the same errors, but no listing is
created and none is recorded for the site. On success the response has no
location — that absence is what "valid" looks like.
Errors:
CONNECTION_NOT_FOUND: no Google account is connected. Google isn't called.TOKEN_RESOLUTION_FAILED: the stored credentials couldn't be used. Google
isn't called and nothing is created.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 they're
worth surfacing: they tell the site owner what to correct. Nothing is
created.GOOGLE_API_CALL_FAILED: the call to Google failed for any other reason.
Google's status and response are in the error payload. Nothing is created.LOCATION_DB_PERSIST_FAILED: Google created the listing but it couldn't be
recorded for the site. The new Google location ID is in the error payload,
so keep it: the listing exists in Google and can be recorded with Create
Location, or removed with Delete Google Location.You can only call this method when authenticated as a Wix app or Wix user identity.
There are 2 errors with this status code.
There is 1 error with this status code.
There are 2 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.