Google Business Lodging (hotels)
Hotels and other lodgings have a large set of extra data on Google: property details, policies (check-in, check-out), pools, wellness, parking, pets, rooms, accessibility, connectivity, sustainability and more.
- Authentication: API Key —
Authorization: Apikey <YOUR_API_KEY> - Location:
user+ optionallocation_id, as in location info. - Format: the data travels in Google's own Lodging format (camelCase).
Availability
Only for locations Google treats as lodging (400 lodging_not_supported otherwise). If
this feature is not available yet, the API answers 503 google_api_not_enabled.
Read
GET /api/uploadposts/google-business/lodging?user=X[&location_id=][&read_mask=pools,policies]—read_maskdefaults to*(everything).GET /api/uploadposts/google-business/lodging/google-updated?user=X— the data as customers see it, withdiff_masklisting what Google changed.
Update
- Method:
PATCH - Endpoint:
/api/uploadposts/google-business/lodging
| Name | Type | Required | Description |
|---|---|---|---|
lodging | object | Yes | Only the fields to change, e.g. {"pools": {"pool": true}, "policies": {"checkinTime": {"hours": 15}}}. |
update_mask | string | No | Explicit field paths (pools.pool,policies). By default it is built from what you send. * is not accepted. |
confirm | boolean | Yes | true: the hotel data is changed on Google. Not needed with dry_run. |
dry_run | boolean | No | Checks eligibility and returns what would be sent, without calling Google. |
Only the fields you send change. Empty values ("", [], {}) change nothing; null clears a field. Lists (for example guestUnits) are replaced whole.
metadata.updateTime (when the data was true) is set to now unless you send it.
{
"success": true,
"location_id": "locations/111",
"update_mask": ["pools.pool", "policies.checkinTime.hours", "metadata.updateTime"],
"lodging": { "...": "Google's answer" }
}
Errors
| Status | code | Meaning |
|---|---|---|
| 400 | invalid_lodging / invalid_field / invalid_update_mask / invalid_read_mask | The request is not valid. |
| 400 | confirmation_required | An update without "confirm": true (checked before the connection). |
| 400 | invalid_json | The body is not a valid JSON object. |
| 400 | lodging_not_supported | The location is not a lodging for Google. |
| 429 | location_edit_rate_limited | Too many edits on this location in a minute (an update counts as one). |
| 404 | lodging_not_found | No lodging data for this location. |
| 503 | google_api_not_enabled | Not available yet. |