提交下单V2
POST
/v2/order
请求参数
Body 参数application/json
orderSn
string
必需
spu
array [object {2}]
商品组
sku
number
必需
number
number
数量
address
object
地址
consignee
string
必需
phone
string
联系方式
province
string
省
city
string
市
area
string
区
street
string
街道
description
string
必需
strictMode
boolean
可选
默认情况下,仅检测已支付的订单是否有重复。
严格模式下,不论订单是否支付,只要是重复订单就进行拦截
示例
{
"orderSn": "string",
"spu": [
{
"sku": 0,
"number": 0
}
],
"address": {
"consignee": "string",
"phone": "string",
"province": "string",
"city": "string",
"area": "string",
"street": "string",
"description": "string"
},
"strictMode": true
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/v2/order' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderSn": "string",
"spu": [
{
"sku": 0,
"number": 0
}
],
"address": {
"consignee": "string",
"phone": "string",
"province": "string",
"city": "string",
"area": "string",
"street": "string",
"description": "string"
},
"strictMode": true
}'
返回响应
🟢200成功
application/json
Body
code
number
1:成功
msg
string
必需
示例
{
"code": 0,
"msg": "string"
}