|
开发者你好,通过你提供的请求数据
我们进行了全流程测试
对于这个商品:"item_id": 2150620498,"sku_id": 11457806454,
经过查询:原价为:39800 分,请从接口 https://doc.youzanyun.com/detail/API/0/1377 获取正确数据传入订单创建接口
{
"trace_id": "yz7-0ad2690a-1667987162295-607353",
"code": 200,
"data": {
"sku_img": {
"spec_values": []
},
"skus": [
{
"sku_no": "A0000005227116",
"price": 39800,
"stock_num": 999,
"sku_id": 11457806454,
"sku_specs": [],
"total_sold_num": 0,
"cost_price": 0
}
],
"category_name": "产品分类",
"item_tags": "口服产品",
"item_id": 2150620498,
"stock_num": 999,
"title": "科龄明眸",
"price_min": 39800,
"item_status": 1,
"item_no": "A0000005227116",
"item_img_urls": [
"https://img01.yzcdn.cn/upload_files/2022/10/29/FmtWrlu-1S0wyPJgIQh3zk5z68h9.jpg"
],
"price": 39800,
"goods_alias": "2fuhznqv6u2o6jd",
"update_at": 1667026948000,
"create_at": 1665669444000,
"package_info": "",
"price_max": 39800,
"introduction": ""
},
"success": true,
"message": "successful"
}
之后,通过更正的数据进行调用
curl -X POST "https://open.youzanyun.com/api/youzan.mei.order.create/4.0.0?access_token=*****" \
-H 'content-type: application/json' \
-d '{"type":8,"node_kdt_id":112924250,"order_buyer_info":{"yz_open_id":"11HCse7C1036963462049206272","address_id":"690244523","mobile":"13891327706"},"order_items":[{"item_snapshot_id":"n90go7UrQeVbidNZbxdh8WmdvR9w","num":1,"item_origin_price":39800,"sku_id":11457806454,"item_sum_price":39800,"item_id":2150620498,"item_type":2}]}'
{"trace_id":"yz7-0ad26a58-1667987367917-78037","code":200,"data":{"yz_open_id":"11HCse7C1036963462049206272","order_price":39900,"tid":"M2022110917492874192615"},"success":true,"message":"successful"}
已经成功得到订单创建成功的结果
另: 1. 用于测试的订单 M2022110917492874192615 请自行处理取消/其他处理。
2. 为保证安全,示例curl请求内 access_token 已做隐藏处理
|
|