创建订单

接口概述

该接口用于创建订单,创建订单最多允许50个SKU,且必须为同一个供应商的商品。多个供应商或多于50个SKU的情况,请自行拆单后提交。一些特殊情况会一次创建多个订单并返回多个订单号。

POST /api/v3/platform/order/create

请求参数

参数名 类型 必填 示例值 描述
addressParam Object {“address”:”网商路699号”,”phone”: “0517-88990077”,”mobile”: “15251667788”,”fullName”: “张三”,”postCode”: “000000”,”areaText”: “滨江区”,”townText”: “”,”cityText”: “杭州市”,”provinceText”: “浙江省”} 收货地址信息
» fullName String 张三 收货人姓名
» mobile String 15251667788 手机
» phone String 0517-88990077 电话
» postCode String 000000 邮编
» countryText String 中国 国家文本
» provinceText String 浙江省 省份文本
» cityText String 杭州市 市文本
» areaText String 滨江区 区文本
» townText String 长河镇 镇文本
» address String 网南路699号 街道地址
cargoParamList Object[] [{“specId”: “b266e0726506185beaf205cbae88530d”,”quantity”: 5,”offerId”: 554456348334},{“specId”: “2ba3d63866a71fbae83909d9b4814f01”,”quantity”: 6,”offerId”: 554456348334}] 商品信息
» offerId Long 554465348334 商品对应的offer id
» specId String b266e0726506185beaf205cabe88530d 商品规格id
» quantity Double 5 商品数量(计算金额)
» openOfferId String Wcv2w970KoL1BcJQGp3wvKvcBThOlPihUtkK3To4= 加密的offerId,当请求返回时只有openOfferId,需将openOfferId传入offerId下单
» outMemberId String 9898291823-23 外部用户会话ID
invoiceParam Object {“invoiceType”:0,”cityText”: “杭州市”,”provinceText”: “浙江省”,”address”: “网商路699号”,”phone”: “0517-88990077”,”mobile”: “15251667788”,”fullName”: “张五”,”postCode”: “000000”,”areaText”: “滨江区”,”companyName”: “测试公司”,”taxpayerIdentifier”: “123455”} 发票信息
outOrderId String 988129883123 外部订单号
message String 买家留言 买家留言信息
flow String general general(创建大市场订单),fenxiao(创建分销订单),saleproxy流程将校验分销关系,paired(火拼下单),boutiquefenxiao(精选货源分销价下单,采购量1个使用包邮), boutiquepifa(精选货源批发价下单,采购量大于2使用).

返回参数

名称 类型 描述 示例值
code Integer 返回状态码 0
result Boolean 返回结果 true
message String 返回描述 “success”
data Object 返回数据 -
» totalSuccessAmount Long 订单总金额(单位:分),一次创建多个订单时,该字段为总金额 100
» orderId String 订单id,一次创建多个订单时,该字段为 111111111
» success Boolean 是否成功 true
» code String 错误码 -
» message String 错误信息 -
» accountPeriod Object 账期信息,返回账期时,返回该字段 -
» » tapType Integer 账期的类型:1—一个月指定日期计算一次,3—两个月指定日期计算一次,6—三个月指定日期计算一次,5—按收货时间和账期计算 1
» » tapDate Integer 根据账期类型不同而不同,按账期类型此值代表是账单日期计算时此值代表计算时间周期 12
» » tapOverdue Integer 逾期次数 0
» failedOfferList Object[] 失败商品信息 -
» » offerId String 下单失败的商品 554465348334
» » specId String 下单失败商品的规格ID b266e0726506185beaf205cabe88530d
» » errorCode String 下单失败的错误代码 0
» » errorMessage String 下单失败的错误描述 -
» postFee Long 运费,单位:分,一次创建多个订单时,该字段为总运费 -
» orderList Object[] 一次创建多个订单时 -
» » postFee Long 运费 10
» » orderAmmount Long 订单实际资金金额,单位为分 100
» » message String 描述信息 null
» » resultCode String 返回码 200
» » success Boolean 是否成功 true
» » orderId String 订单号 123124124
» » payChannel String 支付渠道 shegou

示例请求

  1. {
  2. "flow": "general",
  3. "message": "买家留言",
  4. "addressParam": {
  5. "fullName": "张三",
  6. "mobile": "15251667788",
  7. "phone": "0517-88990077",
  8. "postCode": "000000",
  9. "countryText": "中国",
  10. "provinceText": "浙江省",
  11. "cityText": "杭州市",
  12. "areaText": "滨江区",
  13. "townText": "长河镇",
  14. "address": "网南路699号"
  15. },
  16. "cargoParamList": [
  17. {
  18. "offerId": 554465348334,
  19. "specId": "b266e0726506185beaf205cabe88530d",
  20. "quantity": 5,
  21. "openOfferId": "Wcv2w970KoL1BcJQGp3wvKvcBThOlPihUtkK3To4=",
  22. "outMemberId": "9898291823-23"
  23. },
  24. {
  25. "offerId": 554465348334,
  26. "specId": "2ba3d63866a71fbae83909d9b4814f01",
  27. "quantity": 6
  28. }
  29. ],
  30. "outOrderId": "988129883123",
  31. }

示例返回

  1. {
  2. "code": 0,
  3. "result": true,
  4. "message": "success",
  5. "data": {
  6. "totalSuccessAmount": 100,
  7. "orderId": "111111111",
  8. "success": true,
  9. "code": "200",
  10. "message": null,
  11. "accountPeriod": {
  12. "tapType": 1,
  13. "tapDate": 12,
  14. "tapOverdue": 0
  15. },
  16. "failedOfferList": [
  17. {
  18. "offerId": "554465348334",
  19. "specId": "b266e0726506185beaf205cabe88530d",
  20. "errorCode": "0",
  21. "errorMessage": "-"
  22. }
  23. ],
  24. "postFee": 10,
  25. "orderList": [
  26. {
  27. "postFee": 10,
  28. "orderAmmount": 100,
  29. "message": null,
  30. "resultCode": "200",
  31. "success": true,
  32. "orderId": "123124124",
  33. "payChannel": "shegou"
  34. }
  35. ]
  36. }
  37. }