接口说明
创建直邮小包订单
路径
...
HTTP Verb
...
URL
...
qa: https://cfs-qa.etowertech.com/api/supplier-service/
/v1/openApi/packetOrder/b2c/createOrders
请求头样例
...
POST /v1/openApi/packetOrder/b2c/createOrders HTTP/1.1
Host: http://cfs-qa.etowertech.com/ Content-Type: application/json
Accept: application/json
Authorization:WallTech etotest8xkIIphLnbkjRACNj4P:pc9H97D-_b2_TSCVvNj81A
X-WallTech-Date:Tue, 02 Aug 2022 06:43:37 GMT
请求字段(request)
...
| sparkName | Sparkline |
|---|---|
| hidePane | Filtration Panel |
| id | 1678688780671 |
| isNew | false |
| isOR | AND |
| formatVersion | 2 |
| separator | Point (.) |
...
referenceNo
...
枚举
请按照页面底部附件“平台名称”要求填写
...
isInsurance
...
isSignature
...
orderType=Fulfillment :不必填;
...
orderType=Fulfillment :不必填;
...
orderType=Fulfillment :不必填;
...
orderType=Fulfillment :不必填;
...
orderType=B2C
才可以填写shipper 对象,且非必填
...
returnAddress
...
orderType=B2C
才可以填写returnAddress对象,且非必填
...
orderType=Fulfillment :不必填;
...
orderType=Fulfillment :不必填;
orderType=B2C :必填;
...
拓展字段
...
拓展字段key-value
key:keepShipService
value:boolean
...
matertial
...
collection
...
date
...
请求样例
"ordertype":"Fulfillment"
| 代码块 |
|---|
[
{
"facility": "Australian Warehouse",
"channelCode": "AU test",
"channelOption": "",
"referenceNo": "TestA00001",
"orderType": "Fulfillment",
"platform": "eBay",
"remark": "testremark",
"consignee": {
"addressCode": "11113",
"addressLine1": "street9230",
"addressLine2": "8349hao",
"addressLine3": "345shi",
"city": "testcity",
"company": "testcompany",
"countryCode": "us",
"district": "testdistrict",
"email": "testemail@123.com",
"extendData": null,
"name": "Mack",
"phone": "36247938384",
"state": "teststate",
"taxId": "testtaxid",
"taxId1": "testtaxid1",
"zipCode": "8238juej"
},
"parcels": [
{
"referenceNo": "12",
"referenceNo1": "",
"referenceNo2": "",
"consignmentId": "",
"trackingNo": "",
"descriptionEn": "",
"description": "",
"dangerousGoods": false,
"batteryType": "false",
"weight": 1.245,
"weightUnit": null,
"length": "",
"width": "",
"height": "",
"dimensionUnit": "CM",
"invoiceCurrencyCode": null,
"invoiceValue": "12.22",
"transactionCurrency": "USD",
"transactionAmount": "5.12",
"shippingInstruction": "",
"sortCode": "",
"extendData": {
"keepShipService": false
},
"items": [
{
"quantity": "1",
"sku": "SKG"
},
{
"quantity": "2",
"sku": "TESTcommodity"
}
]
}
]
},
{
"facility": "Australian Warehouse",
"channelCode": "AU test",
"channelOption": "",
"referenceNo": "TestA00002",
"orderType": "Fulfillment",
"platform": "eBay",
"remark": "testremark",
"consignee": {
"addressCode": "11113",
"addressLine1": "street9230",
"addressLine2": "8349hao",
"addressLine3": "345shi",
"city": "testcity",
"company": "testcompany",
"countryCode": "us",
"district": "testdistrict",
"email": "testemail@123.com",
"extendData": null,
"name": "Mack",
"phone": "36247938384",
"state": "teststate",
"taxId": "testtaxid",
"taxId1": "testtaxid1",
"zipCode": "8238juej"
},
"parcels": [
{
"referenceNo": "12",
"referenceNo1": "",
"referenceNo2": "",
"consignmentId": "",
"trackingNo": "",
"descriptionEn": "",
"description": "",
"dangerousGoods": false,
"batteryType": "false",
"weight": 1.245,
"weightUnit": null,
"length": "",
"width": "",
"height": "",
"dimensionUnit": "CM",
"invoiceCurrencyCode": null,
"invoiceValue": "12.22",
"transactionCurrency": "USD",
"transactionAmount": "5.12",
"shippingInstruction": "",
"sortCode": "",
"extendData": {
"keepShipService": false
},
"items": [
{
"quantity": "1",
"sku": "SKG"
},
{
"quantity": "2",
"sku": "TESTcommodity"
}
]
}
]
}
] |
返回样例
成功样例
"ordertype":"Fulfillment"
| 代码块 |
|---|
[
{
"code": "0",
"data": {
"orderNo": "C12283230322000025O",
"referenceNo": "TestA00001"
},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
},
{
"code": "0",
"data": {
"orderNo": "C12283230322000026O",
"referenceNo": "TestA00002"
},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
}
] |
失败样例
"ordertype":"Fulfillment"
| 代码块 |
|---|
[
{
"code": "0005",
"data": "TestA00001",
"errors": [
{
"code": "600904",
"message": "referenceNo:TestA00001,Already exists in the system"
}
],
"message": "paramter error",
"messageId": "",
"success": false,
"warnList": ""
},
{
"code": "0005",
"data": "TestA00002",
"errors": [
{
"code": "600904",
"message": "referenceNo:TestA00002,Already exists in the system"
}
],
"message": "paramter error",
"messageId": "",
"success": false,
"warnList": ""
}
] |
ps: test001是 订单唯一编码 ,区分不同订单的不同错误描述。批量操作 成功的不会返回,会直接保存。
attachments创建仓库尾程小包订单
接口详情见:10.创建直邮小包订单3.0