Skip to content

PMS住宿设置

房型房间设置

获取房型列表

  • 接口地址
POST /api/v1/pmsRoom/getRoomTypeList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
  • 返回结果
名称类型描述
pms_idintpms-storeID
room_type_idint房型ID
namestring房型名称
short_namestring房型简称
price_typeint门市开关类型 10不区分 20区分平日、周末
pricestring每日价格/平日价格
weekend_pricestring周末价格 price_type=20必填
room_countint房间数量
room_listarray房间列表
room_list.*.room_idint房间ID
room_list.*.sortint排序值
room_list.*.room_namestring房间名称
room_list.*.sub_roomsarray子房间列表
room_list..sub_rooms..sub_room_nostring子房间号
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "pms_id": 2,
                "name": "日式简约双人大床房",
                "short_name": "大床房",
                "price_type": 10,
                "price": "100.00",
                "weekend_price": "0.00",
                "room_list": [
                    {
                        "room_id": 19,
                        "sort": 1,
                        "room_name": "101",
                        "sub_rooms": [
                            {
                                "sub_room_no": "A"
                            }
                        ]
                    },
                    {
                        "room_id": 20,
                        "sort": 2,
                        "room_name": "102",
                        "sub_rooms": [
                            {
                                "sub_room_no": "A"
                            }
                        ]
                    }
                ],
                "room_type_id": 3,
                "room_count": 0
            }
        ],
        "total": 1,
        "page_no": 1,
        "page_size": 10,
        "room_count_limit": 20,
        "room_count_used": 10
    }
}

创建房型

  • 接口地址
POST /api/v1/pmsRoom/addRoomType
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
namestringY"日式简约双人大床房"房型名称
short_namestringY"大床房"房型简称
price_typestringY"10"门市开关类型 10不区分 20区分平日、周末
pricestringY"100.00"每日价格/平日价格
weekend_pricestringN"120.00"周末价格 price_type=20必填
room_listarrayY[]房间列表
room_list.*.room_namestringY"101"房间名称
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新房型

  • 接口地址
POST /api/v1/pmsRoom/updateRoomType
  • 请求参数
名称类型是否必需示例描述
room_type_idintY3房型ID
namestringY"日式简约双人大床房"房型名称
short_namestringY"大床房"房型简称
price_typeintY10门市开关类型 10不区分 20区分平日、周末
pricestringY"100.00"每日价格/平日价格
weekend_pricestringN"120.00"周末价格 price_type=20必填
room_listarrayY[]房间列表
room_list.*.room_idintN19房间ID 新增房间不需要携带
room_list.*.room_namestringY"101"房间名称
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

删除房型

  • 接口地址
POST /api/v1/pmsRoom/deleteRoomType
  • 请求参数
名称类型是否必需示例描述
room_type_idintY3房型ID
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新房间

  • 接口地址
POST /api/v1/pmsRoom/updateRoom
  • 请求参数
名称类型是否必需示例描述
room_idintY19房间ID
room_namestringN"101"房间名称
sortintN1排序值
is_dirtyintN2是否脏房 2否 1是
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新房型排序

  • 接口地址
POST /api/v1/pmsRoom/updateRoomTypeSort
  • 请求参数
名称类型是否必需示例描述
room_type_listarrayY[]房型列表
room_type_list.*.room_type_idintY3房型ID
room_type_list.*.sortintY1排序值
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

获取房型Select列表

  • 接口地址
POST /api/v1/pmsRoom/getRoomTypeSelect
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
typesarrayN[1, 2]房型类型 1:房型 2:包栋 例子[1,2] 不传默认是为:1
  • 返回结果
名称类型描述
room_type_idint房型ID
namestring房型名称
sortint排序值
form_typeint房型类型 1:房型 2:包栋
pricestring门市价格
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "room_type_id": 3,
            "name": "日式简约双人大床房",
            "sort": 1,
            "form_type": 1,
            "price": "100.00"
        },
        {
            "room_type_id": 10,
            "name": "日式简约双人大床房22",
            "sort": 1,
            "form_type": 1,
            "price": "100.00"
        }
    ]
}

下载房型导入模板

  • 接口地址
POST /api/v1/pmsRoom/downloadTemplate
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {
        "url": "http://example.com/storage/templates/导入房型模板.xlsx"
    }
}

导入房型

  • 接口地址
POST /api/v1/pmsRoom/importRoomType
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
filefileY-Excel文件,格式如下:
房型名称|简称|价格|周末价格|排序|房间号(多个用逗号分隔)
标准双人房|双人房|140|140|1|101,102,103
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {
        "success_count": 2,
        "error_rows": [
            {
                "row": 2,
                "error": "房型名称、简称和价格为必填项"
            }
        ]
    }
}
  • 错误说明
错误信息描述
房型名称、简称和价格为必填项Excel文件中这些字段不能为空
房型名称已存在同一个 PMS 下不能有重复的房型名称

更新房间排序

  • 接口地址
POST /api/v1/pmsRoom/updateRoomSort
  • 请求参数
名称类型是否必需示例描述
room_listarrayY[]房间列表
room_list.*.room_idintY19房间ID
room_list.*.sortintY1排序值
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

钟点房设置

获取可选房型列表

  • 接口地址
POST /api/v1/pmsRoom/getRoomTypeSelectList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
search_strstringN"关键字"搜索关键字
hour_idintN1钟点房ID 编辑时可填
  • 返回结果
名称类型描述
room_type_idint房型ID
namestring房型名称
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "room_type_id": 3,
            "name": "日式简约双人大床房"
        }
    ]
}

添加钟点房

  • 接口地址
POST /api/v1/pmsRoom/addHourRoom
  • 请求参数
名称类型是否必需示例描述
room_type_idintY3房型ID
start_hhintY2起步时长1~24
start_pricestringY"100.00"起步价格
unit_hhintY1单位时长1~24
unit_pricestringY"50.00"单位价格
max_hhintY24最大时长1~24
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新钟点房

  • 接口地址
POST /api/v1/pmsRoom/updateHourRoom
  • 请求参数
名称类型是否必需示例描述
hour_idintY1钟点房ID
room_type_idintY3房型ID
start_hhintY2起步时长1~24
start_pricestringY"100.00"起步价格
unit_hhintY1单位时长1~24
unit_pricestringY"50.00"单位价格
max_hhintY24最大时长1~24
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

删除钟点房

  • 接口地址
POST /api/v1/pmsRoom/deleteHourRoom
  • 请求参数
名称类型是否必需示例描述
hour_idintY1钟点房ID
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

获取钟点房列表

  • 接口地址
POST /api/v1/pmsRoom/getHourRoomList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
page_nointN1页码
page_sizeintN10每页数量
search_strstringN"关键字"搜索关键字
  • 返回结果
名称类型描述
pms_idintpms-storeID
room_type_idint房型ID
room_type_namestring房型名称
start_hhint起步时长
start_pricestring起步价格
unit_hhint单位时长
unit_pricestring单位价格
max_hhint最大时长
hour_idint钟点房ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "pms_id": 2,
                "room_type_id": 6,
                "start_hh": 10,
                "start_price": "100.00",
                "unit_hh": 2,
                "unit_price": "50.00",
                "max_hh": 24,
                "hour_id": 3,
                "room_type_name": "日式简约双人大床房1"
            }
        ],
        "total": 1,
        "page_no": 1,
        "page_size": 10
    }
}

包栋设置

添加包栋

  • 接口地址
POST /api/v1/pmsBuilding/add
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
namestringY"包栋名称"包栋名称
short_namestringY"包栋简称"包栋简称
price_typestringY"10"门市开关类型 10不区分 20区分平日、周末
pricestringY"100.00"每日价格/平日价格
weekend_pricestringN"120.00"周末价格 price_type=20必填
room_listarrayY[]房型列表
room_list.*.room_idintY19房间ID
room_list.*.ratiointY50房间价格比例 1-99
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新包栋

  • 接口地址
POST /api/v1/pmsBuilding/update
  • 请求参数
名称类型是否必需示例描述
building_idintY1包栋ID
namestringY"包栋名称"包栋名称
short_namestringY"包栋简称"包栋简称
price_typestringY"10"门市开关类型 10不区分 20区分平日、周末
pricestringY"100.00"每日价格/平日价格
weekend_pricestringN"120.00"周末价格 price_type=20必填
room_listarrayY[]房型列表
room_list.*.room_idintY19房间ID
room_list.*.ratiointY50房间价格比例 1-99
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

删除包栋

  • 接口地址
POST /api/v1/pmsBuilding/delete
  • 请求参数
名称类型是否必需示例描述
building_idintY1包栋ID
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

获取包栋列表

  • 接口地址
POST /api/v1/pmsBuilding/list
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
page_nointN1页码
page_sizeintN10每页数量
search_strstringN"关键字"搜索关键字
  • 返回结果
名称类型描述
pms_idintpms-storeID
namestring包栋名称
short_namestring包栋简称
price_typestring门市开关类型 10不区分 20区分平日、周末
pricestring每日价格/平日价格
weekend_pricestring周末价格 price_type=20必填
room_listarray房型列表
room_list.*.room_idint房间ID
room_list.*.ratioint房间价格比例 1-99
room_list.*.room_namestring房间名称
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "pms_id": 2,
                "name": "包栋名称",
                "short_name": "包栋简称",
                "price_type": 10,
                "price": "100.00",
                "weekend_price": "0.00",
                "created_at": "2025-02-18T11:59:21.000000Z",
                "updated_at": "2025-02-18T11:59:21.000000Z",
                "building_id": 1,
                "building_list": [
                    {
                        "room_id": 19,
                        "ratio": 1,
                        "room_name": "日式简约双人大床房-101"
                    }
                ]
            }
        ],
        "total": 1,
        "page_no": 1,
        "page_size": 10
    }
}

早餐设置

添加早餐

  • 接口地址
POST /api/v1/pmsBreakfast/add
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
namestringY"早餐名称"早餐名称
price_typeintY10计价方式 10:单独计价 20:房费包含
pricestringY"100.00"价格
business_typeintY10营业归属 10:住宿 20:餐饮
charge_modeintN20抛账模式 10:扣除前一天房费 20:扣除当天房费
restaurant_idintN1归宿餐厅ID business_type=20必填
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新早餐

  • 接口地址
POST /api/v1/pmsBreakfast/update
  • 请求参数
名称类型是否必需示例描述
breakfast_idintY1早餐ID
namestringN"早餐名称"早餐名称
price_typeintN10计价方式 10:单独计价 20:房费包含
pricestringN"100.00"价格
business_typeintN10营业归属 10:住宿 20:餐饮
charge_modeintN20抛账模式 10:扣除前一天房费 20:扣除当天房费
restaurant_idintN1归宿餐厅ID business_type=20必填
statusintN1状态 1:启用 2:禁用
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

获取早餐列表

  • 接口地址
POST /api/v1/pmsBreakfast/list
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
page_nointN1页码
page_sizeintN10每页数量
search_strstringN"关键字"搜索关键字
  • 返回结果
名称类型描述
pms_idintpms-storeID
namestring早餐名称
price_typeint计价方式 10:单独计价 20:房费包含
pricestring价格
business_typeint营业归属 10:住宿 20:餐饮
charge_modeint抛账模式 10:扣除前一天房费 20:扣除当天房费
restaurant_idint归宿餐厅ID business_type=20必填
restaurant_namestring归宿餐厅名称
breakfast_idint早餐ID
statusint状态 1:启用 2:禁用
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "pms_id": 2,
                "name": "早餐名称",
                "price_type": 10,
                "charge_mode": 20,
                "price": "100.00",
                "business_type": 10,
                "restaurant_id": 0,
                "status": 1,
                "breakfast_id": 1
            }
        ],
        "total": 1,
        "page_no": 1,
        "page_size": 10
    }
}

删除早餐

  • 接口地址
POST /api/v1/pmsBreakfast/delete
  • 请求参数
名称类型是否必需示例描述
breakfast_idintY1早餐ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

消费项设置

添加消费项分组

  • 接口地址
POST /api/v1/pmsConsume/addGroup
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
namestringY"分组名称"分组名称
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新消费项分组

  • 接口地址
POST /api/v1/pmsConsume/updateGroup
  • 请求参数
名称类型是否必需示例描述
consume_group_idintY1分组ID
namestringN"分组名称"分组名称
sortintN1排序值
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

删除消费项分组

  • 接口地址
POST /api/v1/pmsConsume/deleteGroup
  • 请求参数
名称类型是否必需示例描述
consume_group_idintY1分组ID
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新消费排序

  • 接口地址
POST /api/v1/pmsConsume/updateConsumeSort
  • 请求参数
名称类型是否必需示例描述
consume_listarrayY[]消费项列表
consume_list.*.consume_idintY1消费项ID
consume_list.*.sortintY1排序值
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

获取消费项分组列表

  • 接口地址
POST /api/v1/pmsConsume/getGroupList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
  • 返回结果
名称类型描述
pms_idintpms-storeID
consume_group_idint分组ID
namestring分组名称
sortint排序值
is_defaultint是否默认 1是 2否
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "pms_id": "2",
            "name": "其他",
            "sort": 0,
            "is_default": 1,
            "consume_group_id": 1
        },
        {
            "pms_id": "2",
            "name": "支出",
            "sort": 0,
            "is_default": 1,
            "consume_group_id": 2
        }
    ]
}

获取消费类别

  • 接口地址
POST /api/v1/pmsConsume/getCategory
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pmsId
search_strstringN"关键字"搜索关键字
  • 返回结果
名称类型描述
consume_group_idint分组ID
namestring分组名称
consume_listarray消费项列表
consume_list.*.consume_idint消费项ID
consume_list.*.namestring消费项名称
consume_list.*.pricestring价格
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "consume_group_id": 1,
            "name": "其他",
            "consume_list": []
        },
        {
            "consume_group_id": 2,
            "name": "支出",
            "consume_list": [
                {
                    "consume_id": 2,
                    "name": "酒水",
                    "price": "100.00"
                }
            ]
        }
    ]
}

更新消费分组排序

  • 接口地址
POST /api/v1/pmsConsume/updateConsumeGroupSort
  • 请求参数
名称类型是否必需示例描述
consume_group_listarrayY[]消费分组列表
consume_group_list.*.consume_group_idintY1分组ID
consume_group_list.*.sortintY1排序值
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

添加消费项

  • 接口地址
POST /api/v1/pmsConsume/addConsume
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
group_idintY1分组ID
namestringY"消费项名称"消费项名称
pricestringY"100.00"价格
owner_typeintY10业主归属 10:住宿 20:餐饮 30:商超
restaurant_idintN1归宿餐厅ID owner_type=20必填
supermarket_idintN1归宿商超ID owner_type=30必填
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

更新消费项

  • 接口地址
POST /api/v1/pmsConsume/updateConsume
  • 请求参数
名称类型是否必需示例描述
consume_idintY1消费项ID
group_idintN1分组ID
namestringN"消费项名称"消费项名称
pricestringN"100.00"价格
owner_typeintN10业主归属 10:住宿 20:餐饮 30:商超
restaurant_idintN1归宿餐厅ID owner_type=20必填
supermarket_idintN1归宿商超ID owner_type=30必填
statusintN1状态 1:启用 2:禁用
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

删除消费项

  • 接口地址
POST /api/v1/pmsConsume/deleteConsume
  • 请求参数
名称类型是否必需示例描述
consume_idintY1消费项ID
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

获取消费项列表

  • 接口地址
POST /api/v1/pmsConsume/getConsumeList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
page_nointN1页码
page_sizeintN10每页数量
search_strstringN"关键字"搜索关键字
  • 返回结果
名称类型描述
pms_idintpms-storeID
consume_idint消费项ID
group_idint分组ID
namestring消费项名称
pricestring价格
owner_typeint业主归属 10:住宿 20:餐饮 30:商超
restaurant_idint归宿餐厅ID owner_type=20必填
supermarket_idint归宿商超ID owner_type=30必填
statusint状态 1:启用 2:禁用
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "pms_id": "2",
                "group_id": 2,
                "name": "酒水",
                "price": "100.00",
                "owner_type": 10,
                "restaurant_id": "0",
                "supermarket_id": "0",
                "status": 1,
                "group_name": "支出",
                "consume_id": 2
            }
        ],
        "total": 1,
        "page_no": 1,
        "page_size": 10
    }
}

房价分组设置

更新房间分组设置

  • 接口地址
POST /api/v1/pmsGroup/update
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
groupListarrayY[]分组列表
groupList.*.group_idintN/Y1分组ID 有就填,没就不要填,新增分组是没有此参数的,只在编辑已有的分组中存在
groupList.*.namestringY"分组名称"分组名称
groupList.*.room_listarrayY[]房型列表
groupList..room_list..room_idintY19房价ID
groupList..room_list..sortintY1排序值
  • 返回示例
json
{
    "error_code": 0,
    "error_msg": "",
    "description": "",
    "data": {}
}

获取房间分组数据

  • 接口地址
POST /api/v1/pmsGroup/getGroupData
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
  • 返回结果
名称类型描述
group_listarray分组列表
group_list.*.group_idint分组ID
group_list.*.group_namestring分组名称
group_list.*.room_listarray房间列表
group_list..room_list..room_idint房间ID
group_list..room_list..room_namestring房间名称
group_list..room_list..sortint排序值
group_list..room_list..room_type_namestring房型名称
default_group_room_listarray未分组列表
default_group_room_list.*.room_idint房间ID
default_group_room_list.*.room_type_namestring房型名称
default_group_room_list.*.room_namestring房间名称
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "group_list": [
            {
                "group_id": 34,
                "group_name": "分组1",
                "room_list": []
            },
            {
                "group_id": 35,
                "group_name": "分组2",
                "room_list": []
            },
            {
                "group_id": 36,
                "group_name": "分组3",
                "room_list": [
                    {
                        "room_id": 20,
                        "room_type_name": "日式简约双人大床房",
                        "room_name": "102",
                        "sort": 1
                    }
                ]
            }
        ],
        "default_group_list": [
            {
                "room_id": 19,
                "room_type_name": "日式简约双人大床房",
                "room_name": "101"
            },
            {
                "room_id": 21,
                "room_type_name": "日式简约双人大床房1",
                "room_name": "1011"
            }
        ]
    }
}

获取所有分组Select列表

  • 接口地址
POST /api/v1/pmsGroup/getGroupSelectList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
  • 返回结果
名称类型描述
group_idint分组ID
group_namestring分组名称
sortint排序值
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "group_id": 1,
            "group_name": "未分组房间",
            "sort": 0
        },
        {
            "group_id": 2,
            "group_name": "参数",
            "sort": 0
        }
    ]
}

更新分组排序

  • 接口地址
POST /api/v1/pmsGroup/updateGroupSort
  • 请求参数
名称类型是否必需示例描述
group_listarrayY[]分组列表
group_list.*.group_idintY1分组ID
group_list.*.sortintY1排序值
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

订单盒子设置

添加订单盒子标签

  • 接口地址
POST /api/v1/pmsRoomOrder/addOrderBoxTag
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
namestringY"标签名称"标签名称
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

更新订单盒子标签

  • 接口地址
POST /api/v1/pmsRoomOrder/updateOrderBoxTag
  • 请求参数
名称类型是否必需示例描述
tag_idintY1标签ID
namestringN"标签名称"标签名称 注意默认标签不允许修改
sortintN1排序值
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

删除订单盒子标签

  • 接口地址
POST /api/v1/pmsRoomOrder/deleteOrderBoxTag
  • 请求参数
名称类型是否必需示例描述
tag_idintY1标签ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

获取订单盒子标签select列表

  • 接口地址
POST /api/v1/pmsRoomOrder/getOrderBoxTagSelectList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
  • 返回结果
名称类型描述
pms_idintpms-storeID
namestring标签名称
is_defaultint是否默认 1是 2否
sortint排序值
tag_idint标签ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "pms_id": 2,
            "name": "冲突",
            "is_default": 1,
            "sort": 0,
            "tag_id": 1
        },
        {
            "pms_id": 2,
            "name": "刷单",
            "is_default": 1,
            "sort": 0,
            "tag_id": 2
        }
    ]
}

门锁设置

添加设备(由APP对接)

  • 接口地址
POST /api/v1/pmsDevice/addDevice
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
device_nostringY/N"TMD5991"设备编号 lock_info.lock_type===10必填
typeintY10设备类型 10:智能锁
lock_infoobjectY/N{}锁信息 type===10必填写
lock_info.lock_scene_typeintY1锁场景类型 1: PMS门锁 2: 分区门锁,3:楼栋门锁,4:楼层门锁,5:房间门锁,6:子房间门锁
lock_info.lock_typeintY10锁类型 10:密码锁 20:门卡锁
lock_info.has_gatewayintY/N1是否有网关 1:有 2:无 lock_type===10必填
lock_info.area_idintN1分区ID lock_scene_type===2: 分区门锁,3:楼栋门锁,4:楼层门锁,5:房间门锁,6:子房间门锁必填
lock_info.building_idintN6楼栋ID lock_scene_type===3:楼栋门锁,4:楼层门锁,5:房间门锁,6:子房间门锁必填
lock_info.floor_idintN91楼层ID lock_scene_type===4:楼层门锁,5:房间门锁,6:子房间门锁必填
lock_info.room_idintN19房间ID lock_scene_type===5:房间门锁,6:子房间门锁必填
lock_info.sub_room_nostringN"A"子房间号 lock_scene_type===6:子房间门锁必填
  • 返回结果
名称类型描述
device_idint设备ID
device_nostring设备编号
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "device_id": 1,
        "device_no": ""
    }
}

删除设备(由APP接入)

  • 接口地址
POST /api/v1/pmsDevice/deleteDevice
  • 请求参数
名称类型是否必需示例描述
device_idintY1设备ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

获取设备列表(web接入)

  • 接口地址
POST /api/v1/pmsDevice/getDeviceList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
typeintN10设备类型 10:智能锁
lock_typeintN10锁类型 10:密码锁 20:门卡锁 需前置type===10参数配合查询
page_nointN1页码
page_sizeintN10每页数量
search_strstringN"关键字"搜索关键字
  • 返回结果
名称类型描述
device_idint设备ID
device_nostring设备编号
device_namestring设备名称
typeint设备类型 10:智能锁
type_namestring设备类型名称
lock_infoobject锁信息
lock_info.room_full_namestring房间全称
lock_info.lock_typeint锁类型 10:密码锁 20:门卡锁
lock_info.has_gatewayint是否有网关 1:有 2:无
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "device_id": 1,
                "device_no": "TMD5991",
                "device_name": "老房-1103",
                "type": 10,
                "type_name": "智能锁",
                "lock_info": {
                    "room_full_name": "老房-1103",
                    "lock_type": 20,
                    "has_gateway": 2
                }
            }
        ],
        "total": 1,
        "page_no": 1,
        "page_size": 10
    }
}

更新门锁

  • 接口地址
POST /api/v1/pmsDevice/updateDevice
  • 请求参数
名称类型是否必需示例描述
device_idintY1设备ID
device_nostringN"TMD5991"设备编号
lock_infoobjectN{}锁信息
lock_info.has_gatewayintN1是否有网关 1:有 2:无
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

生成关联场景

  • 接口地址
POST /api/v1/pmsDevice/generateScene
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
typeintY1获取关联层级 1:分区 2:分区至楼栋 3:分区至楼栋至楼层
  • 返回结果
名称类型描述
valueint关联ID
labelstring关联名称
childrenarray子级列表
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "value": 2,
            "label": "默认分区",
            "children": [
                {
                    "value": 6,
                    "label": "A栋",
                    "children": [
                        {
                            "value": 91,
                            "label": "001"
                        }
                    ]
                }
            ]
        }
    ]
}

楼栋设置

添加楼栋

  • 接口地址
POST /api/v1/pmsBuilding/addBuilding
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
area_idintY1分区ID
building_namestringY"A栋"楼栋名称
floor_start_nostringY"001"楼层初始号
floor_numintY6楼层总数量
  • 返回结果
名称类型描述
building_idint楼栋ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "building_id": 1
    }
}

更新楼栋

  • 接口地址
POST /api/v1/pmsBuilding/updateBuilding
  • 请求参数
名称类型是否必需示例描述
building_idintY1楼栋ID
area_idintN1分区ID
building_namestringN"A栋"楼栋名称
floor_listarrayN[]楼层列表
floor_list.*.floor_idintN/Y91楼层ID 存在即更新 不存在即新添加
floor_list.*.floor_nostringY"001"楼层号 仅限于数字
  • 返回结果
名称类型描述
building_idint楼栋ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "building_id": 1
    }
}

获取楼栋列表

  • 接口地址
POST /api/v1/pmsBuilding/listBuilding
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
page_nointN1页码
page_sizeintN10每页数量
  • 返回结果
名称类型描述
building_idint楼栋ID
building_namestring楼栋名称
lock_infoobject锁信息
lock_info.lock_idint锁lockId
lock_info.device_nostring锁编号
area_idint分区ID
area_namestring分区名称
floor_listarray楼层列表
floor_list.*.floor_idint楼层ID
floor_list.*.floor_nostring楼层号
floor_list.*.lock_infoobject锁信息
floor_list.*.lock_info.lock_idint锁lockId
floor_list.*.lock_info.device_nostring锁编号
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "building_name": "B栋",
                "building_id": 5,
                "area_id": 1,
                "area_name": "宝安区",
                "lock_info": {
                    "lock_id": 123,
                    "device_no": "ABC123"
                },
                "floor_list": [
                    {
                        "floor_id": 85,
                        "floor_no": "001",
                        "lock_info": {
                            "lock_id": 456,
                            "device_no": "DEF456"
                        }
                    }
                ]
            }
        ],
        "total": 1,
        "page_no": 1,
        "page_size": 10
    }
}

删除楼栋

  • 接口地址
POST /api/v1/pmsBuilding/deleteBuilding
  • 请求参数
名称类型是否必需示例描述
building_idintY1楼栋ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

分区设置

添加分区

  • 接口地址
POST /api/v1/pmsArea/add
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
area_namestringY"测试分区"分区名称
  • 返回结果
名称类型描述
area_idint分区ID
area_namestring分区名称
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "area_id": 1,
        "area_name": "测试分区"
    }
}

更新分区

  • 接口地址
POST /api/v1/pmsArea/update
  • 请求参数
名称类型是否必需示例描述
area_idintY1分区ID
area_namestringY"测试分区修改"分区名称
  • 返回结果
名称类型描述
area_idint分区ID
area_namestring分区名称
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "area_id": 1,
        "area_name": "测试分区修改"
    }
}

获取全部分区

  • 接口地址
POST /api/v1/pmsArea/getAllArea
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
  • 返回结果
名称类型描述
area_idint分区ID
area_namestring分区名称
buildings_countint楼栋数量
defaultint是否默认 1是 2否
lock_infoobject锁信息
lock_info.lock_idint锁lockId
lock_info.device_nostring锁编号
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "area_id": 2,
                "area_name": "默认分区",
                "buildings_count": 2,
                "default": 1,
                "lock_info": {
                    "lock_id": 1,
                    "device_no": "lock001"
                }
            }
        ]
    }
}

删除分区

  • 接口地址
POST /api/v1/pmsArea/delete
  • 请求参数
名称类型是否必需示例描述
area_idintY1分区ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

房间设置

关联房间到楼层

  • 接口地址
POST /api/v1/pmsRoom/linkRoomToFloor
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
floor_idintY91楼层ID
room_idintY19房间ID
child_room_nostringN"A"子房间号 可传 A~Z
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

删除房间关联

  • 接口地址
POST /api/v1/pmsRoom/deleteRoomLocation
  • 请求参数
名称类型是否必需示例描述
location_idintY1关联ID
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

获取房间关联列表

  • 接口地址
POST /api/v1/pmsRoom/getRoomLocationList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
building_idintN6楼栋ID
floor_idintN91楼层ID
room_idintN19房间ID
search_strstringN"关键字"搜索关键字
page_nointN1页码
page_sizeintN10每页数量
linked_statusintN0锁关联状态 0:全部 1:已关联 2:未关联
  • 返回结果
名称类型描述
location_idint关联ID
room_idint房间ID
room_namestring房间名称
room_type_namestring房型类型名称
area_idint分区ID
area_namestring分区名称
full_room_namestring房间全称
building_idint楼栋ID
building_namestring楼栋名称
floor_idint楼层ID
floor_namestring楼层名称
linked_statusint关联状态 1:已关联 2:未关联
lock_infoobject锁信息
lock_info.lock_idint锁lockId
lock_info.device_nostring锁编号
sub_room_locationsarray子房间列表
sub_room_locations.*.sub_room_idint子房间ID
sub_room_locations.*.sub_room_nostring子房间号
sub_room_locations.*.lock_infoobject锁信息
sub_room_locations.*.lock_info.lock_idint锁lockId
sub_room_locations.*.lock_info.device_nostring锁编号
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {
        "list": [
            {
                "location_id": 2,
                "room_id": 33,
                "room_name": "1102",
                "room_type_name": "单间",
                "area_id": 1,
                "area_name": "宝安区",
                "full_room_name": "老房-1102",
                "building_id": 6,
                "building_name": "A栋",
                "floor_id": 91,
                "floor_name": "001",
                "linked_status": 2,
                "sub_room_locations": [
                    {
                        "sub_room_id": 1,
                        "sub_room_no": "A",
                        "lock_info": {
                            "lock_id": 123,
                            "device_no": "ABC123"
                        }
                    }
                ]
            }
        ],
        "total": 2,
        "page_no": 1,
        "page_size": 10
    }
}

获取指定房间下的子房间列表

  • 接口地址
POST /api/v1/pmsRoom/getRoomChildrenList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
room_idintN19房间ID
  • 返回结果
名称类型描述
sub_room_idint子房间ID
sub_room_nostring子房间号
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "sub_room_id": 1,
            "sub_room_no": "A"
        },
        {
            "sub_room_id": 2,
            "sub_room_no": "B"
        }
    ]
}

第三方渠道

获取第三方渠道列表

  • 接口地址
POST /api/v1/channel/channelList
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
  • 返回结果
名称类型描述
channel_idint渠道ID
typeint渠道类型 1:OTA 2:第三方
type_namestring渠道类型名称
channel_typeint渠道类型 10:飞猪 20:携程 30:途家 40:美团酒店 50:小猪民宿 60:木鸟民宿
namestring渠道名称
iconstring渠道图标
sortint排序
protocol_urlstring协议地址
channel_infoobject渠道信息
channel_info.statusint状态 1:已开通 2:未开通 3:审核中 4:审核失败
channel_info.status_namestring状态名称
channel_info.expired_datestring过期时间
channel_info.connect_statusint连接状态 1:直连中 2:未直连
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": [
        {
            "channel_id": 1,
            "type": 1,
            "type_name": "OTA",
            "channel_type": 10,
            "name": "飞猪",
            "icon": "http://hotel.local.star-lock.cn/storage/channel/619a4acc-17a6-40cc-b762-c77134e29a05.png",
            "sort": 1,
            "protocol_url": "http://hotel.local.star-lock.cn/agreement/fj-notice",
            "channel_info": {}
        }
    ]
}

申请开通渠道

  • 接口地址
POST /api/v1/channel/applyOpen
  • 请求参数
名称类型是否必需示例描述
pms_idintY2pms-storeID
channel_idintY1渠道ID
namestringY"渠道名称"渠道名称
contactstringY"联系方式"联系人方式 手机号/邮箱/微信号/QQ号
  • 返回示例
json
{
    "error_code": 0,
    "description": "success",
    "error_msg": "success",
    "data": {}
}

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