With the My Business Account Management API, you can transfer locations to different accounts or location groups. Follow the instructions in this documentation to learn how.
Get started
The following items are required to transfer locations:
Source account: The source account is the account that's an owner of the
location. This account can be a personal account or a location group. After
the transfer is complete the source account no longer has access to the
location.
Destination account: The destination account is the account that the
location should be transferred to. This account can be a personal account
or a location group. After the transfer is complete, the destination account
is the primary owner of the location.
OAuth2 refresh/access tokens: The OAuth2 refresh/access tokens
for the source and destination accounts are needed for each account in order
to call the API.
Transfer Locations
To transfer locations, complete the following steps:
If you're not an owner of the location, you must become one. Use the current business owner’s OAuth credentials to call
account.admins.create
and invite a user to own the listing. Then, use the invited user’s OAuth credentials to callaccounts.invitations.list
to obtain the invitation id. Callaccounts.invitations.accept
to accept this invitation.Use the intended destination account’s OAuth credentials to call
accounts.list
. Then, find the account ID in the list that you want to transfer the location to. The admin ID in the response to theaccount.admins.create
call or theaccounts.invitations.list
call in step 1 can also be used as the account ID. This account ID can refer to a personal account or a location group.Use the account ID that you retrieved in step 2 as the destination account. This is the destinationAccount field in the request body, which you can use to call
locations.transfer
.
Use the destination account’s OAuth credentials to call
accounts.locations.list
and
verify that the transferred location appears in the results. If you call the
accounts.locations.list
endpoint with the source account, the transferred
location isn't included in the results.
Example
The following example demonstrates a transfer location scenario where an agency organization account requires managerial access to a location
while retaining the merchant
as the primary owner. The location is transferred to a location group
in the organization using a transfer account
that is external to the organization. It is assumed that the transfer account
has MANAGER access to the location group
.
- Use the
merchant
OAuth credentials to invite the transfer account as the co-owner of the listing.HTTP Request POST https://mybusinessaccountmanagement.googleapis.com/v1/accounts/merchantAccountId/locations/locationId/admins Authorization: Bearer merchantToken { "adminName": "transferAccountEmail", "role": "OWNER" }
Response { "name": "accounts/merchantAccountId/locations/locationId/admins/transferAccountId", "adminName": "transferAccountEmail", "role": "OWNER", "pendingInvitation": true } - List and accept the invitation using the
transfer account
OAuth credentials.HTTP POST https://mybusinessaccountmanagement.googleapis.com/v1/accounts/transferAccountId/invitations/invitationId:accept Authorization: Bearer transferAccountToken
- Transfer the location to the organization location group using the
transfer account
OAuth credentials. Once complete, the location group becomes the primary owner and the merchant becomes the co-owner of the listing.HTTP POST https://mybusinessaccountmanagement.googleapis.com/v1/locations/locationId:transfer Authorization: Bearer transferAccountToken { "destinationAccount": "accounts/locationGroupAccountId" }
- Transfer the location to the merchant using the
transfer account
OAuth credentials. Once complete, the merchant becomes the primary owner and the organization location group becomes the co-owner of the listing.HTTP POST https://mybusinessaccountmanagement.googleapis.com/v1/locations/locationId:transfer Authorization: Bearer transferAccountToken { "destinationAccount": "accounts/merchantAccountId" }
- Update the location group to a manager role of the location
HTTP PATCH https://mybusinessaccountmanagement.googleapis.com/v1/locations/locationId/admins/locationgroupAccountId?updateMask=role Authorization: Bearer merchantToken { "name": "locations/locationId/admins/locationgroupAccountId", "role": "MANAGER" }