¥开放平台免费API不需用户授权
- 类目预测接口 * 【必填字段】 title, srcChannelId, srcCategoryId, targetChannelId * 【非必填,但有最好填上】itemId, barcode, brandName, pvPairDOList, srcCatNamePathList
公共参数
请求地址:
公共请求参数:
公共响应参数:
点击获取key和secret
请求示例
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaImapCategoryPredictRequest req = new AlibabaImapCategoryPredictRequest();
AlibabaImapCategoryPredictRequest.FixedMappingAppInfo obj1 = new AlibabaImapCategoryPredictRequest.FixedMappingAppInfo();
obj1.setPassword("gEzsP9NyWNPvLAqM");
obj1.setAppName("test_app_name");
req.setFixedMappingAppInfo(obj1);
AlibabaImapCategoryPredictRequest.TopImapItemDo obj2 = new AlibabaImapCategoryPredictRequest.TopImapItemDo();
obj2.setItemId("123");
obj2.setTargetChannelId(31L);
obj2.setBrandName("苹果");
obj2.setSrcCatNamePathList("手机");
obj2.setSrcChannelId(1L);
List<AlibabaImapCategoryPredictRequest.TopPVPairDO> list4 = new ArrayList<AlibabaImapCategoryPredictRequest.TopPVPairDO>();
AlibabaImapCategoryPredictRequest.TopPVPairDO obj5 = new AlibabaImapCategoryPredictRequest.TopPVPairDO();
list4.add(obj5);
obj5.setValueId(1L);
obj5.setPropertyName("11");
obj5.setValueName("1");
obj5.setPropertyId(11L);
obj2.setPvPairDoList(list4);
obj2.setBarcodeList(""690001"");
obj2.setTitle("iphone 11 pro max");
obj2.setTargetCategoryId(456L);
obj2.setSrcCategoryId(522201L);
req.setTopImapItemDo(obj2);
AlibabaImapCategoryPredictResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
响应示例
<alibaba_imap_category_predict_response>
<result>
<success>true</success>
<top_imap_union_category_path_do_list>
<top_imap_union_category_path_do>
<l5_cat_id>5</l5_cat_id>
<leaf_cat_name>todo</leaf_cat_name>
<l3_cat_id>3</l3_cat_id>
<leaf>true</leaf>
<leaf_cat_id>997</leaf_cat_id>
<l1_cat_id>1</l1_cat_id>
<l4_cat_name>todo4</l4_cat_name>
<l2_cat_name>todo2</l2_cat_name>
<l3_cat_name>todo3</l3_cat_name>
<l4_cat_id>4</l4_cat_id>
<l5_cat_name>todo5</l5_cat_name>
<l2_cat_id>2</l2_cat_id>
<l1_cat_name>todo1</l1_cat_name>
</top_imap_union_category_path_do>
</top_imap_union_category_path_do_list>
<error_msg>demo</error_msg>
</result>
</alibaba_imap_category_predict_response>