1688 Developer Reference
I、language enum(country)
Multi-language is entered through country, English: "en", Russian: "ru", Vietnamese: "vi", Japanese: "ja", Korean: "ko", French: "fr", Portuguese: "pt" , Spanish: "es", please contact customer service to activate multiple languages.
II、Search filter enum(filter)
Parameter example:filter passes in "shipIn24Hours,shipIn48Hours", and multiple conditions are separated by commas.
Comprehensive experience points: 5 stars(totalEpScoreLv1),4.5 -5.0 stars(totalEpScoreLv2), 4-4.5 stars (totalEpScoreLv3), 0-4 stars(totalEpScoreLv4)
24 hours collection rate:<95%(getRate24HLv1), ≥95%(getRate24HLv2), ≥99%(getRate24HLv3)
48 hours collection rate:<95%(getRate48HLv1), ≥95%(getRate48HLv2),≥99%(getRate48HLv3)
certified factory(certifiedFactory) same day delivery(shipInToday)1688 carefully selected (1688Selection)Distribution carefully selected(jxhy) Shipped within 24 hours(shipIn24Hours) Shipped within 48 hours(shipIn48Hours)
7 days no reason refund(noReason7DReturn) Support dropshipping(isOnePsale)Support dropshipping and free shipping( isOnePsaleFreePost) New products within 7 days(new7 )New products within 30 days(new30)
Selected globally(isQqyx)Cross-border select pallets(isSelect)
III、Search sorting criteria(sort)
Parameter example:sort{"price":"asc"},asc-Ascending order desc-descending order,enum:wholesale price-price,Repurchase rate-rePurchaseRate,monthly sales-monthSold
IV、Fields supported by list rankType
complex-Comprehensive list,hot-Bestseller list,goodPrice-price list,anchorHot-Anchor Hot List,anchorNew- Emerging anchor list,anchorRecommend-Anchor hot list
VNHot - Vietnam bestseller list,VNTrend-Vietnam trend list
V、TagInfo enum
isOnePsale-Dropshipping,isOnePsaleFreePostage-Free shipping for one piece,isSupportMix-mixed batch,noReason7DReturn-7 days no reason to return,1688_yx-1688 carefully selected,new7-New arrivals within 7 days
new30-New arrivals within 30 days,isQqyx-Selected globally,select-Cross-border select pallets
VI、API interface signature rules(sign)
/**
* sign签名字符串生成规则
*/
public static String getSignString(Map<String, Object> params, String secret) {
// 删除sign签名字段
params.remove("sign");
// 由于map是无序的,这里主要是对key进行排序(字典序)
Set<String> keySet = params.keySet();
String[] keyArr = keySet.toArray(new String[keySet.size()]);
// 字典排序
Arrays.sort(keyArr);
StringBuilder sbd = new StringBuilder();
for (String k : keyArr) {
if (Optional.ofNullable(params.get(k)).isPresent()) {
sbd.append(k).append("=").append(params.get(k)).append("&");
}
}
// secret最后拼接
sbd.append("secret=").append(secret);
return sbd.toString();
}
/**
* 对生成的sign字符串做MD5加密
* 字符串转大写
*/
public static String getMD5String(String str) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] digest = md.digest(str.getBytes());
StringBuilder sb = new StringBuilder();
for (byte b : digest) {
sb.append(String.format("%02x", b));
}
return sb.toString().toUpperCase();
} catch (Exception e) {
return null;
}
}
