V2 0/longtour/check pack free bydate

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

功能说明

检查自由行库存情况,并返回优惠券,常用联系人信息

URL

http://[域名]/v2/longtour/check_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
sum_money
必须
float
订单总金额(优惠券过滤)
app_sub_money

float
下单立减金额(优惠券过滤)
hotels
必须
json

所选酒店信息:格式如:[
    {
        "product_id": "303", //产品id
        "sell_id": "317",//售卖id
        "supplier_id": "57",//供应商id
        "hotel_start_date": "2016-01-28",//酒店入住开始时间
        "hotel_end_date": "2016-01-30",//酒店入住结束时间
        "num": "2"//间数
    }
]


planes
必须
json
机票信息,格式如:{
    "goods_price_max": "550.00",//机票最大价格
    "combo_id": "65"//机票组合id
}
scenerys
必须
json
景点信息,格式如:[
    {
        "product_id": "305",
        "sell_id": "319",
        "supplier_id": "57",
        "date": "2016-01-16",//选择日期
        "num": "3"//份数
    }
],保险,用车,其他信息输入格式同景点一样,不在下方说明。
insurances

json
保险信息,格式如:[{"product_id":"303","sell_id":"317","supplier_id":"57","date":"2016-01-28","num":"2"}]
cars

json
用车信息,格式如:[{"product_id":"303","sell_id":"317","supplier_id":"57","date":"2016-01-28","num":"2"}]
others

json
其他信息,格式如:[{"product_id":"303","sell_id":"317","supplier_id":"57","date":"2016-01-28","num":"2"}]
uid

int
用户id

请求示例

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

返回参数说明

参数 说明
status
success代表成功
data
返回数据列表
address_default
默认地址
address_id
地址id
address_name
地址名称
uid
用户id
receiver
收货人
country
收货人国家
province
收货人省份
city
收货人城市
area
收货人地区
street
收货人街道
address
收货人地址
zipcode
收货人邮编
tel
收货人电话
mobile
收货人手机
email
收货人邮箱
is_default
是否默认地址:0否,1是
province_name
收货人省份名称
city_name
收货人城市名称
email_status
是否需要邮箱:true是,false否
email_require
是否必填,true是,false否
weixin_status
是否需要微信:true是,false否
weixin_require
是否必填:true是,false否
hotel_price_total
酒店价格
user_certs
常用联系人信息(参数参照常用联系人列表wiki)
 cert_name_arr
证件类型
support_passort_info
支持的证件类型列表
coupon_list
优惠券列表(参数参照长线优惠券列表)

正确返回示例

{
    "status": "success",
    "data": {
        "address_default": {
            "address_id": "1471",
            "address_name": "",
            "uid": "629",
            "receiver": "顾城",
            "country": "1",
            "province": "1",
            "city": "37",
            "area": "0",
            "street": "0",
            "address": "亮马河大厦1座27层504",
            "zipcode": "10010",
            "tel": "",
            "mobile": "18610298623",
            "email": "",
            "is_default": "1",
            "ctime": "2014-11-14 14:27:38",
            "province_name": "北京市",
            "city_name": "东城区"
        },
        "email_status": true,
        "email_require": true,
        "weixin_status": false,
        "weixin_require": true,
        "hotel_price_total": ​600,
        "user_certs": [
            {
                "pid": "183",
                "uid": "629",
                "name": "asdfasdf",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "0",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "237",
                        "cert_type": "1",
                        "cert_no": "410881198903253041",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "185",
                "uid": "629",
                "name": "asdfasdf",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "0",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "239",
                        "cert_type": "1",
                        "cert_no": "410881198902213042",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "191",
                "uid": "629",
                "name": "文文",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "245",
                        "cert_type": "1",
                        "cert_no": "110106201005075125",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "193",
                "uid": "629",
                "name": "单位单位",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "247",
                        "cert_type": "1",
                        "cert_no": "11010620100507512",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "195",
                "uid": "629",
                "name": "呃呃呃",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "249",
                        "cert_type": "1",
                        "cert_no": "110106201005075125xxxxx",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "197",
                "uid": "629",
                "name": "订单",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "0",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "251",
                        "cert_type": "1",
                        "cert_no": "110106201005075125",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "199",
                "uid": "629",
                "name": "底端的",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "0",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "253",
                        "cert_type": "1",
                        "cert_no": "111111111111111111",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "249",
                "uid": "629",
                "name": "的的",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "305",
                        "cert_type": "1",
                        "cert_no": "10010219830622345x",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "271",
                "uid": "629",
                "name": "22222222222",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "329",
                        "cert_type": "1",
                        "cert_no": "10010219830622345x",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "293",
                "uid": "629",
                "name": "gghjkgf",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "351",
                        "cert_type": "1",
                        "cert_no": "220322198904126311",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "295",
                "uid": "629",
                "name": "gghjkgf",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "353",
                        "cert_type": "1",
                        "cert_no": "220322198904126311",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "297",
                "uid": "629",
                "name": "gghjkgf",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "355",
                        "cert_type": "1",
                        "cert_no": "220322198904126311",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "299",
                "uid": "629",
                "name": "gghjkgf",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "357",
                        "cert_type": "1",
                        "cert_no": "220322198904126311",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "301",
                "uid": "629",
                "name": "gghjj",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "359",
                        "cert_type": "1",
                        "cert_no": "220322198904126300",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "303",
                "uid": "629",
                "name": "u 和关怀",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "361",
                        "cert_type": "1",
                        "cert_no": "220322198904136321",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "305",
                "uid": "629",
                "name": "s s s",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "363",
                        "cert_type": "1",
                        "cert_no": "220322198904126311",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "625",
                "uid": "629",
                "name": "呃呃呃",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "749",
                        "cert_type": "1",
                        "cert_no": "110106201005075125",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "647",
                "uid": "629",
                "name": "呃呃呃",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "771",
                        "cert_type": "1",
                        "cert_no": "10010219880611461x",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "649",
                "uid": "629",
                "name": "呃呃呃",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "773",
                        "cert_type": "1",
                        "cert_no": "62010219880611461X",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "651",
                "uid": "629",
                "name": "呃呃呃",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "775",
                        "cert_type": "1",
                        "cert_no": "142622199003072515",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "653",
                "uid": "629",
                "name": "呃呃呃",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "777",
                        "cert_type": "1",
                        "cert_no": "62010219830623461x",
                        "cert_name": "身份证"
                    }
                ]
            },
            {
                "pid": "655",
                "uid": "629",
                "name": "文文",
                "first_name": "",
                "last_name": "",
                "phone_num": "",
                "sex": "1",
                "birthday": "0000-00-00",
                "nationality": "0",
                "ctime": "2016-01-21 18:36:27",
                "identity": "",
                "certs": [
                    {
                        "id": "779",
                        "cert_type": "1",
                        "cert_no": "142622199003072515",
                        "cert_name": "身份证"
                    }
                ]
            }
        ],
        "cert_name_arr": [
            {
                "key": ​1,
                "value": "身份证"
            },
            {
                "key": ​2,
                "value": "户口簿"
            },
            {
                "key": ​3,
                "value": "出生证明"
            },
            {
                "key": ​4,
                "value": "护照"
            },
            {
                "key": ​5,
                "value": "港澳通行证"
            },
            {
                "key": ​6,
                "value": "台湾通行证"
            },
            {
                "key": ​7,
                "value": "回乡证"
            },
            {
                "key": ​8,
                "value": "台胞证"
            }
        ],
        "support_passport_info": [
            "1"
        ],
        "coupon_list": [
            {
                "min_amount": "满1.01可用",
                "use_status": "0",
                "coupon_type": "1",
                "coupon_name": "家庭旅行",
                "plat_id": "0",
                "limit_type": "0",
                "activity_id": "0",
                "coupon_sn": "DFjTbWDSJXUc",
                "use_limit": "0",
                "coupon_money": "1",
                "coupon_start_time": "2016-01-01 00:00:00",
                "coupon_end_time": "2016-02-29 23:59:59",
                "order_sn": "",
                "use_time": "0000-00-00 00:00:00",
                "use_time_stamp": "0",
                "coupon_tag": "",
                "plat": "",
                "coupon_type_cn": "代金券",
                "coupon_status_cn": "未使用",
                "start_time": "2016-01-01",
                "end_time": "2016-02-29"
            },
            {
                "min_amount": "满1.01可用",
                "use_status": "0",
                "coupon_type": "1",
                "coupon_name": "全品类",
                "plat_id": "0",
                "limit_type": "0",
                "activity_id": "0",
                "coupon_sn": "2C77TpVQfJmp",
                "use_limit": "0",
                "coupon_money": "1",
                "coupon_start_time": "2015-09-15 14:03:40",
                "coupon_end_time": "2016-10-06 23:59:59",
                "order_sn": "",
                "use_time": "0000-00-00 00:00:00",
                "use_time_stamp": "0",
                "coupon_tag": "萨嘎",
                "plat": "",
                "coupon_type_cn": "代金券",
                "coupon_status_cn": "未使用",
                "start_time": "2015-09-15",
                "end_time": "2016-10-06"
            },
            {
                "min_amount": "满1.01可用",
                "use_status": "0",
                "coupon_type": "2",
                "coupon_name": "1元优惠券",
                "plat_id": "0",
                "limit_type": "0",
                "activity_id": "0",
                "coupon_sn": "abrxUWpKmJCB",
                "use_limit": "0",
                "coupon_money": "1",
                "coupon_start_time": "2015-11-23 00:00:00",
                "coupon_end_time": "2016-11-23 23:59:59",
                "order_sn": "",
                "use_time": "0000-00-00 00:00:00",
                "use_time_stamp": "0",
                "coupon_tag": "",
                "plat": "",
                "coupon_type_cn": "满减券",
                "coupon_status_cn": "未使用",
                "start_time": "2015-11-23",
                "end_time": "2016-11-23"
            }
        ]
    }
}

错误返回示例

实例1:

{ "error_code":"300001",

"error_msg":"参数错误,请重新选择日期"

}

实例2:

{

"error_code":"300050",    //产品库存不足

"error_msg":"哎呀,就填写订单的时间,商品卖光了,请购买其他商品。"

}
实例3: {

"error_code":"300004",

"error_msg":"该自由行机票无数据,请重新选择日期。"

}

实例4: {

"error_code":"300003",

"error_msg":"该自由行酒店无数据,请重新选择日期。"

}

实例5: {

"error_code":"300051",   //该房型库存不足,其他可购买

"error_msg":"哎呀,就填写订单的时间,选中酒店商品库存就不足了,请重新购买。给您造成不便,非常抱歉。"

}