invoiceCurrencyCode
接口说明
创建直邮小包订单
路径
HTTP Verb | URL |
|---|---|
| Post | 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 |
请求字段(request)
| 字段 | 三级字段 | 四级字段 | 类型 | 长度限制 | 中文含义 | 描述 | 是否必填 | 补充描述 |
| facility | String | 50 | 发件人网点 | B2C:shipper facility FF:warehouse | M | |||
referenceNo | String | 50 | 订单唯一编码 | 区分不同订单用 | M | |||
| orderType | String | 10 | 订单类型 | 枚举: B2C=小包直邮(此处为该值) Fulfillment=仓库一件代发 | M | |||
| originPortCode | String | 始发港(空港/海港) | 英文代码 | O | ||||
| injectPortCode | String | 50 | 目的港 | 英文代码 | O | |||
| channelCode | String | 64 | 渠道代码 | 英文、英文标点 | M | |||
| channelOption | String | 64 | 渠道选项 | 英文、英文标点 | O | |||
| platform | Short | 20 | 平台 | 枚举
请按照页面底部附件“平台名称”要求填写 | O | |||
| incoterm | String | 50 | 贸易术语 | 枚举 DDU DDP | O | |||
| collectionType | 20 | 揽收类型 | 枚举 Pick up上门揽收 Drop off自送到仓 不填默认drop off | O | ||||
isInsurance | Boolean | 5 | 是否投保 | boolean 不填默认false | O | |||
isSignature | Boolean | 5 | 是否签名 | boolean 不填默认false | O | |||
| remark | 200 | 备注 | O | |||||
| extendData | 拓展字段 | 比如IOSS key-value形式 | ||||||
| consignee | addressCode | String | 50 | 收件人地址代码 | 比如ONT8表示某个亚马逊仓库 | |||
| name | String | 50 | 收件人姓名 | M | orderType=Fulfillment :必填; orderType=B2C :必填; | |||
| company | String | 512 | 收件人公司 | |||||
| phone | String | 50 | 收件人电话 | |||||
| String | 50 | 收件人邮箱 | ||||||
| countryCode | String | 2 | 目的国二字代码 | 英文代码 | M | orderType=Fulfillment :必填; orderType=B2C :必填; | ||
| state | String | 80 | 收件人省/州 | |||||
| city | String | 80 | 收件人城市 | M | orderType=Fulfillment :必填; orderType=B2C :必填; | |||
| district | String | 128 | 收件人区 | |||||
| addressLine1 | String | 200 | 收件人地址第一行 | M | orderType=Fulfillment :必填; orderType=B2C :必填; | |||
| addressLine2 | String | 200 | 收件人地址第二行 | |||||
| addressLine3 | String | 80 | 收件人地址第三行 | |||||
| zipCode | String | 16 | 收件人邮编 | |||||
| taxId | String | 255 | 收件人税号 | |||||
| taxId1 | String | 255 | 收件人税号1 | |||||
| extendData | 拓展字段 | |||||||
| shipper | name | String | 50 | 发件人姓名 | orderType=B2C 才可以填写shipper 对象,且非必填 | |||
| company | String | 512 | 发件人公司 | |||||
| phone | String | 50 | 发件人电话 | |||||
| String | 50 | 发件人邮箱 | ||||||
| countryCode | String | 2 | 始发国二字代码 | 英文代码 | ||||
| state | String | 80 | 发件人省/州 | |||||
| city | String | 80 | 发件人城市 | |||||
| district | String | 128 | 发件人区 | |||||
| addressLine1 | String | 200 | 发件人地址第一行 | |||||
| addressLine2 | String | 200 | 发件人地址第二行 | |||||
| addressLine3 | String | 80 | 发件人地址第三行 | |||||
| zipCode | String | 16 | 发件人邮编 | |||||
| taxId | String | 255 | 发件人税号 | |||||
| taxId1 | String | 255 | 发件人税号1 | |||||
| extendData | 拓展字段 key-value | |||||||
returnAddress | returnOption | 退件选项 | String | 50 | 枚举: 退件 销毁 | 枚举: 退件 销毁 | orderType=B2C 才可以填写returnAddress对象,且非必填 | |
| name | 退件人姓名 | String | 50 | |||||
| company | 退件人公司 | String | 512 | |||||
| phone | 退件人电话 | String | 50 | |||||
| 退件人邮箱 | String | 50 | ||||||
| countryCode | 退件人国家二字代码 | String | 2 | 英文代码 | 英文代码 | |||
| state | 退件人省/州 | String | 80 | |||||
| city | 退件人城市 | String | 80 | |||||
| district | 退件人区 | String | 128 | |||||
| addressLine1 | 退件人地址第一行 | String | 200 | |||||
| addressLine2 | 退件人地址第二行 | String | 200 | |||||
| addressLine3 | 退件人地址第三行 | String | 80 | |||||
| zipCode | 退件人邮编 | String | 16 | |||||
| extendData | 拓展字段 | |||||||
| parcels | referenceNo | String | 80 | 包裹参考号 | M | |||
| referenceNo1 | String | 80 | 包裹参考号1 | |||||
| referenceNo2 | String | 80 | 包裹参考号2 | |||||
| consignmentId | String | 50 | 包裹货物ID | 澳邮要求MLID+ConsignmentID 2年内不得重复使用数字 | ||||
| trackingNo | String | 80 | 包裹跟踪号 | |||||
| descriptionEn | String | 255 | 包裹英文描述 | M | orderType=Fulfillment :不必填; orderType=B2C :必填; | |||
| description | String | 255 | 包裹中文描述 | |||||
| dangerousGoods | Boolean | 5 | 包裹是否危险品 | true=危险品 false=非危险品 | ||||
| batteryType | Boolean | 5 | 包裹带电类型 | 枚举 true=带电 false=不带电 | ||||
| weight | BigDecimal | 8,3 | 包裹重量 | 8位,小数点后3位 | M | orderType=Fulfillment :不必填; orderType=B2C :必填; | ||
| weightUnit | String | 2 | 重量单位 | 枚举: KG(默认) G LB | ||||
| length | BigDecimal | 8,2 | 包裹长 | |||||
| width | BigDecimal | 8,2 | 包裹宽 | |||||
| height | BigDecimal | 8,2 | 包裹高 | |||||
| dimensionUnit | String | 8 | 尺寸单位 | 枚举: CM(默认) M | ||||
| invoiceCurrencyCode | String | 3 | 发票币种三字代码 | 英文代码 | ||||
| invoiceValue | BigDecimal | 20,2 | 发票金额 | M | orderType=Fulfillment :不必填; orderType=B2C :必填; | |||
| transactionCurrency | BigDecimal | 8,2 | 交易币种 | 电商平台成交币种 | ||||
| transactionAmount | BigDecimal | 8,2 | 交易金额 | 电商平台成交金额 | ||||
| shippingInstruction | String | 50 | 装运指示 | 会显示在部分渠道的面单上 | ||||
| sortCode | String | 50 | 分拣码 | 会显示在部分渠道的面单上 | ||||
| extendData | 拓展字段 | 拓展字段key-value(新增) 'keepShipService': xxx boolean 是/否 'xxId':xxx | orderType=Fulfillment :可用; orderType=B2C :不用; | |||||
| items | itemNumber | String | 128 | 商品编号 | ||||
| itemDescEn | String | 255 | 商品英文描述 | |||||
| itemDesc | String | 255 | 商品本地描述 | |||||
| sku | String | 128 | SKU编码 | M | ||||
| hsCode | String | 128 | 海关编码 | |||||
| quantity | Integer | 9 | 商品数量 | M | ||||
| quantityUnit | String | 10 | 商品数量单位 | |||||
| unitPrice | decimal | 8,2 | 单价 | |||||
| picture | String | 图片 | base64 | |||||
| salesURL | String | 500 | 销售链接 | |||||
| originCountryCode | String | 10 | 原产国二字代码 | 英文代码 | ||||
| weight | BigDecimal | 8,3 | 重量 | |||||
| usage | String | 255 | 用途 | |||||
material | String | 255 | 材质 | |||||
| extendData | 拓展字段 | |||||||
| insurance (说明:如果isInsurance是true要填) | insuranceType | String | 30 | 投保类型 | 可能是用来区分不同的保险第三方平台或者产品 | |||
| beneficiaryType | String | 20 | 受益人类型 | 枚举: 公司=company 个人=individual | ||||
| beneficiary | String | 255 | 受益人/公司 | |||||
| beneficiaryId | String | 20 | 身份证/组织机构代码证 | |||||
| insuranceCurrencyCode | String | 3 | 投保三字代码币种 | |||||
| insuranceAmount | BigDecimal | 20,3 | 保险金额 | |||||
| extendData | 拓展字段 | |||||||
collection | date | date | 揽收日期 | 年月日 | (说明:如果类型是pickup,要填) | |||
| name | String | 50 | 客户姓名 | |||||
| company | String | 512 | 客户公司 | |||||
| phone | String | 50 | 客户电话 | |||||
| String | 50 | 客户邮箱 | ||||||
| countryCode | String | 2 | 客户国家二字代码 | 英文代码 | ||||
| state | String | 80 | 客户省/州 | |||||
| city | String | 80 | 客户城市 | |||||
| district | String | 128 | 客户区 | |||||
| addressLine1 | String | 200 | 客户地址第一行 | |||||
| addressLine2 | String | 200 | 客户地址第二行 | |||||
| addressLine3 | String | 80 | 客户地址第三行 | |||||
| zipCode | String | 16 | 客户邮编 | |||||
| extendData | 拓展字段 |
请求样例
1、"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"
}
]
}
]
}
]
2、"ordertype":"B2C"
[
{
"facility": "B2C321",
"channelCode": "UBI.CN2US.AC.GENERAL.LIGHT",
"channelOption": "B2Cchanneloption",
"referenceNo": "XB03091",
"orderType": "B2C",
"originPortCode": "",
"injectPortCode": "",
"platform": "eBay",
"incoterm": "DDP",
"collectionType": "Pick up",
"isInsurance": null,
"isSignature": null,
"remark": "testremark",
"extendData": {
"extend": null
},
"consignee": {
"addressCode": null,
"addressLine1": "testaddressline1",
"addressLine2": "8349hao",
"addressLine3": "345shi",
"city": "testcity",
"company": "testcompany",
"countryCode": "us",
"district": "testdistrict",
"email": "testemail@123.com",
"extendData": null,
"name": "testconsigneename",
"phone": "36247938384",
"state": "teststate",
"taxId": "testtaxid",
"taxId1": "testtaxid1",
"zipCode": "8238juej"
},
"shipper": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "us",
"district": "",
"email": "",
"extendData": null,
"name": "",
"phone": "",
"state": "",
"taxId": "",
"taxId1": "",
"zipCode": ""
},
"returnAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "",
"district": "",
"email": "",
"extendData": null,
"name": "",
"phone": "",
"returnOption": "",
"state": "",
"zipCode": ""
},
"parcels": [
{
"referenceNo": "PARCEL030933",
"referenceNo1": "",
"referenceNo2": "",
"consignmentId": "",
"trackingNo": "",
"descriptionEn": "descriptionen",
"description": "description",
"dangerousGoods": true,
"batteryType": true,
"weight": 1.245,
"weightUnit": null,
"length": "25",
"width": "26",
"height": "27",
"dimensionUnit": "CM",
"invoiceCurrencyCode": "USD",
"invoiceValue": 2.5,
"transactionCurrency": "USD",
"transactionAmount": "5.12",
"shippingInstruction": "",
"sortCode": "",
"extendData": {
"keepShipService": false
},
"items": [
{
"extendData": null,
"hsCode": "111",
"itemDesc": "desc",
"itemDescEn": "descen",
"itemNumber": "1",
"material": "testmatertial",
"originCountryCode": "cn",
"picture": "",
"quantity": "1",
"quantityUnit": "个",
"salesURL": "testsalesurl",
"sku": "QW",
"unitPrice": "2",
"usage": "testusage",
"weight": ""
}
],
"insurance": [
{
"insuranceAmount": "",
"insuranceCurrencyCode": "",
"insuranceType": "",
"beneficiaryType": "",
"beneficiary": "",
"beneficiaryId": "",
"extendData": null
}
]
}
],
"collection": {
"date": "2023-03-09",
"addressLine1": "testaddress1",
"addressLine2": "testaddress2",
"addressLine3": "testaddress3",
"city": "testcity",
"company": "testcompany",
"countryCode": "us",
"district": "testdistrict",
"email": "testemail@123.com",
"extendData": null,
"name": "testname",
"phone": "phone",
"state": "teststate",
"zipCode": "123456"
}
},
{
"facility": "B2C321",
"channelCode": "UBI.CN2US.AC.GENERAL.LIGHT",
"channelOption": "B2Cchanneloption",
"referenceNo": "XB03091",
"orderType": "B2C",
"originPortCode": "",
"injectPortCode": "",
"platform": "eBay",
"incoterm": "DDP",
"collectionType": "Pick up",
"isInsurance": null,
"isSignature": null,
"remark": "testremark",
"extendData": {
"extend": null
},
"consignee": {
"addressCode": null,
"addressLine1": "testaddressline1",
"addressLine2": "8349hao",
"addressLine3": "345shi",
"city": "testcity",
"company": "testcompany",
"countryCode": "us",
"district": "testdistrict",
"email": "testemail@123.com",
"extendData": null,
"name": "testconsigneename",
"phone": "36247938384",
"state": "teststate",
"taxId": "testtaxid",
"taxId1": "testtaxid1",
"zipCode": "8238juej"
},
"shipper": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "us",
"district": "",
"email": "",
"extendData": null,
"name": "",
"phone": "",
"state": "",
"taxId": "",
"taxId1": "",
"zipCode": ""
},
"returnAddress": {
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"city": "",
"company": "",
"countryCode": "",
"district": "",
"email": "",
"extendData": null,
"name": "",
"phone": "",
"returnOption": "",
"state": "",
"zipCode": ""
},
"parcels": [
{
"referenceNo": "PARCEL030934",
"referenceNo1": "",
"referenceNo2": "",
"consignmentId": "",
"trackingNo": "",
"descriptionEn": "descriptionen",
"description": "description",
"dangerousGoods": true,
"batteryType": true,
"weight": 1.245,
"weightUnit": null,
"length": "25",
"width": "26",
"height": "27",
"dimensionUnit": "CM",
"invoiceCurrencyCode": "USD",
"invoiceValue": 2.5,
"transactionCurrency": "USD",
"transactionAmount": "5.12",
"shippingInstruction": "",
"sortCode": "",
"extendData": {
"keepShipService": false
},
"items": [
{
"extendData": null,
"hsCode": "111",
"itemDesc": "desc",
"itemDescEn": "descen",
"itemNumber": "1",
"material": "testmatertial",
"originCountryCode": "cn",
"picture": "",
"quantity": "1",
"quantityUnit": "个",
"salesURL": "testsalesurl",
"sku": "QW",
"unitPrice": "2",
"usage": "testusage",
"weight": ""
},
{
"extendData": null,
"hsCode": "111",
"itemDesc": "desc",
"itemDescEn": "descen",
"itemNumber": "1",
"matertial": "testmatertial",
"originCountryCode": "cn",
"picture": "",
"quantity": "1",
"quantityUnit": "个",
"salesURL": "testsalesurl",
"sku": "QW",
"unitPrice": "2",
"usage": "testusage",
"weight": ""
}
],
"insurance": [
{
"insuranceAmount": "",
"insuranceCurrencyCode": "",
"insuranceType": "",
"beneficiaryType": "",
"beneficiary": "",
"beneficiaryId": "",
"extendData": null
}
]
}
],
"collection": {
"date": "2023-03-09",
"addressLine1": "testaddress1",
"addressLine2": "testaddress2",
"addressLine3": "testaddress3",
"city": "testcity",
"company": "testcompany",
"countryCode": "us",
"district": "testdistrict",
"email": "testemail@123.com",
"extendData": null,
"name": "testname",
"phone": "phone",
"state": "teststate",
"zipCode": "123456"
}
}
]
返回样例
成功样例
1、"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": ""
}
]
2、"ordertype":"B2C"
{
"code": "0",
"data": {},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
}
失败样例
1、"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": ""
}
]
2、"ordertype":"B2C"
{
"code": "0",
"data": {
"XB03091": [
{
"code": "600222",
"message": "referenceNo:PARCEL030934 field value already exists and cannot be repeated"
}
]
},
"errors": "",
"message": "",
"messageId": "",
"success": true,
"warnList": ""
}
ps: test001是 订单唯一编码 ,区分不同订单的不同错误描述。批量操作 成功的不会返回,会直接保存。