Skip to content
SynupAPI
Get an API key
GETapi.synup.com/api/v4/locations/{locationId}/google-attributes

Get Google Attributes for a Location

This API lists every Google Business Profile attribute that Google allows for a location, for its primary category and country, with Synup's current value next to each one. Use it to see which attributes are still unfilled for the location.

The list is read live from Google using the Google account the location is connected to in Synup. The location must be connected to Google; if it isn't, the API returns an error asking you to connect it first.

Attributes are returned unfilled first. Each attribute has a valueType:

  • BOOL: Yes/No. Send "true" or "false".
  • ENUM: single choice. Send one of allowedValues.
  • REPEATED_ENUM: multi-option list. Send any of allowedValues.
  • URL: a link.

To set or clear a value, use the update location API with customAttributes, using attributeId as the slug, e.g. {"slug": "wi_fi", "value": ["free_wi_fi"]}. Only the attributes you send are changed. To clear an attribute, send it with an empty value, e.g. {"slug": "wi_fi", "value": []}; it is cleared in Synup and removed from the Google Business Profile on the next sync.

Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Path

NameTypeRequiredDescription
locationIdstringrequiredRequired. The location ID, either the numeric ID (e.g. 279403) or the encoded ID returned by other APIs (e.g. TG9jYXRpb246Mjc5NDAz).

Request

Request
curl -X GET 'https://api.synup.com/api/v4/locations/:locationId/google-attributes' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json'

Responses

StatusDescription
200Successfully retrieved the location's Google attributes.
400Bad request: the location isn't connected to Google, Synup can't access the location's Google Business Profile, or the location ID is invalid or not accessible with this API key. `locationGoogleAttributes` is `null`.
401Unauthorized. Invalid or missing API key.
502Google could not be reached or returned an error. Retry after some time.
Example response (generated from the schema)
{
  "data": {
    "locationGoogleAttributes": {
      "totalResult": 0,
      "attributes": [
        {
          "attributeId": "string",
          "displayName": "string",
          "groupDisplayName": "string",
          "valueType": "BOOL",
          "repeatable": true,
          "deprecated": true,
          "allowedValues": [
            {
              "value": null,
              "displayName": null
            }
          ],
          "synupValue": [
            "string"
          ],
          "filled": true,
          "managedIn": "custom_attribute",
          "supportedBySynup": true
        }
      ],
      "filledCount": 0,
      "unfilledCount": 0
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectrequired
data.locationGoogleAttributesobjectrequiredGoogle attributes for the location.
data.locationGoogleAttributes.totalResultintegerrequiredNumber of attributes Google allows for the location.
data.locationGoogleAttributes.attributesarray of objectrequiredOne entry per attribute, unfilled attributes first.
data.locationGoogleAttributes.attributes[].attributeIdstringrequiredGoogle attribute ID, e.g. wi_fi. Use it as the custom attribute slug when you update the location.
data.locationGoogleAttributes.attributes[].displayNamestringoptionalName Google shows for the attribute.
data.locationGoogleAttributes.attributes[].groupDisplayNamestringoptionalGroup Google shows the attribute under, e.g. Amenities.
data.locationGoogleAttributes.attributes[].valueTypestringrequiredBOOL (Yes/No), ENUM (single choice), REPEATED_ENUM (multi-option list) or URL (link).
BOOLENUMREPEATED_ENUMURL
data.locationGoogleAttributes.attributes[].repeatablebooleanoptionalWhether more than one value can be set.
data.locationGoogleAttributes.attributes[].deprecatedbooleanoptionalWhether Google has deprecated the attribute.
data.locationGoogleAttributes.attributes[].allowedValuesarray of objectrequiredValues Google accepts. Empty for URL attributes.
data.locationGoogleAttributes.attributes[].allowedValues[].valuestringoptionalValue to send.
data.locationGoogleAttributes.attributes[].allowedValues[].displayNamestringoptionalLabel Google shows for the value.
data.locationGoogleAttributes.attributes[].synupValuearrayoptionalThe location's current value in Synup; null when not filled.
data.locationGoogleAttributes.attributes[].filledbooleanrequiredWhether Synup holds a value for the attribute.
data.locationGoogleAttributes.attributes[].managedInstringrequiredWhere the value is managed in Synup: custom_attribute (location custom attributes), social_profile (the location's social links), payment_methods (the location's payment methods) or place_action_links.
custom_attributesocial_profilepayment_methodsplace_action_links
data.locationGoogleAttributes.attributes[].supportedBySynupbooleanrequiredWhether Synup publishes this attribute to Google.
data.locationGoogleAttributes.filledCountintegerrequiredAttributes Synup holds a value for.
data.locationGoogleAttributes.unfilledCountintegerrequiredAttributes still unfilled in Synup.