Multi-Location Posting
Post to many business locations at once
Multi-Location Posting
If your connected Google Business account manages multiple locations, you can post to different locations from the same account connection.
List Available Locations
First, retrieve the list of locations you can post to:
const locations = await zernio.connect.getGmbLocations('YOUR_ACCOUNT_ID');
console.log('Available locations:', locations);locations = client.connect.get_gmb_locations("YOUR_ACCOUNT_ID")
print("Available locations:", locations)curl -X GET https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-locations \
-H "Authorization: Bearer YOUR_API_KEY"Post to Multiple Locations
Use the same accountId multiple times with different locationId values:
const { post } = await zernio.posts.createPost({
content: 'Now open at all locations! Visit us today.',
mediaItems: [
{ type: 'image', url: 'https://example.com/store.jpg' }
],
platforms: [
{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: { locationId: 'locations/111111111' }
},
{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: { locationId: 'locations/222222222' }
}
],
publishNow: true
});result = client.posts.create_post(
content="Now open at all locations! Visit us today.",
media_items=[
{"type": "image", "url": "https://example.com/store.jpg"}
],
platforms=[
{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {"locationId": "locations/111111111"}
},
{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {"locationId": "locations/222222222"}
}
],
publish_now=True
)curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Now open at all locations! Visit us today.",
"mediaItems": [
{"type": "image", "url": "https://example.com/store.jpg"}
],
"platforms": [
{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"locationId": "locations/111111111"
}
},
{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"locationId": "locations/222222222"
}
}
],
"publishNow": true
}'The locationId format is locations/ followed by the location ID number.