google account is one location. These endpoints list the locations a Google login manages, connect another one to a brand, update a location’s public profile, and manage its photos and videos, attributes, food menus, and reservation and ordering links.
Endpoints
{login_id} is the login_id returned when you connect Google and on every Google account: see Choose a Google Business Profile. {account_id} is the connected account ID (acc_...). The full schemas are in the API reference.
Read a location’s details
GET /v1/platforms/google/logins/{login_id}/locations returns the locations the Google login can manage, read from Google at request time. A location added in Google Business Profile after the login was authorized appears at once, with no new consent screen.
details carries these fields. Each one is absent when Google returns no value for it, so treat every field as optional. A service-area business (a locksmith, a plumber) has no storefront_address and carries service_area instead.
A boolean flag that is absent means Google told SocialAPI nothing. It does not mean
false: check that the key is present before treating a flag as a denial.
Connect another location to a brand
POST /v1/platforms/google/logins/{login_id}/locations/{location_id}/assign connects one location from the login to a brand, without a second consent screen. {location_id} is the platform_account_id, with the slashes either sent as they are or URL-encoded as %2F.
- One brand per location. A location belongs to exactly 1 brand. Assigning a location that another brand holds returns
400 validation.location_already_assigned. - One Google Business Profile per brand. A brand holds at most 1 location. Assigning a second location to the same brand returns
409 platform.google.brand_has_account. Disconnect the first account, or assign the location to another brand. - The login must still grant the location. A location the login no longer manages returns
400 validation.location_not_granted. - The brand must exist. An unknown brand returns
404 brand.not_found. A missingbrand_idreturns400 validation.field_required. - Cost. Assigning a location costs no credits.
Update a location
PUT /v1/platforms/google/accounts/{account_id} writes the location’s public profile. Send only the fields you want to change:
data, in the shape of details above:
Lists replace instead of merging:
regular_hours.periods, labels, additional_phones, additional_categories, and service_items each overwrite the whole list, so include every entry you want to keep. Objects merge: inside storefront_address you can send only postal_code and the rest of the address stays.
Not writable: place_id, maps_uri, new_review_uri, and the status flags are output only. language_code is fixed when the location is created. A request with none of the writable fields returns 400 validation.no_fields_to_update. A value Google rejects returns 503 platform.google.api_error, with Google’s reason in error.message.
Validate before you write
Google has no sandbox, so every write changes a real Business Profile. Addvalidate_only=true to have Google check the change and apply nothing:
Edits are moderated
A200 means Google accepted the change for review. It does not mean the change is live on Search and Maps. Read the location back to see what is live, and check details.has_pending_edits for edits still under review.
Profile media
A location’s profile carries its own photos and videos: the logo, the cover image, interior and exterior shots. They are separate from the media attached to a post, and they are what customers see on the listing.GET /v1/platforms/google/accounts/{account_id}/media lists them:
GET /v1/platforms/google/accounts/{account_id}/media/{media_id} returns one item. media_id accepts the bare ID or the full resource name from the list.
Add a photo or video
POST /v1/platforms/google/accounts/{account_id}/media adds one item. media takes exactly 1 entry, in the same {source_type, source} form the publishing endpoints accept:
category is one of COVER, PROFILE, LOGO, EXTERIOR, INTERIOR, PRODUCT, AT_WORK, FOOD_AND_DRINK, MENU, COMMON_AREA, ROOMS, TEAMS, or ADDITIONAL. PROFILE sets the avatar shown for the location. LOGO is the fallback when no PROFILE photo exists.
A request with other than 1 media entry returns 422 google.media.single_item_required. An unknown category returns 422 google.media.invalid_category. A media entry that cannot be resolved returns 422 google.media.unresolvable.
Remove a photo or video
DELETE /v1/platforms/google/accounts/{account_id}/media/{media_id} removes an item you added and returns 204 with no body. media_id accepts the bare ID or the full resource name.
Photos your customers posted
Customers add their own photos to a listing. They live in a separate read-only gallery. Read it withcontributed=true:
attribution block with profile_name, profile_photo_url, profile_url, and takedown_url. Google requires you to display the attribution exactly as given, without changing or removing it. A delete on a customer photo returns 403 platform.google.access_denied. Report the photo to Google through its takedown_url instead.
Attributes
Attributes are the facts shown on a listing: outdoor seating, Wi-Fi, accepted payment methods, a wheelchair accessible entrance. Which attributes a location accepts depends on its category and country.GET /v1/platforms/google/accounts/{account_id}/attributes/available lists them:
deprecated: true still reads but should no longer be set.
GET /v1/platforms/google/accounts/{account_id}/attributes returns the attributes set on the location. value_type says which value field is filled:
PUT /v1/platforms/google/accounts/{account_id}/attributes sets the attributes you list and leaves every other attribute alone. Send the one value field that matches the attribute’s value_type. An attribute sent with no value field is removed:
Food menus
Restaurants and cafés can show their menus on the listing. Only locations whose details reportcan_have_food_menus: true support them. Check it before you write: Google refuses menus on any other location.
GET /v1/platforms/google/accounts/{account_id}/food-menus returns every menu. A location without menus returns "menus": [].
PUT /v1/platforms/google/accounts/{account_id}/food-menus replaces every menu with the ones you send, so always send the full set. "menus": [] removes them all:
- Every menu, section, item and option needs at least one label with a
display_name(140 characters at most;description1000 at most). Add one label per language. - Every menu needs a section, and every section needs an item.
- Every item needs
attributes.price.unitsis the whole amount as a string andnanosthe fractional part in billionths, so 12.50 EUR is"units": "12", "nanos": 500000000. An option without a price keeps the item’s.
attributes also accept spiciness (MILD, MEDIUM, HOT), allergen, dietary_restriction, preparation_methods, nutrition_facts, ingredients, serves_num_people, portion_size, and media_keys (photos already on the location’s profile). cuisines, allergen, dietary_restriction and preparation_methods take Google’s enum names, for example FRENCH, PEANUT, VEGAN or GRILLED.
A menu that breaks a rule returns 400 with the offending path in error.meta.field (for example menus[0].sections[1].items[0].attributes.price). A value Google rejects returns 503 platform.google.api_error with its reason.
Reservation and ordering links
Place action links are the “Reserve a table”, “Order online” and “Book” buttons on a listing. Each points at a URL.GET /v1/platforms/google/accounts/{account_id}/place-action-types lists the types the location can offer:
place_action_type is one of APPOINTMENT, ONLINE_APPOINTMENT, DINING_RESERVATION, FOOD_ORDERING, FOOD_DELIVERY, FOOD_TAKEOUT, or SHOP_ONLINE.
GET /v1/platforms/google/accounts/{account_id}/place-action-links lists the links:
is_editable: false was added by a booking or ordering provider (provider_type: AGGREGATOR_3P). It cannot be changed or deleted here.
POST /v1/platforms/google/accounts/{account_id}/place-action-links adds a link. uri and place_action_type are required:
is_preferred: true picks the one Google shows first.
PATCH /v1/platforms/google/accounts/{account_id}/place-action-links/{link_id} changes uri, place_action_type or is_preferred; only the fields you send change. DELETE on the same path removes the link and returns 204.
Limits
Scopes
Related
- Google Business Profile API: capabilities, connect rules, and limits for the platform
- Reviews: list and reply to the reviews on a location
- Google Business Profile publishing: publish local posts to a location
- Connect accounts: choose a location when a login manages more than 1
- Errors: every error code