下单
POST
/api/order/placeOrder
请求参数
Header 参数
token
string
必需
默认值:
{{'38a327e6732714e2a48e0b5d3038b2cc'}}
Body 参数application/x-www-form-urlencoded
action
string
必需
teamhead_id
integer
自提点ID
contact
string
提货人
sex
integer
必需
mobile
string
手机号
goods_id
integer
可选
goods_num
number
可选
cart_id
array[string]
可选
示例值:
[""]
user_remark
string
用户备注
coupon_list_id
integer
用户领取优惠券ID
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/order/placeOrder' \
--header 'token;' \
--data-urlencode 'action=' \
--data-urlencode 'teamhead_id=' \
--data-urlencode 'contact=' \
--data-urlencode 'sex=' \
--data-urlencode 'mobile=' \
--data-urlencode 'goods_id=' \
--data-urlencode 'goods_num=' \
--data-urlencode 'cart_id=' \
--data-urlencode 'user_remark=' \
--data-urlencode 'coupon_list_id='
返回响应
🟢200结算信息
application/json
Body
code
integer
必需
show
integer
必需
msg
string
必需
data
object
必需
teamhead
object
自提点信息
goods
array [object {9}]
商品信息
goods_price
number
商品总价
goods_lineation_price
number
商品总划线价
freight_amount
integer
运费
order_amount
integer
应付款金额
take_time
string
提货时间
示例
{
"code": 1,
"show": 0,
"msg": "",
"data": {
"teamhead": {
"id": 1,
"name": "零点便利店",
"image": "http://www.sqtg.localhost/resource/image/adminapi/default/article01.png",
"real_name": "李四",
"mobile": "17306643985",
"province_id": 110000,
"city_id": 110100,
"district_id": 110101,
"address": "天上人间",
"longitude": null,
"latitude": null,
"level_id": 6,
"level": {
"id": 6,
"level": 1,
"name": "默认等级",
"commission": 5
},
"address_desc": "北京北京市东城区天上人间"
},
"goods": [
{
"id": 1,
"name": "大白菜",
"code": "dbc-123456",
"brand_id": 1,
"unit_id": 1,
"guarantee_ids": [
"1"
],
"image": "http://www.sqtg.localhost/resource/image/adminapi/default/avatar.png",
"video": "",
"video_source": 0,
"video_cover": "",
"status": 1,
"poster": "",
"shipping_method": 1,
"producer": "",
"net_weight": "",
"label": 1,
"warranty": 10,
"storage": 1,
"recommended_reason": null,
"content": "商品详情",
"virtual_sales_num": 0,
"stock_warning": 1000,
"view_num": 0,
"virtual_view_num": 0,
"sales_num": 30,
"sort": 50,
"create_time": "2022-11-25 13:04:34",
"update_time": "2022-12-22 18:46:29",
"delete_time": null,
"goods_item": {
"id": 1,
"goods_id": 1,
"sell_price": "10.00",
"lineation_price": "20.00",
"cost_price": "5.00",
"stock": 90,
"bar_code": "123456"
},
"unit_desc": "单位1",
"goods_num": 10,
"goods_price": 100,
"earnings": 5
},
{
"id": 2,
"name": "上海青",
"code": "dbc-123457",
"brand_id": 1,
"unit_id": 1,
"guarantee_ids": [
"1"
],
"image": "http://www.sqtg.localhost/resource/image/adminapi/default/avatar.png",
"video": "",
"video_source": 0,
"video_cover": "",
"status": 1,
"poster": "",
"shipping_method": 1,
"producer": "",
"net_weight": "",
"label": 0,
"warranty": 0,
"storage": 0,
"recommended_reason": null,
"content": "商品详情",
"virtual_sales_num": 0,
"stock_warning": 0,
"view_num": 0,
"virtual_view_num": 0,
"sales_num": 32,
"sort": 50,
"create_time": "2022-12-21 15:22:00",
"update_time": "2022-12-22 18:46:29",
"delete_time": null,
"goods_item": {
"id": 2,
"goods_id": 2,
"sell_price": "15.00",
"lineation_price": "20.00",
"cost_price": "5.00",
"stock": 88,
"bar_code": "123456"
},
"unit_desc": "单位1",
"goods_num": 2,
"goods_price": 30,
"earnings": 1.5
}
],
"goods_price": 130,
"freight_amount": 0,
"order_amount": 130,
"goods_num": 12,
"earnings": 6.5
}
}
修改于 2023-02-24 08:58:32