预订订单
编辑于: 2024-12-31 17:30
TABLE OF CONTENTS
概述
PC Integration API 会通过5个接口向 PMS 推送订单信息:
从德比向PMS发起的请求
- 可订检查: 实时检查您PMS中所有可用的房型、价格。
- 预订: 向 PMS 推送新预订请求。
- 取消: 向 PMS 推送取消已存在的订单请求。
- 修改: 向 PMS推送修改已经存在的订单请求
从PMS向德比发起的请求
- 订单状态更新:PMS向德比推送订单状态
客人姓名拉丁化:当酒店在德比软件Property Connector开启客人姓名拉丁化的功能时,如果德比软件收到非拉丁化的客人姓名预订,德比软件会向您的PMS同时发送拉丁化的客人姓名以及客人原始姓名
重要:基于安全要求,Property Connector只支持HTTPS/SSL
可订检查
实时请求由渠道端发起,但不是所有渠道都支持
POST https://{your pms endpoint}/availability HTTP/1.1 Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
请求
字段 | 类型 | 是否必填 | 描述 | 说明 |
---|---|---|---|---|
hotelId | String | 是 | 酒店代码 | |
stayRange | Object[stayRange] | 是 |
|
|
stayRange/checkin | Date:yyyy-MM-dd | 是 | 入住日期 |
|
stayRange/checkout | Date:yyyy-MM-dd | 是 | 离店日期 |
|
roomCriteria | Object[roomCriteria] | 是 |
| |
roomCriteria/roomCount | Integer | 是 | 房间数量 |
|
roomCriteria/adultCount | Integer | 是 | 成人数 |
|
roomCriteria/childCount | Integer | 否 | 儿童数 |
|
roomCriteria/childAges | List[Integer] | 否 | 儿童年龄 | |
productCandidate | Object[productCandidate] | 否 |
|
|
productCandidate/roomId | String | 否 | PMS中房型ID | |
productCandidate/rateId | String | 否 | PMS中价格ID | |
iata | String | 否 | 渠道的IATA |
|
loyaltyAccount | Object[loyaltyAccount] | 否 |
|
|
loyaltyAccount/programCode | String | 是 | PMS中的会员编号 | |
loyaltyAccount/accountId | String | 是 | 会员的账号 | |
corpAccount | Object[corpAccount] | 否 |
|
|
corpAccount/corpProgramCode | String | 是 | PMS中 的企业编号 | |
corpAccount/corpId | String | 是 | 企业的账号 |
示例:1.1 常规请求
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2018-01-01T17:09:04.674Z", "version": "0.1" }, "hotelId": "FSDH", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] } }
示例:1.2 请求指定房型、价格
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2018-01-01T17:09:04.674Z", "version": "0.1" }, "hotelId": "FSDH", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] }, "productCandidate": { "roomId": "King", "rateId": "BAR" } }
示例:1.3 完整请求
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2018-01-01T17:09:04.674Z", "version": "0.1" }, "hotelId": "FSDH", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] }, "productCandidate": { "roomId": "King", "rateId": "BAR" }, "iata": "string", "loyaltyAccount": { "programCode": "BW", "accountId": "1234567890123457" }, "corpAccount": { "corpProgramCode": "CR", "corpId": "A-1232" } }
响应
字段 | 类型 | 是否必填 | 描述 | 说明 |
---|---|---|---|---|
hotelId | String | 是 | 酒店代码 |
|
stayRange | Object[stayRange] | 是 |
|
|
stayRange/checkin | Date:yyyy-MM-dd | 是 | 入住日期 |
|
stayRange/checkout | Date:yyyy-MM-dd | 是 | 离店日期 |
|
roomCriteria | Object[roomCriteria] | 是 |
| |
roomCriteria/roomCount | Integer | 是 | 房间数量 |
|
roomCriteria/adultCount | Integer | 是 | 成人数 |
|
roomCriteria/childCount | Integer | 否 | 儿童数 |
|
roomCriteria/childAges | List[Integer] | 否 | 儿童年龄 | |
productCandidate | Object[productCandidate] | 否 |
|
|
productCandidate/roomId | String | 否 | PMS中的房型ID | |
productCandidate/rateId | String | 否 | PMS中的价格ID | |
iata | String | 否 | 渠道的IATA |
|
roomRates | List[roomRates] | 是 |
|
|
roomRates/inventory | Integer | 是 | 可用房间数量 |
|
roomRates/roomId | String | 是 | PMS中的房型ID | |
roomRates/rateId | String | 是 | PMS中的价格ID | |
roomRates/currency | String | 是 | ISO 4217 标准的货币 | |
roomRates/amountBeforeTax | List[BigDecimal] | 否 | 每日价(不含税) | 2者至少有1个 |
roomRates/amountAfterTax | List[BigDecimal] | 否 | 每日价(含税) | |
roomRates/mealPlan | String | 否 | 餐食计划编码 | 附录-餐食计划 |
roomRates/paymentType | Enum
| 否 | 现付\预付\信用住 |
|
roomRates/fees | List[fees] | 否 |
| |
fees/dateRange | Object[dateRange] | 是 |
|
|
dateRange/startDate | Date:yyyy-MM-dd | 是 | 起始日期 |
|
dateRange/endDate | Date:yyyy-MM-dd | 是 | 截止日期 |
|
fees/fee | Object[fee] | 是 |
|
|
fee/name | String | 是 |
| |
fee/type | Enum
| 是 | 价格中是否含税 |
|
fee/amount | String | 是 | 税费金额 |
|
fee/amountType | Enum
| 是 | 税费收取方式 |
|
fee/chargeType | Enum
| 是 | 税费类型 |
|
fee/paymentType | Enum
| 否 | 税费是否预付或现付 |
|
roomRates/cancelPolicy | Object[cancelPolicy] | 否 |
|
|
cancelPolicy/code | String | 是 | 取消政策编码 | 附录-取消政策 |
cancelPolicy/description | String | 否 | 取消政策描述 |
|
响应示例
成功响应
示例:1.1 满足可订检查常规请求条件的响应
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2018-01-01T17:09:04.674Z", "version": "0.1" }, "hotelId": "FSDH", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] }, "roomRates": [ { "inventory": 2, "roomId": "King", "rateId": "BAR", "currency": "USD", "amountBeforeTax": [ 100, 100, 120 ], "amountAfterTax": [ 110, 110, 132 ], "mealPlan": "RO", "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD0_0", "description": "Free Cancel" } }, { "inventory": 5, "roomId": "Twin", "rateId": "BAR", "currency": "USD", "amountBeforeTax": [ 100, 100, 120 ], "amountAfterTax": [ 110, 110, 132 ], "mealPlan": "RO", "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD0_0", "description": "Free Cancel" } }, { "inventory": 2, "roomId": "King", "rateId": "BARB", "currency": "USD", "amountBeforeTax": [ 120, 120, 140 ], "amountAfterTax": [ 132, 132, 154 ], "mealPlan": "BB", "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } }, { "inventory": 5, "roomId": "Twin", "rateId": "BARB", "currency": "USD", "amountBeforeTax": [ 120, 120, 140 ], "amountAfterTax": [ 132, 132, 154 ], "mealPlan": "BB", "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } } ] }
示例:1.2 不满足可订检查常规请求的响应
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2018-01-01T17:09:04.674Z", "version": "0.1" }, "hotelId": "FSDH", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] }, "roomRates": [] }
示例:1.3 满足可订检查请求指定房型、价格的响应
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2018-01-01T17:09:04.674Z", "version": "0.1" }, "hotelId": "FSDH", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] }, "productCandidate": { "roomId": "King", "rateId": "BAR" }, "roomRates": [ { "inventory": 2, "roomId": "King", "rateId": "BAR", "currency": "USD", "amountBeforeTax": [ 100, 100, 120 ], "amountAfterTax": [ 110, 110, 132 ], "mealPlan": "RO", "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD0_0", "description": "Free Cancel" } } ] }
示例:1.4 不满足可订检查请求指定房型、价格的响应
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2018-01-01T17:09:04.674Z", "version": "0.1" }, "hotelId": "FSDH", "stayRange": { "checkin": "2018-01-01", "checkout": "2018-01-04" }, "roomCriteria": { "roomCount": 2, "adultCount": 2, "childCount": 2, "childAges": [ 4, 8 ] }, "productCandidate": { "roomId": "King", "rateId": "BAR" }, "roomRates": [] }
失败响应
{ "header": { "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54", "timeStamp": "2018-01-01T17:09:04.674Z", "version": "0.1" }, "errorCode": "InvalidField", "errorMessage": "Invalid token" }
预订
此 API 用于向 PMS 进行新的预订。
POST https://{your pms endpoint}/book HTTP/1.1 Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
请求
字段 | 类型 | 是否必填 | 描述 | 说明 |
---|---|---|---|---|
reservationIds | Object[ReservationIds] | / | / | / |
reservationIds/distributorResId | String | 是 | 渠道订单号 | / |
reservationIds/derbyResId | String | 是 | 德比软件订单号 | / |
distributorId | String | 是 | 渠道分销商 ID | 渠道ID |
iata | String | 否 | 渠道的 IATA | / |
hotelId | String | 是 | 酒店代码 | / |
stayRange | Object[StayRange] | 是 | / | / |
stayRange/checkin | Date: yyyy-MM-dd | 是 | 入住日期 | / |
stayRange/checkout | Date: yyyy-MM-dd | 是 | 离店日期 | / |
contactPerson | Object[ContactPerson] | 是 | / | / |
contactPerson/firstName | String | 是 | 联系人-名 | 这是渠道推送的原始名称,可能不包含拉丁字母 |
contactPerson/lastName | String | 是 | 联系人-姓氏 | |
contactPerson/firstNameRoma | String | 否 | 用拉丁字母表示的联系人的名 | DerbySoft Property Connect会将联系人的姓名翻译成拉丁字母 |
contactPerson/lastNameRoma | String | 否 | 用拉丁字母表示的联系人的姓 | |
contactPerson/email | String | 否 | 联系人电子邮件 | / |
contactPerson/phone | String | 否 | 联系人电话 | / |
contactPerson/address | String | 否 | 联系人地址 | / |
roomCriteria | Object[RoomCriteria] | 是 | / | / |
roomCriteria/roomCount | Integer | 是 | 房间数量 | / |
roomCriteria/adultCount | Integer | 是 | 成人数 | / |
roomCriteria/childCount | Integer | 否 | 儿童数 | / |
roomCriteria/childAges | List[Integer] | 否 | 儿童年龄 | / |
total | Object[Rate] | 是 | 订单总金额 | / |
total/amountBeforeTax | String | 否 | 订单总金额税前 | 两者必传一个,或全部传递 |
total/amountAfterTax | String | 否 | 订单总金额税后 | |
payment | Object[Payment] | 否 | / | 如果 PMS不符合 PCI-DSS,或者渠道不支持时,此选项为空 |
payment/cardCode | Enum:
| 是 | / | / |
payment/cardNumber | String | 是 | 信用卡号 | / |
payment/cardHolderName | String | 是 | 持卡人姓名 | / |
payment/expireDate | Date: MMYY | 是 | 2位月份+2位年份 | 示例:0119表示19年1月 |
guests | List[Guest] | 是 | / | / |
guests/firstName | String | 是 | 客人-名 | / |
guests/lastName | String | 是 | 客人-姓氏 | / |
guests/firstNameRoma | String | 否 | 用拉丁字符表示的客人名 | / |
guests/lastNameRoma | String | 否 | 用拉丁字符表示的客人姓氏 | |
guests/email | String | 否 | 客人电子邮件 | / |
guests/phone | String | 否 | 客人电话 | / |
guests/address | String | 否 | 客人地址 | / |
guests/age | Integer | 否 | 客人年龄 | / |
guests/type | Enum | 否 | 客人类型:成人、儿童或婴儿 | / |
marketCode | String | 否 | 仅Synxis提供 | / |
comments | List[String] | 否 | / | / |
roomRate | Object[RoomRate] | 是 | / | / |
roomRate/roomId | String | 是 | 房型代码 | / |
roomRate/rateId | String | 是 | 价格代码 | / |
roomRate/currency | String | 是 | 标准的货币代码 | / |
roomRate/amountBeforeTax | List[String] | 否 | 每天税前房价 | / |
roomRate/amountAfterTax | List[String] | 否 | 每天税后房价 | / |
roomRate/mealPlan | String | 否 | / | 附录 - 餐饮方案 |
roomRate/paymentType | Enum - CreditPay - Other | 否 | 支付方式:现付、预付、信用住 | / |
roomRate/guarantee | Object[guarantee] | 否 | ||
guarantee/guaranteeType | Enum -CCG -GTTA -GTC -GTP -NG | 否 | CCG: 信用卡担保 GTTA: 旅行社担保 GTC: 公司担保 GTP: 酒店担保 NG: 无担保 | |
fees | List[Fees] | 否 | 税费清单 | / |
fees/dateRange | Object[DateRange] | 是 | / | / |
dateRange /startDate | / | 是 | 开始日期 | / |
dateRange /endDate | / | 是 | 结束日期 | 包括结束日期 |
fees/fee | Object[Fee] | 是 | / | / |
fee /name | String | 是 | 税费名称 | / |
fee /type | Enum | 是 | 税费是否已包含在价格内 | / |
fee /amount | String | 是 | 税费的金额 | / |
fee /amountType | Enum | 是 | 金额计算方式 固定值、比例 | / |
fee /chargeType | Enum | 是 | 收取方式 | / |
fee /paymentType | Enum | 否 | 费用预付给酒店(预付)或在酒店支付(后付) | / |
cancelPolicy | Object[CancelPolicy] | 否 | 取消政策定义了当客人在特定提前时间范围内取消预订时将收取什么罚款。应到未到的客人和不可取消的时间范围有关 | / |
cancelPolicy/code | String | 是 | 取消政策编码 | 取消政策 |
cancelPolicy/description | String | 是 | 取消政策描述 | / |
resProfiles | List[ResProfile] | 否 | 档案信息 | |
resProfiles/id | String | 是 | 档案ID | |
resProfiles/name | String | 是 | 档案名称 | |
resProfiles/type | Enum
| 是 | 档案类型
| |
resProfiles/contact | Object[Contact] | 否 | 联系人信息 | |
contact/email | String | 否 | 电子邮件 | |
corpAccount | Object[CorpAccount] | 否 | 协议公司信息 | |
corpAccount/corpProgramCode | String | 是 | 协议公司编号 | |
corpAccount/corpId | String | 是 | 协议公司ID | |
memberAccount | Object[MemberAccount] | 否 | 会员信息 | |
memberAccount/programCode | String | 否 | 会员代码 | |
memberAccount/memberLevel | String | 否 | 会员层级 | |
memberAccount/memberId | String | 是 | 会员ID | |
notify | Boolean | 是 | 预订通知模式
| / |
extensions | Map<String:String> | 否 | 扩展字段 | / |
threeDomainSecurity | Object[ThreeDomainSecurity] | 否 | 当3DS验证信用卡持有者有效shi | |
threeDomainSecurity/cavv | String | 否 | ||
threeDomainSecurity /eci | String | 否 | ||
threeDomainSecurity /xid | String | 否 | ||
threeDomainSecurity/threeDomainSecurityVersion | String | 否 | ||
threeDomainSecurity/merchantName | String | 否 |
响应
字段 | 类型 | 是否必填 | 描述 | 说明 |
---|---|---|---|---|
reservationIds/distributorResId | String | 是 | 渠道订单号 | / |
reservationIds/derbyResId | String | 是 | 德比软件订单号 | / |
reservationIds/supplierResId | String | 是 | PMS 订单号 | / |
extensions | Map<String:String> | 否 | 扩展字段 | / |
示例
普通预订
请求
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF" }, "distributorId": "CTRIP", "hotelId": "FSDH", "stayRange": { "checkin": "2021-01-01", "checkout": "2021-01-04" }, "contactPerson": { "firstName": "小明", "lastName": "王", "firstNameRoma": "XIAOMING", "lastNameRoma": "WANG", "email": "[email protected]" }, "roomCriteria": { "roomCount": 2, "adultCount": 1, "childCount": 2, "childAges": [ 4, 8 ] }, "total": { "amountBeforeTax": "640", "amountAfterTax": "704" }, "payment": { "cardCode": "VI", "cardNumber": "4111111111111111", "cardHolderName": "Sherlock Holmes", "expireDate": "0119" }, "guests": [ { "firstName": "小小", "lastName": "张", "firstNameRoma": "XIAOXIAO", "lastNameRoma": "ZHANG" } ], "marketCode": "ASDDD", "comments": [ "no smoking", "high floor" ], "roomRate": { "roomId": "King", "rateId": "BAR", "currency": "USD", "amountBeforeTax": [ "100", "100", "120" ], "amountAfterTax": [ "110", "110", "132" ], "mealPlan": "RO", "guarantee": { "guaranteeType": "CCG" }, "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } }, "threeDomainSecurity": { "cavv": "string", "eci": "string", "xid": "string", "threeDomainSecurityVersion": "string", "transactionId": "string", "merchantName": "string" }, "notify": false }
成功响应
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "89389494" } }
失败响应
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "InvalidField", "errorMessage": "Invalid token" }
带有公司信息的预订
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF" }, "distributorId": "CTRIP", "hotelId": "FSDH", "stayRange": { "checkin": "2021-01-01", "checkout": "2021-01-04" }, "contactPerson": { "firstName": "小明", "lastName": "王", "firstNameRoma": "XIAOMING", "lastNameRoma": "WANG", "email": "[email protected]" }, "roomCriteria": { "roomCount": 2, "adultCount": 1, "childCount": 2, "childAges": [ 4, 8 ] }, "total": { "amountBeforeTax": "640", "amountAfterTax": "704" }, "payment": { "cardCode": "VI", "cardNumber": "4111111111111111", "cardHolderName": "Sherlock Holmes", "expireDate": "0119" }, "guests": [ { "firstName": "小小", "lastName": "张", "firstNameRoma": "XIAOXIAO", "lastNameRoma": "ZHANG" } ], "marketCode": "ASDDD", "comments": [ "no smoking", "high floor" ], "roomRate": { "roomId": "King", "rateId": "BAR", "currency": "USD", "amountBeforeTax": [ "100", "100", "120" ], "amountAfterTax": [ "110", "110", "132" ], "mealPlan": "RO", "guarantee": { "guaranteeType": "CCG" }, "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } }, "resProfiles": [ { "id": "XX1", "name": "XXX1", "type": "COMPANY", "contact": { "email": "[email protected]" } } ], "corpAccount": { "corpProgramCode": "CR", "corpId": "A-1232" }, "threeDomainSecurity": { "cavv": "string", "eci": "string", "xid": "string", "threeDomainSecurityVersion": "string", "transactionId": "string", "merchantName": "string" }, "notify": false }
带有代理信息的预订
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF" }, "distributorId": "CTRIP", "hotelId": "FSDH", "stayRange": { "checkin": "2021-01-01", "checkout": "2021-01-04" }, "contactPerson": { "firstName": "小明", "lastName": "王", "firstNameRoma": "XIAOMING", "lastNameRoma": "WANG", "email": "[email protected]" }, "roomCriteria": { "roomCount": 2, "adultCount": 1, "childCount": 2, "childAges": [ 4, 8 ] }, "total": { "amountBeforeTax": "640", "amountAfterTax": "704" }, "payment": { "cardCode": "VI", "cardNumber": "4111111111111111", "cardHolderName": "Sherlock Holmes", "expireDate": "0119" }, "guests": [ { "firstName": "小小", "lastName": "张", "firstNameRoma": "XIAOXIAO", "lastNameRoma": "ZHANG" } ], "marketCode": "ASDDD", "comments": [ "no smoking", "high floor" ], "roomRate": { "roomId": "King", "rateId": "BAR", "currency": "USD", "amountBeforeTax": [ "100", "100", "120" ], "amountAfterTax": [ "110", "110", "132" ], "mealPlan": "RO", "guarantee": { "guaranteeType": "CCG" }, "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } }, "resProfiles": [ { "id": "XX2", "name": "XXX2", "type": "TRAVEL_AGENT", "contact": { "email": "[email protected]" } } ], "threeDomainSecurity": { "cavv": "string", "eci": "string", "xid": "string", "threeDomainSecurityVersion": "string", "transactionId": "string", "merchantName": "string" }, "notify": false }
带有会员信息的预订
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF" }, "distributorId": "CTRIP", "hotelId": "FSDH", "stayRange": { "checkin": "2021-01-01", "checkout": "2021-01-04" }, "contactPerson": { "firstName": "小明", "lastName": "王", "firstNameRoma": "XIAOMING", "lastNameRoma": "WANG", "email": "[email protected]" }, "roomCriteria": { "roomCount": 2, "adultCount": 1, "childCount": 2, "childAges": [ 4, 8 ] }, "total": { "amountBeforeTax": "640", "amountAfterTax": "704" }, "payment": { "cardCode": "VI", "cardNumber": "4111111111111111", "cardHolderName": "Sherlock Holmes", "expireDate": "0119" }, "guests": [ { "firstName": "小小", "lastName": "张", "firstNameRoma": "XIAOXIAO", "lastNameRoma": "ZHANG" } ], "marketCode": "ASDDD", "comments": [ "no smoking", "high floor" ], "roomRate": { "roomId": "King", "rateId": "BAR", "currency": "USD", "amountBeforeTax": [ "100", "100", "120" ], "amountAfterTax": [ "110", "110", "132" ], "mealPlan": "RO", "guarantee": { "guaranteeType": "CCG" }, "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } }, "memberAccount": { "programCode": "BW", "memberId": "1234567890123457" }, "threeDomainSecurity": { "cavv": "string", "eci": "string", "xid": "string", "threeDomainSecurityVersion": "string", "transactionId": "string", "merchantName": "string" }, "notify": false }
取消
此 API 用于取消 PMS 的现有预订。
POST https://{your pms endpoint}/cancel HTTP/1.1 Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
请求
字段 | 类型 | 是否必填 | 描述 | 说明 |
---|---|---|---|---|
reservationIds | Object[ReservationIds] | / | / | / |
ReservationIds/distributorResId | String | 是 | 渠道订单号 | / |
ReservationIds/derbyResId | String | 是 | 德比软件订单号 | / |
ReservationIds/supplierResId | String | 是 | PMS 订单号 | / |
响应
字段 | 类型 | 是否必填 | 描述 | 说明 |
---|---|---|---|---|
reservationIds | Object[ReservationIds] | / | / | / |
ReservationIds/distributorResId | String | 是 | 渠道订单号 | / |
ReservationIds/derbyResId | String | 是 | 德比软件订单号 | / |
ReservationIds/supplierResId | String | 是 | PMS 订单号 | / |
cancellationId | String | 是 | PMS 订单取消确认号 | / |
示例
请求
{ "header": { "echoToken": "65510873-0037-464e-a7b6-d6e88336bfc0", "timeStamp": "2021-03-21T17:09:04.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "PMS5682587AEC" } }
成功响应
{ "header": { "echoToken": "65510873-0037-464e-a7b6-d6e88336bfc0", "timeStamp": "2021-03-21T17:09:05.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "PMS5682587AEC" }, "cancellationId": "PMS5682587AES" }
失败响应
{ "header": { "echoToken": "65510873-0037-464e-a7b6-d6e88336bfc0", "timeStamp": "2021-03-21T17:09:05.674Z", "version": "0.1" }, "errorCode": "InvalidField", "errorMessage": "Invalid token" }
修改
请注意:通过修改接口推送的修改单,渠道订单号和德比订单号不会改变
POST https://{your pms endpoint}/modify HTTP/1.1 Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
请求
字段 | 类型 | 是否必填 | 描述 | 说明 |
---|---|---|---|---|
reservationIds | Object[reservationIds] | 是 | / | / |
reservationIds/distributorResId | String | 是 | 渠道订单号 | / |
reservationIds/derbyResId | String | 是 | 德比订单号 | / |
reservationIds/supplierResId | String | 是 | PMS订单号 | / |
distributorId | String | 是 | 渠道分销商ID | 渠道ID |
iata | String | 否 | 渠道的IATA | / |
hotelId | String | 是 | 酒店代码 | / |
stayRange | Object[stayRange] | 是 | / | / |
stayRange/checkin | Date:yyyy-MM-dd | 是 | 入住日期 | / |
stayRange/checkout | Date:yyyy-MM-dd | 是 | 离店日期 | / |
contactPerson | Object[contactPerson] | 是 | / | / |
contactPerson/firstName | String | 是 | 联系人-名 | 这是渠道推送的原始名称,可能不包含拉丁字母 |
contactPerson/lastName | String | 是 | 联系人-姓氏 | |
contactPerson/firstNameRoma | String | 否 | 用拉丁字母表示的联系人的名 | DerbySoft Property Connect会将联系人的姓名翻译成拉丁字母 |
contactPerson/lastNameRoma | String | 否 | 用拉丁字母表示的联系人的姓 | |
contactPerson/email | String | 否 | 联系人电子邮件 | / |
contactPerson/phone | String | 否 | 联系人电话 | / |
contactPerson/address | String | 否 | 联系人地址 | / |
roomCriteria | Object[roomCriteria] | 是 | / | / |
roomCriteria/roomCount | Integer | 是 | 房间数量 | / |
roomCriteria/adultCount | Integer | 是 | 成人数 |
|
roomCriteria/childCount | Integer | 否 | 儿童数 |
|
roomCriteria/childAges | List[Integer] | 否 | 儿童年龄 |
|
total | Object[total] | 是 | 订单总金额 |
|
total/amountBeforeTax | String | 否 | 税前订单总金额 | 两者必传一个,或全部传递 |
total/amountAfterTax | String | 否 | 税后订单总金额 | |
payment | Object[payment] | 否 | / | 如果 PMS不符合 PCI-DSS,或者渠道不支持时,此选项为空 |
payment/cardCode | Enum:
| 是 | / | / |
payment/cardNumber | String | 是 | 信用卡号 | / |
payment/cardHolderName | String | 是 | 持卡人姓名 | / |
payment/expireDate | Date: MMYY | 是 | 2位月份+2位年份 | 示例:0119表示19年1月 |
guests | List[guests] | 是 | / | / |
guests/firstName | String | 是 | 客人-名 | 这是渠道推送的原始名称,可能不包含拉丁字母 |
guests/lastName | String | 是 | 客人-姓氏 | |
guests/firstNameRoma | String | 否 | 用拉丁字符表示的客人名 | DerbySoft Property Connect会将联系人的姓名翻译成拉丁字母 |
guests/lastNameRoma | String | 否 | 用拉丁字母表示的联系人的姓 | |
guests/email | String | 否 | 客人电子邮件 | / |
guests/phone | String | 否 | 客人电话 | / |
guests/address | String | 否 | 客人地址 | / |
guests/age | Integer | 否 | 客人年龄 | / |
guests/type | Enum
| 否 | 客人类型:成人、儿童或婴儿 | / |
marketCode | String | 否 | 仅Synxis提供 | / |
comments | List[String] | 否 | / | / |
roomRate | Object[roomRate] | 是 | / |
|
roomRate/roomId | String | 是 | 房型代码 |
|
roomRate/rateId | String | 是 | 价格代码 |
|
roomRate/currency | String | 是 | 标准的货币代码 |
|
roomRate/amountBeforeTax | List[String] | 否 | 每天税前房价 |
|
roomRate/amountAfterTax | List[String] | 否 | 每天税后房价 |
|
roomRate/mealPlan | String | 否 | / | 附录 - 餐饮方案 |
roomRate/paymentType | Enum
| 是 | 支付方式:现付、预付、信用住 | / |
roomRate/guarantee | Object[guarantee] | 否 | / | / |
guarantee/guaranteeType | Enum -CCG -GTTA -GTC -GTP -NG | 否 | CCG: 信用卡担保 GTTA: 旅行社担保 GTC: 公司担保 GTP: 酒店担保 NG: 无担保 | / |
fees | List[fees] | 否 | 税费清单 | / |
fees/dateRange | Object[dateRange] | 是 | / | / |
dateRange/startDate | Date:yyyy-MM-dd | 是 | 开始日期 | / |
dateRange/endDate | Date:yyyy-MM-dd | 是 | 结束日期 | 包括结束日期 |
fees/fee | Object[fee] | 是 | / | / |
fee/name | String | 是 | 税费名称 | / |
fee/type | Enum
| 是 | 税费是否已包含在价格内 | / |
fee/amount | String | 是 | 税费的金额 | / |
fee/amountType | Enum
| 是 | 金额计算方式 固定值、比例 | / |
fee/chargeType | Enum
| 是 | 收取方式 | / |
fee/paymentType | Enum
| 否 | 费用预付给酒店(预付)或在酒店支付(后付) | / |
cancelPolicy | Object[cancelPolicy] | 否 | 取消政策定义了当客人在特定提前时间范围内取消预订时将收取什么罚款。应到未到的客人和不可取消的时间范围有关 |
|
cancelPolicy/code | String | 是 | 取消政策编码 | 附录 - 取消政策 |
cancelPolicy/description | String | 是 | 取消政策描述 |
|
resProfiles | List[ResProfile] | 否 | 档案信息 |
|
resProfiles/id | String | 是 | 档案ID |
|
resProfiles/name | String | 是 | 档案名称 |
|
resProfiles/type | Enum
| 是 | 档案类型
|
|
resProfiles/contact | Object[Contact] | 否 | 联系人信息 |
|
contact/email | String | 否 | 电子邮件 |
|
corpAccount | Object[CorpAccount] | 否 | 协议公司信息 |
|
corpAccount/corpProgramCode | String | 是 | 协议公司编号 |
|
corpAccount/corpId | String | 是 | 协议公司ID |
|
memberAccount | Object[MemberAccount] | 否 | 会员信息 |
|
memberAccount/programCode | String | 否 | 会员代码 |
|
memberAccount/memberLevel | String | 否 | 会员层级 |
|
memberAccount/memberId | String | 是 | 会员ID |
|
notify | Boolean | 是 | 预订通知模式 true:预订通知模式。渠道分销商已经向客户确认了预订,无论可用性或价格是否有效,您的PMS都必须接受预订。 false:预订请求模式。渠道分销商就会根据你的PMS结果向客户确认预订。 |
|
extensions | Map<String:String> | 否 | 扩展字段 |
|
threeDomainSecurity | Object[ThreeDomainSecurity] | 否 | 当3DS验证信用卡持有者有效性 |
|
ThreeDomainSecurity/cavv | String | 否 |
| |
ThreeDomainSecurity/eci | String | 否 |
| |
ThreeDomainSecurity/xid | String | 否 |
| |
ThreeDomainSecurity/threeDomainSecurityVersion | String | 否 |
| |
ThreeDomainSecurity/merchantName | String | 否 |
|
示例
请求
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "89389494" }, "distributorId": "CTRIP", "hotelId": "FSDH", "stayRange": { "checkin": "2021-01-01", "checkout": "2021-01-04" }, "contactPerson": { "firstName": "小明", "lastName": "王", "firstNameRoma": "XIAOMING", "lastNameRoma": "WANG", "email": "[email protected]" }, "roomCriteria": { "roomCount": 2, "adultCount": 1, "childCount": 2, "childAges": [ 4, 8 ] }, "total": { "amountBeforeTax": "640", "amountAfterTax": "704" }, "payment": { "cardCode": "VI", "cardNumber": "4111111111111111", "cardHolderName": "Sherlock Holmes", "expireDate": "0119" }, "guests": [ { "firstName": "小小", "lastName": "张", "firstNameRoma": "XIAOXIAO", "lastNameRoma": "ZHANG" } ], "marketCode": "ASDDD", "comments": [ "no smoking", "high floor" ], "roomRate": { "roomId": "King", "rateId": "BAR", "currency": "USD", "amountBeforeTax": [ "100", "100", "120" ], "amountAfterTax": [ "110", "110", "132" ], "mealPlan": "RO", "guarantee": { "guaranteeType": "CCG" }, "paymentType": "PayNow", "fees": [ { "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "fee": { "name": "Service Charge", "type": "Exclusive", "amount": "10", "amountType": "Percent", "chargeType": "PerRoomPerNight", "paymentType": "PayNow" } } ], "cancelPolicy": { "code": "AD100P_100P", "description": "Non Refundable" } }, "resProfiles": [ { "id": "XX1", "name": "XXX1", "type": "COMPANY", "contact": { "email": "[email protected]" } }, { "id": "XX2", "name": "XXX2", "type": "TRAVEL_AGENT" } ], "memberAccount": { "programCode": "BW", "memberId": "1234567890123457" }, "corpAccount": { "corpProgramCode": "CR", "corpId": "A-1232" }, "threeDomainSecurity": { "cavv": "string", "eci": "string", "xid": "string", "threeDomainSecurityVersion": "string", "transactionId": "string", "merchantName": "string" }, "notify": false }
成功响应
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "reservationIds": { "distributorResId": "C2084DFL0", "derbyResId": "D15F893D34DF", "supplierResId": "89389494" } }
失败响应
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2018-06-27T17:09:04.674Z", "version": "0.1" }, "errorCode": "InvalidField", "errorMessage": "Invalid token" }
订单状态更新(异步回调)
此 API 用于将订单状态从 PMS 同步到 Property Connector,确保 Property Connector 中的状态正确。
POST /pcapigateway/tunnel/{accountId}/resStatus HTTP/1.1 Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip Content-Encoding: gzip Content-Type: application/json;charset=utf-8
请求
reservationIds | Object[ReservationIds] | 是 |
|
|
ReservationIds/supplierResId | String | 是 | PMS订单ID |
|
ReservationIds/cancellationId | String | 否 | 如果是取消单,请输入取消单ID |
|
hotelId | String | 是 |
|
|
cancellationDate | Date: yyyy-MM-dd | 否 |
|
|
roomNo | String | 否 |
|
|
amountBeforeTax | BigDecimal | 否 |
|
|
amountAfterTax | BigDecimal | 否 |
|
|
currency | String | 否 | ISO 4217 标准的货币 |
|
status | Enum
| 是 | Inhouse, CheckedOut, Cancelled, NoShow |
|
示例
请求
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2021-06-27T17:09:04.674Z", "version": "0.2" }, "reservationIds": { "supplierResId": "C2084DFL0" }, "hotelId": "FSDH", "roomNo": "1805", "amountBeforeTax": 200, "amountAfterTax": 218.88, "currency": "USD", "status": "CheckedOut" }
成功响应
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2021-06-27T17:09:04.674Z", "version": "0.2" } }
失败响应
{ "header": { "echoToken": "f67ade36-0b83-49cf-bfb1-b932c45b7d34", "timeStamp": "2021-06-27T17:09:04.674Z", "version": "0.2", "errorCode": "InvalidField", "errorMessage": "Invalid token" } }
此回答是否有所帮助? 是 否
Send feedback