1、 接口说明
| 接口名称 |
api下单 |
| 频率 |
实时 |
| Method |
POST |
| Type |
JSON |
| URI |
/oms/v1/Order/orderByApi |
2、 接口请求
2.1、请求参数
| Field |
类型 |
长度限制 |
是否必填 |
描述 |
| ileId |
String |
|
Y |
ile id |
| sign |
String |
|
Y |
ile key |
| userId |
String |
|
N |
下单客户ID(若userId为空,则ileId、sign必填) |
| method |
String |
|
Y |
创建订单固定值create |
| data |
Object |
|
Y |
订单请求报文对象 |
| amazon_po |
String |
|
N |
亚马逊PO编码 |
| amazon_shipment_ids |
String |
|
N |
亚马逊编码 |
| fbaWarehouseCode |
String |
|
N |
FBA仓库代码,渠道为FBA时字段必填 |
| customsDeclarationType |
int |
|
N (默认为 2 - 买单报关) |
报关类型:1 - 一般贸易报关、 2 - 买单报关 |
| cbm |
String |
|
Y |
订单总体积,单位:立方米 |
| battery |
int |
|
Y |
是否带电:0-不带电、1-带电、2-纯电 |
| chargecode |
String |
|
Y |
渠道编码,请联系ZYL IT获取 |
| consignee |
object |
|
Y |
收件人 |
| address |
String |
|
Y |
收件人详细地址 |
| email |
String |
|
N |
收件人邮箱 |
| name |
String |
|
Y |
收件人姓名 |
| phone |
String |
|
Y |
收件人电话 |
| postcode |
String |
|
Y |
收件人邮编 |
| state |
String |
|
Y |
收件人州 |
| suburb |
String |
|
Y |
收件人城市/区 |
| cust_ref |
String |
|
N |
下单客户单号 |
| items |
object |
|
Y |
订单中的物品信息 |
| hs |
String |
|
N |
包裹中的商品hscode |
| name |
String |
|
Y |
包裹中的物品名称 |
| nameZh |
String |
|
Y |
包裹中的物品中文名称 |
| price |
String |
|
Y |
包裹中的物品单价,单位:USD |
| qty |
String |
|
Y |
包裹中的物品数量 |
| type |
String |
|
N |
包裹中的物品类型 |
| packs |
String |
|
Y |
订单内包裹数量 |
| fbaNumber |
String |
|
N |
亚马逊编码 |
| referenceId |
String |
|
N |
亚马逊PO编码 |
| receiver |
object |
|
N |
收件人 |
| address |
String |
|
N |
收件人详细地址 |
| company |
String |
|
N |
收件人公司 |
| email |
String |
|
N |
收件人邮箱 |
| name |
String |
|
N |
收件人姓名 |
| phone |
String |
|
N |
收件人电话 |
| postcode |
String |
|
N |
收件人邮编 |
| state |
String |
|
N |
收件人州 |
| suburb |
String |
|
N |
收件人城市/区 |
| shipper |
object |
|
Y |
发件人 |
| address |
String |
|
Y |
发件人详细地址 |
| city |
String |
|
Y |
发件人城市 |
| company |
String |
|
Y |
发件人公司 |
| country |
String |
|
Y |
发件人国家 |
| email |
String |
|
Y |
发件人邮箱 |
| name |
String |
|
Y |
发件人姓名 |
| phone |
String |
|
Y |
发件人电话 |
| postcode |
String |
|
Y |
发件人邮编 |
| state |
String |
|
Y |
发件人省份 |
| type |
integer(int32) |
|
Y |
默认输入10 |
| weight |
String |
|
Y |
订单重量, 单位:KG |
| dischargingPort |
String |
|
C |
卸货港,(chargecode为P9开头需传起始口岸,SYD、MEL、BNE、PER) |
| parcelList |
List |
|
N |
包裹尺重信息,非必填;若填写,则列表数据量 需与 packs(订单内包裹数量) 保持一致 |
| barcode |
String |
|
Y |
包裹条码号 |
| parcelWidth |
BigDecimal |
|
Y |
货物入库宽度, 单位:CM |
| parcelHeight |
BigDecimal |
|
Y |
货物入库高度, 单位:CM |
| parcelLength |
BigDecimal |
|
Y |
货物入库长度, 单位:CM |
| parcelWeight |
BigDecimal |
|
Y |
货物入库重量, 单位:KG |
2.2、请求报文
{
"ileId":"your_ileId",
"sign":"your_sign",
"method":"create",
"userId": "your_userId",
"data":{
"amazon_po": "213;213;",
"amazon_shipment_ids": "213;213;",
"cbm": "1",
"chargecode": "P12EXP",
"clear": "DDU",
"battery": 1,
"customsDeclarationType": 2,
"consignee": {
"address": "zxc",
"company": "b803, 521 Harris street, Ultimo, Sydney, NSW, 2007",
"email": "",
"name": "Eva She",
"phone": "123456789",
"postcode": "2007",
"state": "NSW",
"suburb": "Ultimo"
},
"receiver": {
"address": "zxc",
"company": "b803, 521 Harris street, Ultimo, Sydney, NSW, 2007",
"email": "",
"name": "Eva She",
"phone": "123456789",
"postcode": "2007",
"state": "NSW",
"suburb": "Ultimo"
},
"cust_ref": "AM3050803000",
"items": [
{
"hs": "213",
"name": "qwe",
"nameZh": "中",
"price": "3",
"qty": "12",
"type": "B",
"fbaNumber": "FBA111111111",
"referenceId": "123123"
},
{
"type": "B",
"name_zh": "重试",
"name": "zx",
"hs": "213",
"qty": 12,
"price": 4,
"fbaNumber": "FBA222222222",
"referenceId": "123123"
}
],
"packs": "21",
"shipper": {
"postcode": "200120",
"email": "",
"country": "CN",
"company": "zxc",
"name": "zzz",
"state": "zcx",
"city": "zxc",
"address": "zxc",
"phone": "123456789"
},
"type": 10,
"weight": "21",
"parcelList": [
{
"barcode": "test202408260001-1",
"parcelWidth": 1.0,
"parcelHeight": 2.0,
"parcelLength": 3.0,
"parcelWeight": 4.0
},
{
"barcode": "test202408260001-2",
"parcelWidth": 1.0,
"parcelHeight": 2.0,
"parcelLength": 3.0,
"parcelWeight": 4.0
}
]
}
3、 接口响应
3.1、公共响应参数
| Field |
类型 |
长度限制 |
是否必填 |
描述 |
| body |
object |
- |
Y |
|
| code |
integer(int32) |
- |
Y |
|
| msg |
string |
- |
Y |
|
3.1.1、响应状态
| 状态码 |
说明 |
| 200 |
订单提交成功 |
| 201 |
Created |
| 401 |
Unauthorized |
| 403 |
Forbidden |
| 404 |
Not FoundOK |
| 500 |
系统异常 |
| 51001 |
订单参数校验异常 |
| 51006 |
远程请求productCode失败 |
3.2、成功响应报文
{
"body": {
"id": 2988,
"orderId": "ILS20231012054224269000042D",
"conCode": "FIT1321003029",
"refCode": "QNHZ30008780",
"clientCode": "AM3050803000",
"customerId": "1111",
"customerName": "abcd",
"productCode": "26219",
"productName": "墨尔本悉尼本地卡派不含税DDU",
"preWeight": 0.22,
"preCbm": 0.1,
"postCode": "2007",
"preParcelNumber": 1,
"itemValue": 0,
"orderStatus": 1,
"orderWay": 0,
"warehouseCode": "ZS",
"hsDeclarationType": "买单报关",
},
"code": 200,
"msg": ""
}
3.3、 失败响应报文
{
"body": {},
"code": 4001000,
"msg": ""
}
作者:ZYL 创建时间:2023-09-06 16:36
最后编辑:ZYL 更新时间:2025-12-16 17:32