转至元数据结尾
转至元数据起始

正在查看旧版本。 查看 当前版本.

与当前比较 查看页面历史

« 前一个 版本 28 下一个 »

接口说明

创建小包订单

路径

HTTP Verb 

URL

POST

qa: https://cfs-qa.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

StringM50仓库代码

channelCode

StringM64

渠道名称

仅限英文字符


platform

StringO20订单平台来源(新增)

remark

StringO200订单备注

extendData




拓展字段 key-value形式(新增)



consigneeaddressCode
String
50

收件人地址代码

比如ONT8表示某个亚马逊仓库



name
StringM50收件人姓名


company
String
50收件人公司


phone
String
50

收件人电话



email
String
50收件人邮箱


countryCode
StringM2收件人国家二字码;如CN;US


state
StringM?80收件人省/州


city
StringM80收件人城市


district
String
128收件人区


addressLine1
StringM200收件人地址第一行


addressLine2
String
200收件人地址第二行


addressLine3
String
80收件人地址第三行


zipCode
StringM16收件人邮编



shippername
String
50发件人姓名


company
String
512?发件人公司


phone
String
50发件人电话


email
String
50发件人邮箱


countryCode
String
2发件人国家二字码


state
String
80发件人省/州


city
String
80发件人城市


district
String
128发件人区


addressLine1
String
200发件人地址第一行


addressLine2
String
200发件人地址第二行


addressLine3
String
80发件人地址第三行


zipCode


16发件人邮编



parcelsreferenceNo
StringM80包裹参考号


























































































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

parcels

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 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 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 system"
}
],
"message": "paramter error",
"messageId": "",
"success": false,
"warnList": ""
},
{
"code": "0",
"data": {
"orderNo": "C12283230214000033O",
"referenceNo": "testnewapi019"
},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
}
]




  • 无标签