TABLE OF CONTENTS


渠道酒店激活接口 


DerbySoft 调用此接口来激活渠道酒店列表。用户在获取到供应商酒店列表后,需要在该接口返回酒店的状态,表示哪些酒店进行售卖。

建议此接口和供应商酒店接口组合使用。


GET /hotels/{supplierId} HTTP/1.1
URL: {{ariPushendpoint}}/hotels/{supplierId}
Authorization:Bearer {apiKey} 
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8

请求规范


名称

描述必传字段

类型

示例

supplierId

酒店集团 IDYes

String

HILTON


响应规范

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

supplierId

酒店集团 ID

 Yes

string

HILTON

hotelId

酒店代码

Yes

string

GATHI

status

酒店在渠道系统的状态

Yes

enum

Actived,

Deactived


响应示例(成功)

  
{
    "supplierId": "HILTON",
    "hotelId": "GATHI",
    "status": "Actived"
  }

响应示例(失败)


{
    "error": "Key not authorised"
}


渠道产品激活接口

DerbySoft 调用此接口来激活渠道产品列表。用户在获取到供应商产品列表后,需要在该接口返回产品的状态,表示哪些产品进行售卖。

建议此接口和供应商产品接口组合使用。


GET /hotel/{supplierId}/{hotelId} HTTP/1.1
URL: {{ariPushendpoint}}/hotel/{supplierId}/{hotelId}
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


响应规范


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

supplierId

酒店集团 ID

 Yes

string

HILTON

hotelId

酒店代码

Yes

string

GATHI

status

渠道产品状态

Yes

string

settings

设置参数

Noobject"settings": {
"key": "value"
} 
ariTypeARI类型Yesenum[Daily, LOS]
rateType价格类型Yesenum

 [ AmountBeforeTax, AmountAfterTax, Both ]

表示是否返回税前价、税后价,或者返回税前和税后价

  • AmountBeforeTax:  在下单和实时询价接口只返回税前价
  • AmountAfterTax:   在下单和实时询价接口只返回税后价
  • Both: 始终返回税前和税后价

amountBeforeTax
productsarrayYes//
@roomIdstringYes房型代码KING
@rateIdstringYes价格代码BAR
@statusenumYes产品在渠道系统的状态[Actived, Deactived]Actived
products/occupancyarrayYes//
@maxAdultintergerYes最大成人数【每间】2
@maxChildintergerYes最大儿童数【每间】2
@maxOccupancyintergerYes最大入住人数【每间】3



响应示例 (成功)


{
  "supplierId": "HILTON",
  "hotelId": "GATHI",
  "status": "Actived",
  "settings": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "ariType": "Daily",
  "rateType": "AmountBeforeTax",
  "products": [
    {
      "roomId": "K1",
      "rateId": "CBAR",
      "status": "Actived",
      "occupancy": {
        "maxAdult": 3,
        "maxChild": 2,
        "maxOccupancy": 3
      }
    }
  ]
}

响应示例(失败)


{
    "error": "Key not authorised"
}


Daily ARI 推送

DerbySoft 调用此接口推送 Daily ARI 到渠道系统。推送分为Delta和Overlay模式。


Overlay:是指当酒店产品的价量态发生变化时,推送该酒店的所有产品到渠道系统。
Delta:是指当酒店产品的价量态发生变化时,推送该产品到渠道系统,每次推送产品数量范围1-15,由渠道指定。


POST /ari/daily/push HTTP/1.1
URL: {{ariPushEndpoint}}/ari/daily/push
Authorization:Bearer {apiKey}
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8


请求示例

  • Occupancy Rate
{
  "header": {
    "supplierId": "HILTON",
    "distributorId": "GTA",
    "version": "v4",
    "token": "18393849028490234"
  },
  "messageType": "Delta",
  "hotelId": "GATHI",
  "dateRange": {
    "startDate": "2024-01-01",
    "endDate": "2024-01-04"
  },
  "currency": "USD",
  "dailyAris": [
    {
      "roomId": "K1",
      "rateId": "BARB",
      "corpCodes": [
	"IBM"
],
      "mealPlans": [
        "BB",
        "BB",
        "BB",
        "BB"
      ],
      "inventories": [
        9,
        0,
        9,
        9
      ],
      "rates": {
        "type": "OccupancyRate",
        "rates": [
          {
            "adultCount": 2,
            "childCount": 1,
            "amountBeforeTax": [
              502.19,
              502.19,
              502.19,
              502.19
            ],
            "amountAfterTax": [
              623.23,
              623.23,
              623.23,
              623.23
            ]
          }
        ]
      },
      "availStatuses": {
        "close": [
          false,
          false,
          false,
          false
        ],
        "minStayArrival": [
          0,
          2,
          0,
          0
        ],
        "maxStayArrival": [
          0,
          2,
          0,
          0
        ],
        "minStayThrough": [
          0,
          2,
          0,
          0
        ],
        "maxStayThrough": [
          0,
          2,
          0,
          0
        ],
        "minAdvanceDay": [
          0,
          2,
          0,
          0
        ],
        "maxAdvanceDay": [
          365,
          365,
          365,
          365
        ],
        "cta": [
          false,
          false,
          false,
          true
        ],
        "ctd": [
          false,
          false,
          false,
          true
        ],
        "fplos": [
          "1111111",
          "1001111",
          "1000001",
          "0000000"
        ]
      },
      "rateChangeIndicators": [
        true,
        false,
        true,
        false
      ]
    }
  ]
}


请求规范

属性类型必传字段描述示例

header

object

Yes

 /

 /

@supplierId

string

Yes

最大长度:32

酒店集团 ID

HILTON

@distributorId

string

Yes

最大长度:32

渠道 ID

GTA

@version

string

Yes

最大长度:20

API版本

v1.2

@token

string

Yes

最大长度:64

用于标识请求和响应的唯一ID,通常应为UUID

18393849028490234

messageType

enum

No

枚举:[Delta(增量),Overlay(全量)]

默认类型为全量推送

Delta

hotelId

string

Yes

酒店代码

GATHI

dateRange

object

Yes

日期范围

 /

@startDate

string

Yes

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

2024-01-01

@endDate

string

Yes

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

2024-01-04

currency

string

Yes

币种代码[ISO-4217]

USD

dailyAris

array

Yes

日期范围内的每日价和房间库存

 /

@roomId

string

Yes

房型代码

10000101

@rateId

string

Yes

价格计划代码

123456

@corpCodes

array

No

表示该产品可用的企业协议代码列表

IBM

@mealPlans

array[string]

No

餐食计划

[ "BB", "BB", "BB", "BB" ]

@inventories

array[integer]

Yes

房量/库存

[ 9, 0, 9, 9 ]

dailyAris / rates

 /

Yes

 /

 /

@type

Enum 枚举: 

 

Yes

枚举:[OccupancyRate,CommonRate]

指示要使用的费率模型

 /

rates / rates

array[object]

Yes

如果是“CommonRate”,则不会显示该节点

 /

@adultCount

integer

No

如果是“CommonRate ”,则不会显示该节点

 /

@childCount

integer

No

CommonRate,则不会显示该节点

 /

@amountBeforeTax

array[number]

No

 /

[ 502.19, 502.19, 502.19, 502.19 ]

@amountAfterTax

array[number]

No

 /

[ 623.23, 623.23, 623.23, 623.23 ]

dailyAris / availStatuses

 /

 /

 /

 /

@close

array[boolean]

Yes

是否关房

true 表示房态为关房

false 表示房态为可住

[ false, false, false, false ]

@minStayArrival

array[integer]

No

最少入住天数,0 值表示无限制

[ 0, 2, 0, 0 ]

@maxStayArrival

array[integer]

No

最大入住天数,0 值表示无限制

[ 0, 2, 0, 0 ]

@minStayThrough

array[integer]

No

如果入住跨越此天,最少入住天数,0 值表示无限制

[ 0, 2, 0, 0 ]

@maxStayThrough

array[integer]

No

如果入住跨越此天,最大入住天数,0 值表示无限制

[ 0, 2, 0, 0 ]

@minAdvanceDay

array[integer]

No

最少提前几天预订,0 值表示无限制

[ 0, 2, 0, 0 ]

@maxAdvanceDay

array[integer]

No

最大提前几天预订,0 值表示无限制

[ 365, 365, 365, 365 ]

@cta

array[boolean]

No

Closed to Arrival, 如果为true, 表示当天不可预订

[ false, false, false, true ]

@ctd

array[boolean]

No

如果为true, 表示当天不可离店

[ false, false, false, true ]

@fplos

array[string]

No

Full Pattern Length of Stay, 表示连住几晚是否可住 0值 表示不可住

[ "1111111", "1001111", "1000001", "0000000" ]

dailyAris / rateChangeIndicators

array[boolean]

No

房价变化标识

[ true, false, true, false ]



响应示例

  • 成功响应(HTTP 状态 200)
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v1.0.0",
"token": "18393849028490234"
},
"hotelId": "GATHI",
"updateDateRange": {
"startDate": "2024-01-01",
"endDate": "2024-01-04"
}
}

  • 错误响应(HTTP 状态 403)
{
"errorCode": "InvalidField",
"errorMessage": " Unauthorized token"
}

  • 错误响应(HTTP 状态 500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}


响应规范

属性类型必传字段描述示例

header

object

Yes

 /

 /

@supplierId

string

Yes

最大长度:32

酒店集团 ID

HILTON

@distributorId

string

Yes

最大长度:32

渠道 ID

GTA

@version

string

Yes

最大长度:20

API版本

v1.2

@token

string

Yes

最大长度:64

用于标识请求和响应的唯一 ID,通常应为 UUID

18393849028490234

hotelId

string

Yes

酒店代码

GATHI

updateDateRange

object

 Yes

日期范围

 /

@startDate

string

Yes

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

2024-01-01

@endDate

string

Yes

结束日期,格式为y yyy-MM-dd

2024-01-04



LOS 价格推送

DerbySoft 调用此接口推送 LOS ARI 到渠道系统,推送分为Overlay和Delta模式。

Overlay:是指当酒店产品的价量态发生变化时,推送该酒店的所有产品到渠道系统。
Delta:是指当酒店产品的价量态发生变化时,推送该产品到渠道系统,每次推送产品数量范围1-15,由渠道指定。
POST /ari/los/push HTTP/1.1
URL: {{ariPushendpoint}}/ari/los/push
Authorization:Bearer {apiKey}
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8


请求示例

  • Occupancy Rate
{
  "header": {
    "supplierId": "HILTON",
    "distributorId": "GTA",
    "version": "v4",
    "token": "18393849028490234"
  },
  "messageType": "Delta",
  "hotelId": "GATHI",
  "dateRange": {
    "startDate": "2024-01-01",
    "endDate": "2024-01-04"
  },
  "currency": "USD",
  "losAris": [
    {
      "roomId": "K1",
      "rateId": "BARB",
      "corpCodes": [
	"IBM"
],
      "los": 1,
      "mealPlans": [
        "BB",
        "BB",
        "RO",
        "BB"
      ],
      "inventories": [
        9,
        0,
        9,
        9
      ],
      "rates": {
        "type": "OccupancyRate",
        "rates": [
          {
            "adultCount": 2,
            "childCount": 1,
            "amountBeforeTax": [
              502.19,
              502.19,
              502.19,
              502.19
            ],
            "amountAfterTax": [
              623.23,
              623.23,
              623.23,
              623.23
            ]
          }
        ]
      }
    }
  ]
}


请求规范

属性类型必传字段描述示例

header

object

Yes

 /

 /

@supplierId

string

Yes

最大长度:32

酒店集团 ID

HILTON

@distributorId

string

Yes

最大长度:32

渠道 ID

GTA

@version

string

Yes

最大长度:20

API 版本

v1.2

@token

string

Yes

最大长度:64

用于标识请求和响应的唯一 ID,通常应为 UUID

18393849028490234

messageType

enum

No

枚举:[Delta (增量),Overlay (全量)]

省略属性表示消息类型为全量推送

Delta

hotelId

string

Yes

酒店代码

GATHI

dateRange

object

Yes

日期范围

 /

@startDate

string

Yes

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

2024-01-01

@endDate

string

Yes

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

2024-01-04

currency

string

Yes

币种代码[ISO-4217]

USD

losAris

array

Yes

表示连住几晚的价格和房量。如果没有可用的价格,则表示酒店已关闭。如果可用房价仅适用于某些房型,则意味着其他房型已关闭。

 /

@roomId

string

Yes

房型代码

10000101

@rateId

string

Yes

价格计划代码

123456

@corpCodes

array

No

表示该产品可用的企业

IBM

@los

integer

Yes

表示连住

1

@mealPlans

array[string]

No

每日期餐食计划

[ "BB", "BB", "BB", "BB" ]

@inventories

array[integer]

Yes

每日房量/库存

[ 9, 0, 9, 9 ]

losAris / rates

 /

Yes

 /

 /

@type

enum

Yes

枚举:[OccupancyRate,CommonRate]

指示要使用的价格模型:OccupancyRate 或 CommonRate。

 /

rates / rates

array[object]

Yes

如果该节点是“CommonRate”,则不会显示该节点。

 /

@adultCount

integer

No

如果该节点是“CommonRate”,则不会显示该节点。

 /

@childCount

integer

No

如果该节点是“CommonRate”,则不会显示该节点。

 /

@amountBeforeTax

array[number]

No

 /

[ 502.19, 502.19, 502.19, 502.19 ]

@amountAfterTax

array[number]

No

 /

[ 623.23, 623.23, 623.23, 623.23 ]

rates / extraChildRates

object

No

byAge 类型的儿童价是由 OccupancyRate 的子节点 extraChildRates 来提供。且酒店必须提供最大儿童年龄信息(maxChildAge)

 /

@minAge

integer

Yes

最小儿童年龄,值大于或等于零

0

@maxAge

integer

Yes

最大儿童年龄,值小于或等于 maxChildAge

2

@amountBeforeTax

array[number]

No

 /

[ 40, 40 ]

@amountAfterTax

array[number]

No

 /

[ 40, 40 ]

extensions

object

No

用于额外属性或设置等

 /


响应示例

  • 成功响应(HTTP 状态 200)
{
"header": {
"supplierId": "HILTON",
"distributorId": "GTA",
"version": "v1.0.0",
"token": "18393849028490234"
},
"hotelId": "GATHI",
"updateDateRange": {
"startDate": "2024-01-01",
"endDate": "2024-01-04"
}
}

  • 错误响应(HTTP 状态 403)
{
"errorCode": "InvalidField",
"errorMessage": " Unauthorized token"
}

  • 错误响应(HTTP 状态 500)
{
"errorCode": "InvalidField",
"errorMessage": "Invalid Message"
}


响应规范

属性类型必传字段描述示例

header

object

Yes

 /

 /

@supplierId

string

Yes

最大长度:32

酒店集团 ID

HILTON

@distributorId

string

Yes

最大长度:32

渠道 ID

GTA

@version

string

Yes

最大长度:20

API版本

v1.2

@token

string

Yes

最大长度:64

用于标识请求和响应的唯一 ID,通常应为 UUI。

18393849028490234

hotelId

string

Yes

酒店代码

GATHI

updateDateRange

object

 Yes

日期范围

 /

@startDate

string

Yes

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

2024-01-01

@endDate

string

Yes

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

2024-01-04