简要描述:
- 批发订单
请求域名:
请求URL:
直接购买:
GET/&route=plugin.hotel-supply.frontend.goods-buy.index
提交订单:
POST/&route=plugin.hotel-supply.frontend.create.index
参数:
酒店信息 | 是否必须 | 类型 | 说明 |
---|---|---|---|
hotel_id | 是 | int | 酒店id |
sid | 是 | int | 房型id |
nums | 是 | int | 定房数量 |
date_price | 是 | array | 价格组 |
user_name | 是 | string | 入住登记姓名 提交订单时传 |
tel | 是 | string | 联系电话 提交订单时传 |
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
invoice_type | 否 | int | 发票类型(0:电子发票,1:纸质发票) |
rise_type | 否 | int | 发票抬头(0:单位,1:个人) |
call | 否 | string | 称呼 |
ncompany_numberote | 否 | string | 单位识别号 |
total_price | float | 合计 |
orders | 是否必须 | 类型 | 说明 |
---|---|---|---|
pre_id | 是 | int | 预下单id |
deduction_ids | [deduction.code] | 抵扣码 | |
note | 否 | string | 订单备注 |
酒店请求数据例:
hotel_id:1385
sid:4499
price:100.00
nums:2
user_name:测试
tel:15012345678
date_price:[{"date":"19\/03\/2020","price":100},{"date":"20\/03\/2020","price":50},{"date":"21\/03\/2020","price":70}]
返回示例:
正确时返回:
{
"result": 1,
"msg": "成功",
"data": {
"amount_items": [
{
"code": "total_goods_price",
"name": "订单总金额",
"amount": "440.00"
},
{
"code": "total_dispatch_price",
"name": "总运费",
"amount": "0.00"
}
],
"discount_amount_items": [ ],
"fee_items": [ ],
"total_price": "440.00",
"orders": [
{
"plugin_id": 48,
"is_virtual": true,
"dispatch_type_id": 0,
"mark": "",
"goods_price": "440.00",
"price": "440.00",
"order_goods_price": "440.00",
"cost_amount": "440.00",
"discount_price": "0.00",
"fee_amount": "0.00",
"deduction_price": "0.00",
"dispatch_price": "0.00",
"goods_total": 2,
"no_refund": 0,
"order_sn": "SN20200318164203c1",
"note": null,
"shop_name": "酒店-杭州云廊小庐",
"need_address": true,
"invoice_type": null,
"rise_type": null,
"collect_name": null,
"company_number": null,
"pre_id": "413a5200241cc7fe7dd5945331bace78",
"order_settings": [ ],
"order_address": {
"street_id": 0,
"zipcode": ""
},
"hotel_supply_order": {
"uniacid": "6",
"huilian_oid": "SN20200318164203c1",
"price": "440.00",
"hotel_id": "1385",
"sid": "4499",
"user_name": "",
"tel": "",
"nums": "2",
"start_at": 1584460800,
"end_at": 1584720000,
"hotel": {
"id": 76,
"uniacid": 6,
"hotel_id": 1385,
"name": "杭州云廊小庐",
"shortname": "杭州云廊小庐",
"latitude": "30.20004733695",
"longitude": "120.08196582383",
"tel": "0571-86908751",
"logourl": "http://lcw.unionhotel.cn/uploads/q/qmuiko1431678728/0/b/9/0/thumb_5e215cbf650b3.jpg",
"provice": "浙江省",
"city": "杭州市",
"area": "西湖区",
"address": "浙江省杭州市西湖区梅家坞176号(十里琅珰山脚下)",
"other": "PARKING,WIFI,XICANG,RESHUI,XIYI,JIAOXING,SHANGWANG,XINGLI",
"level": 3,
"is_manfang": 0,
"created_at": "2020-03-11 14:49:50",
"fang": {
"id": 4499,
"name": "山景大床房",
"image_1": "http://lcw.unionhotel.cn/uploads/q/qmuiko1431678728/f/6/e/a/thumb_5e4e42cc824f6.png",
"image_2": "",
"image_3": ""
},
"level_name": "精品民宿",
"other_name": "停车位,WIFI,XICANG,热水,洗衣,叫醒,上网,行李"
}
},
"order_goods": [
{
"goods_option_id": 0,
"goods_option_title": "",
"comment_status": 0,
"goods_id": 174,
"total": 2,
"uid": 2455,
"uniacid": 6,
"title": "山景大床房",
"thumb": "http://lcw.unionhotel.cn/uploads/q/qmuiko1431678728/f/6/e/a/thumb_5e4e42cc824f6.png",
"goods_sn": "",
"product_sn": "",
"goods_price": "440.00",
"price": "440.00",
"goods_cost_price": "440.00",
"goods_market_price": "440.00",
"coupon_price": "0.00",
"need_address": 1,
"payment_amount": "440.00",
"buttons": [
{
"name": "评价",
"api": "",
"value": ""
}
],
"goods_option": null,
"order_goods_discounts": [ ],
"order_goods_deductions": {
"1": {
"name": "积分",
"code": "point",
"uid": 2455,
"usable_amount": "0.00",
"usable_coin": "0.00",
"used_amount": "0.00",
"used_coin": "0.00"
}
}
}
],
"order_coupons": [ ],
"order_discounts": [ ],
"order_deductions": [ ],
"has_one_dispatch_type": null,
"order_fees": [ ]
}
],
"discount": {
"member_coupons": [ ]
},
"dispatch": {
"delivery_method": [
{
"dispatch_type_id": 1,
"name": "快递"
},
{
"dispatch_type_id": 8,
"name": "上门自提"
}
],
"default_member_address": {
"id": 41,
"uniacid": 6,
"uid": 2455,
"username": "测试",
"mobile": "15219025049",
"zipcode": "",
"province": "北京",
"city": "北京市",
"district": "门头沟区",
"address": "测试",
"isdefault": 1
}
}
}
}
错误时返回:
{
"result": 0,
"msg": "错误信息",
}
返回参数说明:
参数名 | 类型 | 说明 |
---|
酒店信息 orders下面的 hotel_supply_order.hotel
参数名 | 类型 | 说明 |
---|---|---|
name | string | 酒店名称 |
address | string | 酒店地址 |
tel | string | 酒店电话 |