道旅集团 · CHANNEL MANAGER
Dida ChannelManager 接口文档
接口地址
接口地址https://cm-dataapi.didatravel.com
API认证与安全指南
为了确保API调用的安全性和数据完整性,所有对本API的请求都必须经过严格的认证和签名。请仔细阅读并遵循以下指南。
1. 认证凭证
您需要从我方获取以下两项凭证,用于API认证:
ApiKey(API密钥): 一个唯一的字符串,用于识别调用方的身份。ApiSecret(API私钥): 一个保密的字符串,用于对请求进行签名。此私钥绝不能在任何不安全的环境中(如客户端前端代码)暴露或传输。
PS: ApiKey和ApiSecret需要Dida提供。
2. 认证流程概述
所有受保护的API请求都必须同时满足以下两个条件:
- 身份识别: 在请求头中提供
ApiKey。 - 请求签名: 在请求头中提供一个基于请求内容和
ApiSecret计算出的签名 (X-Signature),以及用于生成该签名的时间戳 (X-Timestamp) 和随机数 (X-Nonce)。
服务器会验证您的身份,并重新计算签名与您提供的签名进行比对。同时,服务器会通过时间戳和随机数来防止请求被重放攻击。
3. HTTP请求头要求
每次请求必须包含以下HTTP头:
| Header | 描述 | 示例值 |
|---|---|---|
Authorization | (推荐) 用于传递 ApiKey。格式为 ApiKey <Your-ApiKey> | ApiKey a1b2c3d4e5f67890 |
X-API-Key | (备选) 如果不方便使用 Authorization 头,可使用此头直接传递 ApiKey | a1b2c3d4e5f67890 |
X-Timestamp | 当前的 Unix时间戳 (秒)。服务器会拒绝与服务器时间相差超过 300秒 (5分钟) 的请求 | 1678886400 |
X-Nonce | 一个仅使用一次的随机字符串。建议使用UUID。服务器会拒绝在5分钟内重复出现的 Nonce | c3a4b1d2-e5f6-4a7b-8c9d-0e1f2a3b4c5d |
X-Signature | 基于请求内容计算出的HMAC-SHA256签名,使用Base64编码。详见下面的 签名生成算法 | wS2X.../aBcDeFg= |
Content-Type | 如果请求包含请求体(如POST, PUT),此头必须设置为 application/json | application/json |
4. 签名生成算法 (Signature Generation)
签名是保证请求未被篡改的核心。请严格按照以下步骤生成 X-Signature 的值。
步骤 1: 准备待签名字符串 (stringToSign)
将以下五个部分按照顺序拼接成一个字符串,中间没有任何分隔符。
stringToSign = timestamp + nonce + requestPath + queryString + requestBody
timestamp:X-Timestamp头的值。nonce:X-Nonce头的值。requestPath: 请求的路径部分,不包含域名和查询参数。例如,对于URLhttps://api.example.com/v1/users?page=2,requestPath是/v1/users。queryString: 请求的查询字符串部分,包含?前缀。如果URL没有查询参数,则此部分为空字符串""。例如,对于.../v1/users?page=2&size=10,queryString是?page=2&size=10。requestBody:
步骤 2: 计算HMAC-SHA256签名
使用您的 ApiSecret作为密钥,对步骤1中生成的 stringToSign 进行HMAC-SHA256哈希计算。
步骤 3: Base64编码
将步骤2中计算出的二进制哈希结果进行Base64编码,得到最终的签名字符串。
5.常见错误响应
| HTTP状态码 | code | message | 可能原因 |
|---|---|---|---|
| 401 Unauthorized | 401 | Missing API Key... | 请求头中未找到 Authorization: ApiKey ... 或 X-API-Key |
| 400 Bad Request | 400 | Missing required headers... | 缺少 X-Timestamp, X-Nonce, 或 X-Signature 中的一个或多个 |
| 401 Unauthorized | 401 | Invalid or expired timestamp. | X-Timestamp 的值与服务器时间相差超过5分钟。请检查您的服务器时间是否同步 |
| 401 Unauthorized | 401 | Replayed request detected. | 使用了重复的 X-Nonce 值。请确保每次请求都生成唯一的Nonce |
| 401 Unauthorized | 401 | Invalid API Key... | 提供的 ApiKey 无效或未在系统中配置 |
| 401 Unauthorized | 401 | Invalid signature. | 签名验证失败。最常见的原因是:1. stringToSign 的拼接顺序或内容与规定不符。2. ApiSecret 使用错误。3. 请求体在发送过程中被修改 |
6.Postman示例demo
// 1. 获取key
const apiKey = pm.environment.get("api_key");
const apiSecret = pm.environment.get("api_secret");
pm.request.headers.upsert({ key: "X-API-Key", value: apiKey });
// 2. 生成时间戳和Nonce
const timestamp = Math.floor(Date.now() / 1000).toString();
const nonce = crypto.randomUUID(); // Postman沙箱内置了crypto对象
// 3. 将Timestamp和Nonce添加到请求头
// Postman会自动处理,即使Headers中已存在同名key,也会使用这里设置的值
pm.request.headers.upsert({ key: "X-Timestamp", value: timestamp });
pm.request.headers.upsert({ key: "X-Nonce", value: nonce });
// 4. 获取请求路径和查询参数
const path = pm.request.url.getPath(); // e.g., /api/data
const query = pm.request.url.getQueryString(); // e.g., ?name=test&id=123
// 5. 安全地获取请求体 (最关键的一步)
let bodyContent = "";
// 检查请求体是否存在,并且模式是'raw' (最常见的情况,如JSON)
if (pm.request.body && pm.request.body.mode === 'raw' && pm.request.body.raw) {
bodyContent = pm.request.body.raw;
}
// 注意:对于GET, DELETE等没有请求体的请求,bodyContent会保持为空字符串 ""
// 这与我们服务器端的逻辑完全匹配
// 6. 按照与服务器完全相同的顺序,构建待签名字符串
const stringToSign = `${timestamp}${nonce}${path}${query}${bodyContent}`;
// 7. 计算HMAC-SHA256签名
const signature = CryptoJS.HmacSHA256(stringToSign, apiSecret).toString(CryptoJS.enc.Base64);
// 8. 将最终的签名添加到请求头
pm.request.headers.upsert({ key: "X-Signature", value: signature });
// --- 用于调试的日志 ---
// 你可以在Postman Console (View -> Show Postman Console) 中看到这些输出
console.log("--- Signature Generation Details ---");
console.log("Timestamp:", timestamp);
console.log("Nonce:", nonce);
console.log("Path:", path);
console.log("Query:", query);
console.log("Body Content:", bodyContent);
console.log("String to Sign:", stringToSign);
console.log("Generated Signature:", signature);
console.log("------------------------------------");
业务侧功能
接口结构
产品拉取接口(Dida静态源模式,产品信息由Dida提供)
PropertyList
接口地址:{{BaseUrl}}/api/v1/Property/GetList
Request:
{
"PropertyID": null,
"HotelCode":""
}
| Name | Description |
| PropertyID | Dida的酒店ID,int类型
|
| HotelCode | 推送的酒店ID,string类型
|
Response:
{
"code": 200,
"message":"success",
"data": [
{
"PropertyID": 2030330,
"Name":"Test Hotel",
"CustomerPropertyCode": null,
"PriceModel":"PDP"
},
{
"PropertyID": 2030331,
"Name":"Test_Hotel - 2 (Exia)",
"CustomerPropertyCode": null,
"PriceModel":"PDP"
}
]
}
| Name | Description | |
|---|---|---|
| code | 状态码 | |
| message | 信息 | |
| data | 酒店信息 | |
| PropertyID | 酒店ID | |
| Name | 酒店名称 | |
| CustomerPropertyCode | 酒店Code(可自行设置) | |
| PriceModel | 价格模式:OBP或PDP。 PDP(Package-Deal Pricing):房间单价,按照房间设置价格。 OBP(Occupancy-Based Pricing):可根据人数设置价格。 | |
| ChildMaxAge | 儿童最大年龄 年龄段 | |
| Currency | 币种 |
RoomTypeAndRatePlan
接口地址:{{BaseUrl}}/api/v1/Property/GetRoomTypeAndRatePlan
Request
{
"PropertyID": 2030331,
"HotelCode":"P001"
}
Response
{
"code": 200,
"message":"success",
"data": {
"PropertyID": 2030331,
"HotelCode":"P001",
"RoomTypes": [
{
"RoomTypeID": 1730029,
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"RoomTypeName":"DELUXE KING ,1 Double or 1 Twin",
"RatePlans": [
{
"RatePlanID": 2300816,
"RatePlanName":"Room Only Room Only",
"RatePlanCode":"YOUR_RatePlan_CODE",
"CustomerRatePlanCode": null,
"CutoffDays": 0
}
]
}
]
}
}
取消政策时区为酒店当地时区
餐食
| Name | Description | ||
|---|---|---|---|
| RoomTypes | 房型列表 | ||
| RoomTypeID | 房型ID | ||
| RoomTypeName | 房型名称 | ||
| RoomTypeCode | 房型Code(可自行设置) | ||
| MaxPerson | 最大总人数 | ||
| MaxAdult | 最大成人数 | ||
| MaxChild | 最大儿童数 | ||
| RatePlans | 价格计划列表 | ||
| RatePlanID | 价格计划ID | ||
| RatePlanCode | YOUR_RatePlan_CODE | ||
| RatePlanName | 价格计划名称 | ||
| CustomerRatePlanCode | 价格计划Code(可自行设置) | ||
| BasePersonCount | 基础人数 | ||
| CutoffDays | 提前预定天数(RP级别) |
产品推送接口(供应商静态源模式,产品信息由您提供)
PushHotel
接口地址:{{BaseUrl}}/api/v1/Property/PushHotel
Request:
{
"HotelCode":"P001",
"Name":"Sunshine Hotel",
"Name_CN":"阳光酒店",
"Status": 1,
"PriceModel":"PDP",
"ChildMaxAge": 12,
"Currency":"USD",
"Country":"United States",
"City":"New York",
"Addr":"123 Sunshine Street, Manhattan",
"Phone":"+1-212-555-1234",
"Email":"zirun.dong@didatravel.com",
"Longitude":"-73.935242",
"Latitude":"40.730610"
}
| 字段 | 描述 |
|---|---|
| HotelCode | 酒店的唯一识别码 |
| Name | 酒店名称 |
| Name_CN | 酒店中文名称 |
| Status | 酒店的当前状态 1: 正常 (Active) 0: 不可用 (Inactive) |
| PriceModel | 酒店价格模式:OBP或PDP PDP: 房间单价 OBP: 可根据人数设置价格 |
| ChildMaxAge | 儿童最大年龄 |
| Currency | 酒店货币代码 |
| Country | 国家/地区 |
| City | 城市 |
| Addr | 街道地址 |
| Phone | 联系电话 |
| 联系邮箱 | |
| Longitude | 经度 |
| Latitude | 纬度 |
Response:
{
"code": 200,
"message":"success",
"data": null
}
PushRoomTypeAndRatePlan
接口地址:{{BaseUrl}}/api/v1/Property/PushRoomTypeAndRatePlan
Request:
{
"HotelCode":"P001",
"RoomTypes": [
{
"RoomTypeCode":"DR001",
"RoomTypeName":"Deluxe Room",
"RoomTypeName_CN":"豪华房",
"Status": 1,
"MaxPerson": 4,
"MaxAdult": 3,
"MaxChild": 1,
"BedTypeID": 1,
"BedTypeName":"King Bed"
},
{
"RoomTypeCode":"SR001",
"RoomTypeName":"Standard Room",
"RoomTypeName_CN": null,
"Status": 1,
"MaxPerson": 2,
"MaxAdult": 2,
"MaxChild": 0,
"BedTypeID": 2,
"BedTypeName":"Queen Bed",
"IsOnRequest": true
}
],
"RatePlans": [
{
"RatePlanCode":"RP001",
"RoomTypeCode":"DR001",
"Status": 1,
"RatePlanName":"Standard Rate",
"RatePlanName_CN":"标准费用",
"BasePersonCount": 2,
"CutoffDays": 0,
"MealTypeID": 1,
"MealTypeName":"Breakfast Included"
},
{
"RatePlanCode":"RP002",
"RoomTypeCode":"SR001",
"Status": 1,
"RatePlanName":"Non-Refundable Rate",
"RatePlanName_CN": null,
"BasePersonCount": 1,
"CutoffDays": 7,
"MealTypeID": 0,
"MealTypeName":"Room Only",
"IsRefundable": true,
"CancellationPolicies": [
{
"HourCount": 6,
"CancellationType":"FullStay"
},
{
"HourCount": 48,
"CancellationType":"None",
"FlatFee": 60.06
}
],
// 加人费,可空,当设置了房型的最大人数 > RP BasePersonCount 的时候设置该值。
// 不设置则默认不会售卖超出人数的房态。
"ExtraPersonChargeSettingList": [
{
"AgeCategoryCode":"A",
"Setting": {
"ChargeType":"SA",
"Rules": [
{
"ExtraPersonCount": 1,
"IncludedMealCount": 0,
"AdjustType":"ABS",
"Amount": 105.00
},
{
"ExtraPersonCount": 2,
"IncludedMealCount": 0,
"AdjustType":"ABS",
"Amount": 155.00
}
]
}
},
{
"AgeCategoryCode":"BA",
"Setting": {
"ChargeType":"SA",
"Rules": [
{
"ExtraPersonCount": 1,
"IncludedMealCount": 0,
"AdjustType":"ABS",
"Amount": 60.00
},
{
"ExtraPersonCount": 2,
"IncludedMealCount": 0,
"AdjustType":"ABS",
"Amount": 90.00
}
]
}
}
]
}
]
}
| Name | Description | ||
|---|---|---|---|
| RoomTypes | |||
| RoomTypeCode | 必填,string,酒店内唯一值。 | ||
| IsOnRequest | 可空,默认为 null,立即确认。 false: 立即确认资源 true: 非立即确认资源 | ||
| IsDeleted | 可空,默认为 null,未删除。 true: 将房型移除,不可撤销,不可恢复,并且该 RoomTypeCode 后续无法使用。 | ||
| RatePlans | |||
| RatePlanCode | 必填,string,酒店内唯一值。 | ||
| CancellationPolicies | 可取消政策列表,IsRefundable=true 时必须指定值。 例如 入住日 2025-06-06 HourCount=6 / CancellationType=FullStay 代表 2025-06-05 18:00 之后退款,收取所有房费。 例如 入住日 2025-06-06 HourCount=48 / CancellationType=None / FlatFee=60.06 代表 2025-06-04 00:00 之后退款,收取 60.06 费用。 | ||
| HourCount | 代表距离入住当天0点的多少小时前,生效该取消政策,不支持负数(整型)(酒店当地时间) | ||
| CancellationType | None: 固定费用 FirstNight: 收取首晚费用 TwoNights: 收取两晚费用 TenPercentOfFullStay: 收取全部费用的10% TwentyPercentOfFullStay: 收取全部费用的20% ThirtyPercentOfFullStay: 收取全部费用的30% FortyPercentOfFullStay: 收取全部费用的40% FiftyPercentOfFullStay: 收取全部费用的50% SixtyPercentOfFullStay: 收取全部费用的60% SeventyPercentOfFullStay: 收取全部费用的70% EightyPercentOfFullStay: 收取全部费用的80% NinetyPercentOfFullStay: 收取全部费用的90% FullStay: 收取全部费用 | ||
| FlatFee | 固定费用时,必须指定一个值(两位小数) | ||
| ExtraPersonChargeSettingList | 见下方描述。 | ||
| IsDeleted | 可空,默认为 null,未删除。 true: 将 RP 移除,不可撤销,不可恢复,并且该 RatePlanCode 后续无法使用。 |
加人费字段:
| ExtraPersonChargeSettingList | 加人费列表,分为成人加人费和儿童加人费,最多分别设置一项。 可空,当设置了房型的最大人数 > RP BasePersonCount 的时候设置该值,不设置则默认不会售卖超出人数的房态。 支持推送修改。 | |||
|---|---|---|---|---|
| AgeCategoryCode | 加人类型。 A: 成人。 BA: 儿童。 | |||
| Setting | ||||
| ChargeType | 费用类型。 SA: 独立计费,即最基本的加人费,将费用加在原始房费上。 其他:待补充说明。 | |||
| Rules | ||||
| ExtraPersonCount | 加人数量。 | |||
| IncludedMealCount | 包含的餐食数量。 | |||
| AdjustType | 费用类型。 ABS: 绝对值,对应金额直接合计。 其他:待补充说明。 | |||
| Amount | AdjustType="ABS" 时,该值为数值类型的金额。 |
Response:
{
"code": 200,
"message":"success",
"data": null
}
ARI推送接口
接口地址:{{BaseUrl}}/api/v1/ARI/Push
重试说明:如果接口没有返回code:200,需要进行重试
字段说明:PropertyID、RoomTypeID、RatePlanID 对应 Dida 静态源模式,若使用「产品拉取接口」,推送 ARI 时这三个字段为必传;HotelCode、RoomTypeCode、RatePlanCode 对应供应商静态源模式,若使用「产品推送模式」,推送 ARI 时这三个字段为必传。
PDP模式
Request
{
"PropertyID": 2030330,
"HotelCode":"",
"InventoryList": [
{
"RoomTypeID": 1730030,
"StayDate":"2024-12-20",
"Inventory": 3,
"Status": 1
},
{
"RoomTypeID": 1730030,
"StayDate":"2024-12-21",
"Inventory": 3,
"Status": 1
}
],
"RateList": [
{
"RoomTypeID": 1730030,
"RatePlanID": 2300817,
"RatePlanCode":"RP002",
"RoomTypeCode":"SR001",
"StayDate":"2024-12-20",
"Price": 100,
"Status": 1,
"Currency":"CNY",
"MinLOS": 0,
"MaxLOS": 999,
"CTA": false,
"CTD": false,
"CuttoffDays": 0
},
{
"RoomTypeID": 1730030,
"RatePlanID": 2300817,
"RatePlanCode":"RP002",
"RoomTypeCode":"SR001",
"StayDate":"2024-12-21",
"Price": 100,
"Status": 1,
"Currency":"CNY",
"MinLOS": 0,
"MaxLOS": 999,
"CTA": false,
"CTD": false,
"CuttoffDays": 0
}
]
}
OBP模式
Request
{
"PropertyID": 2030501,
"HotelCode":"",
"InventoryList": [
{
"RoomTypeID": 1731035,
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"StayDate":"2024-12-20",
"Inventory": 3,
"Status": 1
},
{
"RoomTypeID": 1731035,
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"StayDate":"2024-12-21",
"Inventory": 3,
"Status": 1
}
],
"RateList": [
{
"RoomTypeID": 1731035,
"RatePlanID": 2322702,
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"RatePlanCode":"YOUR_RatePlan_CODE",
"StayDate":"2024-12-20",
"Price": null,
"Status": 1,
"Currency":"CNY",
"OBPPrices": [
{
"Occupancy": 1,
"Price": 100,
"Status": 1,
"Type":"Adult"
},
{
"Occupancy": 2,
"Price": 120,
"Status": 1,
"Type":"Adult"
},
{
"Occupancy": 1,
"Price": 50,
"Status": 1,
"Type":"Child"
}
],
"MinLOS": 0,
"MaxLOS": 999,
"CTA": false,
"CTD": false,
"CuttoffDays": 0
},
{
"RoomTypeID": 1731035,
"RatePlanID": 2322702,
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"RatePlanCode":"YOUR_RatePlan_CODE",
"StayDate":"2024-12-21",
"Price": null,
"Status": 1,
"Currency":"CNY",
"OBPPrices": [
{
"Occupancy": 1,
"Price": 100,
"Status": 1,
"Type":"Adult"
},
{
"Occupancy": 2,
"Price": 120,
"Status": 1,
"Type":"Adult"
},
{
"Occupancy": 1,
"Price": 50,
"Status": 1,
"Type":"Child"
}
],
"MinLOS": 0,
"MaxLOS": 999,
"CTA": false,
"CTD": false,
"CuttoffDays": 0
}
]
}
| Name | Description | ||
|---|---|---|---|
| PropertyID | Dida酒店ID,Dida静态源模式下必传(使用产品拉取接口时) | ||
| HotelCode | 供应商酒店Code,供应商静态源模式下必传(使用产品推送模式时) | ||
| InventoryList | 库存更新列表 | ||
| RoomTypeID | 房型ID,Dida静态源模式下必传(使用产品拉取接口时) | ||
| RoomTypeCode | YOUR_ROOMTYPE_CODE 供应商房型Code,供应商静态源模式下必传(使用产品推送模式时) | ||
| StayDate | 日期:YYYY-MM-DD | ||
| Inventory | 库存 | ||
| Status | 状态: 0:InActive 1:Active | ||
| RateList | 价格更新列表 | ||
| RatePlanID | 价格计划ID,Dida静态源模式下必传(使用产品拉取接口时) | ||
| RatePlanCode | YOUR_RatePlan_CODE 供应商价格计划Code,供应商静态源模式下必传(使用产品推送模式时) | ||
| StayDate | 日期:YYYY-MM-DD | ||
| Price | 价格(PDP价格设置)(两位小数) | ||
| Currency | 币种 | ||
| Status | 状态: 0:InActive 1:Active | ||
| MinLOS | 最小连住天数, null为不限制 | ||
| MaxLOS | 最大连住天数, null为不限制 | ||
| CTA | CloseToArrive Ture:禁止入住 False:可以入住 null:不限制 | ||
| CTD | CloseToDepart Ture:禁止入住 False:可以入住 null:不限制 | ||
| CuttoffDays | 提前预定天数: null:不限制 优先级高于RP级别 | ||
| OBPPrices | OBP价格设置列表 总价格=成人价格+儿童价格 | ||
| Occupancy | 人数 | ||
| Price | 价格 | ||
| Status | 状态: 0:InActive 1:Active | ||
| Type | "Adult":成人 "Child":儿童 |
Response
{
"code": 200,
"message":"success"
}
失败响应示例
{
"code": 400,
"message":"Property not found."
}
| Name | Description |
|---|---|
| code | 200:ok 401:账号或密码错误 400:请求参数错误 500:服务不可用 |
| message | success:更新成功 fail:更新失败 |
订单接口
新订接口
接口地址:{{WebHookURL}}
Request:
{
"ClientID":"DidaTravel",
"UserName":"DidaUserName",
"Password":"DidaPassword",
"BookingID":"DEB12345678000001",
"Status":"New",
"PropertyID": 2030330,
"RoomTypeID": 1730030,
"RatePlanID": 2300817,
"HotelCode":"YOUR_HOTEL_CODE",
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"RatePlanCode":"YOUR_RatePlan_CODE",
"PropertyName":"PropertyName",
"RoomTypeName":"RoomTypeName",
"RatePlanName":"RatePlanName",
"MealTypeID": 0,
"MealTypeName":"Room Only",
"BedTypeID": 1,
"BedTypeName":"1 Single",
"CheckInDate":"2024-12-20",
"CheckOutDate":"2024-12-22",
"RoomCount": 1,
"Remark":"No Smoking",
"PaymentInfo": {
"CardNumber":"1234567890123456",
"CardHolderName":"John Doe",
"CVC":"123",
"ActiveFromDate":"2023-01-01",
"ExpireDate":"2024-12-31"
},
"GuestInfoList": [
{
"RoomNum": 1,
"GuestFirstName":"John",
"GuestLastName":"Doe",
"Age": 30,
"IsAdult": true
},
{
"RoomNum": 1,
"GuestFirstName":"Jane",
"GuestLastName":"Doe",
"Age": 28,
"IsAdult": true
}
],
"PriceInfoList": [
{
"RoomNum": 1,
"AdultCount": 2,
"ChildCount": 0,
"TotalPrice": 150.00,
"Currency":"USD",
"DailyRateList": [
{
"Price": 75.00,
"StayDate":"2024-12-20"
},
{
"Price": 75.00,
"StayDate":"2024-12-21"
}
]
}
],
"Contact": {
"FirstName":"Dida",
"LastName":"Travel",
"Email":"service@didatravel.com",
"Phone":"+86-0755-82628521",
"Address":"Shenzhen Bay Tech-Eco Park, Shenzhen, China"
}
}
| Name | Description | ||
|---|---|---|---|
| ClientID | Always:DidaTravel | ||
| UserName | DidaUserName,Dida提供,需要检查 | ||
| Password | DidaPassword,Dida提供,需要检查 | ||
| BookingID | 订单ID(判断重复) | ||
| Status | 订单状态: New:新订 Cancel:取消 Modify:修改 | ||
| PropertyID | 酒店ID | ||
| RoomTypeID | 房型ID | ||
| RatePlanID | 价格计划ID | ||
| HotelCode | YOUR_HOTEL_CODE | ||
| RoomTypeCode | YOUR_ROOMTYPE_CODE | ||
| RatePlanCode | YOUR_RatePlan_CODE | ||
| PropertyName | 酒店名称 | ||
| RoomTypeName | 房型名称 | ||
| RatePlanName | 价格计划名称 | ||
| MealTypeID | 餐型ID(见餐型床型代码说明) | ||
| MealTypeName | 餐型名称 | ||
| BedTypeID | 床型ID(见餐型床型代码说明) | ||
| BedTypeName | 床型名称 | ||
| CheckInDate | 入住日期 | ||
| CheckOutDate | 离店日期 | ||
| RoomCount | 房间数量 | ||
| PaymentInfo | 支付信息(如有) | ||
| CardNumber | 卡号 | ||
| CardHolderName | 卡持有者名称 | ||
| CVC | CVC(kekong) | ||
| ActiveFromDate | 生效日期 | ||
| ExpireDate | 过期时间 | ||
| GuestInfoList | 客人信息列表 | ||
| RoomNum | 房间号 | ||
| GuestFirstName | 客人名 | ||
| GuestLastName | 客人姓 | ||
| Age | 年龄 | ||
| IsAdult | 是否是成人 | ||
| PriceInfoList | 价格信息列表 | ||
| RoomNum | 房间号 | ||
| AdultCount | 成人数量 | ||
| ChildCount | 儿童数量 | ||
| TotalPrice | 房间总价 | ||
| Currency | 币种 | ||
| DailyRateList | 每日价格列表 | ||
| Price | 价格 | ||
| StayDate | 日期 | ||
| Contact | Dida联系信息 | ||
| FirstName | 联系名字:Dida | ||
| LastName | 联系名字:Travel | ||
| Dida联系Email | |||
| Phone | Dida联系电话 | ||
| Address | Dida联系地址 |
Response:
{
"Success": true,
"Msg":"Success",
"BookingID":"DEB12345678",
"ConfirmationCode":"123456"
}
| Name | Description |
|---|---|
| Success | true:下单成功 false:下单失败 |
| Msg | 成功或失败信息 |
| BookingID | 订单ID |
| ConfirmationCode | 酒店确认号 |
取消接口
接口地址:{{WebHookURL}}
Request:
{
"ClientID":"DidaTravel",
"UserName":"DidaUserName",
"Password":"DidaPassword",
"BookingID":"DEB12345678000001",
"Status":"Cancel",
"PropertyID": 2030330,
"RoomTypeID": 1730030,
"RatePlanID": 2300817,
"HotelCode":"YOUR_HOTEL_CODE",
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"RatePlanCode":"YOUR_RatePlan_CODE",
"CheckInDate":"2024-12-20",
"CheckOutDate":"2024-12-22",
"RoomCount": 1
}
| Name | Description |
|---|---|
| ClientID | Always:DidaTravel |
| UserName | DidaUserName,Dida提供,需要检查 |
| Password | DidaPassword,Dida提供,需要检查 |
| BookingID | 订单ID |
| Status | 订单状态: New:新订 Cancel:取消 Modify:修改 Always Cancel |
| PropertyID | 酒店ID |
| RoomTypeID | 房型ID |
| RatePlanID | 价格计划ID |
| HotelCode | YOUR_HOTEL_CODE |
| RoomTypeCode | YOUR_ROOMTYPE_CODE |
| RatePlanCode | YOUR_RatePlan_CODE |
| CheckInDate | 入住日期 |
| CheckOutDate | 离店日期 |
| RoomCount | 房间数量 |
Response:
{
"Success": true,
"Msg":"Success"
}
| Name | Description |
|---|---|
| Success | true:取消成功 false:取消失败 |
| Msg | 成功或失败信息 |
修改订单接口(仅限姓名、支付方式和备注,某字段为null代表该字段信息不修改)
接口地址:{{WebHookURL}}/softchange
Request:(字段含义同下单接口)
{
"ClientID":"DidaTravel",
"UserName":"DidaUserName",
"Password":"DidaPassword",
"BookingID":"DEB12345678000001",
"Status":"Modify",
"PropertyID": 2030330,
"RoomTypeID": 1730030,
"RatePlanID": 2300817,
"HotelCode":"YOUR_HOTEL_CODE",
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"RatePlanCode":"YOUR_RatePlan_CODE",
"Remark":"No Smoking",
"PaymentInfo": {
"CardNumber":"1234567890123456",
"CardHolderName":"John Doe",
"ActiveFromDate":"2023-01-01",
"ExpireDate":"2024-12-31"
},
"GuestInfoList": [
{
"RoomNum": 1,
"GuestFirstName":"John",
"GuestLastName":"Doe",
"Age": 30,
"IsAdult": true
},
{
"RoomNum": 1,
"GuestFirstName":"Jane",
"GuestLastName":"Doe",
"Age": 28,
"IsAdult": true
}
]
}
查询订单
接口地址:{{BaseUrl}}/api/v1/Booking/List
| Name | Description |
|---|---|
| BookingID | 订单ID |
| OrderDateStart | 订单日期范围开始(YYYY-MM-DD) |
| OrderDateEnd | 订单日期范围结束(包含)(YYYY-MM-DD) |
| StayDateStart | 入住区间范围开始(YYYY-MM-DD) |
| StayDateEnd | 入住区间范围结束(包含)(YYYY-MM-DD) |
Request:
{
"BookingID":"DEB241217201xxxxx",
"OrderDateStart":"2024-12-17",
"OrderDateEnd":"2024-12-17",
"StayDateStart":"2024-12-17",
"StayDateEnd":"2024-12-17"
}
Response(字段含义同新订接口):
{
"code": 200,
"message":"success",
"data": [
{
"BookingID":"DEB241217201xxxxx",
"Status": null,
"ConfirmationCode": null,
"PropertyID": 1992267,
"RoomTypeID": 1209418,
"RatePlanID": 1581070,
"HotelCode":"YOUR_HOTEL_CODE",
"RoomTypeCode":"YOUR_ROOMTYPE_CODE",
"RatePlanCode":"YOUR_RatePlan_CODE",
"PropertyName": null,
"RoomTypeName": null,
"RatePlanName": null,
"MealTypeID": 0,
"MealTypeName": null,
"BedTypeID": 1,
"BedTypeName": null,
"CheckInDate":"2025-01-16T00: 00: 00",
"CheckOutDate":"2025-01-17T00: 00: 00",
"RoomCount": 1,
"Remark": null,
"PaymentInfo": null,
"GuestInfoList": [
{
"RoomNum": 1,
"GuestFirstName":"test",
"GuestLastName":"test",
"Age": null,
"IsAdult": true
}
],
"PriceInfoList": [
{
"RoomNum": 1,
"AdultCount": 1,
"ChildCount": 0,
"TotalPrice": 0.0,
"Currency":"JPY",
"DailyRateList": null
}
],
"Contact": null,
}
]
}
确认订单(仅对待确认订单有效)
接口地址:{{BaseUrl}}/api/v1/Booking/ConfirmOnRequest
| Name | Description |
|---|---|
| BookingID | DIDA 下单时传入的订单 ID |
| Status | 订单状态: Confirmed = 1 Cancelled = 2 Rejected = 3 |
| Msg | 附加信息 |
Request:
{
"BookingID":"DEB241217201xxxxx",
"Status": 1,
"Msg":"确认成功"
}
Response:
{
"Success": true,
"Msg":"Success"
}
| Name | Description |
|---|---|
| Success | true:接收成功 false: 接收失败 |
| Code | 状态码: 200:确认成功 201:订单已确认 400:订单已取消 401:订单状态异常 404:订单不存在 500:系统异常 |
| Msg | 确认结果信息 |
确认号推送
接口地址:{{BaseUrl}}/api/v1/Booking/UpdateConfirmationCode
| Name | Description |
|---|---|
| BookingID | DIDA 下单时传入的订单 ID |
| ConfirmationCode | 酒店确认号 |
Request:
{
"BookingID":"DEB241217201xxxxx",
"ConfirmationCode":"123456"
}
Response:
{
"Success": true,
"Msg":"Success",
"Code": 200
}
| Name | Description |
|---|---|
| Success | true:接收成功 false: 接收失败 |
| Code | 状态码: 200:确认成功 201:已有确认号 400:参数异常 401:订单已取消 404:订单不存在 500:系统异常 |
| Msg | 确认结果信息 |
附录
餐型代码说明
| MealTypeID | 名称 |
|---|---|
| 0 | Room Only |
| 1 | Breakfast Included |
| 2 | Half-Board |
| 3 | Full-Board |
| 4 | All Inclusive |
| 5 | Dinner |
| 6 | BreakfastAndDinner |
| 7 | BreakfastAndLunch |
| 8 | PKG(Room&Ticket) |
| 9 | Lunch |
| 10 | Lunch And Dinner |
| 11 | Suhur |
| 12 | Iftar |
| 13 | Suhur And Iftar |
| 14 | Suhur or Iftar |
主要床型代码说明
| BedTypeID | 名称 |
|---|---|
| 1 | 1 Single |
| 2 | 1 Double |
| 3 | 1 Twin |
| 4 | 3 Single |
| 5 | 1 Double 1 Single |
| 6 | 2 Double |
| 7 | 1 Double 1 Twin |
| 8 | 2 Twin |
| 9 | 1 Double or 1 Twin |
| 10 | 1 Double 1 Sofa |
| 11 | 1 Single 1 Sofa |
| 14 | 2 Single 1 Sofa |
| 15 | 3 Single 1 Sofa |
| 16 | 4 Single 1 Sofa |
| 17 | 2 Double 1 Sofa |
| 18 | 1 Double 2 Sofa |
| 21 | 1 Double 1 Single 1 Sofa |
| 22 | 1 Double 2 Single 1 Sofa |
| 23 | 1 Double 2 Single 1 Double-Sofa |
| 24 | 1 Sofa |
Postman文件
以下为完整的 Postman 配置文件,可直接复制使用。
📄 CMOpenAPI.postman_environment.json
{
"_postman_exported_at": "2025-07-29T05:31:36.615Z",
"_postman_exported_using": "Postman/11.56.1",
"_postman_variable_scope": "environment",
"id": "b4b17b7a-6029-4ca3-88ff-b324d7748112",
"name": "CMOpenAPI",
"values": [
{
"enabled": true,
"key": "api_key",
"type": "default",
"value": "<YOUR_API_KEY>"
},
{
"enabled": true,
"key": "api_secret",
"type": "default",
"value": "<YOUR_API_SECRET>"
},
{
"enabled": true,
"key": "BaseUrl",
"type": "default",
"value": "https://cm-dataapi.didatravel.com"
},
{
"enabled": true,
"key": "WebHookURL",
"type": "default",
"value": "https://didacmapi.yourwebsite.com"
}
]
}
📄 CMOpenAPI.postman_collection.json
{
"auth": {
"apikey": [
{
"key": "value",
"type": "string",
"value": "ApiKey {{api_key}}"
},
{
"key": "key",
"type": "string",
"value": "Authorization"
}
],
"type": "apikey"
},
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"// 1. 获取key\r",
"const apiKey = pm.environment.get(\"api_key\");\r",
"const apiSecret = pm.environment.get(\"api_secret\");\r",
"\r",
"pm.request.headers.upsert({ key: \"X-API-Key\", value: apiKey });\r",
"\r",
"// 2. 生成时间戳和Nonce\r",
"const timestamp = Math.floor(Date.now() / 1000).toString();\r",
"const nonce = crypto.randomUUID(); // Postman沙箱内置了crypto对象\r",
"\r",
"// 3. 将Timestamp和Nonce添加到请求头\r",
"// Postman会自动处理,即使Headers中已存在同名key,也会使用这里设置的值\r",
"pm.request.headers.upsert({ key: \"X-Timestamp\", value: timestamp });\r",
"pm.request.headers.upsert({ key: \"X-Nonce\", value: nonce });\r",
"\r",
"// 4. 获取请求路径和查询参数\r",
"const path = pm.request.url.getPath(); // e.g., /api/data\r",
"const query = pm.request.url.getQueryString(); // e.g., ?name=test&id=123\r",
"\r",
"// 5. 安全地获取请求体 (最关键的一步)\r",
"let bodyContent = \"\";\r",
"// 检查请求体是否存在,并且模式是'raw' (最常见的情况,如JSON)\r",
"if (pm.request.body && pm.request.body.mode === 'raw' && pm.request.body.raw) {\r",
" bodyContent = pm.request.body.raw;\r",
"}\r",
"// 注意:对于GET, DELETE等没有请求体的请求,bodyContent会保持为空字符串 \"\"\r",
"// 这与我们服务器端的逻辑完全匹配\r",
"\r",
"// 6. 按照与服务器完全相同的顺序,构建待签名字符串\r",
"const stringToSign = `${timestamp}${nonce}${path}${query}${bodyContent}`;\r",
"\r",
"// 7. 计算HMAC-SHA256签名\r",
"const signature = CryptoJS.HmacSHA256(stringToSign, apiSecret).toString(CryptoJS.enc.Base64);\r",
"\r",
"// 8. 将最终的签名添加到请求头\r",
"pm.request.headers.upsert({ key: \"X-Signature\", value: signature });\r",
"\r",
"// --- 用于调试的日志 ---\r",
"// 你可以在Postman Console (View -> Show Postman Console) 中看到这些输出\r",
"console.log(\"--- Signature Generation Details ---\");\r",
"console.log(\"Timestamp:\", timestamp);\r",
"console.log(\"Nonce:\", nonce);\r",
"console.log(\"Path:\", path);\r",
"console.log(\"Query:\", query);\r",
"console.log(\"Body Content:\", bodyContent);\r",
"console.log(\"String to Sign:\", stringToSign);\r",
"console.log(\"Generated Signature:\", signature);\r",
"console.log(\"------------------------------------\");"
],
"packages": {},
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
""
],
"packages": {},
"type": "text/javascript"
}
}
],
"info": {
"_exporter_id": "29840969",
"_postman_id": "3e8e9b42-326a-4d84-8421-326d34b0b577",
"name": "CMOpenAPI",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"packages": {},
"type": "text/javascript"
}
}
],
"name": "GetPropertyList",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"PropertyID\": null,\r\n \"HotelCode\":\"\"\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"Property",
"GetList"
],
"raw": "{{BaseUrl}}/api/v1/Property/GetList"
}
},
"response": []
},
{
"name": "GetBedTypes",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": ""
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"Property",
"GetBedTypes"
],
"raw": "{{BaseUrl}}/api/v1/Property/GetBedTypes"
}
},
"response": []
},
{
"name": "GetMealTypes",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": ""
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"Property",
"GetMealTypes"
],
"raw": "{{BaseUrl}}/api/v1/Property/GetMealTypes"
}
},
"response": []
},
{
"name": "GetRoomTypeAndRatePlan",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"PropertyID\": 2030501,\r\n \"HotelCode\": \"\"\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"Property",
"GetRoomTypeAndRatePlan"
],
"raw": "{{BaseUrl}}/api/v1/Property/GetRoomTypeAndRatePlan"
}
},
"response": []
},
{
"name": "PushHotel",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"HotelCode\": \"P001\",\r\n \"Name\": \"Sunshine Hotel\",\r\n \"Status\": 1,\r\n \"PriceModel\": \"PDP\",\r\n \"ChildMaxAge\": 12,\r\n \"Currency\": \"USD\",\r\n \"Country\": \"United States\",\r\n \"City\": \"New York\",\r\n \"Addr\": \"123 Sunshine Street, Manhattan\",\r\n \"Phone\": \"+1-212-555-1234\",\r\n \"Email\":\"zirun.dong@didatravel.com\",\r\n \"Longitude\": \"-73.935242\",\r\n \"Latitude\": \"40.730610\"\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"Property",
"PushHotel"
],
"raw": "{{BaseUrl}}/api/v1/Property/PushHotel"
}
},
"response": []
},
{
"name": "PushRoomTypeAndRatePlan",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"HotelCode\": \"P001\",\r\n \"RoomTypes\": [\r\n {\r\n \"RoomTypeCode\": \"DR001\",\r\n \"Status\": 1,\r\n \"MaxPerson\": 4,\r\n \"MaxAdult\": 3,\r\n \"MaxChild\": 1,\r\n \"RoomTypeName\": \"Deluxe Room\",\r\n \"BedTypeID\": 1,\r\n \"BedTypeName\": \"King Bed\"\r\n },\r\n {\r\n \"RoomTypeCode\": \"SR001\",\r\n \"Status\": 1,\r\n \"MaxPerson\": 2,\r\n \"MaxAdult\": 2,\r\n \"MaxChild\": 0,\r\n \"RoomTypeName\": \"Standard Room\",\r\n \"BedTypeID\": 2,\r\n \"BedTypeName\": \"Queen Bed\"\r\n }\r\n ],\r\n \"RatePlans\": [\r\n {\r\n \"RatePlanCode\": \"RP001\",\r\n \"RoomTypeCode\": \"DR001\",\r\n \"Status\": 1,\r\n \"RatePlanName\": \"Standard Rate\",\r\n \"BasePersonCount\": 2,\r\n \"CutoffDays\": 0,\r\n \"MealTypeID\": 1,\r\n \"MealTypeName\": \"Breakfast Included\"\r\n },\r\n {\r\n \"RatePlanCode\": \"RP002\",\r\n \"RoomTypeCode\": \"SR001\",\r\n \"Status\": 1,\r\n \"RatePlanName\": \"Non-Refundable Rate\",\r\n \"BasePersonCount\": 1,\r\n \"CutoffDays\": 7,\r\n \"MealTypeID\": 2,\r\n \"MealTypeName\": \"Room Only\"\r\n }\r\n ]\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"Property",
"PushRoomTypeAndRatePlan"
],
"raw": "{{BaseUrl}}/api/v1/Property/PushRoomTypeAndRatePlan"
}
},
"response": []
},
{
"name": "ARIUpdate PDP",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"PropertyID\": 2030330,\r\n \"HotelCode\":\"P001\",\r\n \"InventoryList\": [\r\n {\r\n \"RoomTypeID\": 1730030,\r\n \"StayDate\": \"2024-12-20\",\r\n \"Inventory\": 3,\r\n \"Status\": 1\r\n },\r\n {\r\n \"RoomTypeID\": 1730030,\r\n \"StayDate\": \"2024-12-21\",\r\n \"Inventory\": 3,\r\n \"Status\": 1\r\n }\r\n ],\r\n \"RateList\": [\r\n {\r\n \"RoomTypeID\": 1730030,\r\n \"RatePlanID\": 2300817,\r\n \"StayDate\": \"2024-12-20\",\r\n \"Price\": 100,\r\n \"Status\": 1,\r\n \"Currency\": \"CNY\",\r\n \"MinLOS\": 0,\r\n \"MaxLOS\": 999,\r\n \"CTA\": false,\r\n \"CTD\": false,\r\n \"CuttoffDays\": 0\r\n },\r\n {\r\n \"RoomTypeID\": 1730030,\r\n \"RatePlanID\": 2300817,\r\n \"StayDate\": \"2024-12-21\",\r\n \"Price\": 100,\r\n \"Status\": 1,\r\n \"Currency\": \"CNY\",\r\n \"MinLOS\": 0,\r\n \"MaxLOS\": 999,\r\n \"CTA\": false,\r\n \"CTD\": false,\r\n \"CuttoffDays\": 0\r\n }\r\n ]\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"ARI",
"Push"
],
"raw": "{{BaseUrl}}/api/v1/ARI/Push"
}
},
"response": []
},
{
"name": "ARIUpdate OBP",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"PropertyID\": 2030501,\r\n \"HotelCode\":\"P001\",\r\n \"InventoryList\": [\r\n {\r\n \"RoomTypeID\": 1731035,\r\n \"StayDate\": \"2024-12-20\",\r\n \"Inventory\": 3,\r\n \"Status\": 1\r\n },\r\n {\r\n \"RoomTypeID\": 1731035,\r\n \"StayDate\": \"2024-12-21\",\r\n \"Inventory\": 3,\r\n \"Status\": 1\r\n }\r\n ],\r\n \"RateList\": [\r\n {\r\n \"RoomTypeID\": 1731035,\r\n \"RatePlanID\": 2322702,\r\n \"StayDate\": \"2024-12-20\",\r\n \"Price\": null,\r\n \"Status\": 1,\r\n \"Currency\": \"CNY\",\r\n \"OBPPrices\": [\r\n {\r\n \"Occupancy\": 1,\r\n \"Price\": 100,\r\n \"Status\": 1,\r\n \"Type\": \"Adult\"\r\n },\r\n {\r\n \"Occupancy\": 2,\r\n \"Price\": 120,\r\n \"Status\": 1,\r\n \"Type\": \"Adult\"\r\n },\r\n {\r\n \"Occupancy\": 1,\r\n \"Price\": 50,\r\n \"Status\": 1,\r\n \"Type\": \"Child\"\r\n }\r\n ],\r\n \"MinLOS\": 0,\r\n \"MaxLOS\": 999,\r\n \"CTA\": false,\r\n \"CTD\": false,\r\n \"CuttoffDays\": 0\r\n },\r\n {\r\n \"RoomTypeID\": 1731035,\r\n \"RatePlanID\": 2322702,\r\n \"StayDate\": \"2024-12-21\",\r\n \"Price\": null,\r\n \"Status\": 1,\r\n \"Currency\": \"CNY\",\r\n \"OBPPrices\": [\r\n {\r\n \"Occupancy\": 1,\r\n \"Price\": 100,\r\n \"Status\": 1,\r\n \"Type\": \"Adult\"\r\n },\r\n {\r\n \"Occupancy\": 2,\r\n \"Price\": 120,\r\n \"Status\": 1,\r\n \"Type\": \"Adult\"\r\n },\r\n {\r\n \"Occupancy\": 1,\r\n \"Price\": 50,\r\n \"Status\": 1,\r\n \"Type\": \"Child\"\r\n }\r\n ],\r\n \"MinLOS\": 0,\r\n \"MaxLOS\": 999,\r\n \"CTA\": false,\r\n \"CTD\": false,\r\n \"CuttoffDays\": 0\r\n }\r\n ]\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"ARI",
"Push"
],
"raw": "{{BaseUrl}}/api/v1/ARI/Push"
}
},
"response": []
},
{
"name": "GetBookingList",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"BookingID\": \"DEB241217201431338\",\r\n \"OrderDateStart\": \"2024-12-17\",\r\n \"OrderDateEnd\": \"2024-12-17\"\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{BaseUrl}}"
],
"path": [
"api",
"v1",
"Booking",
"List"
],
"raw": "{{BaseUrl}}/api/v1/Booking/List"
}
},
"response": []
},
{
"name": "AddBooking",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"ClientID\": \"DidaTravel\",\r\n \"UserName\": \"DidaUserName\",\r\n \"Password\": \"DidaPassword\",\r\n \"BookingID\": \"DEB12345678000001\",\r\n \"Status\": \"New\",\r\n \"PropertyID\": 2030330,\r\n \"PropertyName\": \"PropertyName\",\r\n \"RoomTypeID\": 1730030,\r\n \"RoomTypeName\": \"RoomTypeName\",\r\n \"RatePlanID\": 2300817,\r\n \"RatePlanName\": \"RatePlanName\",\r\n \"MealTypeID\": \"0\",\r\n \"MealTypeName\": \"Room Only\",\r\n \"BedTypeID\": \"1\",\r\n \"BedTypeName\": \"1 Single\",\r\n \"CheckInDate\": \"2024-12-20\",\r\n \"CheckOutDate\": \"2024-12-21\",\r\n \"RoomCount\": 1,\r\n \"Remark\": \"no smoking\",\r\n \"PaymentInfo\": {\r\n \"CardNumber\": \"1234567890123456\",\r\n \"CardHolderName\": \"John Doe\",\r\n \"CVC\": \"123\",\r\n \"ActiveFromDate\": \"2023-01-01\",\r\n \"ExpireDate\": \"2024-12-31\"\r\n },\r\n \"GuestInfoList\": [\r\n {\r\n \"RoomNum\": 1,\r\n \"GuestFirstName\": \"John\",\r\n \"GuestLastName\": \"Doe\",\r\n \"Age\": 30,\r\n \"IsAdult\": true\r\n },\r\n {\r\n \"RoomNum\": 1,\r\n \"GuestFirstName\": \"Jane\",\r\n \"GuestLastName\": \"Doe\",\r\n \"Age\": 28,\r\n \"IsAdult\": true\r\n }\r\n ],\r\n \"PriceInfoList\": [\r\n {\r\n \"RoomNum\": 1,\r\n \"AdultCount\": 2,\r\n \"ChildCount\": 0,\r\n \"TotalPrice\": 150.00,\r\n \"Currency\": \"USD\",\r\n \"DailyRateList\": [\r\n {\r\n \"Price\": 75.00,\r\n \"StayDate\": \"2024-12-20\"\r\n },\r\n {\r\n \"Price\": 75.00,\r\n \"StayDate\": \"2024-12-21\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"Contact\": {\r\n \"FirstName\": \"Dida\",\r\n \"LastName\": \"Travel\",\r\n \"Email\": \"service@didatravel.com\",\r\n \"Phone\": \"+86-0755-82628521\",\r\n \"Address\": \"Shenzhen Bay Tech-Eco Park, Shenzhen, China\"\r\n }\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{WebHookURL}}"
],
"raw": "{{WebHookURL}}"
}
},
"response": []
},
{
"name": "CancelBooking",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"ClientID\": \"DidaTravel\",\r\n \"UserName\": \"DidaUserName\",\r\n \"Password\": \"DidaPassword\",\r\n \"BookingID\": \"DEB12345678000001\",\r\n \"Status\": \"Cancel\",\r\n \"PropertyID\": 2030330,\r\n \"RoomTypeID\": 1730030,\r\n \"RatePlanID\": 2300817,\r\n \"CheckInDate\": \"2024-12-20\",\r\n \"CheckOutDate\": \"2024-12-21\",\r\n \"RoomCount\": 1\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{WebHookURL}}"
],
"raw": "{{WebHookURL}}"
}
},
"response": []
},
{
"name": "ModifyBooking",
"request": {
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
},
"raw": "{\r\n \"ClientID\": \"DidaTravel\",\r\n \"UserName\": \"DidaUserName\",\r\n \"Password\": \"DidaPassword\",\r\n \"BookingID\": \"DEB12345678000001\",\r\n \"Status\": \"Modify\",\r\n \"PropertyID\": 2030330,\r\n \"RoomTypeID\": 1730030,\r\n \"RatePlanID\": 2300817,\r\n \"CheckInDate\": \"2024-12-20\",\r\n \"CheckOutDate\": \"2024-12-22\",\r\n \"RoomCount\": 1,\r\n \"PaymentInfo\": {\r\n \"CardNumber\": \"1234567890123456\",\r\n \"CardHolderName\": \"John Doe\",\r\n \"CVC\": \"123\",\r\n \"ActiveFromDate\": \"2023-01-01\",\r\n \"ExpireDate\": \"2024-12-31\"\r\n },\r\n \"GuestInfoList\": [\r\n {\r\n \"RoomNum\": 1,\r\n \"GuestFirstName\": \"John\",\r\n \"GuestLastName\": \"Doe\",\r\n \"Age\": 30,\r\n \"IsAdult\": true\r\n },\r\n {\r\n \"RoomNum\": 1,\r\n \"GuestFirstName\": \"Jane\",\r\n \"GuestLastName\": \"Doe\",\r\n \"Age\": 28,\r\n \"IsAdult\": true\r\n }\r\n ],\r\n \"PriceInfoList\": [\r\n {\r\n \"RoomNum\": 1,\r\n \"AdultCount\": 2,\r\n \"ChildCount\": 0,\r\n \"TotalPrice\": 150.00,\r\n \"Currency\": \"USD\",\r\n \"DailyRateList\": [\r\n {\r\n \"Price\": 75.00,\r\n \"StayDate\": \"2024-12-20\"\r\n },\r\n {\r\n \"Price\": 75.00,\r\n \"StayDate\": \"2024-12-21\"\r\n }\r\n ]\r\n }\r\n ]\r\n}"
},
"header": [],
"method": "POST",
"url": {
"host": [
"{{WebHookURL}}"
],
"raw": "{{WebHookURL}}"
}
},
"response": []
}
]
}