# Get Google Attributes for a Location

```http
GET https://api.synup.com/api/v4/locations/{locationId}/google-attributes
```

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.

Source: https://developer.synup.com/api/locations/get-google-attributes-for-a-location

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `locationId` | string | required | Required. The location ID, either the numeric ID (e.g. `279403`) or the encoded ID returned by other APIs (e.g. `TG9jYXRpb246Mjc5NDAz`). |

## Example request

```bash
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

| Status | Description |
| --- | --- |
| `200` | Successfully retrieved the location's Google attributes. |
| `400` | Bad 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`. |
| `401` | Unauthorized. Invalid or missing API key. |
| `502` | Google could not be reached or returned an error. Retry after some time. |
