获取房价接口

一、接口名称:

getRoomPriceDirect

二、接口说明:

该接口可以获取房价和采购价,根据传入的参数isGetPurchasePrice的值来返回不同信息,该值为true则返回采购价,否则返回渠道房价。
SalePriceChannel包含渠道:None、Ctrip、QunarAll、Qunar、QunarB、QunarD、QunarY、QunarT、B2B、Purchase、ChannelA、B2BOffline、B2BAll、Suggested

三、输入参数:

父节点 名称 编码 类型 必填 描述
请求信息 requestor RequestorType y
渠道 channel SalePriceChannel y
获取价格标识 isGetPurchasePrice boolean y 是否获取采购价,true:获取采购价,false获取房价。默认为获取房价
酒店id hotelId int y
房型id roomIds List y 一次不能超过30个房型
起始日期 startDate Calendar y
结束日期 endDate Calendar y

四、输入输出示例示例

1、获取渠道房价isGetPurchasePrice未设值,默认为false取房价,请求:

{
"requestor":{
"invoker":"100000595",
"operatorName":"MIPSERVICE",
"opClientIP":"",
"languageType":"ch"},
"channel":"Ctrip",
"hotelId":11326876,
"roomIds":[96818446],
"startDate":"/Date(1520352000000+0800)/",
"endDate":"/Date(1520352000000+0800)/"
}

返回:

{
    "ResponseStatus": {
        "Timestamp": "/Date(1516877769255+0800)/",
        "Ack": "Success",
        "Errors": [],
        "Build": null,
        "Version": "v1",
        "Extension": null
    },
    "resultStatus": {
        "resultCode": 0,
        "resultMsg": "success"
    },
    "channelRoomPrices": [
        {
            "channel": "Ctrip",
            "roomPrices": [
                {
                    "roomId": 96818446,
                    "effectDate": "/Date(1520352000000+0800)/",
                    "price": 150,  //房价: -100:不变;-1:删除
                    "breakfast": 1, // 早餐:-100:不变(已有房价记录则不变,新增记录则取defaultBreakfast);-1:删除
                    "tax": 0
                }
            ]
        }
    ],
    "roomPurchasePrices": null  //默认不返回采购价
}

2、取采购价,isGetPurchasePrice设值为True,请求:

{
    "requestor":{
        "invoker":"100000595",
        "operatorName":"MIPSERVICE",
        "opClientIP":"",
        "languageType":"ch"
    },
    "hotelId":11324964,
    "isGetPurchasePrice":true,//仅返回采购价
    "roomIds":[96816072],
    "startDate":"/Date(1517241600000+0800)/",
    "endDate":"/Date(1517846400000+0800)/"
}

返回:

{
    "ResponseStatus": {
        "Timestamp": "/Date(1517309691755+0800)/",
        "Ack": "Success",
        "Errors": [],
        "Build": null,
        "Version": "v1",
        "Extension": null
    },
    "resultStatus": {
        "resultCode": 0,
        "resultMsg": "success"
    },
    "channelRoomPrices": null,
    "roomPurchasePrices": [
        {
            "roomId": 96816072,
            "effectDate": "/Date(1517241600000+0800)/",
            "price": 11.11,
            "breakfast": 2,
            "tax": 0,
            "purchaseCode": null
        },
       ……
    ]
}

results matching ""

    No results matching ""