登录
退出
首页
开放版图
苏宁有货
商家后台
文档中心
文档中心
API文档
消息中心
平台公告
工单
我的工单
提交工单
控制台
SDK调用示例
suning.custom.isvitemlist.query/
调用示例(JAVA)
复制全部代码
import com.suning.api.entity.custom.IsvitemlistQueryRequest; import com.suning.api.entity.custom.IsvitemlistQueryResponse; IsvitemlistQueryRequest request = new IsvitemlistQueryRequest(); request.setBrandCode("00000000"); request.setCategoryCode("1"); request.setCatentryType("01"); request.setCmTitle("金圭内胆"); request.setDelFlag("00"); request.setEditBeginTime("最近编辑时间-开始时间"); request.setEditEndTime("最近编辑时间-结束时间"); request.setFcateCode("432556"); request.setGroupCodes("12"); request.setKeyWord("关键词"); request.setMaxPrice("6.7"); request.setMixPrice("1.2"); request.setOrderType("1"); request.setPage("1"); request.setPagenum("1"); request.setProductCode("100002496,100004184"); request.setProductName("*"); request.setSaleStatus("1,7,8"); request.setScateCode("342224,5322"); request.setSupplierCmmdtyCode("100000016,100000017,100000018"); request.setTcateCode("432556"); //api入参校验逻辑开关,当测试稳定之后建议设置为 false 或者删除该行 request.setCheckParam(true); String serverUrl = "https://openpre.cnsuning.com/api/http/sopRequest"; String appKey = "你的appKey"; String appSecret = "你的appSecret"; DefaultSuningClient client = new DefaultSuningClient(serverUrl, appKey,appSecret, "json"); try { IsvitemlistQueryResponse response = client.excute(request); System.out.println("返回json/xml格式数据 :" + response.getBody()); } catch (SuningApiException e) { e.printStackTrace(); }
调用示例(PHP)
复制全部代码
$req = new IsvitemlistQueryRequest(); $req -> setBrandCode("00000000"); $req -> setCategoryCode("1"); $req -> setCatentryType("01"); $req -> setCmTitle("金圭内胆"); $req -> setDelFlag("00"); $req -> setEditBeginTime("最近编辑时间-开始时间"); $req -> setEditEndTime("最近编辑时间-结束时间"); $req -> setFcateCode("432556"); $req -> setGroupCodes("12"); $req -> setKeyWord("关键词"); $req -> setMaxPrice("6.7"); $req -> setMixPrice("1.2"); $req -> setOrderType("1"); $req -> setPage("1"); $req -> setPagenum("1"); $req -> setProductCode("100002496,100004184"); $req -> setProductName("*"); $req -> setSaleStatus("1,7,8"); $req -> setScateCode("342224,5322"); $req -> setSupplierCmmdtyCode("100000016,100000017,100000018"); $req -> setTcateCode("432556"); //api入参校验逻辑开关,当测试稳定之后建议设置为 false 或者删除该行 $req -> setCheckParam('true'); $serverUrl = "https://openpre.cnsuning.com/api/http/sopRequest"; $appKey = "你的appKey"; $appSecret = "你的appSecret"; $client = new DefaultSuningClient($serverUrl,$appKey,$appSecret,'json'); $resp = $client -> execute($req); print_r("返回响应报文:".$resp);
调用示例(.NET)
复制全部代码
using suning_api_sdk.BizRequest.CustomCustomRequest; using suning_api_sdk.BizResponse.CustomCustomResponse; using suning_api_sdk.Models.CustomCustomModel; IsvitemlistQueryRequest request = new IsvitemlistQueryRequest(); request.brandCode="00000000"; request.categoryCode="1"; request.catentryType="01"; request.cmTitle="金圭内胆"; request.delFlag="00"; request.editBeginTime="最近编辑时间-开始时间"; request.editEndTime="最近编辑时间-结束时间"; request.fcateCode="432556"; request.groupCodes="12"; request.keyWord="关键词"; request.maxPrice="6.7"; request.mixPrice="1.2"; request.orderType="1"; request.page="1"; request.pagenum="1"; request.productCode="100002496,100004184"; request.productName="*"; request.saleStatus="1,7,8"; request.scateCode="342224,5322"; request.supplierCmmdtyCode="100000016,100000017,100000018"; request.tcateCode="432556"; //开启日志调试,当测试稳定之后建议设置为 false 或者删除该行 SuningLogger.IsLogDebug = true; string serverUrl = "https://openpre.cnsuning.com/api/http/sopRequest"; string appKey = "你的appKey"; string appSecret = "你的appSecret"; ISuningClient client = new DefaultSuningClient(serverUrl, appKey,appSecret); IsvitemlistQueryResponse response = client.Execute(request);
调用示例(PYTHON)
复制全部代码
# -*- coding: utf-8 -*- import suning.api request = suning.api.custom.IsvitemlistQueryRequest() request.brandCode="00000000"; request.categoryCode="1"; request.catentryType="01"; request.cmTitle="金圭内胆"; request.delFlag="00"; request.editBeginTime="最近编辑时间-开始时间"; request.editEndTime="最近编辑时间-结束时间"; request.fcateCode="432556"; request.groupCodes="12"; request.keyWord="关键词"; request.maxPrice="6.7"; request.mixPrice="1.2"; request.orderType="1"; request.page="1"; request.pagenum="1"; request.productCode="100002496,100004184"; request.productName="*"; request.saleStatus="1,7,8"; request.scateCode="342224,5322"; request.supplierCmmdtyCode="100000016,100000017,100000018"; request.tcateCode="432556"; domain = "https://openpre.cnsuning.com" appKey = "你的appKey" appSecret = "你的appSecret" request.setDomainInfo(domain,"80") request.setAppInfo(appKey,appSecret) try: result=request.getResponse() print(result) except Exception as e: print(e)