Locals 路客酒店开放接口
  1. 可用性API
Locals 路客酒店开放接口
  • 预订API
    • 订单创建
      POST
    • 订单取消
      POST
    • 查询订单
      GET
  • 可用性API
    • 报价信息
      GET
  • 内容API
    • 酒店列表
      GET
    • 酒店详情
      GET
  • 数据模型
    • Data
    • ReserveRes
    • CheckDays
    • Customer
    • HudsonCustomer
    • RoomCustomer
    • HudsonCustomerInfo
    • DailyPrice
    • MapBigDecimal
    • ContactInfo
    • MapString
    • StdReserveRQ
    • Data
    • CancelRes
    • CancelRQ
    • BedType
    • Breakfast
    • RoomBed
    • DayInfo
    • Meal
    • ExtraFee
    • DailyInfo
    • GiftService
    • Fee
    • RefundRule
    • Gift
    • GoodsRoom
    • Rate
    • key
    • HotelRate
    • NationRule
    • MapHotelGoods
    • Data
    • AvailabilityRes
    • StdPricesRQ
    • Hotel
    • Data
    • HotelRes
    • BreakfastPolicy
    • Image
    • Room
    • HotelDetail
    • HotelDetailRes
  1. 可用性API

报价信息

测试环境
https://hudson-dev.localhome.cn
测试环境
https://hudson-dev.localhome.cn
GET
/openapi/hotel/availability
调用方式(HTTP Method):GET
查询报价:
1.
至少仅需要 hotelIds 和 checkin、checkout 参数,通常还需要填写 roomNum、roomCustomers 参数;
2.
一次查询 hotelIds 最多5个,checkin、checkout 最多30天,roomNum 默认 1,roomCustomers 默认 2 成人 0 儿童;
3.
仅返回酒店下房型的符合查询条件的报价,不满足连住、间数、提前预订等约束,或查询日期范围内整体不可订的,将被过滤不返回。
预订前报价校验:
1.
报价校验场景,请仅传确定的一个 hotelIds 和 ratePlanId,以及实际的 checkin、checkout、roomNum、roomCustomers 参数;
2.
另外,还需提供待下单金额相关的 dailyPrices、taxAndFee 参数,currency 请与查询报价结果保持一致,将检查待下单金额能否成功预订。

请求参数

Query 参数

Header 参数

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://hudson-dev.localhome.cn/openapi/hotel/availability?rq={"hotelIds":"1296369727399878657,1296369727399878658","checkin":"2024-01-01","checkout":"2024-01-03","roomNum":1,"roomCustomers":[{"adults":2}]}' \
--header 'Authorization: {{authorization}}' \
--header 'Timestamp: {{timestamp}}' \
--header 'PartnerId: 1758852059833961'

返回响应

🟢200成功
application/json
Body

示例
{
  "success": false,
  "code": "",
  "message": "",
  "data": [
    {
      "hotelId": 0,
      "name": "",
      "currency": "",
      "timeZone": "",
      "rates": [
        {
          "roomId": 0,
          "name": "",
          "ratePlanId": 0,
          "view": "",
          "roomBed": {
            "relation": "",
            "beds": [
              {
                "type": "",
                "count": 0
              }
            ]
          },
          "breakfast": {
            "count": 0,
            "desc": ""
          },
          "checkinTime": "",
          "checkoutTime": "",
          "dailyInfos": [
            {
              "date": "",
              "price": 0.0,
              "status": 0,
              "count": 0
            }
          ],
          "taxAndFee": 0.0,
          "adults": 0,
          "children": 0,
          "childAge": 0,
          "checkinFees": [
            {
              "name": "",
              "fee": 0.0,
              "currency": ""
            }
          ],
          "gifts": [
            {
              "type": "",
              "name": "",
              "desc": "",
              "price": 0.0,
              "rule": ""
            }
          ],
          "refundRules": [
            {
              "type": "",
              "amount": 0.0,
              "maxHoursBeforeCheckIn": 0,
              "minHoursBeforeCheckIn": 0
            }
          ],
          "nationRule": {
            "type": "",
            "nations": [
              ""
            ]
          }
        }
      ]
    }
  ],
  "extras": {
    "": ""
  }
}
修改于 2025-10-14 03:28:32
上一页
查询订单
下一页
酒店列表
Built with