版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

...

创建小包订单

路径

HTTP Verb 

URL

POST

qa: https://cfs-qa.etowertech.com/api/supplier-service

prd: http://b2b.etowertech.com/api/supplier-service

/api/supplier-service/v2/b2c/orders



 

请求头样例



POST  /api/supplier-service/v2/b2c/orders  HTTP/1.1

Content-Type: application/json

Accept: application/json

User-Agent: Mozilla 5.0

Host: cfs-qa.etowertech.com

X-WallTech-Date: Thu, 06 Aug 2020 06:21:24 GMT

Authorization:WallTech testv7lVa8Fu2Kn6R7OAG6T:htM1QoTEUnuLsVbItVtABfSFYCs=


请求字段(request)


一级字段二级字段三级字段四级字段类型长度限制中文含义描述是否必填
orderfacility

String50发件人网点B2C:shipper facility
FF:warehouse
M

channelCode

String64渠道代码英文、英文标点,传值传的是渠道名称M

platform

String20平台
O

remark

String200备注
O

consigneeaddressCode
String50收件人地址代码比如ONT8表示某个亚马逊仓库

name
String50收件人姓名
M

company
String50收件人公司


phone
String50收件人电话


email
String50收件人邮箱


countryCode
String2目的国二字代码英文代码M

state
String80收件人省/州
M

city
String80收件人城市
M

district
String128收件人区


addressLine1
String200收件人地址第一行
M

addressLine2
String200收件人地址第二行


addressLine3
String80收件人地址第三行


zipCode
String16收件人邮编
M

shippername
String50发件人姓名


company
String512发件人公司


phone
String50发件人电话


email
String50发件人邮箱


countryCode
String2始发国二字代码英文代码

state
String80发件人省/州


city
String80发件人城市


district
String128发件人区


addressLine1
String200发件人地址第一行


addressLine2
String200发件人地址第二行


addressLine3
String80发件人地址第三行


zipCode
String16发件人邮编


parcelsreferenceNo
String80包裹参考号
M

description
String255包裹中文描述


weight
BigDecimal8,3包裹重量8位,小数点后3位M

weightUnit
String10重量单位枚举:
KG(默认)
G
LB


length
BigDecimal8,3包裹长


width
BigDecimal8,3包裹宽


height
BigDecimal8,3包裹高


dimensionUnit
String8尺寸单位枚举:
CM(默认)
M


itemsskuString128SKU编码
M

quantityInteger11商品数量
M


请求样例


[
     {
         "facility":   "Canada Warehouse Toronto 3Canada Warehouse Toronto 3-FBA2431425677i656434536",
         "channelCode":   "hwc",
         "platform":   "12345678901234567890",
         "remark":   "testremark",
         "consignee":   {
             "addressCode":   "test",
             "name":   "testname",
             "company":   "testcompany",
             "countryCode":   "cn",
             "state":   "teststate",
             "city":   "testcity",
             "district":   "testdistirct",
             "addressLine1":   "testaddressline1",
             "addressLine2":   "testaddressline2",
             "addressLine3":   "testaddressline3",
             "zipCode":   "testzipcode",
             "phone":   "testphone",
             "email":   "testemail@123.com"
         },
         "shipper":   {
             "addressCode":   "",
             "name":   "",
             "company":   "",
             "countryCode":   "",
             "state":   "",
             "city":   "",
             "district":   "",
             "addressLine1":   "",
             "addressLine2":   "",
             "addressLine3":   "",
             "zipCode":   "",
             "phone":   "",
             "email":   ""
         },
         "parcels":   {
             "referenceNo":   "testnewapi017",
             "description":   "GOODSSKG",
             "weight":   "12",
             "weightUnit":   "",
             "length":   "",
             "width":   "",
             "height":   "",
             "dimensionUnit":   "CM",
             "items":   [
                 {
                     "sku":   "testgoods",
                     "quantity":   "1"
                 }
             ]
         }
     },
     {
         "facility":   "Canada Warehouse Toronto 3Canada Warehouse Toronto 3-FBA2431425677i656434536",
         "channelCode":   "hwc",
         "platform":   "12345678901234567890",
         "remark":   "testremark",
         "consignee":   {
             "addressCode":   "11112",
             "name":   "testname",
             "company":   "testcompany",
             "countryCode":   "cn",
             "state":   "teststate",
             "city":   "testcity",
             "district":   "testdistirct",
             "addressLine1":   "testaddressline1",
             "addressLine2":   "testaddressline2",
             "addressLine3":   "testaddressline3",
             "zipCode":   "testzipcode",
             "phone":   "testphone",
             "email":   "testemail@123.com"
         },
         "shipper":   {
             "addressCode":   "",
             "name":   "",
             "company":   "",
             "countryCode":   "",
             "state":   "",
             "city":   "",
             "district":   "",
             "addressLine1":   "",
             "addressLine2":   "",
             "addressLine3":   "",
             "zipCode":   "",
             "phone":   "",
             "email":   ""
         },
         "parcels":   {
             "referenceNo":   "testnewapi018",
             "description":   "GOODSSKG",
             "weight":   "12",
             "weightUnit":   "",
             "length":   "",
             "width":   "",
             "height":   "",
             "dimensionUnit":   "CM",
             "items":   [
                 {
                     "sku":   "testgoods",
                     "quantity":   "1"
                 }
             ]
         }
     }
]


返回样例


成功样例

[
     {
         "code":   "0",
         "data":   {
             "orderNo":   "C12283230214000029O",
             "referenceNo":   "testnewapi017"
         },
         "errors":   "",
         "message":   "",
         "messageId":   "",
         "success":   true,
         "warnList":   ""
     },
     {
         "code":   "0",
         "data":   {
             "orderNo":   "C12283230214000030O",
             "referenceNo":   "testnewapi018"
         },
         "errors":   "",
         "message":   "",
         "messageId":   "",
         "success":   true,
         "warnList":   ""
     }
]




失败样例

[
     {
         "code":   "0005",
         "data":   {
             "orderIndex":   1,
             "referenceNo":   "testnewapi017"
         },
         "errors":   [
             {
                 "code":   "600904",
                 "message":   "referenceNo:testnewapi017,Already exists in the systemAlready exists in the system"
             }
         ],
         "message":   "paramter errorparamter error",
         "messageId":   "",
         "success":   false,
         "warnList":   ""
     },
     {
         "code":   "0",
         "data":   {
             "orderNo":   "C12283230214000033O",
             "referenceNo":   "testnewapi019"
         },
         "errors":   "",
         "message":   "",
         "messageId":   "",
         "success":   true,
         "warnList":   ""
     }
]