登录
退出
首页
开放版图
苏宁有货
商家后台
文档中心
文档中心
API文档
消息中心
平台公告
工单
我的工单
提交工单
控制台
SDK调用示例
suning.integrate.culitemcontents.modify/
调用示例(JAVA)
复制全部代码
import com.suning.api.entity.integrate.CulitemcontentsModifyRequest; import com.suning.api.entity.integrate.CulitemcontentsModifyResponse; CulitemcontentsModifyRequest request = new CulitemcontentsModifyRequest(); request.setAfterSaleServiceDec("七天内包退换"); request.setAlertQty("5"); request.setAssortCode("11111111"); request.setCmTitle("商品标题"); DetailModule detailModule= new DetailModule(); detailModule.setContent("模块化详情内容"); detailModule.setModuleId("123"); detailModule.setModuleName("模块名称"); detailModule.setNum("1"); detailModule.setType("模板类型"); List
detailModuleList =new ArrayList
(); detailModuleList.add(detailModule); request.setDetailModule(detailModuleList); request.setIntroduction("单一详情"); request.setInvQty("10"); request.setItemCode("7775"); request.setPeopleNum("2"); request.setPingouPrice("20.00"); request.setPrice("20.00"); request.setProductCode("105560068"); request.setPurchaseMax("10"); request.setPurchaseMin("5"); request.setSaleDate("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 { CulitemcontentsModifyResponse response = client.excute(request); System.out.println("返回json/xml格式数据 :" + response.getBody()); } catch (SuningApiException e) { e.printStackTrace(); }
调用示例(PHP)
复制全部代码
$req = new CulitemcontentsModifyRequest(); $req -> setAfterSaleServiceDec("七天内包退换"); $req -> setAlertQty("5"); $req -> setAssortCode("11111111"); $req -> setCmTitle("商品标题"); $detailModule= new DetailModule(); $detailModule-> setContent("模块化详情内容"); $detailModule-> setModuleId("123"); $detailModule-> setModuleName("模块名称"); $detailModule-> setNum("1"); $detailModule-> setType("模板类型"); $req -> setDetailModule(array($detailModule)); $req -> setIntroduction("单一详情"); $req -> setInvQty("10"); $req -> setItemCode("7775"); $req -> setPeopleNum("2"); $req -> setPingouPrice("20.00"); $req -> setPrice("20.00"); $req -> setProductCode("105560068"); $req -> setPurchaseMax("10"); $req -> setPurchaseMin("5"); $req -> setSaleDate("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; CulitemcontentsModifyRequest request = new CulitemcontentsModifyRequest(); request.afterSaleServiceDec="七天内包退换"; request.alertQty="5"; request.assortCode="11111111"; request.cmTitle="商品标题"; CulitemcontentsModifyDetailModuleReq detailModule= new CulitemcontentsModifyDetailModuleReq(); detailModule.content="模块化详情内容"; detailModule.moduleId="123"; detailModule.moduleName="模块名称"; detailModule.num="1"; detailModule.type="模板类型"; List
detailModuleList =new ArrayList
(); detailModuleList.add(detailModule); request.detailModule=detailModuleList; request.introduction="单一详情"; request.invQty="10"; request.itemCode="7775"; request.peopleNum="2"; request.pingouPrice="20.00"; request.price="20.00"; request.productCode="105560068"; request.purchaseMax="10"; request.purchaseMin="5"; request.saleDate="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); CulitemcontentsModifyResponse response = client.Execute(request);
调用示例(PYTHON)
复制全部代码
# -*- coding: utf-8 -*- import suning.api request = suning.api.integrate.CulitemcontentsModifyRequest() request.afterSaleServiceDec="七天内包退换"; request.alertQty="5"; request.assortCode="11111111"; request.cmTitle="商品标题"; request. detailModule= [{ content:"模块化详情内容", moduleId:"123", moduleName:"模块名称", num:"1", type:"模板类型", }]; request.introduction="单一详情"; request.invQty="10"; request.itemCode="7775"; request.peopleNum="2"; request.pingouPrice="20.00"; request.price="20.00"; request.productCode="105560068"; request.purchaseMax="10"; request.purchaseMin="5"; request.saleDate="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)