路客云
  1. 静态信息
路客云
  • 客户端API
    • 静态信息
      • 保存房源
        POST
      • 房源下架
        POST
      • 保存门店
        POST
      • 门店发布
        POST
      • 门店预审核处理
        POST
    • 渠道
      • 飞猪
        • 渠道移除关联
  • 房型分组
    • 保存&同步渠道价格计划
      POST
  • 房型
    • 渠道房型同步
      POST
  • 其他
    • common获取接口
      POST
  1. 静态信息

保存房源

POST
/channelRoomCategory

请求参数

Header 参数
hudson-access-token
string 
必需
示例值:
{{token}}
Content-Type
string 
必需
示例值:
application/json
Body 参数application/json
channelRoomCategoryId
string 
必需
campId
null 
必需
roomCategoryId
null 
必需
channelId
null 
必需
accountId
null 
必需
poiId
null 
必需
rentType
string 
必需
productType
string 
必需
bedroomNum
integer 
必需
hallNum
string 
必需
kitchenNum
string 
必需
bathroomNum
string 
必需
ableArea
string 
必需
bedNum
integer 
必需
personCapacity
string 
必需
bathroomType
string 
必需
isInventoryLimited
string 
必需
inventory
string 
必需
name
string 
必需
description
string 
必需
aroundInfo
string 
必需
medias
object 
必需
mediaId
string 
必需
number
string 
图片归属类型位置
必需
description
string 
必需
type
string 
必需
bedMetas
array [object {3}] 
必需
roomNumber
integer 
必需
dictKey
string 
必需
value
string 
必需
metas
array [object {2}] 
必需
dictKey
string 
必需
value
string 
必需
示例
{
  "channelRoomCategoryId": "1527481295978340353",
  "campId": null,
  "roomCategoryId": null,
  "channelId": null,
  "accountId": null,
  "poiId": null,
  "rentType": "",
  "productType": "",
  "bedroomNum": 2,
  "hallNum": "",
  "kitchenNum": "",
  "bathroomNum": "",
  "ableArea": "",
  "bedNum": 11,
  "personCapacity": "13",
  "bathroomType": "",
  "isInventoryLimited": "",
  "inventory": "",
  "name": "",
  "description": "",
  "aroundInfo": "",
  "medias": null,
  "bedMetas": [
    {
      "roomNumber": 1,
      "dictKey": "41",
      "value": "{\"bedCount\":8,\"bedSizeIds\":[\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"]}"
    },
    {
      "roomNumber": 2,
      "dictKey": "40",
      "value": "{\"bedCount\":1,\"bedSizeIds\":[\"1\"]}"
    },
    {
      "roomNumber": 2,
      "dictKey": "41",
      "value": "{\"bedCount\":2,\"bedSizeIds\":[\"1\",\"1\"]}"
    }
  ],
  "metas": [
    {
      "dictKey": "36",
      "value": "1"
    },
    {
      "dictKey": "41",
      "value": "{\"bedCount\":10,\"bedSizeIds\":[0,0,0,0,0,0,0,0,1,1]}"
    },
    {
      "dictKey": "40",
      "value": "{\"bedCount\":1,\"bedSizeIds\":[\"1\"]}"
    },
    {
      "dictKey": "53",
      "value": "#民宿是您旅途中的家,也是房东用心打造的家,请像爱护自己家一样爱护它哟。谢谢~#\n1、入住后请注意噪音问题,避免打扰到邻居;\n2、应公安部门要求,所有入住人均需办理入住登记;\n\n4、轰趴派对和商业拍摄用途,预订前需明确说明,入住后发现则房东有权取消订单;\n5、请支持环保爱地球,离开房间前请关灯关空调;\n6、为了大家的健康和安全,室内禁止吸烟,禁止使用蜡烛或烟火;\n7、禁止黄赌毒!"
    },
    {
      "dictKey": "173",
      "value": "5"
    }
  ]
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://hudson-dev.localhome.cn/channelRoomCategory' \
--header 'hudson-access-token: 4266fea25ef44b61a435bb5944e392ac' \
--header 'hudson-access-token;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "channelRoomCategoryId": "1527481295978340353",
    "campId": null,
    "roomCategoryId": null,
    "channelId": null,
    "accountId": null,
    "poiId": null,
    "rentType": "",
    "productType":"",
    "bedroomNum": 2,
    "hallNum": "",
    "kitchenNum": "",
    "bathroomNum": "",
    "ableArea": "",
    "bedNum": 11,
    "personCapacity": "13",
    "bathroomType": "",
    "isInventoryLimited": "",
    "inventory": "",
    "name": "",
    "description": "",
    "aroundInfo": "",
    "medias": null,
    "bedMetas": [
        {
            "roomNumber": 1,
            "dictKey": "41",
            "value": "{\"bedCount\":8,\"bedSizeIds\":[\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"]}"
        },
        {
            "roomNumber": 2,
            "dictKey": "40",
            "value": "{\"bedCount\":1,\"bedSizeIds\":[\"1\"]}"
        },
        {
            "roomNumber": 2,
            "dictKey": "41",
            "value": "{\"bedCount\":2,\"bedSizeIds\":[\"1\",\"1\"]}"
        }
    ],
    "metas": [
        {
            "dictKey": "36",
            "value": "1"
        },
        {
            "dictKey": "41",
            "value": "{\"bedCount\":10,\"bedSizeIds\":[0,0,0,0,0,0,0,0,1,1]}"
        },
        {
            "dictKey": "40",
            "value": "{\"bedCount\":1,\"bedSizeIds\":[\"1\"]}"
        },
        {
            "dictKey": "53",
            "value": "#民宿是您旅途中的家,也是房东用心打造的家,请像爱护自己家一样爱护它哟。谢谢~#\n1、入住后请注意噪音问题,避免打扰到邻居;\n2、应公安部门要求,所有入住人均需办理入住登记;\n\n4、轰趴派对和商业拍摄用途,预订前需明确说明,入住后发现则房东有权取消订单;\n5、请支持环保爱地球,离开房间前请关灯关空调;\n6、为了大家的健康和安全,室内禁止吸烟,禁止使用蜡烛或烟火;\n7、禁止黄赌毒!"
        },
        {
            "dictKey":"173",
            "value":"5"
        }
    ]
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{}
下一页
房源下架
Built with