V2 0/longtour/get pack free bydate

来自技术开发小组内部wiki
跳转至: 导航搜索

功能说明

获取长线游(自由行)选定方案

URL

http://[域名]/v2/longtour/get_pack_free_bydate

返回格式

支持json,xml.通过format参数来控制

HTTP请求方式

POST.可以post的数据为xml或json.

输入参数说明

各个参数请进行URL 编码,编码时请遵守 RFC 1738
(1)公共参数
发送请求时必须传入公共参数,详见公共参数说明。
(2)私有参数
参数名称 是否必须 类型 描述
date
必须
date 出行日期,yyyy-mm-dd格式
version
必须
string 客户端版本
adult_num
必须
int 成人数
child_num
必须
int
儿童数
product_id
必须
int
产品id

请求示例

正式环境
http://api.fumubang.com/v2_0/longtour/get_pack_free_bydate
测试环境
http://api.fumubang.net/v2_0/longtour/get_pack_free_bydate
本地环境
http://dev-api.fumubang.net/v2_0/longtour/get_pack_free_bydate

返回参数说明

参数 说明
pack_hotel_arr
打包酒店列表
info_id
打包详细id
package_id
打包id
day_of_trip
旅行第n天
days_of_trip
旅行花费(耗时)天数
day_of_trip2
旅行第几天(返程)
days_of_trip2
旅行花费(耗时)天数(返程)
type_name
产品类型
room_id
房型id
room_name
房型名称
head_pic
房型头图
images
酒店图片id
hotel_banner
酒店图片地址
bed_types
床型列表(注:取room_data下的床型)
type
床型-类型
other_type
其他类型
width
床宽
length
床长
resize_bed
可否加床 0:未知,1:不可加床,2:免费加床,3:收费加床
resize_bed_width
加床-宽
resize_bed_length
加床-长
resize_desc
加床描述
max_persons
最多入住人数
building
建筑面积
floor
楼层
window_state
是否有窗 0:无窗1:有窗2:部分有窗
smoke_state
是否有无烟室 1:有无烟室2:没有无烟室3:禁烟4:未知http://wiki.fumubang.net/index.php?title=V2_0/longtour/get_pack_free_bydate&action=edit&section=7
wifi_state
wifi状态 1:不支持2:免费3:收费
note
备注
hotel_name
酒店名称
star_level
星级
nature
酒店性质 1:合资,2:外资,3:股份制,4:国企,5:其他
upload_img
床型封面图片
room_price
酒店入住晚数*每日价格(默认勾选的)
price_data
酒店价格数据
date
日期
market_price
市场价
goods_price
现价
sell_id
售卖id
product_id
产品id
supplier_id
供应商id
stock
库存
raw_stock
原始库存
pack_plane_arr
打包机票
combo_id
机票组合id
goods_price_max 机票最大价格
planes
机票列表
stock_buy
购买票数
types 机票类型:adult成人票,child儿童票
goods_price
价格
pack_insur_arr
打包保险
pack_scenic
打包景点
price_data
景点价格日期列表
data
景点信息列表
product_name
产品名称
scenic_name
景点名称
pack_taxi
打包用车
pack_other_arr
打包其他
common_date_arr
选择日期列表
hotel_start_date
入住开始日期
hotel_end_date
入住结束日期
hotel_end_date_stay
入住实际结束日期
first_room_stock_min
第一个房型的最小库存(默认选中)
first_room_stock
第一个房型的总库存
hotel_data
酒店数据
 img_url
图片地址列表
head_pic
房型头图
rooms
房型列表
stock
该房型的总库存
room_price
该房型每日价格*晚数的总价
stock_select_min
可选最小库存
stock_select_max
可选最多库存,跟随web端,目前定义20
stock_select_good
最优选择间数
free_price_strategy
自由行价格策略(或增加金额,或优惠金额(优惠金额为负数)),app端在计算明细金额的时候需增加此价格
price_units
用车价格单位:人/份
buy_limit
购买限制:0不限,1一人一份
price_rules
其他产品价格单位:人/份

正确返回示例

{
    "pack_hotel_arr": [
        {
            "hotel_start_date": "2016-02-29",
            "hotel_end_date": "2016-03-03",
            "hotel_end_date_stay": "2016-03-02",
            "first_room_stock_min": ​1,
            "first_room_stock": ​98,
            "hotel_data": {
                "info_id": "271",
                "package_id": "41",
                "sell_id": "317",
                "product_id": "303",
                "supplier_id": "57",
                "affiliation": "1",
                "day_of_trip": "1",
                "days_of_trip": "3",
                "day_of_trip2": "0",
                "days_of_trip2": "0",
                "type_name": "hotel",
                "extra_name": "",
                "plane_need_transfer": "0",
                "taxi_set_date": "0",
                "insurance_unit": "0",
                "round_trip_status": "0",
                "is_used": "0",
                "status": "1",
                "is_delete": "0",
                "create_uid": "6",
                "admin_uid": "6",
                "ctime": "2016-01-14 19:21:45",
                "uptime": "2016-01-14 19:21:45",
                "room_id": "67",
                "room_name": "打发房",
                "head_pic": "",
                "images": "353",
                "bed_types": "array (\n  0 => \n  array (\n    \\'type\\' => \\'single\\',\n    \\'other_type\\' => \\'\\',\n    \\'width\\' => \\'2\\',\n    \\'length\\' => \\'2\\',\n  ),\n  1 => \n  array (\n    \\'type\\' => \\'double\\',\n    \\'other_type\\' => \\'\\',\n    \\'width\\' => \\'3\\',\n    \\'length\\' => \\'3\\',\n  ),\n)",
                "resize_bed": "1",
                "resize_bed_width": "2.0",
                "resize_bed_length": "2.0",
                "resize_price": "120.00",
                "resize_desc": "飞得更高发的",
                "max_persons": "12",
                "building_area": "34",
                "floor": "2",
                "window_state": "1",
                "smoke_state": "2",
                "wifi_state": "2",
                "note": "",
                "hotel_name": "小明测试酒店",
                "star_level": "5",
                "nature": "1",
                "province_id": "0",
                "city_id": "0",
                "address": "亮马河大厦",
                "lng": "0",
                "lat": "0",
                "contact": "",
                "upload_img": "411",
                "upload_attachment": "",
                "url": "",
                "product_name": "小明测试酒店",
                "cat_id": "0",
                "title": "小明测试酒店",
                "sub_title": "小明测试酒店",
                "banner": "353",
                "is_fclub": "0",
                "pub_city_id": "0",
                "sell_city_id": "",
                "age_min": "0",
                "age_max": "99",
                "start_city_ids": "0",
                "destination_country_ids": "",
                "destination_provinces_ids": "0",
                "destination_city_ids": "0",
                "require_data": "",
                "sell_stat": "16",
                "sell_min_price": "0.00",
                "market_min_price": "0.00",
                "click_num": "0",
                "sell_num": "10",
                "start_sell_time": "0000-00-00 00:00:00",
                "end_sell_time": "0000-00-00 00:00:00",
                "online_time": "0000-00-00 00:00:00",
                "offline_time": "0000-00-00 00:00:00",
                "pay_time_limits": "0",
                "sort_rank": "0",
                "images_url": [
                    "http://img3.fumubang.net/D20160114192212299.png"
                ]
            },
            "rooms": [
                {
                    "room_data": {
                        "info_id": "271",
                        "package_id": "41",
                        "sell_id": "317",
                        "product_id": "303",
                        "supplier_id": "57",
                        "affiliation": "1",
                        "day_of_trip": "1",
                        "days_of_trip": "3",
                        "day_of_trip2": "0",
                        "days_of_trip2": "0",
                        "type_name": "hotel",
                        "extra_name": "",
                        "plane_need_transfer": "0",
                        "taxi_set_date": "0",
                        "insurance_unit": "0",
                        "round_trip_status": "0",
                        "is_used": "0",
                        "status": "1",
                        "is_delete": "0",
                        "create_uid": "6",
                        "admin_uid": "6",
                        "ctime": "2016-01-14 19:21:45",
                        "uptime": "2016-01-14 19:21:45",
                        "room_id": "67",
                        "room_name": "打发房",
                        "head_pic": "",
                        "images": "353",
                        "bed_types": [
                            {
                                "type": "大床",
                                "other_type": "",
                                "width": "2",
                                "length": "2"
                            },
                            {
                                "type": "双床",
                                "other_type": "",
                                "width": "3",
                                "length": "3"
                            }
                        ],
                        "resize_bed": "1",
                        "resize_bed_width": "2.0",
                        "resize_bed_length": "2.0",
                        "resize_price": "120.00",
                        "resize_desc": "飞得更高发的",
                        "max_persons": "12",
                        "building_area": "34",
                        "floor": "2",
                        "window_state": "1",
                        "smoke_state": "2",
                        "wifi_state": "2",
                        "note": "",
                        "hotel_name": "小明测试酒店",
                        "star_level": "5",
                        "nature": "1",
                        "province_id": "0",
                        "city_id": "0",
                        "address": "亮马河大厦",
                        "lng": "0",
                        "lat": "0",
                        "contact": "",
                        "upload_img": "411",
                        "upload_attachment": "",
                        "url": "",
                        "product_name": "小明测试酒店",
                        "cat_id": "0",
                        "title": "小明测试酒店",
                        "sub_title": "小明测试酒店",
                        "banner": "353",
                        "is_fclub": "0",
                        "pub_city_id": "0",
                        "sell_city_id": "",
                        "age_min": "0",
                        "age_max": "99",
                        "start_city_ids": "0",
                        "destination_country_ids": "",
                        "destination_provinces_ids": "0",
                        "destination_city_ids": "0",
                        "require_data": "",
                        "sell_stat": "16",
                        "sell_min_price": "0.00",
                        "market_min_price": "0.00",
                        "click_num": "0",
                        "sell_num": "10",
                        "start_sell_time": "0000-00-00 00:00:00",
                        "end_sell_time": "0000-00-00 00:00:00",
                        "online_time": "0000-00-00 00:00:00",
                        "offline_time": "0000-00-00 00:00:00",
                        "pay_time_limits": "0",
                        "sort_rank": "0",
                        "images_url": [
                            "http://img3.fumubang.net/D20160114192212299.png"
                        ]
                    },
                    "stock": ​98,
                    "room_price": "600.00",
                    "stock_select_min": ​1,
                    "stock_select_max": ​2,

                   "stock_select_good": ​1,
                }
            ]
        }
    ],
    "pack_plane_arr": {
        "combo_id": ​57,
        "goods_price_max": "1120.00",
        "planes": [
            [
                {
                    "product_id": "299",
                    "supplier_id": "57",
                    "sell_id": "305",
                    "stock_buy": ​2,
                    "types": "adult",
                    "goods_price": "200.00"
                },
                {
                    "product_id": "299",
                    "supplier_id": "57",
                    "sell_id": "311",
                    "stock_buy": ​1,
                    "types": "child",
                    "goods_price": "120.00"
                }
            ],
            [
                {
                    "product_id": "299",
                    "supplier_id": "57",
                    "sell_id": "303",
                    "stock_buy": ​1,
                    "types": "child",
                    "goods_price": "200.00"
                },
                {
                    "product_id": "299",
                    "supplier_id": "57",
                    "sell_id": "309",
                    "stock_buy": ​2,
                    "types": "adult",
                    "goods_price": "200.00"
                }
            ]
        ]
    },
    "pack_insur_arr": [
        {
            "info_id": "421",
            "package_id": "41",
            "sell_id": "349",
            "product_id": "327",
            "supplier_id": "59",
            "affiliation": "2",
            "day_of_trip": "0",
            "days_of_trip": "0",
            "day_of_trip2": "0",
            "days_of_trip2": "0",
            "type_name": "insurance",
            "extra_name": "",
            "plane_need_transfer": "0",
            "taxi_set_date": "0",
            "insurance_unit": "1",
            "round_trip_status": "0",
            "is_used": "0",
            "status": "0",
            "is_delete": "0",
            "create_uid": "6",
            "admin_uid": "6",
            "ctime": "2016-01-19 17:28:33",
            "uptime": "2016-01-19 17:28:33",
            "price_id": "1055",
            "date": "0000-00-00 00:00:00",
            "market_price": "1.00",
            "goods_price": "2.00",
            "settle_price": "3.00",
            "stock": "2147483647",
            "raw_stock": "2147483647",
            "product_name": "马杰测试保险",
            "cat_id": "0",
            "title": "马杰测试保险",
            "sub_title": "马杰测试保险",
            "banner": "",
            "is_fclub": "0",
            "pub_city_id": "0",
            "sell_city_id": "",
            "age_min": "0",
            "age_max": "99",
            "start_city_ids": "",
            "destination_country_ids": "",
            "destination_provinces_ids": "",
            "destination_city_ids": "",
            "require_data": "",
            "sell_stat": "16",
            "sell_min_price": "0.00",
            "market_min_price": "0.00",
            "click_num": "0",
            "sell_num": "24",
            "start_sell_time": "0000-00-00 00:00:00",
            "end_sell_time": "0000-00-00 00:00:00",
            "online_time": "0000-00-00 00:00:00",
            "offline_time": "0000-00-00 00:00:00",
            "pay_time_limits": "0",
            "sort_rank": "0",
            "name": "马杰测试保险d",
            "company": "太平洋2",
            "contract_id": "391",
            "contract_desc": "保险描述测试sdfd"
        }
    ],
    "pack_scenic": [
        {
            "price_data": [
                {
                    "stock": "100",
                    "goods_price": "30.00",
                    "date": "2016-02-29"
                },
                {
                    "stock": "97",
                    "goods_price": "30.00",
                    "date": "2016-03-01"
                },
                {
                    "stock": "100",
                    "goods_price": "30.00",
                    "date": "2016-03-02"
                },
                {
                    "stock": "100",
                    "goods_price": "30.00",
                    "date": "2016-03-03"
                },
                {
                    "stock": "100",
                    "goods_price": "30.00",
                    "date": "2016-03-04"
                }
            ],
            "data": {
                "info_id": "277",
                "package_id": "41",
                "sell_id": "319",
                "product_id": "305",
                "supplier_id": "57",
                "affiliation": "2",
                "day_of_trip": "0",
                "days_of_trip": "0",
                "day_of_trip2": "0",
                "days_of_trip2": "0",
                "type_name": "scenic",
                "extra_name": "",
                "plane_need_transfer": "0",
                "taxi_set_date": "0",
                "insurance_unit": "0",
                "round_trip_status": "0",
                "is_used": "0",
                "status": "0",
                "is_delete": "0",
                "create_uid": "6",
                "admin_uid": "6",
                "ctime": "2016-01-14 19:25:15",
                "uptime": "2016-01-14 19:25:15",
                "price_id": "2721",
                "date": "2016-03-04 00:00:00",
                "market_price": "0.00",
                "goods_price": "30.00",
                "settle_price": "101.00",
                "stock": "100",
                "raw_stock": "100",
                "product_name": "小明测试",
                "cat_id": "0",
                "title": "小明测试",
                "sub_title": "小明测试",
                "banner": "",
                "is_fclub": "0",
                "pub_city_id": "0",
                "sell_city_id": "",
                "age_min": "0",
                "age_max": "99",
                "start_city_ids": "",
                "destination_country_ids": "",
                "destination_provinces_ids": "",
                "destination_city_ids": "",
                "require_data": "",
                "sell_stat": "16",
                "sell_min_price": "0.00",
                "market_min_price": "0.00",
                "click_num": "0",
                "sell_num": "15",
                "start_sell_time": "0000-00-00 00:00:00",
                "end_sell_time": "0000-00-00 00:00:00",
                "online_time": "0000-00-00 00:00:00",
                "offline_time": "0000-00-00 00:00:00",
                "pay_time_limits": "0",
                "sort_rank": "0",
                "scenic_name": "小明测试",
                "scenic_stars": "5",
                "business_hour_start": "8:34",
                "business_hour_end": "18:45",
                "sell_hour_start": "8:50",
                "sell_hour_end": "18:00",
                "country_id": "0",
                "province_id": "1",
                "city_id": "41",
                "address": "亮马河大厦",
                "traffic_info": "第三方打算",
                "longitude": "116.472023",
                "latitude": "39.950653",
                "cover_images_id": "357"
            }
        }
    ],
    "pack_taxi": [
        {
            "info_id": "859",
            "package_id": "41",
            "sell_id": "439",
            "product_id": "367",
            "supplier_id": "59",
            "affiliation": "2",
            "day_of_trip": "0",
            "days_of_trip": "0",
            "day_of_trip2": "0",
            "days_of_trip2": "0",
            "type_name": "rent_car",
            "extra_name": "",
            "plane_need_transfer": "0",
            "taxi_set_date": "1",
            "insurance_unit": "0",
            "round_trip_status": "0",
            "is_used": "0",
            "status": "1",
            "is_delete": "0",
            "create_uid": "6",
            "admin_uid": "6",
            "ctime": "2016-01-29 09:52:33",
            "uptime": "2016-01-29 09:52:33",
            "price_id": "3191",
            "date": "0000-00-00 00:00:00",
            "market_price": "0.00",
            "goods_price": "111.00",
            "settle_price": "1.00",
            "stock": "2147483647",
            "raw_stock": "2147483647",
            "product_name": "尼玛怎么这样",
            "cat_id": "0",
            "title": "尼玛怎么这样",
            "sub_title": "尼玛怎么这样",
            "banner": "",
            "is_fclub": "0",
            "pub_city_id": "0",
            "sell_city_id": "",
            "age_min": "0",
            "age_max": "99",
            "start_city_ids": "",
            "destination_country_ids": "",
            "destination_provinces_ids": "",
            "destination_city_ids": "",
            "require_data": "",
            "sell_stat": "16",
            "sell_min_price": "0.00",
            "market_min_price": "0.00",
            "click_num": "0",
            "sell_num": "10",
            "start_sell_time": "0000-00-00 00:00:00",
            "end_sell_time": "0000-00-00 00:00:00",
            "online_time": "0000-00-00 00:00:00",
            "offline_time": "0000-00-00 00:00:00",
            "pay_time_limits": "0",
            "sort_rank": "0",
            "name": "豪华小车来喽",
            "price_units": "辆",
            "start_type": "0",
            "start_address": "北京",
            "end_type": "0",
            "end_address": "上海",
            "car_brand": "比亚迪S7",
            "car_info": "0",
            "seatings": "6",
            "carpool": "0",
            "taxi_desc": "豪华啊"
        }
    ],
    "pack_other_arr": [
        {
        "info_id": "1637",
        "package_id": "173",
        "sell_id": "1711",
        "product_id": "2000079",
        "supplier_id": "201",
        "affiliation": "2",
        "day_of_trip": "0",
        "days_of_trip": "0",
        "day_of_trip2": "0",
        "days_of_trip2": "0",
        "type_name": "extra",
        "extra_name": "",
        "plane_need_transfer": "0",
        "taxi_set_date": "0",
        "insurance_unit": "0",
        "round_trip_status": "0",
        "is_used": "0",
        "comments": "",
        "status": "1",
        "is_delete": "0",
        "create_uid": "171",
        "admin_uid": "171",
        "ctime": "2016-03-03 18:34:33",
        "uptime": "2016-03-03 18:34:33",
        "price_id": "35671",
        "date": "0000-00-00 00:00:00",
        "market_price": "0.00",
        "goods_price": "200.00",
        "settle_price": "150.00",
        "stock": "194",
        "raw_stock": "200",
        "pss_id": "929",
        "product_name": "sam-婴儿票",
        "cat_id": "0",
        "title": "sam-婴儿票",
        "sub_title": "sam-婴儿票",
        "banner": "",
        "is_fclub": "0",
        "pub_city_id": "0",
        "sell_city_id": "",
        "age_min": "0",
        "age_max": "99",
        "start_city_ids": "",
        "destination_country_ids": "",
        "destination_provinces_ids": "",
        "destination_city_ids": "",
        "require_data": "",
        "sell_stat": "0",
        "sell_min_price": "0.00",
        "market_min_price": "0.00",
        "click_num": "0",
        "sell_num": "16",
        "start_sell_time": "0000-00-00 00:00:00",
        "end_sell_time": "0000-00-00 00:00:00",
        "online_time": "0000-00-00 00:00:00",
        "offline_time": "0000-00-00 00:00:00",
        "pay_time_limits": "0",
        "sort_rank": "0",
        "name": "sam-婴儿票",
        "buy_limit": "0",
        "price_rules": "人",
        "extra_desc": "收拾收拾"
    }
    ],
    "common_date_arr": [
        "2016-02-29",
        "2016-03-01",
        "2016-03-02",
        "2016-03-03",
        "2016-03-04"
    ],
    "free_price_strategy": ​100
}

错误返回示例

实例1:

{ "error_code":"300001",

"error_msg":"参数不全"

}

实例2:

{

"error_code":"300002",

"error_msg":"数据格式错误"

}

实例3:

{

"error_code":"300003",

"error_msg":"请选择日期"

}

实例4: {

"error_code":"300004",

"error_msg":"抱歉,产品库存不足,请修改出行人数或出行日期。"

}