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

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

与当前比较 查看页面历史

« 前一个 版本 27 下一个 »

接口说明

创建直邮小包订单

路径

HTTP Verb 

URL

Post

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

/v1/openApi/packetOrder/b2c/createOrders

 

请求头样例


POST 

POST /v1/openApi/packetOrder/b2c/createOrders HTTP/1.1
Content-Type: application/json
Accept: application/json
User-Agent: Mozilla 5.0

lang:zh_CN

Host: http://cfs-qa.etowertech.com/api/supplier-service

X-WallTech-Date: Thu, 06 Aug 2020 06:21:24 GMT
Authorization: WallTech testLvs2jdug2qIoRsJyuxs:2THPh5_j4OTYUGdinstTC4nYqDE=


请求字段(request)


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

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

orderUniqueNumber

referenceNo???



String50订单唯一编码区分不同订单用M
orderType

String10订单类型枚举:
B2C=小包直邮(此处为该值)
Fulfillment=仓库一件代发
M
originPortCode

String
始发港(空港/海港)英文代码O
injectPortCode

String50目的港英文代码O
channelCode

String64渠道代码英文、英文标点M
channelOption

String64渠道选项英文、英文标点O
platform

String20平台
O
incoterm

String50贸易术语枚举
DDU
DDP
O
collectionType 


20揽收类型枚举
Pick up上门揽收
Drop off自送到仓
不填默认drop off
O

insuranceOrNot

isInsurance



Boolean3是否投保boolean 不填默认falseO

signatureOrNot

isSignature



Boolean3是否签名boolean 不填默认falseO
remark



备注
O
extendData



拓展字段比如IOSS
key-value形式

consigneeaddressCode
String50收件人地址代码比如ONT8表示某个亚马逊仓库
name
String50收件人姓名
M
company
String512收件人公司

phone
String50收件人电话

email
String50收件人邮箱

countryCode
String2目的国二字代码英文代码M
state
String80收件人省/州

city
String80收件人城市
M
district
String128收件人区

addressLine1
String200收件人地址第一行
M
addressLine2
String200收件人地址第二行

addressLine3
String80收件人地址第三行

zipCode
String16收件人邮编

taxId
String255收件人税号

taxId1
String255收件人税号1

extendData


拓展字段

shippername
String50发件人姓名

company
String512发件人公司

phone
String50发件人电话

email
String50发件人邮箱

countryCode
String2始发国二字代码英文代码
state
String80发件人省/州

city
String80发件人城市

district
String128发件人区

addressLine1
String200发件人地址第一行

addressLine2
String200发件人地址第二行

addressLine3
String80发件人地址第三行

zipCode
String16发件人邮编

taxId
String255发件人税号

taxId1
String255发件人税号1

extendData


拓展字段 key-value

returnAddress

returnOption退件选项String50枚举:
退件
销毁
枚举:
退件
销毁

name退件人姓名String512


company退件人公司String50


phone退件人电话String50


email退件人邮箱String2


countryCode退件人国家二字代码String80英文代码英文代码
state退件人省/州String80


city退件人城市String128


district退件人区String200


addressLine1退件人地址第一行String200


addressLine2退件人地址第二行String80


addressLine3退件人地址第三行String16


zipCode退件人邮编String255


extendData拓展字段




parcelsreferenceNo
String80包裹参考号
M
referenceNo1
String80包裹参考号1

referenceNo2
String80包裹参考号2

consignmentId
String50包裹货物ID澳邮要求MLID+ConsignmentID 2年内不得重复使用数字
trackingNo
String80包裹跟踪号

descriptionEn
String255包裹英文描述
M
description
String255包裹中文描述

dangerousGoods
Boolean3包裹是否危险品true=危险品
false=非危险品

batteryType
Boolean3包裹带电类型枚举
true=带电
false=不带电

weight
BigDecimal8,3包裹重量8位,小数点后3位M
weightUnit
String10重量单位枚举:
KG(默认)
G
LB

length
BigDecimal8,3包裹长

width
BigDecimal8,3包裹宽

height
BigDecimal8,3包裹高

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

invoiceCurrencyCode
String5发票币种三字代码英文代码
invoiceValue
BigDecimal20,3发票金额
M
shippingInstruction
String50装运指示会显示在部分渠道的面单上
sortCode
String50分拣码会显示在部分渠道的面单上
extendData


拓展字段

itemsitemNumberString128商品编号

itemDescEnString255商品英文描述

itemDescString255商品本地描述

skuString128SKU编码

hsCodeString128海关编码

quantityInteger11商品数量

quantityUnitString10商品数量单位

unitPricedecimal10,2单价

pictureString
图片base64
salesURLString500销售链接

originCountryCodeString10原产国二字代码英文代码
weightBigDecimal10,3重量

usageString255用途

matertial

material

String255材质

extendData

拓展字段

insurance
(说明:如果isInsurance是true要填)
insuranceTypeString30投保类型可能是用来区分不同的保险第三方平台或者产品
beneficiaryTypeString20受益人类型枚举:
公司=company
个人=individual

beneficiaryString255受益人/公司

beneficiaryIdString20身份证/组织机构代码证

insuranceCurrencyCodeString8投保二字代码币种

insuranceAmountBigDecimal20,3保险金额

extendData

拓展字段

collectionInfo

collection
(说明:如果类型是pickup,要填)

date
date3揽收日期年月日
name
String512客户姓名

company
String50客户公司

phone
String50客户电话

email
String2客户邮箱

countryCode
String80客户国家二字代码英文代码
state
String80客户省/州

city
String128客户城市

district
String200客户区

addressLine1
String200客户地址第一行

addressLine2
String80客户地址第二行

addressLine3
String16客户地址第三行

zipCode
String255客户邮编

extendData


拓展字段

请求样例


{
"order": [
{
"channelCode": "UBI.CN2US.AC.GENERAL.LIGHT",
"channelOption": "B2Cchanneloption",
"collectionInfo":

{ "addressCode": "", "addressLine1": "", "addressLine2": "", "addressLine3": "", "city": "", "company": "", "countryCode": "", "district": "", "email": "", "extendData": null, "name": "", "phone": "", "returnOption": "", "state": "", "taxId": "", "taxId1": "", "zipCode": "" }

,
"collectionType": "",
"consignee":

{ "addressCode": "", "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" }

,
"extendData":

{ "extend": "extend" }

,
"facility": "B2C",
"incoterm": "DDP",
"injectPortCode": "",
"insuranceOrNot": "",
"orderType": "B2C",
"orderUniqueNumber":"test001",
"originPortCode": "",
"parcels": [
{
"batteryType": "false",
"consignmentId": "",
"dangerousGoods": false,
"description": "goodscn",
"descriptionEn": "goodsen",
"dimensionUnit": "CM",
"extendData": null,
"height": "10",
"invoiceCurrencyCode": "USD",
"invoiceValue": "35",
"insurance": [

{ "insuranceAmount": "", "insuranceCurrencyCode": "", "insuranceType": "", "modifiedAccount": "", "extendData": null }

],
"items": [

{ "extendData": null, "hsCode": "111", "itemDesc": "goodscn", "itemDescEn": "", "itemNumber": "Amireuxtest", "matertial": "testmatertial", "originCountryCode": "cn", "picture": "", "quantity": "1", "quantityUnit": "个", "salesURL": "testsalesurl", "sku": "testgoods", "unitPrice": "10", "usage": "testusage", "weight": "5" }

],
"length": "25",
"referenceNo": "APITES023",
"referenceNo1": "",
"referenceNo2": "",
"shippingInstruction": "",
"sortCode": "",
"trackingNo": "",
"weight": "5",
"weightUnit": "KG",
"width": "25"
}
],
"platform": "testplatform",
"remark": "testremark",
"returnAddress":

{ "addressCode": "", "addressLine1": "", "addressLine2": "", "addressLine3": "", "city": "", "company": "", "countryCode": "", "district": "", "email": "", "extendData": null, "name": "", "phone": "", "returnOption": "销毁", "state": "", "taxId": "", "taxId1": "", "zipCode": "" }

,
"shipper":

{ "addressCode": "", "addressLine1": "sipinglujiedao", "addressLine2": "gaoxinlu900hao", "addressLine3": "190shi", "city": "shanghaishi", "company": "shippercompany", "countryCode": "cn", "district": "yangpuqu", "email": "shippertest@123.com", "extendData": null, "name": "xiaozhang", "phone": "18893043453", "returnOption": "", "state": "shanghai", "taxId": "shippertaxid", "taxId1": "shippertaxid1", "zipCode": "300210" }

,
"signatureOrNot": ""
},
{
"channelCode": "UBI.CN2US.LHEST.STD.EXPRESS.CV",
"channelOption": "B2Cchanneloption",
"collectionInfo":

{ "addressCode": "", "addressLine1": "", "addressLine2": "", "addressLine3": "", "city": "", "company": "", "countryCode": "", "district": "", "email": "", "extendData": null, "name": "", "phone": "", "returnOption": "", "state": "", "taxId": "", "taxId1": "", "zipCode": "" }

,
"collectionType": "",
"consignee":

{ "addressCode": "", "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" }

,
"extendData":

{ "extend": "extend" }

,
"facility": "B2C",
"incoterm": "DDP",
"injectPortCode": "",
"insuranceOrNot": "",
"orderType": "B2C",
"orderUniqueNumber":"test001",
"originPortCode": "",
"parcels": [
{
"batteryType": "false",
"consignmentId": "",
"dangerousGoods": false,
"description": "goodscn",
"descriptionEn": "goodsen",
"dimensionUnit": "CM",
"extendData": null,
"height": "10",
"invoiceCurrencyCode": "USD",
"invoiceValue": "35",
"insurance": [

{ "insuranceAmount": "", "insuranceCurrencyCode": "", "insuranceType": "", "modifiedAccount": "", "type": "", "typeDesc": "" }

],
"items": [

{ "extendData": null, "hsCode": "111", "itemDesc": "goodscn", "itemDescEn": "", "itemNumber": "Amireuxtest", "matertial": "testmatertial", "originCountryCode": "cn", "picture": "", "quantity": "1", "quantityUnit": "个", "salesURL": "testsalesurl", "sku": "testgoods", "unitPrice": "10", "usage": "testusage", "weight": "5" }

],
"length": "25",
"referenceNo": "APITES024",
"referenceNo1": "",
"referenceNo2": "",
"shippingInstruction": "",
"sortCode": "",
"trackingNo": "",
"weight": "5",
"weightUnit": "KG",
"width": "25"
}
],
"platform": "testplatform",
"remark": "testremark",
"returnAddress":

{ "addressCode": "", "addressLine1": "", "addressLine2": "", "addressLine3": "", "city": "", "company": "", "countryCode": "", "district": "", "email": "", "extendData": null, "name": "", "phone": "", "returnOption": "销毁", "state": "", "taxId": "", "taxId1": "", "zipCode": "" }

,
"shipper":

{ "addressCode": "", "addressLine1": "sipinglujiedao", "addressLine2": "gaoxinlu900hao", "addressLine3": "190shi", "city": "shanghaishi", "company": "shippercompany", "countryCode": "cn", "district": "yangpuqu", "email": "shippertest@123.com", "extendData": null, "name": "xiaozhang", "phone": "18893043453", "returnOption": "", "state": "shanghai", "taxId": "shippertaxid", "taxId1": "shippertaxid1", "zipCode": "300210" }

,
"signatureOrNot": ""
}
]
}


返回样例


成功样例

{
"code": "0",
"data": {},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
}



失败样例

{
"code": "0",
"data": {
"test002": [

{ "code": "600222", "message": "referenceNo APITES032Field already exists, cannot be repeated" }

],
"test001": [

{ "code": "600222", "message": "referenceNo APITES033Field already exists, cannot be repeated" }

]
},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
}

ps: test001是 订单唯一编码 ,区分不同订单的不同错误描述。批量操作 成功的不会返回,会直接保存。



  • 无标签