创建订单
<h1>创建万联订单</h1>
<ul>
<li>请求接口:POST /pushOrder</li>
</ul>
<h2>生成MD5</h2>
<pre><code class="language-java">/**
测试环境 icid: 8301
测试环境 secret: KpqNIlE3JUxFkm5
时间戳 timesTamp:13位
MD5(icid+timsTamp+secret)
*/
public String Md5(int icid, String secret, Long timesTamp) {
String timestamp = String.valueOf(timesTamp);
String base = icid + timestamp + secret;
return DigestUtils.md5DigestAsHex(base.getBytes());
}</code></pre>
<h2>Body 请求参数</h2>
<table>
<thead>
<tr>
<th style="text-align: center;">名称</th>
<th style="text-align: center;">位置</th>
<th style="text-align: center;">类型</th>
<th style="text-align: center;">必选</th>
<th style="text-align: center;">中文名</th>
<th style="text-align: center;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">body</td>
<td style="text-align: center;">body</td>
<td style="text-align: center;">FbaOrder</td>
<td style="text-align: center;">是</td>
<td style="text-align: center;">FbaOrder</td>
<td style="text-align: center;">订单实体类</td>
</tr>
</tbody>
</table>
<h2>CosexFbaOrder属性</h2>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>约束</th>
<th>中文名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>icid</td>
<td>int</td>
<td>是</td>
<td></td>
<td>用户icid</td>
<td>用户icid</td>
</tr>
<tr>
<td>timeStamp</td>
<td>long</td>
<td>是</td>
<td></td>
<td>时间戳</td>
<td>时间戳13位</td>
</tr>
<tr>
<td>mD5</td>
<td>String</td>
<td>是</td>
<td></td>
<td>mD5</td>
<td>mD5</td>
</tr>
<tr>
<td>baoguan</td>
<td>boolean</td>
<td>是</td>
<td></td>
<td>是否报关(默认false)</td>
<td>是否报关 false:不报关 true:报关</td>
</tr>
<tr>
<td>cDepart</td>
<td>String</td>
<td>是</td>
<td></td>
<td>交货方式</td>
<td>交货方式(KD:快递 SMQJ:上门取件 ZS:自送)</td>
</tr>
<tr>
<td>cNum</td>
<td>String</td>
<td>否</td>
<td></td>
<td>内单号</td>
<td>内单号 (不传则自动生成)</td>
</tr>
<tr>
<td>cNo</td>
<td>String</td>
<td>否</td>
<td></td>
<td>转单号</td>
<td>转单号</td>
</tr>
<tr>
<td>cEmsKind</td>
<td>String</td>
<td>是</td>
<td></td>
<td>渠道名</td>
<td>渠道名</td>
</tr>
<tr>
<td>fWeight</td>
<td>number</td>
<td>是</td>
<td></td>
<td>重量,kg,3位小数</td>
<td>重量,kg,3位小数</td>
</tr>
<tr>
<td>zssite</td>
<td>String</td>
<td>否</td>
<td></td>
<td>自送站点</td>
<td>自送站点</td>
</tr>
<tr>
<td>cnkd</td>
<td>String</td>
<td>否</td>
<td></td>
<td>快递方式</td>
<td>快递方式</td>
</tr>
<tr>
<td>cnnum</td>
<td>String</td>
<td>否</td>
<td></td>
<td>快递单号 0-50个字符(派送方式为快递时 必填)</td>
<td>快递单号 0-50个字符(派送方式是快递时 必填)</td>
</tr>
<tr>
<td>iItem</td>
<td>int</td>
<td>是</td>
<td></td>
<td>件数</td>
<td></td>
</tr>
<tr>
<td>ordertype</td>
<td>int</td>
<td>是</td>
<td></td>
<td>订单类型 1快递 2 FBA 3小包</td>
<td>订单类型 1快递 2 FBA 3小包</td>
</tr>
<tr>
<td>fbapostcode</td>
<td>String</td>
<td>否</td>
<td></td>
<td>fba仓库代码 是FBA货物是 必填</td>
<td>fba仓库代码 是FBA货物时 必填</td>
</tr>
<tr>
<td>isfbacan</td>
<td>boolean</td>
<td>是</td>
<td></td>
<td>是否FBA地址(true :是FBA地址 false:私人)</td>
<td>是否FBA地址</td>
</tr>
<tr>
<td>cremark</td>
<td>String</td>
<td>否</td>
<td></td>
<td>备注</td>
<td>备注</td>
</tr>
<tr>
<td>fcubicValue</td>
<td>number</td>
<td>否</td>
<td></td>
<td>立方数</td>
<td>立方数</td>
</tr>
<tr>
<td>cDes</td>
<td>String</td>
<td>是</td>
<td></td>
<td>目的地国家二字码</td>
<td>目的地国家二字码(如:US)</td>
</tr>
<tr>
<td>cDesCN</td>
<td>String</td>
<td>否</td>
<td></td>
<td>目的地国家中文</td>
<td>目的地国家中文</td>
</tr>
<tr>
<td>cRHouseNumber</td>
<td>String</td>
<td>否</td>
<td></td>
<td>收件门牌号 1-63个字符</td>
<td>收件门牌号 1-63个字符</td>
</tr>
<tr>
<td>cREMail</td>
<td>String</td>
<td>否</td>
<td></td>
<td>收件电邮 0-63个字符</td>
<td>收件电邮 0-63个字符</td>
</tr>
<tr>
<td>cRSms</td>
<td>String</td>
<td>否</td>
<td></td>
<td>收件短信 0-63个字符</td>
<td>收件短信 0-63个字符</td>
</tr>
<tr>
<td>cRAddr</td>
<td>String</td>
<td>是</td>
<td></td>
<td>收件地址 非空 1-254个字符</td>
<td>收件地址 非空 1-254个字符</td>
</tr>
<tr>
<td>cRCity</td>
<td>String</td>
<td>是</td>
<td></td>
<td>收件城市 非空 1-126个字符</td>
<td>收件城市 非空 1-126个字符</td>
</tr>
<tr>
<td>cRUnit</td>
<td>String</td>
<td>否</td>
<td></td>
<td>收件单位 1-254个字符</td>
<td>收件单位 1-254个字符</td>
</tr>
<tr>
<td>cRProvince</td>
<td>String</td>
<td>是</td>
<td></td>
<td>收件省州 非空 1-63个字符</td>
<td>收件省州 非空 1-63个字符</td>
</tr>
<tr>
<td>cRCountry</td>
<td>String</td>
<td>是</td>
<td></td>
<td>收件国家 1-126个字符</td>
<td>收件国家 1-126个字符</td>
</tr>
<tr>
<td>cRPostcode</td>
<td>String</td>
<td>是</td>
<td></td>
<td>收件邮编 非空 1-15个字符</td>
<td>收件邮编 非空 1-15个字符</td>
</tr>
<tr>
<td>cRPhone</td>
<td>String</td>
<td>是</td>
<td></td>
<td>收件电话 1-63个字符</td>
<td>收件电话 1-63个字符</td>
</tr>
<tr>
<td>cReceiver</td>
<td>String</td>
<td>是</td>
<td></td>
<td>收件人 非空 1-63个字符</td>
<td>收件人 非空 1-63个字符</td>
</tr>
<tr>
<td>cSender</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件人 非空 1-30个字符</td>
<td>发件人 非空 1-30个字符</td>
</tr>
<tr>
<td>cSUnit</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件单位 非空 1-127个字符</td>
<td>发件单位 非空 1-127个字符</td>
</tr>
<tr>
<td>cSAddr</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件详细地址 非空 1-127个字符</td>
<td>发件详细地址 非空 1-127个字符</td>
</tr>
<tr>
<td>cSCity</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件城市 非空 1-63个字符</td>
<td>发件城市 非空 1-63个字符</td>
</tr>
<tr>
<td>cSPostcode</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件邮编 非空 1-15个字符</td>
<td>发件邮编 非空 1-15个字符</td>
</tr>
<tr>
<td>cSProvince</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件省州 非空 1-30个字符</td>
<td>发件省州 非空 1-30个字符</td>
</tr>
<tr>
<td>cSCountry</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件国家 1-63个字符</td>
<td>发件国家 1-63个字符</td>
</tr>
<tr>
<td>cSPhone</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件电话 非空 1-63个字符</td>
<td>发件电话 非空 1-63个字符</td>
</tr>
<tr>
<td>cSEMail</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件电邮,0-63个字符</td>
<td>发件电邮,0-63个字符</td>
</tr>
<tr>
<td>cSSms</td>
<td>String</td>
<td>否</td>
<td></td>
<td>发件短信,0-63个字符</td>
<td>发件短信,0-63个字符</td>
</tr>
<tr>
<td>ItemList</td>
<td>[<a href="#schemacosexordergoods">CosexOrderGoodsItem</a>]</td>
<td>是</td>
<td></td>
<td>箱子集合</td>
<td>箱子集合</td>
</tr>
</tbody>
</table>
<p><h2 id="tocS_CosexOrderGoodsItem">箱子实体类:CosexOrderGoodsItem</h2></p>
<pre><code class="language-json"> {
&quot;boxNum&quot;:1,
&quot;fxWeight&quot;:1.000,
&quot;ixHeight&quot;:1.00,
&quot;ixLong&quot;:1.00,
&quot;ixWidth&quot;:1.00,
&quot;shippmentId&quot;:&quot;CESHI&quot;,
&quot;referenceId&quot;:&quot;CESHI&quot;,
&quot;cosexFbaGoodsList&quot;:[
{
&quot;asin&quot;:&quot;1&quot;,
&quot;brand&quot;:&quot;1&quot;,
&quot;currency&quot;:&quot;USD&quot;,
&quot;cxGCodeA&quot;:&quot;&quot;,
&quot;cxGCodeB&quot;:&quot;&quot;,
&quot;cxGCodeBEn&quot;:&quot;&quot;,
&quot;cxGCodeC&quot;:&quot;&quot;,
&quot;cxGCodeCEn&quot;:&quot;&quot;,
&quot;cxGUnit&quot;:&quot;件&quot;,
&quot;cxGoods&quot;:&quot;衣服&quot;,
&quot;cxGoodsA&quot;:&quot;clothes&quot;,
&quot;daici&quot;:&quot;&quot;,
&quot;daidian&quot;:&quot;&quot;,
&quot;fxPrice&quot;:12.00,
&quot;imgPath&quot;:&quot;&quot;,
&quot;ixQuantity&quot;:3,
&quot;link&quot;:&quot;&quot;,
&quot;sku&quot;:&quot;123125454251&quot;,
&quot;unitprice&quot;:12.0,
&quot;weight&quot;:1.52
}
]
}
</code></pre>
<h3>属性</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>约束</th>
<th>中文名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>boxNum</td>
<td>integer(int32)</td>
<td>是</td>
<td>none</td>
<td></td>
<td>箱数(默认 1,相同规格,且物品相同的箱子可以大于 1 )</td>
</tr>
<tr>
<td>fxWeight</td>
<td>number</td>
<td>是</td>
<td>none</td>
<td></td>
<td>重量(或称重),必须,且大于零。</td>
</tr>
<tr>
<td>ixHeight</td>
<td>number</td>
<td>是</td>
<td>none</td>
<td></td>
<td>高,整数,cm。 无,则填 0</td>
</tr>
<tr>
<td>ixLong</td>
<td>number</td>
<td>是</td>
<td>none</td>
<td></td>
<td>长,整数,cm。 无,则填 0</td>
</tr>
<tr>
<td>ixWidth</td>
<td>number</td>
<td>是</td>
<td>none</td>
<td></td>
<td>宽,整数,cm。 无,则填 0</td>
</tr>
<tr>
<td>shippmentId</td>
<td>string</td>
<td>是</td>
<td>none</td>
<td></td>
<td>货件编号(ordertype为2 且 isfbacan 为 true时,必填 0-63字符)</td>
</tr>
<tr>
<td>referenceId</td>
<td>string</td>
<td>是</td>
<td>none</td>
<td></td>
<td>跟踪编号(ordertype为2 且 isfbacan 为 true时,必填 0-63字符)</td>
</tr>
<tr>
<td>cosexFbaGoodsList</td>
<td>[<a href="#schemacosexordergoods">CosexOrderGoods</a>]</td>
<td>是</td>
<td>none</td>
<td></td>
<td>物品详细数据</td>
</tr>
</tbody>
</table>
<p><h2 id="tocS_CosexOrderGoods">物品实体类:CosexOrderGoods</h2></p>
<h3>属性</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>约束</th>
<th>中文名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>asin</td>
<td>string</td>
<td>否</td>
<td>none</td>
<td></td>
<td>ASIN码 0~254个字符</td>
</tr>
<tr>
<td>brand</td>
<td>string</td>
<td>否</td>
<td>none</td>
<td></td>
<td>品牌 0~30个字符</td>
</tr>
<tr>
<td>currency</td>
<td>string</td>
<td>是</td>
<td>none</td>
<td></td>
<td>申报币种 0~100个字符</td>
</tr>
<tr>
<td>cxGCodeA</td>
<td>string</td>
<td>是</td>
<td>none</td>
<td></td>
<td>HS编码 0-63个字符。</td>
</tr>
<tr>
<td>cxGCodeB</td>
<td>string</td>
<td>可能必填</td>
<td>none</td>
<td></td>
<td>中文货物材质 0-63个字符。FBA订单必填</td>
</tr>
<tr>
<td>cxGCodeBEn</td>
<td>string</td>
<td>可能必填</td>
<td>none</td>
<td></td>
<td>英文货物材质 0-63个字符。FBA订单必填</td>
</tr>
<tr>
<td>cxGCodeC</td>
<td>string</td>
<td>可能必填</td>
<td>none</td>
<td></td>
<td>中文产品用途 0-63个字符。FBA订单必填</td>
</tr>
<tr>
<td>cxGCodeCEn</td>
<td>string</td>
<td>可能必填</td>
<td>none</td>
<td></td>
<td>英文产品用途 0-63个字符。FBA订单必填</td>
</tr>
<tr>
<td>cxGUnit</td>
<td>string</td>
<td>可能必填</td>
<td>none</td>
<td></td>
<td>物品单位 0-15个字符。</td>
</tr>
<tr>
<td>cxGoods</td>
<td>string</td>
<td>是</td>
<td>none</td>
<td></td>
<td>中文品名 0-63个字符 非空</td>
</tr>
<tr>
<td>cxGoodsA</td>
<td>string</td>
<td>是</td>
<td>none</td>
<td></td>
<td>英文品名 0-63个字符 非空</td>
</tr>
<tr>
<td>daici</td>
<td>string</td>
<td>否</td>
<td>none</td>
<td></td>
<td>带磁 0~100个字符</td>
</tr>
<tr>
<td>daidian</td>
<td>string</td>
<td>否</td>
<td>none</td>
<td></td>
<td>带电 0~100个字符</td>
</tr>
<tr>
<td>fxPrice</td>
<td>number</td>
<td>是</td>
<td>none</td>
<td></td>
<td>申报单价 范围: 0~999999999</td>
</tr>
<tr>
<td>imgPath</td>
<td>string</td>
<td>可能必填</td>
<td>none</td>
<td></td>
<td>图片url 0~254个字符。FBA订单必填</td>
</tr>
<tr>
<td>ixQuantity</td>
<td>integer(int32)</td>
<td>是</td>
<td>none</td>
<td></td>
<td>物品数量 范围: 0~999999</td>
</tr>
<tr>
<td>link</td>
<td>string</td>
<td>否</td>
<td>none</td>
<td></td>
<td>销售链接 0~1000个字符</td>
</tr>
<tr>
<td>sku</td>
<td>string</td>
<td>否</td>
<td>none</td>
<td></td>
<td>sku 0~254个字符</td>
</tr>
<tr>
<td>unitprice</td>
<td>number</td>
<td>否</td>
<td>none</td>
<td></td>
<td>销售单价 范围: 0~999999999</td>
</tr>
<tr>
<td>weight</td>
<td>number</td>
<td>否</td>
<td>none</td>
<td></td>
<td>物品重量</td>
</tr>
</tbody>
</table>
<pre><code class="language-json">//FbaOrder订单实体类:
{
&quot;icid&quot;:8301,
&quot;timeStamp&quot;:1692774867255,
&quot;mD5&quot;:&quot;40246ba5e15f8ab985ef1b37bfbd431a&quot;,
&quot;baoguan&quot;:false,
&quot;cDepart&quot;:&quot;SMQJ&quot;,
&quot;cDes&quot;:&quot;US&quot;,
&quot;cDesCN&quot;:&quot;美国&quot;,
&quot;cEmsKind&quot;:&quot;美国海派UPS-W&quot;,
&quot;fbapostcode&quot;:&quot;FTW1&quot;,
&quot;cNo&quot;:&quot;&quot;,
&quot;cNum&quot;:&quot;&quot;,
&quot;cRAddr&quot;:&quot;33333 LBJ FWY&quot;,
&quot;cRCity&quot;:&quot;Dallas&quot;,
&quot;cRCountry&quot;:&quot;US&quot;,
&quot;cRNo&quot;:&quot;&quot;,
&quot;cRPhone&quot;:&quot;1234567890&quot;,
&quot;cRSms&quot;:&quot;1234567890&quot;,
&quot;cRPostcode&quot;:&quot;75241&quot;,
&quot;cRProvince&quot;:&quot;TX&quot;,
&quot;cRUnit&quot;:&quot;FTW1&quot;,
&quot;cReceiver&quot;:&quot;Amazon.com Services, Inc.&quot;,
&quot;fWeight&quot;:10,
&quot;fcubicValue&quot;:0.25,
&quot;iItem&quot;:1,
&quot;isfbacan&quot;:true,
&quot;nItemType&quot;:1,
&quot;ordertype&quot;:2,
&quot;ItemList&quot;:[
{
&quot;boxNum&quot;:1,
&quot;fxWeight&quot;:1.000,
&quot;ixHeight&quot;:1.00,
&quot;ixLong&quot;:1.00,
&quot;ixWidth&quot;:1.00,
&quot;shippmentId&quot;:&quot;CESHI&quot;,
&quot;referenceId&quot;:&quot;CESHI&quot;,
&quot;cosexFbaGoodsList&quot;:[
{
&quot;asin&quot;:&quot;1&quot;,
&quot;brand&quot;:&quot;1&quot;,
&quot;currency&quot;:&quot;USD&quot;,
&quot;cxGCodeA&quot;:&quot;&quot;,
&quot;cxGCodeB&quot;:&quot;&quot;,
&quot;cxGCodeBEn&quot;:&quot;&quot;,
&quot;cxGCodeC&quot;:&quot;&quot;,
&quot;cxGCodeCEn&quot;:&quot;&quot;,
&quot;cxGUnit&quot;:&quot;件&quot;,
&quot;cxGoods&quot;:&quot;衣服&quot;,
&quot;cxGoodsA&quot;:&quot;clothes&quot;,
&quot;daici&quot;:&quot;&quot;,
&quot;daidian&quot;:&quot;&quot;,
&quot;fxPrice&quot;:12.0,
&quot;imgPath&quot;:&quot;&quot;,
&quot;ixQuantity&quot;:3,
&quot;link&quot;:&quot;&quot;,
&quot;sku&quot;:&quot;123125454251&quot;,
&quot;unitprice&quot;:&quot;12.0,
&quot;weight&quot;:1.52
}
]
}
]
}</code></pre>
<h2>返回结果</h2>
<table>
<thead>
<tr>
<th style="text-align: center;">名称</th>
<th style="text-align: center;">类型</th>
<th style="text-align: center;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">code</td>
<td style="text-align: center;">integer(int32)</td>
<td style="text-align: center;">2000是正确返回 其他均为错误</td>
</tr>
<tr>
<td style="text-align: center;">data</td>
<td style="text-align: center;">OrderReturn</td>
<td style="text-align: center;">返回参数</td>
</tr>
<tr>
<td style="text-align: center;">msg</td>
<td style="text-align: center;">string</td>
<td style="text-align: center;">消息</td>
</tr>
</tbody>
</table>
<h2>OrderReturn属性</h2>
<table>
<thead>
<tr>
<th style="text-align: center;">名称</th>
<th style="text-align: center;">类型</th>
<th style="text-align: center;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">cMess</td>
<td style="text-align: center;">string</td>
<td style="text-align: center;">错误信息</td>
</tr>
<tr>
<td style="text-align: center;">cNo</td>
<td style="text-align: center;">string</td>
<td style="text-align: center;">转单号</td>
</tr>
<tr>
<td style="text-align: center;">cNum</td>
<td style="text-align: center;">string</td>
<td style="text-align: center;">内单号,记录在系统内部的运单号,唯一</td>
</tr>
<tr>
<td style="text-align: center;">cRNo</td>
<td style="text-align: center;">string</td>
<td style="text-align: center;">参考号</td>
</tr>
<tr>
<td style="text-align: center;">confirm</td>
<td style="text-align: center;">boolean</td>
<td style="text-align: center;">是否成功</td>
</tr>
</tbody>
</table>
<pre><code class="language-java">//正确示例:
{
&quot;code&quot;: 2000,
&quot;data&quot;: {
&quot;confirm&quot;: true,
&quot;cMess&quot;: &quot;COSEX123下单成功&quot;,
&quot;cNo&quot;: &quot;COSEX123&quot;,
&quot;cNum&quot;: &quot;COSEX123&quot;,
&quot;cRNo&quot;: &quot;COSEX123&quot;
},
&quot;msg&quot;: &quot;&quot;
}
//报错示例:
{
&quot;code&quot;: 1000,
&quot;data&quot;: {
&quot;confirm&quot;: false,
&quot;cMess&quot;: &quot;&quot;,
&quot;cNo&quot;: &quot;&quot;,
&quot;cNum&quot;: &quot;&quot;,
&quot;cRNo&quot;: &quot;&quot;
},
&quot;msg&quot;: &quot;token不能为空&quot;
}</code></pre>