Google — connect location to review site

Overview

Connect a Google Business Profile location to a store review site. Persists the account/location/place ids + token, sets sendto_scrapper=Y, url_status=enable, connection_status=connected; soft-deletes obsolete RD-scraped Google reviews for the (store, Google) pair (Google's own API becomes source of truth). And records a gbp_connection_events row (CONNECTED / RECONNECTED / ACCOUNT_SWITCHED). Emits audit STORE_REVIEW_SITE_OAUTH_CONNECTED (and GOOGLE_OAUTH_WIPED_RD_REVIEWS when rows are wiped).

Prerequisites

  • Either a bearer token in the Authorization header, or the invite hash this endpoint accepts in place of one.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/google/review-site/connect

Authentication

  • A bearer token is optional here. Send one to act as a signed-in user, or supply the documented hash instead.

  • Use a bearer token (api guard, scoped by an ownership check).

  • OR use an invite hash (no token) whose encoded store must own store_review_site_id.

Rate limit

  • 30 requests/min per IP (public).

Request body

FieldTypeRequiredDescription
store_review_site_idintegerRequiredMust exist; in caller scope (an ownership check) unless using hash.
google_access_token_idintegerRequiredthe Google connection's id from the token exchange.
account_namestring (≤255)RequiredGoogle account resource, e.g. accounts/123. No angle brackets.
location_namestring (≤255)RequiredGoogle location resource, e.g. locations/456. No angle brackets.
google_place_idstringRequiredGoogle Place ID.
mapsUriurl (≤2000)RequiredGoogle Maps URL → stored as review_site_url.
newReviewUriurl (≤2000)RequiredWrite-review URL → stored as landing_page_url.
google_responseanyOptionalRaw Google API payload.
force_updateinteger (0,1)OptionalRe-link even if a different location is already connected (wipes prior reviews).
hashstringOptionalInvite hash [store_id, 15]; grants access without a token, must match the row's store.
{
  "store_review_site_id": "<storeReviewSiteId>",
  "google_access_token_id": 42,
  "account_name": "accounts/123456789",
  "location_name": "locations/987654321",
  "google_place_id": "ChIJN1t_tDeuEmsRUsoyG83frY4",
  "mapsUri": "https://maps.google.com/?cid=123",
  "newReviewUri": "https://search.google.com/local/writereview?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4",
  "force_update": 0
}

How it works

  • 200 on connect. 400 if the location belongs to a different location without force_update, or (production) if the Google location is already linked elsewhere.

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "The review site has been updated successfully."
  }
}

400 Location already linked · 400

{
  "message": "Bad Request",
  "status": "error",
  "errors": "The Google location is already linked to other places. Please connect another GMB account."
}

400 Different location · 400

{
  "message": "Bad Request",
  "status": "error",
  "errors": "The location account does not correspond to the current location. Please choose the same location account"
}

Errors

StatusMeaning
400Location already linked
401The bearer token is missing, expired or invalid
422The request failed validation — the response names the fields
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/google/review-site/connect" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"store_review_site_id": "<storeReviewSiteId>", "google_access_token_id": 42, "account_name": "accounts/123456789", "location_name": "locations/987654321", "google_place_id": "ChIJN1t_tDeuEmsRUsoyG83frY4", "mapsUri": "https://maps.google.com/?cid=123", "newReviewUri": "https://search.google.com/local/writereview?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4", "force_update": 0}'

Did this page help you?