Lodging API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
更新日志
v1.2:2023 年 10 月 26 日
可持续认证
弃用 SustainabilityCertifications
对象。了解详情。
v1.1:2021 年 9 月 9 日
可持续性
在 Lodging
类型中添加了 Sustainability
对象。了解详情。
v1:2021 年 4 月 5 日
API 权限
Lodging API 需要在 GCP Console 中启用。OAuth 范围保持不变。
端点网址
可以通过 https://mybusinesslodging.googleapis.com/v1/{name=locations/{locationId}/lodging}
(而不是 https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}
)使用 Lodging API。
LanguageSpoken
对象已更改,现在接受语言代码。了解详情。
现在,allUnits
和 someUnits
字段只是输出。
您无法再修改 allUnits
或 someUnits
字段。了解详情。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eThe Lodging API has been updated with a new endpoint URL (\u003ccode\u003ehttps://mybusinesslodging.googleapis.com/v1/{name=locations/{locationId}/lodging}\u003c/code\u003e) and requires enabling from the GCP Console.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLanguageSpoken\u003c/code\u003e object now uses language codes, and the \u003ccode\u003eallUnits\u003c/code\u003e and \u003ccode\u003esomeUnits\u003c/code\u003e fields have become output-only, meaning they can no longer be edited.\u003c/p\u003e\n"],["\u003cp\u003eA new \u003ccode\u003eSustainability\u003c/code\u003e object was introduced in v1.1 within the \u003ccode\u003eLodging\u003c/code\u003e type, providing information about sustainability practices.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSustainabilityCertifications\u003c/code\u003e object has been deprecated in the latest version (v1.2), with further details available in the provided link.\u003c/p\u003e\n"]]],[],null,["# Lodging API\n\n\u003cbr /\u003e\n\nChange log\n----------\n\n### v1.2: 2023-10-26\n\n#### Sustainability Certifications\n\nDeprecation of `SustainabilityCertifications` object. [More Info.](/my-business/reference/lodging/rest/v1/Lodging#Sustainability)\n\n### v1.1: 2021-09-09\n\n#### Sustainability\n\nAddition of `Sustainability` object within `Lodging` Type. [More Info.](/my-business/reference/lodging/rest/v1/Lodging#Sustainability)\n\n### v1: 2021-04-05\n\n#### API Access\n\nThe Lodging API will need to be enabled from the [GCP Console.](https://console.developers.google.com/apis/library/mybusinesslodging.googleapis.com) The OAuth scope remains the same.\n\n#### Endpoint URL\n\nThe Lodging API is accessible at `https://mybusinesslodging.googleapis.com/v1/{name=locations/{locationId}/lodging}` instead of `https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}`\n\n#### `LanguageSpoken` format\n\nThe `LanguageSpoken` object has changed and now accepts a language code. [More Info.](/my-business/preview/reference/lodging/rest/v1/Lodging#LanguageSpoken)\n\n#### `allUnits` and `someUnits` are now Output Only.\n\nYou can no longer edit the `allUnits` or `someUnits` fields. [More info.](/my-business/preview/reference/lodging/rest/v1/Lodging)"]]