## 通過外箱碼獲取對應產品碼
接口需要指定商戶及ApiKey才能獲取到數據,目前獲取到的是當前用戶所有的數據列表。
>[info] 接口`data`數據字段
```
{
"code" : "12位內包裝碼"
}
```
~~~[api]
post:http://315.cuci.cc/code/api/getCodeByMax.html
*code=默認值#商戶編號,需要在平臺獲取
*sign=簽名值#數據簽名,需要使用簽名規則進行簽名
*time=時間戳#當前時間戳
*array:data=["code"=>"12位內包裝碼"]#需要提交數據(一維數組)
<<<
接口成功
{
"msg": "獲取產品碼列表成功",
"code": "SUCCESS",
"time": 1497424050,
"sign": "5E10FC86B00AFB9C901CDBBB5BEE856B",
"type": "JSON",
"data": {
"list": [
{
"sn": "1000007252",
"max": "100000000001",
"code": "10001000020001",
"verfiy": "0151",
"url": "http:\/\/code.6-315.com\/query\/2ILD85Y24.html"
},
{
"sn": "1000007252",
"max": "100000000001",
"code": "10001000020002",
"verfiy": "0302",
"url": "http:\/\/code.6-315.com\/query\/2ILD85Y25.html"
},
{
"sn": "1000007252",
"max": "100000000001",
"code": "10001000020003",
"verfiy": "0453",
"url": "http:\/\/code.6-315.com\/query\/2ILD85Y26.html"
},
{
"sn": "1000007252",
"max": "100000000001",
"code": "10001000020004",
"verfiy": "0604",
"url": "http:\/\/code.6-315.com\/query\/2ILD85Y27.html"
}
]
}
}
<<<
非關聯外箱碼
{
"msg": "外箱碼對應為非關聯類型",
"code": "ERROR-UNRELATION",
"sign": "32位數據簽名",
"type": "JSON",
"data": [],
}
<<<
無效外箱碼
{
"msg": "無效的外箱碼",
"code": "ERROR-INVALID",
"sign": "32位數據簽名",
"type": "JSON",
"data": [],
}
<<<
商戶異常
{
"msg": "商戶不存在, 請傳入正確的商戶!",
"code": "ERROR",
"sign": "32位數據簽名",
"type": "JSON",
"data": [],
}
<<<
簽名異常
{
"msg": "簽名錯誤, 請檢查數據內容是否正確!",
"code": "ERROR",
"sign": "32位數據簽名",
"type": "JSON",
"data": [],
}
<<<
驗證異常
{
"msg": "簽名數據與商戶ApiKey不匹配!",
"code": "ERROR",
"sign": "32位數據簽名",
"type": "JSON",
"data": [],
}
<<<
數據異常
{
"msg": "數據格式錯誤!",
"code": "ERROR",
"sign": "32位數據簽名",
"type": "JSON",
"data": [],
}
~~~