Skip to content

PMS房价设置

1. 修改房价

1.1 单个修改价格

  • 接口地址
POST /v1/roomPrice/changeSingle
  • 请求参数
名称类型是否必需示例描述
pms_idintY1pms-storeID
room_type_idintY1房型/包栋ID
channel_idintY0渠道ID,0门市价
start_datestringY"2025-02-20"开始日期
end_datestringY"2025-02-24"结束日期
priceintY399价格
  • 返回结果

1.2 批量改价

  • 接口地址
POST /v1/roomPrice/changeBatch
  • 请求参数
名称类型是否必需示例描述
pms_idintY1pms-storeID
batchListarrayY[]批量改价列表
batchList.*.room_type_idintY1房型/包栋ID
batchList.*.channel_idintY0渠道ID,0门市价
batchList.*.priceintY2改价参数,价格/平日
batchList.*.weekend_priceintY3改价参数,周末价格
bool_weekendintY1是否改周末价;1: 是, 2: 否
modify_price_methodintY2改价方式;1: 指定金额, 2: 规则调价
rule_basic_channelintY1规则-基准渠道 1门市2渠道
rule_operator_typeintY4调价类型 1加, 2减, 3乘, 4除
week_dayarrayY[1, 3, 4, 6, 0]周几
start_datestringY"2025-09-30"开始日期
end_datestringY"2025-10-08"结束日期
  • 返回结果

1.3 房价列表

  • 接口地址
POST /v1/roomPrice/getPriceList
  • 请求参数
名称类型是否必需示例描述
pms_idintY1pms-storeID
start_datestringY"2025-09-26"日历开始时间,不能小于2年前
end_datestringY"2025-10-16"日历结束时间,不能大于2年后,时间间隔小于30天
  • 返回结果
名称类型描述
idint房型ID
namestring房型名称
short_namestring房型简称
price_typeint价格类型;10: 门市价, 20: 渠道价
pricestring价格
weekend_pricestring周末价格
pricesobject配置的价格 - 日期: 价格
  • 返回示例
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_idintY1pms-storeID
operator_datearrayN["2025-02-19", "2025-02-20"]操作日期
price_datearrayN["2025-01-01", "2025-10-24"]价格日期
room_type_idsarrayN[1]房型ID
modify_price_methodintN2改价方式;1: 指定金额, 2: 规则调价
operator_idsarrayN[1]操作人ID
  • 返回结果
名称类型描述
idint改价记录ID
pms_idintpms-storeID
channel_idint渠道ID
channel_namestring渠道名称
local_from_shortnamestring房型名称
channel_from_shortnamestring渠道房型名称
datesarray价格日期
week_day_jsonarray周几集合
week_day_namestring周几名称
modify_price_methodint改价方式;1: 指定金额, 2: 规则调价
modify_price_method_namestring改价方式名称
bool_weekendint是否区分周末;1: 是, 2: 否
rule_basic_channelint基础渠道;1: 门市价, 2: 渠道价
rule_basic_channel_namestring基础渠道名称
rule_operator_typeint调价类型;1: 加, 2: 减, 3: 乘, 4: 除
rule_operator_type_namestring调价类型名称
pricestring改价参数,价格/平日
weekend_pricestring改价参数,周末
operatorstring操作人
created_atstring操作时间
  • 返回示例
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_nointN1页码;默认1
page_sizeintN25每页数量;默认25
pms_idintY1pms-storeID
record_idintY1改价记录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_idintY1酒店ID
accomsarrayY[]房间住宿信息数组
accoms.*.room_idintY19房间ID
accoms.*.start_dateintY1709510400开始日期时间戳
accoms.*.end_dateintY1709596800结束日期时间戳
  • 返回结果
名称类型描述
dataarray房间价格数据列表
data.*.room_idint房间ID
data.*.daily_pricesarray每日房价数据列表
data..daily_prices..datestring日期,格式:YYYY-MM-DD
data..daily_prices..pricefloat房价
  • 返回示例
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_idintY1酒店ID
room_type_idintY3房型ID
datesarrayY[]日期列表
dates.*.datestringY"2025-09-30"日期,格式:YYYY-MM-DD
channel_idintY0渠道ID 门市价:0
  • 返回结果
名称类型描述
dataobject返回数据
data.room_type_idint房型ID
data.channel_idint渠道ID
data.price_listarray价格列表
data.price_list.*.datestring日期,格式:YYYY-MM-DD
data.price_list.*.pricefloat房价
data.price_list.*.is_weekendbool是否周末
  • 返回示例
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
            }
        ]
    }
}

鑫泓佳智能硬件通信协议文档