登录
退出
首页
开放版图
苏宁有货
商家后台
文档中心
文档中心
API文档
消息中心
平台公告
工单
我的工单
提交工单
控制台
SDK调用示例
suning.integrate.culitemcontentrevise.modify/
调用示例(JAVA)
复制全部代码
import com.suning.api.entity.integrate.CulitemcontentreviseModifyRequest; import com.suning.api.entity.integrate.CulitemcontentreviseModifyResponse; CulitemcontentreviseModifyRequest request = new CulitemcontentreviseModifyRequest(); request.setAfterSaleServiceDec("七天包退换"); request.setAssortCode("11111111"); request.setCmTitle("商品标题"); DetailModule detailModule= new DetailModule(); detailModule.setContent("模块化详情内容"); detailModule.setModuleId("123"); detailModule.setModuleName("模块名称"); detailModule.setNum("1"); detailModule.setType("cat_mod"); List
detailModuleList =new ArrayList
(); detailModuleList.add(detailModule); request.setDetailModule(detailModuleList); request.setIntroduction("单一详情"); request.setItemCode("111"); request.setPeopleNum("2"); request.setProductCode("105560068"); request.setPurchaseMax("10"); request.setPurchaseMin("5"); request.setSalesDate("2014-01-06"); request.setSaleSet("0"); request.setSellPoint("十万个为什么"); request.setSupplierImgAUrl("商家商品图片1地址url"); request.setSupplierImgBUrl("商家商品图片2地址url"); request.setSupplierImgCUrl("商家商品图片3地址url"); request.setSupplierImgDUrl("商家商品图片4地址url"); request.setSupplierImgEUrl("商家商品图片5地址url"); //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 { CulitemcontentreviseModifyResponse response = client.excute(request); System.out.println("返回json/xml格式数据 :" + response.getBody()); } catch (SuningApiException e) { e.printStackTrace(); }
调用示例(PHP)
复制全部代码
$req = new CulitemcontentreviseModifyRequest(); $req -> setAfterSaleServiceDec("七天包退换"); $req -> setAssortCode("11111111"); $req -> setCmTitle("商品标题"); $detailModule= new DetailModule(); $detailModule-> setContent("模块化详情内容"); $detailModule-> setModuleId("123"); $detailModule-> setModuleName("模块名称"); $detailModule-> setNum("1"); $detailModule-> setType("cat_mod"); $req -> setDetailModule(array($detailModule)); $req -> setIntroduction("单一详情"); $req -> setItemCode("111"); $req -> setPeopleNum("2"); $req -> setProductCode("105560068"); $req -> setPurchaseMax("10"); $req -> setPurchaseMin("5"); $req -> setSalesDate("2014-01-06"); $req -> setSaleSet("0"); $req -> setSellPoint("十万个为什么"); $req -> setSupplierImgAUrl("商家商品图片1地址url"); $req -> setSupplierImgBUrl("商家商品图片2地址url"); $req -> setSupplierImgCUrl("商家商品图片3地址url"); $req -> setSupplierImgDUrl("商家商品图片4地址url"); $req -> setSupplierImgEUrl("商家商品图片5地址url"); //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.CustomIntegrateRequest; using suning_api_sdk.BizResponse.CustomIntegrateResponse; using suning_api_sdk.Models.CustomIntegrateModel; CulitemcontentreviseModifyRequest request = new CulitemcontentreviseModifyRequest(); request.afterSaleServiceDec="七天包退换"; request.assortCode="11111111"; request.cmTitle="商品标题"; CulitemcontentreviseModifyDetailModuleReq detailModule= new CulitemcontentreviseModifyDetailModuleReq(); detailModule.content="模块化详情内容"; detailModule.moduleId="123"; detailModule.moduleName="模块名称"; detailModule.num="1"; detailModule.type="cat_mod"; List
detailModuleList =new ArrayList
(); detailModuleList.add(detailModule); request.detailModule=detailModuleList; request.introduction="单一详情"; request.itemCode="111"; request.peopleNum="2"; request.productCode="105560068"; request.purchaseMax="10"; request.purchaseMin="5"; request.salesDate="2014-01-06"; request.saleSet="0"; request.sellPoint="十万个为什么"; request.supplierImgAUrl="商家商品图片1地址url"; request.supplierImgBUrl="商家商品图片2地址url"; request.supplierImgCUrl="商家商品图片3地址url"; request.supplierImgDUrl="商家商品图片4地址url"; request.supplierImgEUrl="商家商品图片5地址url"; //开启日志调试,当测试稳定之后建议设置为 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); CulitemcontentreviseModifyResponse response = client.Execute(request);
调用示例(PYTHON)
复制全部代码
# -*- coding: utf-8 -*- import suning.api request = suning.api.integrate.CulitemcontentreviseModifyRequest() request.afterSaleServiceDec="七天包退换"; request.assortCode="11111111"; request.cmTitle="商品标题"; request. detailModule= [{ content:"模块化详情内容", moduleId:"123", moduleName:"模块名称", num:"1", type:"cat_mod", }]; request.introduction="单一详情"; request.itemCode="111"; request.peopleNum="2"; request.productCode="105560068"; request.purchaseMax="10"; request.purchaseMin="5"; request.salesDate="2014-01-06"; request.saleSet="0"; request.sellPoint="十万个为什么"; request.supplierImgAUrl="商家商品图片1地址url"; request.supplierImgBUrl="商家商品图片2地址url"; request.supplierImgCUrl="商家商品图片3地址url"; request.supplierImgDUrl="商家商品图片4地址url"; request.supplierImgEUrl="商家商品图片5地址url"; 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)