接口说明
创建直邮小包订单
路径
...
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
...
请求样例
"ordertype":"Fulfillment"
| 代码块 |
|---|
[
{
"facility": "Australian Warehouse",
"channelCode": "AU test",
"channelOption": "",
"referenceNo": "030919",
"orderType": "Fulfillment",
"originPortCode": "",
"injectPortCode": "",
"platform": "eBay",
"incoterm": "",
"collectionType": null,
"isInsurance": "",
"isSignature": "",
"remark": "testremark",
"extendData": {
"extend": null
},
"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"
},
"shipper": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "",
"district": "",
"email": "",
"extendData": null,
"name": "1",
"phone": "",
"state": "",
"taxId": "",
"taxId1": "",
"zipCode": ""
},
"returnAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "",
"district": "",
"email": "",
"extendData": null,
"name": "",
"phone": "",
"returnOption": "",
"state": "",
"zipCode": ""
},
"parcels": [
{
"referenceNo": "12",
"referenceNo1": "",
"referenceNo2": "",
"consignmentId": "",
"trackingNo": "",
"descriptionEn": "",
"description": "",
"dangerousGoods": false,
"batteryType": "false",
"weight": 1.245,
"weightUnit": "",
"length": "",
"width": "",
"height": "",
"dimensionUnit": "CM",
"invoiceCurrencyCode": "",
"invoiceValue": "12.22",
"transactionCurrency": "USD",
"transactionAmount": "5.12",
"shippingInstruction": "",
"sortCode": "",
"extendData": {
"keepShipService": false
},
"items": [
{
"extendData": null,
"hsCode": "",
"itemDesc": "",
"itemDescEn": "",
"itemNumber": "",
"matertial": "",
"originCountryCode": "",
"picture": "",
"quantity": "1",
"quantityUnit": "",
"salesURL": "",
"sku": "SKG",
"unitPrice": "",
"usage": "",
"weight": null
},
{
"extendData": null,
"hsCode": "",
"itemDesc": "",
"itemDescEn": "",
"itemNumber": "",
"matertial": "",
"originCountryCode": "",
"picture": "",
"quantity": "1",
"quantityUnit": "",
"salesURL": "",
"sku": "TESTcommodity",
"unitPrice": "",
"usage": "",
"weight": null
}
],
"insurance": [
{
"insuranceAmount": "",
"insuranceCurrencyCode": "",
"insuranceType": "",
"beneficiaryType": "",
"beneficiary": "",
"beneficiaryId": "",
"extendData": null
}
]
}
],
"collection": {
"date": "",
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "",
"district": "",
"email": "",
"extendData": null,
"name": "",
"phone": "",
"state": "",
"zipCode": ""
}
},
{
"facility": "Australian Warehouse",
"channelCode": "AU test",
"channelOption": "",
"referenceNo": "030920",
"orderType": "Fulfillment",
"originPortCode": "",
"injectPortCode": "",
"platform": "eBay",
"incoterm": "",
"collectionType": null,
"isInsurance": "",
"isSignature": "",
"remark": "testremark",
"extendData": {
"extend": null
},
"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"
},
"shipper": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "",
"district": "",
"email": "",
"extendData": null,
"name": "1",
"phone": "",
"state": "",
"taxId": "",
"taxId1": "",
"zipCode": ""
},
"returnAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "",
"district": "",
"email": "",
"extendData": null,
"name": "",
"phone": "",
"returnOption": "",
"state": "",
"zipCode": ""
},
"parcels": [
{
"referenceNo": "12",
"referenceNo1": "",
"referenceNo2": "",
"consignmentId": "",
"trackingNo": "",
"descriptionEn": "",
"description": "",
"dangerousGoods": false,
"batteryType": "false",
"weight": 1.245,
"weightUnit": "",
"length": "",
"width": "",
"height": "",
"dimensionUnit": "CM",
"invoiceCurrencyCode": "",
"invoiceValue": "12.22",
"shippingInstruction": "",
"sortCode": "",
"extendData": null,
"items": [
{
"extendData": null,
"hsCode": "",
"itemDesc": "",
"itemDescEn": "",
"itemNumber": "",
"matertial": "",
"originCountryCode": "",
"picture": "",
"quantity": "1",
"quantityUnit": "",
"salesURL": "",
"sku": "SKG",
"unitPrice": "",
"usage": "",
"weight": null
},
{
"extendData": null,
"hsCode": "",
"itemDesc": "",
"itemDescEn": "",
"itemNumber": "",
"matertial": "",
"originCountryCode": "",
"picture": "",
"quantity": "1",
"quantityUnit": "",
"salesURL": "",
"sku": "TESTcommodity",
"unitPrice": "",
"usage": "",
"weight": null
}
],
"insurance": [
{
"insuranceAmount": "",
"insuranceCurrencyCode": "",
"insuranceType": "",
"beneficiaryType": "",
"beneficiary": "",
"beneficiaryId": "",
"extendData": null
}
]
}
],
"collection": {
"date": "",
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "",
"district": "",
"email": "",
"extendData": null,
"name": "",
"phone": "",
"state": "",
"zipCode": ""
}
}
] |
返回样例
成功样例
"ordertype":"Fulfillment"
| 代码块 |
|---|
{
"code": "0",
"data": {},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
} |
失败样例
"ordertype":"Fulfillment"
| 代码块 |
|---|
{
"code": "0",
"data": {
"030920": [
{
"code": "600904",
"message": "referenceNo:030920,Already exists in the system"
}
],
"030919": [
{
"code": "600904",
"message": "referenceNo:030919,Already exists in the system"
}
]
},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
} |
ps: test001是 订单唯一编码 ,区分不同订单的不同错误描述。批量操作 成功的不会返回,会直接保存。
attachments创建仓库尾程小包订单
接口详情见:10.创建直邮小包订单3.0