天猫和支付宝打通项目中,针对支付宝域,提供商品的查询接口。
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
app_name | String | 可选 | alipay-miniapp |
|
微服务应用名称 |
biz_code | String | 可选 | miniapp_itemquery |
|
微服务业务Key |
opt_str | String | 可选 | {"topItemIds":"556171646671"} | json接口 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | StarkResult | result | |
|
1 2 3 4 5 6 7 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); TmallMiniappItemQueryRequest req = new TmallMiniappItemQueryRequest(); req.setAppName( "alipay-miniapp" ); req.setBizCode( "miniapp_itemquery" ); req.setOptStr( "{\"topItemIds\":\"556171646671\"}" ); TmallMiniappItemQueryResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
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 | < tmall_miniapp_item_query_response > < result > < has_more ></ has_more > < msg_code ></ msg_code > < data > < data > < item_list > < itemlist > < huabei > < installment_price ></ installment_price > < free_num ></ free_num > < type ></ type > < brand_name ></ brand_name > </ huabei > < base_info > < item_id ></ item_id > < title ></ title > < long_title ></ long_title > < pic_url ></ pic_url > < pic_url_m ></ pic_url_m > < status ></ status > </ base_info > < price > < orig_price ></ orig_price > < acty_price ></ acty_price > </ price > < material > < app_entry_image ></ app_entry_image > </ material > </ itemlist > </ item_list > </ data > </ data > < success ></ success > < ip ></ ip > </ result > </ tmall_miniapp_item_query_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|