概述

我们提供 4 种接口用于 PMS 与 PropertyConnector 间传递酒店信息。这些接口在整合 时不是必须开发。


  1. Update ChannelSetting: 更新Property Connector中渠道的基本信息。
  2. ChannelProduct Query: 查询Property Connector中酒店再渠道端的房型、价格信息(ID和名称)。
  3. Update ChannelMapping: 关联渠道端和酒店的房型、价格对应关系。
  4. Channel Query:获取全部可用渠道列表



更新渠道信息

此API用于更新Property Connector中的渠道基本信息。

使用前的注意事项
1. 已经在Property Connector中创建酒店、房型、价格
2. 已经在Properyt Connector中创建并激活产品
3. 已经在Property Connector中激活目标渠道


POST /pcapigateway/profile/{accountId}/hotels/{hotelId}/channels/{channelId}/connection HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript


请求

字段

类型

是否必填

描述

备注

hotelId

String

酒店ID

channelId

String

德比系统中的渠道ID

参考‘查询渠道列表

channelHotelId

String

酒店在渠道端的ID

对于在渠道端mapping的渠道,请保持channelHotelId和hotelId推送相同的值.

channelPaymentType

Enum

  • UPC on ePass

  • UPC

  • Bank Transfer

  • E-Card

Agoda端支持的支付方式

  • UPC on ePass: 允许您使用一张虚拟信用卡批量处理一批订单

  • UPC: 允许您使用一张虚拟信用卡处理每张订单

  • Bank Transfer: 允许您通过银行转账处理

  • E-Card: 使用Agoda发行的实体信用卡扣款


当连接Agoda时,该字段为必填

status

Enum

  • Actived

  • Deactived

userName

String

渠道端用户名

当连接以集团方式连接Agoda,Booking.com,Expedia时,该字段为必填

password

String

渠道端密码

当连接以集团方式连接Agoda,Booking.com,Expedia时,该字段为必填

currency

String

符合 ISO 4217 标准的渠道端货币

rateRule

Object[rateRule]

channelRateType

Enum

  • AmountBeforeTax

  • AmountAfterTax

推给渠道的价格是否含税

channelResRateType

Enum

  • AmountBeforeTax

  • AmountAfterTax

推给PMS的订单是否含税

当连接Agoda时,该字段为必填

channelPriceType

Enum

  • NetPrice

  • SellPrice

推给渠道的价格是底价或卖价

当连接Agoda时,该字段为必填

channelResPriceType

Enum

  • NetPrice

  • SellPrice

推给PMS的订单是底价或卖价

当连接Agoda时,该字段为必填


示例1.1 - 单体酒店更新Booing.com的渠道信息


请求

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "BOOKINGCOM",
  "channelHotelId": "20230215",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "BOOKINGCOM",
  "channelHotelId": "20230215",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}
JavaScript

响应(失败)

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "errorCode": "PARAM_CHECK",
  "errorMessage": "channelRateType is required"
}
JavaScript

示例1.2 - 集团酒店更新Booing.com的渠道信息


请求

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "BOOKINGCOM",
  "userName": "BOOKINGCOMAPIMACHINEACCOUNT",
  "password": "BOOKINGCOMAPIPASSWORD",
  "channelHotelId": "20230215",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "BOOKINGCOM",
  "userName": "BOOKINGCOMAPIMACHINEACCOUNT",
  "password": "BOOKINGCOMAPIPASSWORD",
  "channelHotelId": "20230215",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}
JavaScript

响应(失败)

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "errorCode": "PARAM_CHECK",
  "errorMessage": "channelRateType is required"
}
JavaScript

示例 1.3 - 单体酒店更新Agoda渠道信息


请求

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "AGODA",
  "channelHotelId": "20230215",
  "channelPaymentType": "UPC",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax",
    "channelPriceType": "NetPrice",
    "channelResRateType": "NetPrice"
  }
}
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
"hotelId": "FSDH",
  "channelId": "AGODA",
  "channelHotelId": "20230215",
  "channelPaymentType": "UPC",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax",
    "channelPriceType": "NetPrice",
    "channelResRateType": "NetPrice"
  }
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "errorCode": "InvalidField",
  "errorMessage": "channelResRateType is required"
}
JavaScript

示例 1.4 - 集团酒店更新Agoda渠道信息


请求

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "AGODA",
  "channelHotelId": "20230215",
  "channelPaymentType": "UPC",
  "password": "AGODAAPIKEY",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax",
    "channelPriceType": "NetPrice",
    "channelResRateType": "NetPrice"
  }
}
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
"hotelId": "FSDH",
  "channelId": "AGODA",
  "channelHotelId": "20230215",
  "channelPaymentType": "UPC",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax",
    "channelPriceType": "NetPrice",
    "channelResRateType": "NetPrice"
  }
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "errorCode": "InvalidField",
  "errorMessage": "channelResRateType is required"
}
JavaScript

示例 1.5 - 单体酒店更新Expedia渠道设置

请求

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "EXPEDIA",
  "channelHotelId": "20230215",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "EXPEDIA",
  "channelHotelId": "20230215",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "errorCode": "PARAM_CHECK",
  "errorMessage": "channelRateType is required"
}
JavaScript

示例 1.6 - 集团更新Expedia渠道设置


请求

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "EXPEDIA",
  "channelHotelId": "20230215",
  "userName": "EXPEDIAAPIUSERNAME",
  "password": "EXPEDIAAPIPASSWORD",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "EXPEDIA",
  "channelHotelId": "20230215",
  "userName": "EXPEDIAAPIUSERNAME",
  "password": "EXPEDIAAPIPASSWORD",
  "status": "Actived",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "errorCode": "PARAM_CHECK",
  "errorMessage": "channelRateType is required"
}
JavaScript


示例 1.7 - 其他需要在渠道端更新设置的渠道

请求

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "HOTELBEDS",
  "channelHotelId": "20230215",
  "status": "Actived",
  "rateForm": "0",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}

响应(成功)

{
  "header": {
    "echoToken": "12f10b22-9fbb-4898-84c8-a70e5695ff20",
    "timeStamp": "2023-02-16T02:46:14.721Z",
    "version": "0.1"
  },
  "hotelId": "FSDH",
  "channelId": "HOTELBEDS",
  "channelHotelId": "20230215",
  "status": "Actived",
  "rateForm": "0",
  "currency": "CNY",
  "rateRule": {
    "channelRateType": "AmountBeforeTax",
    "channelResRateType": "AmountBeforeTax"
  }
}

响应 (失败)

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "errorCode": "PARAM_CHECK",
  "errorMessage": "channelRateType is required"
}


查询渠道产品


此API用于查询酒店在渠道端设置的房型、价格信息(编号、名称)

1. 此API适用于需要在Property Connector中完成mapping的渠道,如Booking.com,Expedia,Agoda,不适用于全部渠道
2. 此API返回的都是已激活的产品(房型、价格计划)

GET /pcapigateway/profile/api/channels/{channelId}/channelhotels/{channelHotelId}/products?hotelSystemConnectionId={accountId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

返回

字段

类型

是否必填

描述

备注

channelHotelId

String

酒店在渠道端的ID

hotelName

String

酒店在渠道端的名称

channelId

String

德比系统中的渠道ID

  • AGODA

  • BOOKINGCOM

  • EXPEDIA

channelProducts

List[channelProducts]


channelProducts/availStatus

String

用于标识是否接受数据

当连接Expedia时,该字段为必填

channelProducts/channelrateId

String

渠道端价格ID

channelProducts/channelrateName

String

渠道端价格名称

channelProducts/channelroomId

String

渠道端房型ID

channelProducts/channelroomName

String

渠道端房型名称

channelProducts/status

Enum

  • Actived

始终为‘Active’

retrieveDate

String

最近一次更新时间


示例 2.1 - 查询Booking.com产品信息


请求

GET /pcapigateway/profile/api/channels/{channelId}/channelhotels/{channelHotelId}/products?hotelSystemConnectionId={accountId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12275459-a4d5-4677-bfc5-a24be6e5e192",
    "timeStamp": "2023-02-22T06:28:12.584Z",
    "version": "0.1"
  },
  "channelHotelId": "20230223",
  "hotelName": "20230223",
  "channelId": "BOOKINGCOM",
  "channelProducts": [
    {
      "roomId": "20230223_room02",
      "roomName": "Double Room",
      "rateId": "20230223_rate02",
      "rateName": "Breakfast Included",
      "status": "Actived"
    },
    {
      "roomId": "20230223_room02",
      "roomName": "Double Room",
      "rateId": "20230223_rate03",
      "rateName": "Breakfast Included",
      "status": "Actived"
    },
    {
      "roomId": "20230223_room01",
      "roomName": "Single Room",
      "rateId": "20230223_rate01",
      "rateName": "Breakfast Included",
      "status": "Actived"
    },
    {
      "roomId": "20230223_room01",
      "roomName": "Single Room",
      "rateId": "20230223_rate02",
      "rateName": "Breakfast Included",
      "status": "Actived"
    },
    {
      "roomId": "20230223_room03",
      "roomName": "Single Room",
      "rateId": "20230223_rate01",
      "rateName": "Breakfast Included",
      "status": "Actived"
    }
  ],
  "retrieveDate": "2023-02-22T06:18:15.759"
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "12275459-a4d5-4677-bfc5-a24be6e5e192",
    "timeStamp": "2023-02-22T06:28:12.584Z",
    "version": "0.1"
  },
  "errorCode": "ProductNotFound",
  "errorMessage": "channel product not exist."
}
JavaScript

示例 2.2 - 查询Agoda产品信息


请求

GET /pcapigateway/profile/api/channels/{channelId}/channelhotels/{channelHotelId}/products?hotelSystemConnectionId={accountId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12275459-a4d5-4677-bfc5-a24be6e5e192",
    "timeStamp": "2023-02-22T06:28:12.584Z",
    "version": "0.1"
  },
  "channelHotelId": "20230223",
  "hotelName": "20230223",
  "channelId": "AGODA",
  "channelProducts": [
    {
      "roomId": "20230223_room02",
      "roomName": "Double Room",
      "rateId": "20230223_rate02",
      "rateName": "Breakfast Included",
      "status": "Actived"
    },
    {
      "roomId": "20230223_room02",
      "roomName": "Double Room",
      "rateId": "20230223_rate03",
      "rateName": "Breakfast Included",
      "status": "Actived"
    },
    {
      "roomId": "20230223_room01",
      "roomName": "Single Room",
      "rateId": "20230223_rate01",
      "rateName": "Breakfast Included",
      "status": "Actived"
    },
    {
      "roomId": "20230223_room01",
      "roomName": "Single Room",
      "rateId": "20230223_rate02",
      "rateName": "Breakfast Included",
      "status": "Actived"
    },
    {
      "roomId": "20230223_room03",
      "roomName": "Single Room",
      "rateId": "20230223_rate01",
      "rateName": "Breakfast Included",
      "status": "Actived"
    }
  ],
  "retrieveDate": "2023-02-22T06:18:15.759"
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "12275459-a4d5-4677-bfc5-a24be6e5e192",
    "timeStamp": "2023-02-22T06:28:12.584Z",
    "version": "0.1"
  },
  "errorCode": "ProductNotFound",
  "errorMessage": "channel product not exist."
}
JavaScript

示例 2.3 - 查询Expedia产品信息


请求

GET /pcapigateway/profile/api/channels/{channelId}/channelhotels/{channelHotelId}/products?hotelSystemConnectionId={accountId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

响应(成功)

{
  "header": {
    "echoToken": "12275459-a4d5-4677-bfc5-a24be6e5e192",
    "timeStamp": "2023-02-22T06:28:12.584Z",
    "version": "0.1"
  },
  "channelHotelId": "20230223",
  "hotelName": "20230223",
  "channelId": "EXPEDIA",
  "channelProducts": [
    {
      "roomId": "20230223_room02",
      "roomName": "Double Room",
      "rateId": "20230223_rate02",
      "rateName": "Breakfast Included",
      "availStatus": true,
      "status": "Actived"
    },
    {
      "roomId": "20230223_room02",
      "roomName": "Double Room",
      "rateId": "20230223_rate02A",
      "rateName": "Breakfast Included",
      "availStatus": false,
      "status": "Actived"
    },
    {
      "roomId": "20230223_room01",
      "roomName": "Single Room",
      "rateId": "20230223_rate01",
      "rateName": "Room Only",
      "availStatus": true,
      "status": "Actived"
    },
    {
      "roomId": "20230223_room01",
      "roomName": "Single Room",
      "rateId": "20230223_rate01A",
      "rateName": "Room Only",
      "availStatus": false,
      "status": "Actived"
    }
  ],
  "retrieveDate": "2023-02-22T06:18:15.759"
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "17037ddb-bad2-4cb9-9390-ac8583055224",
    "timeStamp": "2023-02-22T06:32:29.510Z",
    "version": "0.1"
  },
  "errorCode": "ProductNotFound",
  "errorMessage": "channel product not exist."
}
JavaScript


更新mapping


此API用于激活或更新渠道端与酒店的产品对应关系


需要在供应商端更新mapping的渠道如Agoda,Booking.com,Expedia等,请在XML中包含渠道的房型ID和价格ID

其他渠道在XML中则要求渠道端使用的房型ID、价格ID和PMS中的一致。



请注意每次请求必须包含所有渠道的房型和价格
Property Connector会根据mapping关系向PMS推送您的PMS房型ID、价格ID
POST /pcapigateway/profile/{accountId}/hotels/{hotelId}/channels/{channelId}/product/mapping HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

请求

字段

类型

是否必填

描述

备注

channelId

String

德比系统中的渠道ID

参考‘查询渠道列表

channelhotelId

String

酒店在渠道端的名称

 对于在渠道端mapping的渠道,请保持channelHotelId和hotelId推送相同的值.

productMapping

List[productMapping]

 

 

productMapping/roomId

String

PMS中的房型ID

 

productMapping/roomIdType

String

始终为‘RoomType’

 

productMapping/rateId

String

PMS中的价格ID

 

productMapping/rateIdType

String

始终为 “RatePlan” 

 

productMapping/channelRoomId

String

渠道端的房型ID

对于在渠道端mapping的渠道,请保持channelRoomId和roomId推送相同的值.

productMapping/channelRateId

String

渠道端的价格ID

 对于在渠道端mapping的渠道,请保持channelRateId和rateId推送相同的值.

productMapping/feeIds

List[String]

当PMS价格与渠道要求的税费要求不一致时,根据此税费ID计算

productMapping/status

Enum

  • Actived

  • Deactived

是否激活此对应关系

 

示例 3.1 - 更新Booking.com的mapping


请求

{
    "header": {
        "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
        "timeStamp": "2023-02-17T07:38:06.119Z",
        "version": "0.1"
    },
    "hotelId": "OPEN0001",
    "channelId": "BOOKINGCOM",
    "channelHotelId": "20230215",
    "productMapping": [
        {
            "roomId": "K2",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "B-K2",
            "channelRateId": "B-Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Deactived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate1",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate01",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate02",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        }
    ]
}
JavaScript

响应(成功)

{
    "header": {
        "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
        "timeStamp": "2023-02-17T07:38:06.119Z",
        "version": "0.1"
    },
    "hotelId": "OPEN0001",
    "channelId": "BOOKINGCOM",
    "channelHotelId": "20230215",
    "productMapping": [
        {
            "roomId": "K2",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "B-K2",
            "channelRateId": "B-Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Deactived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate1",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate01",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate02",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        }
    ]
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
    "timeStamp": "2023-02-17T07:38:06.119Z",
    "version": "0.1"
  }
  "errorCode": "MissingField",
  "errorMessage": "Please complete the hotel, room, rate and product creation first"
}
JavaScript

示例 3.2 - 更新Agoda的mapping


请求

{
    "header": {
        "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
        "timeStamp": "2023-02-17T07:38:06.119Z",
        "version": "0.1"
    },
    "hotelId": "OPEN0001",
    "channelId": "AGODA",
    "channelHotelId": "20230215",
    "productMapping": [
        {
            "roomId": "K2",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "B-K2",
            "channelRateId": "B-Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Deactived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate1",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate01",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate02",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        }
    ]
}
JavaScript

响应(成功)

{
    "header": {
        "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
        "timeStamp": "2023-02-17T07:38:06.119Z",
        "version": "0.1"
    },
    "hotelId": "OPEN0001",
    "channelId": "AGODA",
    "channelHotelId": "20230215",
    "productMapping": [
        {
            "roomId": "K2",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "B-K2",
            "channelRateId": "B-Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Deactived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate1",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate01",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate02",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        }
    ]
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
    "timeStamp": "2023-02-17T07:38:06.119Z",
    "version": "0.1"
  }
  "errorCode": "MissingField",
  "errorMessage": "Please complete the hotel, room, rate and product creation first"
}
JavaScript

示例 3.3 - 更新Expedia的mapping


请求

{
    "header": {
        "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
        "timeStamp": "2023-02-17T07:38:06.119Z",
        "version": "0.1"
    },
    "hotelId": "OPEN0001",
    "channelId": "EXPEDIA",
    "channelHotelId": "20230215",
    "productMapping": [
        {
            "roomId": "K2",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "B-K2",
            "channelRateId": "B-Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Deactived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate1",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate01",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate02",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        }
    ]
}
JavaScript

响应(成功)

{
    "header": {
        "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
        "timeStamp": "2023-02-17T07:38:06.119Z",
        "version": "0.1"
    },
    "hotelId": "OPEN0001",
    "channelId": "EXPEDIA",
    "channelHotelId": "20230215",
    "productMapping": [
        {
            "roomId": "K2",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "B-K2",
            "channelRateId": "B-Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Deactived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate1",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate01",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "20230215_room01",
            "channelRateId": "20230215_rate02",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        }
    ]
}
JavaScript

响应 (失败)

{
  "header": {
    "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
    "timeStamp": "2023-02-17T07:38:06.119Z",
    "version": "0.1"
  }
  "errorCode": "MissingField",
  "errorMessage": "Please complete the hotel, room, rate and product creation first"
}

示例 3.4 - 需要在渠道端更新mapping的渠道


请求

{
    "header": {
        "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
        "timeStamp": "2023-02-17T07:38:06.119Z",
        "version": "0.1"
    },
    "hotelId": "OPEN0001",
    "channelId": "HOTELBEDS",
    "channelHotelId": "20230215",
    "productMapping": [
        {
            "roomId": "K2",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "K2",
            "channelRateId": "Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Deactived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate1",
            "rateIdType": "RatePlan",
            "channelRoomId": "K1",
            "channelRateId": "Rate1",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "K1",
            "channelRateId": "Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        }
    ]
}

响应(成功)

{
    "header": {
        "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
        "timeStamp": "2023-02-17T07:38:06.119Z",
        "version": "0.1"
    },
    "hotelId": "OPEN0001",
    "channelId": "HOTELBEDS",
    "channelHotelId": "20230215",
    "productMapping": [
        {
            "roomId": "K2",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "K2",
            "channelRateId": "Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Deactived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate1",
            "rateIdType": "RatePlan",
            "channelRoomId": "K1",
            "channelRateId": "Rate1",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        },
        {
            "roomId": "K1",
            "roomIdType": "RoomType",
            "rateId": "Rate2",
            "rateIdType": "RatePlan",
            "channelRoomId": "K1",
            "channelRateId": "Rate2",
            "feeIds": ["FEE01001","FEE01002"],
            "status": "Actived"
        }
    ]
}

响应 (失败)



查询渠道列表

该接口用于查询全部可以通过PropertyConnector直连的渠道列表


GET /pcapigateway/profile/channels?hotelSystemConnectionId={accountId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8


响应

字段类型是否必填描述
备注

channels/channelId

String

德比系统中的渠道ID


channels/channelName

String

渠道英语名称

channels/channelCategory

String

渠道的分类

channels/bookingNotify

Boolean



channels/mappingRequired

Boolean







Element

Type

Occurrence

Description

Comment

字段

类型

是否必填

描述

备注

channels/channelId

String

德比系统中的渠道ID

channels/channelName

String

Optional

Distributor English name

 

channels/channelCategory

String

Optional

Distributor category

 

channels/bookingNotify

Boolean

 

A flag indicates Booking Notify or Booking Request

  1. true: Booking Notify mode. In this way, the distributor has already confirmed the reservation to the customer, your PMS has to accept it no matter availability or rates is valid or not.

  2. false: Booking Request mode. In this way, the distributor will confirm the reservation to the customer according to the result of your PMS.

 

channels/mappingRequired

Boolean

 

A flag indicates whether channels need complete   mapping at their side or not

  1. true: Channel need not do mapping at their side (i.e. AGODA, BOOKINGCOM, EXPEDIA)

  2. false: Channel need do mapping at their side.