TABLE OF CONTENTS

渠道使用此 API 获取酒店集团的酒店列表和酒店产品

  • 酒店列表(/hotels/{supplierId}):渠道使用此 API 获取酒店列表以及可售卖状态。如返回酒店状态为 Deactived 则表示酒店集团已下线此酒店或不可售卖。当渠道在请求中携带 corpCode,接口将返回对该 corpCode 可用的酒店列表及状态。
  • 酒店产品(/Hotel/{supplierId}/{hotelId}):渠道使用此 API 获取酒店产品以及每个产品的可售卖状态。Deactived 表示不可售卖。当渠道在请求中携带 corpCode,接口将返回对该 corpCode 可用的产品列表及状态。

酒店列表同步接口

渠道使用此 API 获取酒店列表,然后根据酒店状态(Actived/Deactived)在自己的系统中上线或下线酒店。建议定时调用此接口询问及更新变化(每天至少同步一次)

重要提醒:

如果渠道在请求中指定了corpCode,BTS将返回所有供应商酒店 (v.1.2.1)。
如果渠道没有指定任何 corpCode,BTS 将返回所有供应商酒店。
所有接口移除 Supplier Code
GET /hotels/{supplierId}?distributorId={distributorId}&supplierId={supplierId} HTTP/1.1
URL: {endpoint}/hotels/{supplierId}?distributorId={distributorId}&supplierId={supplierId}
Authorization:Bearer {apiKey}
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8

请求参数

名称

描述必传字段

类型

示例

supplierId

酒店集团 IDYes

String

HILTON

distributorId

渠道 IDYesString

TUI

corpCode

渠道企业代码No

String

IBM



响应示例

  • 成功响应(HTTP 状态 200)
[
{
"hotelId": "GATHI",
"hotelName": "This is a test hotel",
"supplierId": "HILTON",
"status": "Actived"
}
]
  • 错误响应(HTTP 状态 401)
{
"error": "Key not authorized"
}
  • 错误响应(HTTP 状态 500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}


响应规范

属性

类型

必传字段

描述

示例

hotelId

string

Yes

酒店代码

GATHI

hotelName

string

No

酒店名称

Hilton hotel resorts

supplierId

string

Yes

酒店集团 ID

HILTON

status

enum

Yes

酒店状态

举例: [ Actived, Deactived ]

Actived




酒店产品接口同步接口

渠道使用此API获取酒店产品以及每个产品的可售卖状态。建议定时调用此接口询问及更新变(每天至少同步一次)

GET /hotel/{supplierId}/{hotelId}?distributorId={distributorId}&supplierId={supplierId} HTTP/1.1
URL: {endpoint}/hotel/{supplierId}/{hotelId}?distributorId={distributorId}&supplierId={supplierId}
Authorization:Bearer {apiKey}
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8

请求参数

名称描述必传字段类型
示例

supplierId

酒店集团 ID

 Yes

string

HILTON

hotelId

酒店代码

Yes

string

GATHI

distributorId

渠道 ID

Yes

string

TUI

corpCode

渠道企业代码

No

string

IBM



响应示例

  • 成功响应(HTTP状态200)
{
  "hotelId": "GATHI",
  "hotelName": "This is a test hotel",
  "supplierId": "HILTON",
  "status": "Actived",
  "chainCode": "Hilton",
  "brandCode": "Hampton",
  "longitude": "41.40338",
  "latitude": "2.17403",
  "city": "string",
  "country": "string",
  "state": "string",
  "address": [
    "AddressLine1",
    "AddressLine2",
    "AddressLine3",
    "AddressLine4",
    "AddressLine5"
  ],
  "phone": {
    "countryAccessCode": "string",
    "areaCityCode": "string",
    "phoneNumber": "string"
  },
  "settings": {
    "key1": "value1",
    "key2": "value2"
  },
  "extensions": {
      "ratePlanCategories": "RP1, RP2, RP3",
   
   },
  "ariType": "Daily",
  "timezone": "America/Los_Angeles",
  "rateType": "AmountBeforeTax",
  "maxChildAge": 17,
  "childRateType": "ByAge",
  "products": [
    {
      "roomId": "10000101",
      "rateId": "123456",
      "ratetFlag": "CWD"
      "stayType": "OverNightRoom",
      "status": "Actived",
      "roomName": "Double Room",
      "roomDescription": "Soak in city views in our Deluxe room, which features a well-appointed ensuite bathroom and up-to-date entertainment offerings.",
      "rateName": "Bar Rate",
      "rateDescription": "Begin your day with a hearty meal.",
      "occupancy": {
        "maxAdult": 3,
        "maxChild": 2,
        "maxOccupancy": 3
      },
      "paymentType": "PayNow",
      "guarantee": {
        "guaranteeType": "CCG"
      },
      "cancelPolicies": [
        {
          "dateRange": {
            "startDate": "2024-01-01",
            "endDate": "2024-01-04"
          },
          "cancelPolicy": {
            "code": "AD100P_100P",
            "description": "Non Refundable",
            "cancelPenalties": [
              {
                "noShow": true,
                "cancellable": true,
                "cancelDeadline": {
                  "offsetTimeDropType": "BeforeArrival",
                  "offsetTimeUnit": "D",
                  "offsetTimeValue": 999,
                  "deadline": "string"
                },
                "penaltyCharge": {
                  "chargeBase": "FullStay",
                  "nights": 0,
                  "amount": 0,
                  "percent": 0
                }
              }
            ]
          }
        }
      ],
      "fees": [
        {
          "dateRange": {
            "startDate": "2024-01-01",
            "endDate": "2024-01-04"
          },
          "fee": {
            "name": "Service Charge",
            "type": "Exclusive",
            "amount": 10,
            "amountType": "Percent",
            "chargeType": "PerRoomPerNight",
            "paymentType": "PayNow",
            "effectivePerson": 0
          }
        }
      ],
      "bookingChannels": [
        "channel",
        "channel"
      ],
      "sourceMarkets": [
        "region",
        "region"
      ],
     
        }
      ]
    }
  ]
}
  • 错误响应(HTTP状态401)
{
"error": "Key not authorized"
}
  • 错误响应(HTTP状态500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}

响应规范

属性

类型

必传字段

描述

示例

hotelId

string

Yes

酒店代码

GATHI

hotelName

string

No

酒店名称

This is a test hotel

supplierId

string

Yes

酒店集团 ID

 HILTON

status

enum

Yes

酒店状态

枚举: [ Actived, Deactived ]

Actived

chainCode

string

No

连锁代码可以标识酒店连锁或管理集团,例如 Hyatt、Hilton。酒店连锁代码由酒店集团决定,如果酒店是单体酒店,仅通过 hotelId 字段即可识别,则酒店连锁代码是可选的。 

Hilton

brandCode

string

No

品牌代码可以识别连锁店内的品牌,例如 Courtyard、Hampton Inn。如果酒店是单体酒店,则是可选字段。

Hamption

longitude

string

No

酒店经纬度信息

41.40338

latitude

string

No

酒店经纬度信息

2.17403

city

string

No

 /

 /

country

string

No

 /

 /

state

string

No

 /

 /

address

array

No

最多支持五个地址

[ "AddressLine1", "AddressLine2", "AddressLine3", "AddressLine4", "AddressLine5" ]

phone

object

No

 /

 /

@countryAccessCode

string

Yes

 /

 /

@areaCityCode

string

No

 /

 /

@phoneNumber

string

Yes

 /

 /

settings

object

Yes

用于额外属性或设置等

{

    "key": "value"

}

extensions

object

No

它是可选字段,与万豪对接的渠道可通过此字段接收万豪的 集群代码(Cluster Code)及与之对应的价格计划代码。

{

    "M96": "FBJL,MWSU,YRNB,RMOT",

    "13.RPT": "LLRJ,XXRN,UAON,HDYB"

}

 

ariType

enum

Yes

枚举:[Daily,LOS]

指示 ARI API 使用的 ARI 模型

Daily

timezone

string

Yes

酒店时区

America/Los_Angeles

rateType

enum

Yes

枚举:[AmountBeforeTax、AmountAfterTax、Both]

指示酒店集团提供的价格类型

  • AmountBeforeTax:酒店集团仅提供税前价
  • AmountAfterTax:酒店集团只仅提供税后价
  • Both:酒店集团同时提供税前价及税后价

AmountBeforeTax

maxChildAge

integer

No

如果 childRateType 为 ByAge,则 maxChildAge 为必填字段。

 /

childRateType

enum

No

枚举:[Normal, ByAge, Free, AsAdult]

儿童价类型

  • Normal:默认类型,入住成人与入住儿童组合价,与入住儿童年龄无关
  • ByAge:根据入住儿童年龄收取对应儿童价。此类型时 maxChildAge 字段提供最大儿童年龄设置。推送 ARI 时,儿童价由 extraChildRates 节点推送
  • Free:入住儿童免费
  • AsAdult:入住儿童将按成人收费

ByAge

products

array

Yes

 /

 /

@roomId

string

Yes

房型代码

King

@rateId

string

Yes

价格计划代码

BAR

@rateFlagenum
No价格标签,用于表示集团价格类型 【RFP】表示企业固定协议价,【CWD】表示企业[集团]折扣价, 【PUB】表示公开零售价CWD

@stayType

enum

No

枚举:[OverNightRoom,DayUseRoom]

标识此产品是专门用于日用房还是常规过夜使用。默认类型为OverNightRoom

OverNightRoom

@status

enum

Yes

枚举: [ Actived, Deactived ]

Actived

@roomName

string

No

房型名称

King Room

@roomDescription

string

No

 /

Soak in city views in our Deluxe room, which features a well-appointed ensuite bathroom and up-to-date entertainment offerings.

@rateName

string

No

价格计划名称

Best Available Rate

@rateDescription

string

No

 /

Begin your day with a hearty meal

products/occupancy

 

Yes

 /

 /

@maxAdult

integer

Yes

最大入住成人数

3

@maxChild

integer

Yes

最大入住儿童数

2

@maxOccupancy

integer

Yes

最大入住人数

3

@paymentType

enum

No

枚举:[PayLater,PayNow]

预付(PayNow)、前台现付(PayLater)

PayNow

products/guarantee

 /

No

 /

 /

@guaranteeType

string

Yes

此房价的保证信息。

担保类型,参考 担保类型列表.

CCG

products/cancelPolicies

 /

No

 /

 /

cancelPolicies/dateRange

object

No

 日期范围

 /

@startDate

string

Yes

开始日期,格式为 yyyy-MM-dd

2024-01-01

@endDate

string

Yes

结束日期,格式为 yyyy-MM-dd

2024-01-04

cancelPolicies/cancelPolicy

object

No

 /

 /

@code

string

Yes

取消政策代码

最大长度:128

AD100P_100P

@description

string

No

取消政策的描述

最大长度:1024

Non Refundable

cancelPolicy/cancelPenalties

 /

Yes

取消政策详情

 /

@noShow

boolean

Yes

如果为true,则意味着罚金适用于“未入住”,cancellable 和 cancelDeadline 两个节点将不会出现。

 /

@cancellable

boolean

No

标示是否允许取消。如果为 false,则不可取消。如果为 true,cancelDeadline 节点将出现。

 /

cancelPenalties / cancelDeadline

 /

 /

 /

 /

@offsetTimeDropType

enum

No

标示取消政策以入住日期或预订日期为依据。目前只支持入住日期类型

枚举:[BeforeArrival]

 /

@offsetTimeUnit

enum

No

枚举: [ D, H ]

 

 /

@offsetTimeValue

number

No

时间数

 /

@deadline

string

No

取消截止时间,一般为酒店所在地时间,如下午4点前或下午6点前

 /

cancelPenalties/ penaltyCharge

 /

Yes

 /

 /

@chargeBase

enum

No

如果是FullStay,则为百分比或金额;如果是NightBase,则需要通过 nights 节点提供间夜数。

枚举:[FullStay,NightBase]

 /

@nights

number

No

罚款是基于入住晚数,如一晚

 /

@amount

number

No

罚款是固定费用,如30.00美元

 /

@percent

number

No

罚款是基于百分比,如 15.5 为 15.5%

 /

products/fees

/

No

 /

 /

fees/dateRange

 /

No

 日期范围

 /

@startDate

string

Yes

开始日期,格式为yyyy-MM-dd

2024-01-01

@endDate

string

Yes

结束日期,格式为yyyy-MM-dd

2024-01-04

fees/fee

object

No

 /

 /

@name

string

Yes

费用或税款的名称

Service Charge

@type

enum

Yes

税费是否包含在税前价中

枚举:[Inclusive,Exclusive]

Exclusive

@amount

number

Yes

税费金额

10

@amountType

enum

Yes

税费收取规则,是固定金额收取,还是按房费比例收取

枚举:[Fix,Percent]

Percent

@chargeType

enum

Yes

枚举: [ PerRoomPerNight, PerPersonPerNight, PerRoomPerStay, PerPersonPerStay ]

PerRoomPerNight

@paymentType

enum

No

预付(PayNow)、前台现付(PayLater)

枚举:[PayLater,PayNow]

PayNow

 @effectivePerson

 number

 No

从第几名成人开始收取额外费用,通常从第3名成人开始收取。值为 3 表示从第3名成年人起将收取额外费用

 /

products/bookingChannels

array[string]

No

渠道 ID/子渠道 ID

["channel1", "channel2"]

products/sourceMarkets

array[string]

No

/

["region1", "region2"]