PMS房价设置
1. 修改房价
1.1 单个修改价格
- 接口地址
POST /v1/roomPrice/changeSingle- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 1 | pms-storeID |
| room_type_id | int | Y | 1 | 房型/包栋ID |
| channel_id | int | Y | 0 | 渠道ID,0门市价 |
| start_date | string | Y | "2025-02-20" | 开始日期 |
| end_date | string | Y | "2025-02-24" | 结束日期 |
| price | int | Y | 399 | 价格 |
- 返回结果
无
1.2 批量改价
- 接口地址
POST /v1/roomPrice/changeBatch- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 1 | pms-storeID |
| batchList | array | Y | [] | 批量改价列表 |
| batchList.*.room_type_id | int | Y | 1 | 房型/包栋ID |
| batchList.*.channel_id | int | Y | 0 | 渠道ID,0门市价 |
| batchList.*.price | int | Y | 2 | 改价参数,价格/平日 |
| batchList.*.weekend_price | int | Y | 3 | 改价参数,周末价格 |
| bool_weekend | int | Y | 1 | 是否改周末价;1: 是, 2: 否 |
| modify_price_method | int | Y | 2 | 改价方式;1: 指定金额, 2: 规则调价 |
| rule_basic_channel | int | Y | 1 | 规则-基准渠道 1门市2渠道 |
| rule_operator_type | int | Y | 4 | 调价类型 1加, 2减, 3乘, 4除 |
| week_day | array | Y | [1, 3, 4, 6, 0] | 周几 |
| start_date | string | Y | "2025-09-30" | 开始日期 |
| end_date | string | Y | "2025-10-08" | 结束日期 |
- 返回结果
无
1.3 房价列表
- 接口地址
POST /v1/roomPrice/getPriceList- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 1 | pms-storeID |
| start_date | string | Y | "2025-09-26" | 日历开始时间,不能小于2年前 |
| end_date | string | Y | "2025-10-16" | 日历结束时间,不能大于2年后,时间间隔小于30天 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| id | int | 房型ID |
| name | string | 房型名称 |
| short_name | string | 房型简称 |
| price_type | int | 价格类型;10: 门市价, 20: 渠道价 |
| price | string | 价格 |
| weekend_price | string | 周末价格 |
| prices | object | 配置的价格 - 日期: 价格 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"id": 1,
"name": "日式简约双人大床房",
"short_name": "日式简约双人大床房111",
"price_type": 10,
"price": "100.00",
"weekend_price": "0.00",
"prices": {
"2025-10-01": "75.00",
"2025-10-02": "75.00",
"2025-10-04": "44.44",
"2025-10-06": "75.00",
"2025-10-08": "75.00",
"2025-10-05": "75.00"
}
},
{
"id": 2,
"name": "日式豪华双人大床房224",
"short_name": "大床房22411",
"price_type": 10,
"price": "99.00",
"weekend_price": "0.00",
"prices": {
"2025-10-01": "265.00",
"2025-10-02": "265.00",
"2025-10-04": "368.00",
"2025-10-05": "265.00",
"2025-10-06": "265.00",
"2025-10-08": "265.00"
}
}
]
}2. 改价记录
2.1 改价记录
- 接口地址
POST /v1/roomPrice/changeRecordList- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 1 | pms-storeID |
| operator_date | array | N | ["2025-02-19", "2025-02-20"] | 操作日期 |
| price_date | array | N | ["2025-01-01", "2025-10-24"] | 价格日期 |
| room_type_ids | array | N | [1] | 房型ID |
| modify_price_method | int | N | 2 | 改价方式;1: 指定金额, 2: 规则调价 |
| operator_ids | array | N | [1] | 操作人ID |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| id | int | 改价记录ID |
| pms_id | int | pms-storeID |
| channel_id | int | 渠道ID |
| channel_name | string | 渠道名称 |
| local_from_shortname | string | 房型名称 |
| channel_from_shortname | string | 渠道房型名称 |
| dates | array | 价格日期 |
| week_day_json | array | 周几集合 |
| week_day_name | string | 周几名称 |
| modify_price_method | int | 改价方式;1: 指定金额, 2: 规则调价 |
| modify_price_method_name | string | 改价方式名称 |
| bool_weekend | int | 是否区分周末;1: 是, 2: 否 |
| rule_basic_channel | int | 基础渠道;1: 门市价, 2: 渠道价 |
| rule_basic_channel_name | string | 基础渠道名称 |
| rule_operator_type | int | 调价类型;1: 加, 2: 减, 3: 乘, 4: 除 |
| rule_operator_type_name | string | 调价类型名称 |
| price | string | 改价参数,价格/平日 |
| weekend_price | string | 改价参数,周末 |
| operator | string | 操作人 |
| created_at | string | 操作时间 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"page_no": 1,
"page_size": 25,
"total": 7,
"pages": 1,
"list": [
{
"id": 19,
"pms_id": 1,
"channel_id": 0,
"channel_name": "门市价",
"local_from_shortname": "大床房",
"channel_from_shortname": "",
"dates": [
"2025-10-01 至 2025-10-02",
"2025-10-04 至 2025-10-06",
"2025-10-08 至 2025-10-08"
],
"week_day_json": [1, 3, 4, 6, 0],
"week_day_name": "周一、周三、周四、周六、周日",
"modify_price_method": 2,
"modify_price_method_name": "规则调价",
"bool_weekend": 1,
"rule_basic_channel": 1,
"rule_basic_channel_name": "门市价",
"rule_operator_type": 4,
"rule_operator_type_name": "除以",
"price": "2.00",
"weekend_price": "3.00",
"operator": "biaobiao1",
"created_at": "2025-02-20 16:52:51"
}
]
}
}2.2 改价记录明细
- 接口地址
POST /v1/roomPrice/changeRecordPrice- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| page_no | int | N | 1 | 页码;默认1 |
| page_size | int | N | 25 | 每页数量;默认25 |
| pms_id | int | Y | 1 | pms-storeID |
| record_id | int | Y | 1 | 改价记录ID |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"page_no": 1,
"page_size": 3,
"total": 5,
"pages": 2,
"list": []
}
}2.3 查询指定时间范围内的每天房价
- 接口地址
POST /api/v1/roomPrice/queryPrice- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 1 | 酒店ID |
| accoms | array | Y | [] | 房间住宿信息数组 |
| accoms.*.room_id | int | Y | 19 | 房间ID |
| accoms.*.start_date | int | Y | 1709510400 | 开始日期时间戳 |
| accoms.*.end_date | int | Y | 1709596800 | 结束日期时间戳 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| data | array | 房间价格数据列表 |
| data.*.room_id | int | 房间ID |
| data.*.daily_prices | array | 每日房价数据列表 |
| data..daily_prices..date | string | 日期,格式:YYYY-MM-DD |
| data..daily_prices..price | float | 房价 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": [
{
"room_id": 19,
"daily_prices": [
{
"date": "2025-03-03",
"price": "100.00"
},
{
"date": "2025-03-04",
"price": "100.00"
}
]
}
]
}2.4 获取指定日期房价
- 接口地址
POST /api/v1/roomPrice/getPriceByDates- 请求参数
| 名称 | 类型 | 是否必需 | 示例 | 描述 |
|---|---|---|---|---|
| pms_id | int | Y | 1 | 酒店ID |
| room_type_id | int | Y | 3 | 房型ID |
| dates | array | Y | [] | 日期列表 |
| dates.*.date | string | Y | "2025-09-30" | 日期,格式:YYYY-MM-DD |
| channel_id | int | Y | 0 | 渠道ID 门市价:0 |
- 返回结果
| 名称 | 类型 | 描述 |
|---|---|---|
| data | object | 返回数据 |
| data.room_type_id | int | 房型ID |
| data.channel_id | int | 渠道ID |
| data.price_list | array | 价格列表 |
| data.price_list.*.date | string | 日期,格式:YYYY-MM-DD |
| data.price_list.*.price | float | 房价 |
| data.price_list.*.is_weekend | bool | 是否周末 |
- 返回示例
json
{
"error_code": 0,
"description": "success",
"error_msg": "success",
"data": {
"room_type_id": 3,
"channel_id": 0,
"price_list": [
{
"date": "2025-09-30",
"price": "12000.00",
"is_weekend": false
},
{
"date": "2025-10-01",
"price": "12000.00",
"is_weekend": false
},
{
"date": "2025-10-02",
"price": "12000.00",
"is_weekend": false
}
]
}
}