Channel
Modified on: 2024-05-29 16:28
TABLE OF CONTENTS
- Overview
- Update ChannelSetting
- Example 1.1 - Update ChannelSetting for Booking.com as an Independent Property
- Example 1.2 - Update ChannelSetting for Booking.com as a Group
- Example 1.3 - Update ChannelSetting for Agoda as an Independent Property
- Example 1.4 - Update ChannelSetting for Agoda as a Group
- Example 1.5 - Update ChannelSetting for Expedia as an Independent Property
- Example 1.6 - Update ChannelSetting for Expedia as a Group
- Example 1.7 - Update ChannelSetting for Other Channels which need do Mapping on their side
- ChannelProduct Query
- Update ChannelMapping
- Channel Query
Overview
There are four types of messages to exchange channel data between your PMS and DerbySoft Property Connector. All of them are optional to be implemented.
1.Update ChannelSetting: To Create/Update the channel general setting information to DerbySoft Property Connector.
2.ChannelProduct Query: Query the channel roomtype and rateplan information (id and name) from DerbySoft Property Connector.
3.Update ChannelMapping: To Create/Update the channel roomtype and rateplan mapping to DerbySoft Property Connector.
4.Channel Query: To Fetch channel list with all available channel.
Update ChannelSetting
This API is used to activate a new channel for a property, and update the channel general setting information to DerbySoft Property Connector.
The pre requistions to call this API are: 1. Property,room type and retaplan have been created and actived in Property Connector. 2. Products have been created and activatied in Property Connector. 3. The target channel has been activated in 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
Request Schema
Element | Type | Occurrence | Description | Comment |
---|---|---|---|---|
hotelId | String | Mandatory | Hotel unique id of PMS | |
channelId | String | Mandatory | Id of distributor in DerbySoft’s system | Please refer to Channel Query API |
channelHotelId | String | Mandatory | Hotel unique id in channel (distributor) | For those channels which need do mapping on their side, please ensure that your PMS sends the same code in the channelHotelId and hotelId. |
channelPaymentType | Enum
| Option | The payment type setting for Agoda
| It’s mandatory if channelId is AGODA |
status | Enum
| Mandatory | ||
userName | String | Option | User name for the connection with channel | It’s mandatory if channelId is BOOKING, EXPEDIA and connection with them as a Group. |
password | String | Option | password for the connection with channel | It’s mandatory if channelId is AGODA, BOOKING, EXPEDIA and connection with them as a Group. |
currency | String | Mandatory | The currency code in channel (distributor) Currency code with ISO 4217 standard | |
rateRule | Object[rateRule] | Mandatory | ||
channelRateType | Enum
| Mandatory | The rate type flag that used for rate upate to channel (distributor) | |
channelResRateType | Enum
| Option | The rate type flag that used for the reservation receiving from channel (distributor) | It’s mandatory if channelId is AGODA |
channelPriceType | Enum
| Option | The price type set up that used for Agoda | It’s mandatory if channelId is AGODA |
channelResPriceType | Enum
| Option | The price type set up that used for the reservation for Agoda | It’s mandatory if channelId is AGODA |
Example 1.1 - Update ChannelSetting for Booking.com as an Independent Property
Request
{ "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" } }
Response(Success)
{ "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" } }
Response(Error)
{ "header": { "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "PARAM_CHECK", "errorMessage": "channelRateType is required" }
Example 1.2 - Update ChannelSetting for Booking.com as a Group
Request
{ "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" } }
Response(Success)
{ "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" } }
Response(Error)
{ "header": { "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "PARAM_CHECK", "errorMessage": "channelRateType is required" }
Example 1.3 - Update ChannelSetting for Agoda as an Independent Property
Request
{ "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" } }
Response(Success)
{ "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" } }
Response(Error)
{ "header": { "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "InvalidField", "errorMessage": "channelResRateType is required" }
Example 1.4 - Update ChannelSetting for Agoda as a Group
Request
{ "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" } }
Response(Success)
{ "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" } }
Response(Error)
{ "header": { "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "InvalidField", "errorMessage": "channelResRateType is required" }
Example 1.5 - Update ChannelSetting for Expedia as an Independent Property
Request
{ "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" } }
Response(Success)
{ "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" } }
Response(Error)
{ "header": { "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "PARAM_CHECK", "errorMessage": "channelRateType is required" }
Example 1.6 - Update ChannelSetting for Expedia as a Group
Request
{ "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" } }
Response(Success)
{ "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" } }
Response(Error)
{ "header": { "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "PARAM_CHECK", "errorMessage": "channelRateType is required" }
Example 1.7 - Update ChannelSetting for Other Channels which need do Mapping on their side
Request
{ "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" } }
Response(Success)
{ "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" } }
Response(Error)
{ "header": { "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "PARAM_CHECK", "errorMessage": "channelRateType is required" }
ChannelProduct Query
This api is used to query the channel roomtype and rateplan information (id and name) from Derbysoft Property Connector.
Please note that the feature only works for channls including Agoda, Booking.com and Expedia.
1. This API is used for channel which needs to conplete product mapping in your PMS such as Booking.com,Expedia,Agoda, not for all channel 2. This API always returns active products(active room type and active rate plan).
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
Response Schema
Element | Type | Occurrence | Description | Comment |
---|---|---|---|---|
channelHotelId | String | Mandatory | Id of distributor in DerbySoft’s system | |
hotelName | String | Option | Hotel name in Distributor | |
channelId | String | Mandatory | Id of distributor in DerbySoft’s system | |
channelProducts | List[channelProducts] | Mandatory | Channel product list | |
channelProducts/availStatus | String | Optional | The flag whether a channel accepts ARI update | It’s mandatory if channelId is EXPEDIA |
channelProducts/channelrateId | String | Mandatory | Rateplan id in channel (distributor) | |
channelProducts/channelrateName | String | Mandatory | Rateplan name in channel (distributor) | |
channelProducts/channelroomId | String | Mandatory | Roomtype id in channel (distributor) | |
channelProducts/channelroomName | String | Mandatory | Roomtype name in channel (distributor) | |
channelProducts/status | Enum
| Mandatory | Always “Actived” | |
retrieveDate | String | Mandatory | The latest time for fetching channel products |
Example 2.1 - Query Channel Products from Booking.com
Request
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
Response(Success)
{ "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" }
Response(Error)
{ "header": { "echoToken": "12275459-a4d5-4677-bfc5-a24be6e5e192", "timeStamp": "2023-02-22T06:28:12.584Z", "version": "0.1" }, "errorCode": "ProductNotFound", "errorMessage": "channel product not exist." }
Example 2.2 - Query Channel Products from Agoda
Request
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
Response(Success)
{ "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" }
Response(Error)
{ "header": { "echoToken": "12275459-a4d5-4677-bfc5-a24be6e5e192", "timeStamp": "2023-02-22T06:28:12.584Z", "version": "0.1" }, "errorCode": "ProductNotFound", "errorMessage": "channel product not exist." }
Example 2.3 - Query Channel Products from Expedia
Request
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
Response(Success)
{ "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" }
Response(Error)
{ "header": { "echoToken": "17037ddb-bad2-4cb9-9390-ac8583055224", "timeStamp": "2023-02-22T06:32:29.510Z", "version": "0.1" }, "errorCode": "ProductNotFound", "errorMessage": "channel product not exist." }
Update ChannelMapping
This API is used to activate or update the channel roomtype and rateplan mapping to Derbysoft Property Connector.
For channels who require mappings from Supplier, including Agoda, Booking.com or Expedia, please include channel room type ID and rate code in the xml.
For other channels, channel room type IDs and rate codes should be the same as the PMS IDs.
Please ensure that every request from your PMS contains all roomtype and rateplan mapping for the channel. For those channels which need do mapping on their side, please ensure that your PMS sends the same code in the channelRoomId and roomId, and sends the same code in the channelRateId and rateId.
Please note that DerbySoft Connector sends your PMS Room Type Code and Rate Plan Code in the reservation according to the mapping result.
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
Request Schema
Element | Type | Occurrence | Description | Comment |
---|---|---|---|---|
channelId | String | Mandatory | Id of distributor in DerbySoft’s system | Please refer to Channel Query API |
channelhotelId | String | Mandatory | Hotel unique id in channel (distributor) | For those channels which need do mapping on their side, please ensure that your PMS sends the same code in the channelHotelId and hotelId. |
productMapping | List[productMapping] | Mandatory |
|
|
productMapping/roomId | String | Mandatory | Roomtype id or Roomtype code in PMS |
|
productMapping/roomIdType | String | Mandatory | Always “RoomType” |
|
productMapping/rateId | String | Mandatory | Rateplan id or Rateplan code in PMS |
|
productMapping/rateIdType | String | Mandatory | Always “RatePlan” |
|
productMapping/channelRoomId | String | Mandatory | Roomtype id in channel (distributor) | For those channels which need do mapping on their side, please ensure that your PMS sends the same code in the channelRoomId and roomId. |
productMapping/channelRateId | String | Mandatory | Rateplan id in channel (distributor) | For those channels which need do mapping on their side, please ensure that your PMS sends the same code in the channelRateId and rateId. |
productMapping/feeIds | List[String] | Option | Product associated Tax or fee id | |
productMapping/status | Enum
| Mandatory | The status of this mapping data |
|
Example 3.1 - Update Channel Products Mapping for Booking.com
Request
{ "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" } ] }
Response(Success)
{ "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" } ] }
Response(Error)
{ "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" }
Example 3.2 - Update Channel Products Mapping for Agoda
Request
{ "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" } ] }
Response(Success)
{ "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" } ] }
Response(Error)
{ "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" }
Example 3.3 - Update Channel Products Mapping for Expedia
Request
{ "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" } ] }
Response(Success)
{ "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" } ] }
Response(Error)
{ "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" }
Example 3.4 - Update Channel Products Mapping for Other Channels which need do Mapping on their side
Request
{ "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" } ] }
Response(Success)
{ "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" } ] }
Response(Error)
{ "header": { "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "InvalidField", "errorMessage": "Invalid token" }
Channel Query
This API is used to query channel information which can be connected from DerbySoft Property Connector.
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
Response Schema
Element | Type | Occurrence | Description | Comment |
---|---|---|---|---|
header | Object[header] | Mandatory | ||
header/echoToken | String | Mandatory | A unique ID to identify request and response, normally it should be UUID. | |
header/timeStamp | String | Mandatory | Timestamp | |
header/version | String | Mandatory | Version | |
channels/channelId | String | Mandatory | Id of distributor in DerbySoft’s system | Please refer to Channel Query API |
channels/channelName | String | Optional | Distributor English name | |
channels/channelCategory | String | Optional | Distributor category | |
channels/bookingNotify | Boolean | Mandatory | A flag indicates Booking Notify or Booking Request
| |
channels/mappingRequired | Boolean | Mandatory | A flag indicates whether channels need complete mapping at their side or not
|
Example 4.1 - Query Channel List
Response(Success)
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2023-02-17T07:38:06.119Z", "version": "0.1" }, "channels": [{ "channelId": "AGODA", "channelName": "Agoda", "channelCategory": "OTA", "bookingNotify": true, "mappingRequired": true }] }
Response(Error)
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2023-02-17T07:38:06.119Z", "version": "0.1" } "errorCode": "InvalidField", "errorMessage": "hotelSystemConnectionId is required" }
Did you find it helpful? Yes No
Send feedback