1. 可用性API
Locals 路客酒店开放接口
  • 预订API
    • 订单创建
      POST
    • 订单取消
      POST
    • 查询订单
      GET
  • 可用性API
    • 报价信息
      GET
  • 内容API
    • 酒店列表
      GET
    • 酒店详情
      GET
  • 数据模型
    • Data
    • ReserveRes
    • CheckDays
    • Customer
    • HudsonCustomer
    • RoomCustomer
    • HudsonCustomerInfo
    • DailyPrice
    • MapBigDecimal
    • ContactInfo
    • MapString
    • StdReserveRQ
    • NightCharge
    • Data
    • Stay
    • CancelRes
    • Amount
    • CancelRQ
    • BedType
    • Charge
    • Breakfast
    • RoomBed
    • Totals
    • DayInfo
    • Meal
    • ChargeCalculated
    • ExtraFee
    • DailyInfo
    • FeesPricingInformation
    • GiftService
    • Fee
    • EpsPriceInfo
    • 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": true,
    "code": "SUCCESS",
    "message": "EnumErrorCode.SUCCESS.getDesc()",
    "data": [
        {
            "hotelId": 1296369727399878700,
            "name": "Hilton Motif Seattle",
            "currency": "CNY",
            "timeZone": "GMT+8",
            "rates": [
                {
                    "roomId": 0,
                    "name": "City View Deluxe Family Suite",
                    "nameCn": "City View Deluxe Family Suite",
                    "ratePlanId": 1296369727399878700,
                    "view": "NONE",
                    "roomBed": [
                        {
                            "relation": "AND",
                            "beds": [
                                {
                                    "type": "KING_BED",
                                    "count": 1
                                }
                            ]
                        }
                    ],
                    "breakfast": {
                        "count": 0,
                        "desc": "早餐",
                        "desc2": "双早"
                    },
                    "checkinTime": "12:00",
                    "checkoutTime": "14:00",
                    "dailyInfos": [
                        {
                            "date": "2030-01-10",
                            "price": 500,
                            "status": 1,
                            "count": 1
                        }
                    ],
                    "taxAndFee": 15,
                    "adults": 2,
                    "children": 0,
                    "childAge": 12,
                    "checkinFees": [
                        {
                            "name": "城市税",
                            "fee": 15,
                            "currency": "CNY"
                        }
                    ],
                    "gifts": [
                        {
                            "type": "OTHER",
                            "name": "欢迎果盘",
                            "desc": "入住日22:00前到店,免费赠送欢迎果盘一份",
                            "price": 120,
                            "rule": "ONCE"
                        }
                    ],
                    "refundRules": [
                        {
                            "type": "FREE",
                            "amount": 0,
                            "maxHoursBeforeCheckIn": 0,
                            "minHoursBeforeCheckIn": 0
                        }
                    ],
                    "originalCancellationPolicy": "string",
                    "cancellationExchangeRate": 0,
                    "nationRule": {
                        "type": "WRITE_LIST",
                        "nations": [
                            "string"
                        ]
                    },
                    "roomExtJson": "string",
                    "pricingInformation": [
                        {
                            "rpId": 0,
                            "rateScore": 0,
                            "exchangeRate": 0,
                            "nightly": [
                                [
                                    {
                                        "type": "BASE_RATE",
                                        "value": "string",
                                        "currency": "string"
                                    }
                                ]
                            ],
                            "stay": [
                                {
                                    "type": "BASE_RATE",
                                    "value": "string",
                                    "currency": "string"
                                }
                            ],
                            "totals": {
                                "inclusive": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "exclusive": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "propertyInclusive": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "inclusiveStrikethrough": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "strikethrough": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "propertyInclusiveStrikethrough": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "marketingFee": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "grossProfit": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "minimumSellingPrice": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "propertyFees": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                }
                            },
                            "fees": {
                                "mandatoryFee": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "resortFee": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                },
                                "mandatoryTax": {
                                    "billableCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    },
                                    "requestCurrency": {
                                        "value": "string",
                                        "currency": "string"
                                    }
                                }
                            }
                        }
                    ],
                    "isPackagingPrice": 0,
                    "cancelStatus": "string",
                    "unCancelDates": "string",
                    "specialOfferDescription": "string",
                    "valueAddPromotion": [
                        "string"
                    ],
                    "rateAmenity": [
                        "string"
                    ]
                }
            ]
        }
    ],
    "extras": {
        "key": "string"
    }
}
修改于 2026-03-17 07:50:52
上一页
查询订单
下一页
酒店列表
Built with