商品详情页下单
POST
/app/mall/api/v1/create/order
请求参数
Body 参数application/json
mallGoodsProduct
object
商品规格信息
id
integer
规格ID
goodsId
integer
商品ID
goodsName
string
商品名称
goodsCode
string
商品编码
specifications
string
规格信息
goodsPrice
integer
商品价格
goodsNum
integer
商品数量
imgUrl
string
规格图片
userAddressId
integer
用户收货地址ID
payType
string
必需
userMessage
string
用户留言
couponId
integer
优惠券ID
freightPrice
integer
运费 单位元
integralNums
integer
必需
示例
{
"mallGoodsProduct":
{
"id": 10,
"goodsId": 1,
"goodsName": "母亲节礼物-舒适安睡组合",
"goodsCode": "515091408151908352",
"specifications": "[\"1.8m床垫*1+枕头*2\",\"浅杏粉\"]",
"goodsPrice": 1001,
"goodsNum": 1,
"imgUrl": "http://yanxuan.nosdn.127.net/10022c73fa7aa75c2c0d736e96cc56d5.png?quality=90&thumbnail=200x200&imageView"
},
"userAddressId":1,
"payType":"1",
"userMessage":"请优先配送!!!"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://47.93.16.76:8080/app/mall/api/v1/create/order' \
--header 'Content-Type: application/json' \
--data-raw '{
"mallGoodsProduct":
{
"id": 10,
"goodsId": 1,
"goodsName": "母亲节礼物-舒适安睡组合",
"goodsCode": "515091408151908352",
"specifications": "[\"1.8m床垫*1+枕头*2\",\"浅杏粉\"]",
"goodsPrice": 1001,
"goodsNum": 1,
"imgUrl": "http://yanxuan.nosdn.127.net/10022c73fa7aa75c2c0d736e96cc56d5.png?quality=90&thumbnail=200x200&imageView"
},
"userAddressId":1,
"payType":"1",
"userMessage":"请优先配送!!!"
}'
返回响应
🟢200成功
application/json
Body
msg
string
必需
code
integer
必需
示例
{
"msg": "操作成功",
"code": 200
}
修改于 2023-12-26 06:53:18