V1/order/cart submit
来自技术开发小组内部wiki
功能说明
选中购物车里的商品后,进入确定订单页,选择优惠券,写备注,最终生成订单调用这个接口
URL
http://[域名]//v1/order/cart_submit
返回格式
支持json,xml.通过format参数来控制
HTTP请求方式
POST.可以post的数据为xml或json.
输入参数说明
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
uid | 是 | int | 用户id |
cart_info | 是 | string | 购物车数据信息 |
appname | 是 | string | APP名字 |
referer | 是 | string | 订单渠道 |
address_id | 否 | int | 地址id |
receiver | 是 | string | 收货人姓名 |
mobile | 是 | string | 收货人手机 |
address | 否 | string | 地址 |
inv_type | 否 | string | 发票(0:不用1:个人;2:企业) |
inv_content | 否 | string | 发票抬头 |
sum_money | 是 | string | 用户应付总额(包含运费计算,防止服务器和客户端计算出不同的应付总额) |
cps_name |
是 |
string |
订单来源的页面跟踪(2.5版本新增,运营统计需要) |
user_city_id |
是 |
int |
用户所属分站 |
cart_info示例
{
"cart":
[
{
"coupon_sn":"xxxxx",//优惠券码,没使用优惠券填""
"postscript":"", //订单留言,无留言填""
"extend_field":[{"name":"IDcard","value":"123123123123123"},...], //附加表单回传
"cert_info":[{"name":"张三","cert_no":"130852369852141425"},...],//证件信息
"shipping_method":1,//运送方式:1快递,2ems(2.5版本新增)
"listTicketes": [//票种列表,该商户下所有票务的所有票种的列表
{
"cartid": 12222,//购物车id
"tid": 12222,//票种id
"num": 1, //票种的购买数量
"play_time": "2014-12-01" //景点票时间
},...
]
},...
]
}
请求示例
正式环境 http://api.fumubang.com/v1/order/create_cart_order 测试环境 http://api.fumubang.net/v1/order/create_cart_order 本地环境 http://dev-api.fumubang.net/v1/order/create_cart_order
返回参数说明
{
"pay_sn": "1412011003322509685700", "orders": [ { "order_id": "16283", "order_sn": "20141201100332610811", "change_to_order": null, "order_name": "shuwen测试活动11", "pay_sn": null, "my_pay_sn": "1412011003322509685700", "third_sn": null, "buyer_email": null, "uid": "32344", "order_status": "0", "shipping_status": "0", "trace_status": "0", "pay_status": "0", "confirm_status": "0", "pay_clear": "0", "order_city_id": "1", "shop_user_id": "23", "goods_group_id": "227", "goods_type": "3", "receiver": "", "country": "1", "province": "2", "city": "55", "area": "0", "street": "0", "address": " 阿萨德发的发发的说法发", "zipcode": "", "tel": "", "mobile": "12589654587", "email": "", "postscript": "1111111111111", "inv_type": "0", "inv_payee": "", "inv_content": "", "money": "¥199.01", "shipping_fee": "¥1.00", "pay_source": "支付宝", "pay_note": "", "editor_note": null, "referer": "", "appname": "", "create_time": "2014-12-01 10:03:32", "confirm_time": "0000-00-00 00:00:00", "pay_time": "0000-00-00 00:00:00", "confirm_update_time": "0000-00-00 00:00:00", "shipping_time": "0000-00-00 00:00:00", "play_time": "1970-01-01 08:00:00", "use_coupon": "0", "coupon_money": 0, "app_sub_money": "2", "coupon_share_money": "0.00", "realpay_money": null, "is_comment": "0", "order_status_name": "未付款", "app_activity": "1", "sum_money": "¥198.01", "is_invoice": 0, "inv_type_name": "不需要发票", "is_return": null,"ext_info": [ { "name": "IDcard", "value": "136000253688888888" }, { "name": "电话", "value": "13652365235" } ],//附加表单信息 "activity":[ { "aid": "100071", "activity_type": "1", "shape_type": "2", "sub_title": "", "activity_title": "shuwen测试活动11", "banner": "http://img3.fumubang.net/huodong/banner/X20140630114217237.jpg", "goods": [ { "rec_id": "18401", "group_tickets_name": null, "product_detail": "尺码:X</br>颜色:橙色</br>", "total_num": "1", "goods_id": "1281", "goods_price": "199.01", "app_price": "189.00" } ],... },...] "order_ctime": "2014-12-01 10:03", "shipping_info": "" },... ] "sum_money": 596.01, "offset_shiping_fee":"0"//相同商家邮费抵消金额, "is_equal":"0"//app计算金额与服务器计算的金额是否相等:0否1是
}