- 接口注意事项
- 开放平台:接口调用凭证
- 开放平台:客户信息
- 开放平台:企业会员
- 开放平台:商品
- 开放平台:商品分组
- 开放平台:管理企业标签
- 开放平台:编辑客户企业标签
- 开放平台:事件通知
- 开放平台:获客活动
- 开放平台:成员信息
- 开放平台:推客
新增客户订单
POST
https://w.xiaoliebian.com/api/demo-wechat-work/open/api/customer/order/add
开放平台:客户信息
请求参数
Header 参数
Authorization
string <string>
认证令牌
示例值:
Bearer 64FMJbvkyQC2EHY8G9
Body 参数application/json
shopId
string
必需
Validate[max: 128; ]
orderId
string
必需
Validate[max: 128; ]
transactionId
string
可选
Validate[max: 128; ]
state
enum<integer>
必需
(See: 订单状态)
枚举值:
12345
示例值:
1
finalePrice
integer
必需
staffId
string
必需
Validate[max: 64; ]
originalPrice
integer
必需
orderItemList
array [object {14}]
必需
orderId
string <string>
必需
Validate[max: 128; ]
id
string <string>
必需
Validate[max: 128; ]
productId
string <string>
必需
Validate[max: 128; ]
skuId
string <string>
必需
Validate[max: 128; ]
banner
string <string>
必需
name
string <string>
必需
Validate[max: 128; ]
num
integer <int32>
购买数量
示例值:
0
originalUnitPrice
integer <int32>
必需
示例值:
0
freight
integer <int32>
必需
示例值:
0
discountPrice
integer <int32>
必需
示例值:
0
finalePrice
integer <int32>
必需
示例值:
0
value
array[string]
规格值,非必填
示例值:
,
state
enum<integer>
必需
(See: 订单状态)
枚举值:
12345
xlbAfterSaleStatus
integer
可选
externalUserId
string
必需
Validate[max: 64; ]
createTime
string
必需
示例:2023-12-01 12:12:12
shipReceiver
string
可选
shipPhone
string
可选
shipAddress
string
可选
示例
{
"shopId": "58",
"orderId": "94",
"transactionId": "47",
"state": 1,
"finalePrice": 24,
"staffId": "9",
"originalPrice": 98,
"orderItemList": [
{
"orderId": "4",
"id": "47",
"productId": "53",
"skuId": "2",
"banner": "ipsum commodo amet ut velit",
"name": "只各备对",
"num": 0,
"originalUnitPrice": 0,
"freight": 0,
"discountPrice": 0,
"finalePrice": 0,
"value": ",",
"state": 1,
"xlbAfterSaleStatus": 1
}
],
"externalUserId": "84",
"createTime": "2004-04-09 04:30:03",
"shipReceiver": "",
"shipPhone": "",
"shipAddress": ""
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://w.xiaoliebian.com/api/demo-wechat-work/open/api/customer/order/add' \
--header 'Authorization: Bearer 64FMJbvkyQC2EHY8G9' \
--header 'Content-Type: application/json' \
--data-raw '{
"shopId": "58",
"orderId": "94",
"transactionId": "47",
"state": 1,
"finalePrice": 24,
"staffId": "9",
"originalPrice": 98,
"orderItemList": [
{
"orderId": "4",
"id": "47",
"productId": "53",
"skuId": "2",
"banner": "ipsum commodo amet ut velit",
"name": "只各备对",
"num": 0,
"originalUnitPrice": 0,
"freight": 0,
"discountPrice": 0,
"finalePrice": 0,
"value": ",",
"state": 1,
"xlbAfterSaleStatus": 1
}
],
"externalUserId": "84",
"createTime": "2004-04-09 04:30:03",
"shipReceiver": "",
"shipPhone": "",
"shipAddress": ""
}'
返回响应
🟢200OK
application/json
Body
success
boolean
成功标识
示例值:
true
code
integer <int32>
错误编码
示例值:
0
msg
string <string>
错误信息
示例值:
value
null
必需
traceId
string <string>
链路ID
示例值:
示例
{
"success": true,
"code": 0,
"msg": "",
"value": "",
"traceId": ""
}
修改于 2024-09-11 08:46:51