# 下单

type:POST

endpoint:/api/order

Head:

User-ID:填您使用的组织id
User-Token:联系管理员索要token
1
2

Request:

{
    "orgOp": "orgOp",
    "warehouseCode": "warehouseID",
    "productId": "productId",
    "productCode": "productCode",
    "remark": "Testing",
    "customerOrderId": "CUA-WRGZ093-DFG-001",
    "generalTrade": true,
    "customerRefnumber": {
        "fbaNumber": "QWERTY"
    },
    "deliveryDetail": {
        "deliveryType": "DELIVERY",
        "appointmentAt": "2018-07-16 15:00:00",
        "appointmentTo": "2018-07-16 18:00:00",
        "expressCompany": "expressCompany",
        "expressNumber": "expressNumber",
        "contractName": "Zhang Mr.",
        "phone": "15512345678",
        "country": "CH",
        "province": "GUANGDONG",
        "city": "SHENZHENG",
        "addressFirst": "addressFirst",
        "addressSecond": "addressSecond"
    },
    "shippingDetail": {
        "contractName": "contractName",
        "phone": "phone",
        "country": "US",
        "province": "LOS",
        "city": "city",
        "zipcode": "zipcode",
        "addressFirst": "addressFirst",
        "addressSecond": "addressSecond",
        "fbaWarehouseCode": "fbaWarehouseCode"
    },
    "packingList": {
        "goodsType": "CHARGED",
        "totalCarton": 2,
        "cartonDetails": [{
            "customerCartonNumber": "CUST-0001",
            "length": 80.1,
            "width": 60.0,
            "height": 79.5,
            "weight": 15.0,
            "items": [{
                "sku": "PhoneShell",
                "qty": 12
            }]
        },
        {
            "customerCartonNumber": "CUST-0002",
            "length": 75.1,
            "width": 50.0,
            "height": 79.5,
            "weight": 15.0,
            "items": [{
                "sku": "PhoneShell",
                "qty": 12
            },
            {
                "sku": "keyboard",
                "qty": 2
            }]
        }]
    },
    "products": {
        "keyboard": {
            "nameEn": "keyboard",
            "nameCn": "键盘",
            "price": 60.0,
            "currency": "CNY",
            "pictureUrl": "https://xxxx.xxxx.xxx.png",
            "picture": null,
            "pictureContentType": null,
            "units": null,
            "length": 15.0,
            "width": 16.0,
            "height": 15.0,
            "weight": 1.0,
            "singleNetWeight": 0.89,
            "description": "d",
            "brand": "XX牌",
            "material": "ABS+PBT",
            "purpose": "打字",
            "model": "Iphone",
            "hscode": "12346",
            "euHsCode": "123456",
            "asin": null
        },
        "PhoneShell": {
            "nameEn": "PhoneShell",
            "nameCn": "手机壳",
            "price": 60.0,
            "currency": "CNY",
            "pictureUrl": "https://xxxx.xxxx.xxx.png",
            "picture": null,
            "pictureContentType": null,
            "units": null,
            "length": 15.0,
            "width": 16.0,
            "height": 15.0,
            "weight": 1.0,
            "singleNetWeight": 0.89,
            "description": "d",
            "brand": "XX牌",
            "material": "塑胶",
            "purpose": "保护手机",
            "model": "Iphone",
            "hscode": "12346",
            "euHsCode": "123456",
            "asin": null
        }
    },
    "attachment": null,
    "attachmentSuffix": ".xxx",
    "amazonReferenceId": ""
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
参数 类型 长度 是否必填 说明 -
orgOp String 60 必填 仓库操作方组织ID
warehouseCode String 60 必填 下单仓库id
productId&productCode String 60 两者至少填一项 产品(渠道)ID或代码
remark String 200 订单备注
customerOrderId String 60 必填 客户订单号
generalTrade boolean - 必填 是否一般贸易
customerRefnumber String[] 每个60 除客户订单号外其它第三方记录号
deliveryType String - 必填 值必须为以下之一:PICK_UP_FROM_CUSTOMER("上门取货"),DELIVERY("送货上门"),DELIVERY_BY_EXPRESS("快递到仓库")
appointmentAt String(yyyy-MM-dd HH:mm:ss) - 预约的起始时间
appointmentTo 同上 - 预约的结束时间
expressCompany String 60 快递公司名称
expressNumber String 60 快递单号
contractName String 60 必填 联系人
phone String 60 必填 联系人联系号码
country String 60 必填 填国家2位英文编码或者中文名称
province String 60 收件地址时必填 州/省
city String 60 收件地址时必填 城市
addressFirst String 200 必填 地址1
addressSecond String 200 地址2
fbaWarehouseCode String 60 当国家填US时必填,也可以直接填"无"来表示不能提供仓码 FBA仓库代码
goodsType String - 必填 值必须为以下之一:COMMON("普货"),CHARGED("带电"),MAGNETIC("带磁"),CHARGED_MAGNETIC("带电带磁"),TEXTILE("纺织品"), SHOE("鞋子"), BAGS("包包"),POWDER("带粉末"),LIQUID("带液体"),OTHER("其他")
totalCarton int - 必填 箱数,必须和明细中箱数相等
customerCartonNumber String 60 客户箱号
length double <9999999.99 长(cm)
width double <9999999.99 宽(cm)
height double <9999999.99 高(cm)
weight double <9999999.99 重(kg)
sku String 60 必填 products中的key
qty int - 必填 sku数量
products map - 必填 key为sku,value为sku明细
nameEn String 200 必填 sku英文名称(如未特殊说明以下描述均指单个SKU)
nameCn String 200 必填 sku中文名称
price double - 必填 货值
currency String - 必填 币种,人民币要填CNY
pictureUrl String - 图片下载地址
picture byte[] - 图片字节数组,UTF-8编码
pictureContentType String - 图片MIME类型
units String 50 单位
length double <9999999.99 长(cm)
width double <9999999.99 宽(cm)
height double <9999999.99 高(cm)
weight double <9999999.99 毛重(cm)
singleNetWeight double <9999999.99 净重(cm)
description String 1000 描述
brand String 60 品牌
material String 60 材质
purpose String 65535 用途
model String 60 型号
hscode String 50 中国海关编码
euHsCode String 60 欧盟海关编码
asin String 200 ASIN或销售链接
attachment byte[] - 附件字节数组,UTF-8格式
attachmentSuffix String - 附件后缀
amazonReferenceId String - 亚马逊REF ID

Response:

{
    "customerOrderId": "CUA-WRGZ093-DFG-001",
    "cartonNumberList": [{
        "customerCartonNumber": "CUA0001",
        "cartonNumber": "ITUS178100001U0001"
    },
    {
        "customerCartonNumber": "CUA0002",
        "cartonNumber": "ITUS178100001U0002"
    },
    {
        "customerCartonNumber": "CUA0003",
        "cartonNumber": "ITUS178100001U0003"
    }],
    "cartonLabelUrl": "https://tms-web.starpost.cn/api/cartonlabel?orderId=ITUS178100001",
    "orderId": "ITUS178100001",
    "result": {
        "message": "",
        "success": true
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
参数 类型 说明
customerOrderId String 客户订单号
customerCartonNumber String 客户箱号
cartonNumber String 箱号
cartonLabelUrl String 下载箱标URL,请求参数说明:orderId(订单号),paperSpec(纸张规格,目前暂支持100x100和A4两种规格,默认100x100)
orderId String 订单成功后会返回订单号,请保存
message String 下单失败返回信息
success boolean 是否下单成功
Last Updated: 5/19/2023, 4:24:08 PM