OverviewProductsPlatformsAPI ReferenceResources
Connect

Assign Google Business Profile location to another profile

POSThttps://zernio.com/api/v1/accounts/{accountId}/gmb-locations/assign

Connect a Google Business Profile location onto a DIFFERENT profile by reusing the OAuth grant from an already-connected Google Business Profile account, with no browser and no re-authorization.

Built for agencies whose single Google account has manager access to many client locations and who run one profile per client:

  1. Connect one location the normal way (browser OAuth).
  2. Bulk-assign the rest onto each client's profile via this endpoint.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

accountIdstringRequired

A source connected Google Business Profile account whose OAuth grant is reused.

Body

application/json

What every request needs

profileIdstringRequired

Target profile to connect the location onto.

selectedLocationIdstringRequired

The Google Business Profile location ID to assign (e.g. "locations/123").

Optional parameters1 field
googleAccountIdstring

Optional but recommended. The Google Business Profile Account resource name ("accounts/123") that owns the location (from GET gmb-locations). When provided the location is resolved directly instead of by enumerating the account, required for accounts with many locations.

Responses

Success· the request worked

Errors· the request failed

How it behaves

Parameters

  • The path accountId is a SOURCE connected Google Business Profile account (the token holder).
  • The body profileId is the TARGET profile, which may already hold other locations.

Assigning a location the target profile already holds refreshes that account.

POST/v1/accounts/{accountId}/gmb-locations/assign
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.assignGoogleBusinessLocation({  path: {    accountId: 'account_abc123',  },  body: {    profileId: 'profile_abc123',    selectedLocationId: 'selectedlocation_abc123',  },});console.log(data);
{  "message": "Google Business location assigned to profile successfully",  "account": {    "accountId": "6a41f0ab70e2d329a7741307",    "platform": "googlebusiness",    "username": "Snap Fitness Dianella",    "displayName": "Snap Fitness Dianella",    "isActive": true,    "selectedLocationName": "Snap Fitness Dianella",    "selectedLocationId": "12345678901234567890"  }}
OpenAPI specification
Was this page helpful?