登录
退出
首页
开放版图
苏宁有货
商家后台
文档中心
文档中心
API文档
消息中心
平台公告
工单
我的工单
提交工单
控制台
SDK调用示例
suning.retailer.jsydbtborder.create/
调用示例(JAVA)
复制全部代码
import com.suning.api.entity.retailer.JsydbtborderCreateRequest; import com.suning.api.entity.retailer.JsydbtborderCreateResponse; JsydbtborderCreateRequest request = new JsydbtborderCreateRequest(); request.setAddress("123"); request.setBusinessHallName("123"); request.setBusinessHallNo("123"); request.setCity("123"); request.setCompanyName("123"); request.setCounty("123"); request.setDoOrderPriceMode("123"); request.setEmail("123"); request.setExtContent("123"); request.setInstallDate("123"); request.setInvoiceAddress("123"); request.setInvoiceCity("123"); request.setInvoiceContent("123"); request.setInvoiceCounty("123"); request.setInvoiceName("123"); request.setInvoicePhone("123"); request.setInvoiceProvice("123"); request.setInvoiceState("123"); request.setInvoiceType("123"); request.setIsUseBalance("123"); request.setMobile("mobile"); request.setName("123"); request.setNeedInstall("123"); request.setOrderPriceSnap("123"); request.setPaymentType("123"); request.setPhone("123"); request.setPoNo("123"); request.setPromiseDate("123"); request.setPromiseTimeRange("123"); request.setPromiseTimeRangeCode("123"); request.setProvince("123"); request.setRegAddr("123"); request.setRegBank("123"); request.setRegBankAccount("123"); request.setRegCode("123"); request.setRegCompanyName("123"); request.setRegPhone("123"); request.setRemark("123"); request.setReservedDateStr("123"); request.setReservedTimeRange("123"); request.setReservingDate("123"); request.setSelectedInvoiceTitle("123"); request.setSku("123"); request.setSubmitState("123"); request.setThirdOrder("123"); request.setToken("666666"); request.setTown("123"); request.setZip("123"); //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 { JsydbtborderCreateResponse response = client.excute(request); System.out.println("返回json/xml格式数据 :" + response.getBody()); } catch (SuningApiException e) { e.printStackTrace(); }
调用示例(PHP)
复制全部代码
$req = new JsydbtborderCreateRequest(); $req -> setAddress("123"); $req -> setBusinessHallName("123"); $req -> setBusinessHallNo("123"); $req -> setCity("123"); $req -> setCompanyName("123"); $req -> setCounty("123"); $req -> setDoOrderPriceMode("123"); $req -> setEmail("123"); $req -> setExtContent("123"); $req -> setInstallDate("123"); $req -> setInvoiceAddress("123"); $req -> setInvoiceCity("123"); $req -> setInvoiceContent("123"); $req -> setInvoiceCounty("123"); $req -> setInvoiceName("123"); $req -> setInvoicePhone("123"); $req -> setInvoiceProvice("123"); $req -> setInvoiceState("123"); $req -> setInvoiceType("123"); $req -> setIsUseBalance("123"); $req -> setMobile("mobile"); $req -> setName("123"); $req -> setNeedInstall("123"); $req -> setOrderPriceSnap("123"); $req -> setPaymentType("123"); $req -> setPhone("123"); $req -> setPoNo("123"); $req -> setPromiseDate("123"); $req -> setPromiseTimeRange("123"); $req -> setPromiseTimeRangeCode("123"); $req -> setProvince("123"); $req -> setRegAddr("123"); $req -> setRegBank("123"); $req -> setRegBankAccount("123"); $req -> setRegCode("123"); $req -> setRegCompanyName("123"); $req -> setRegPhone("123"); $req -> setRemark("123"); $req -> setReservedDateStr("123"); $req -> setReservedTimeRange("123"); $req -> setReservingDate("123"); $req -> setSelectedInvoiceTitle("123"); $req -> setSku("123"); $req -> setSubmitState("123"); $req -> setThirdOrder("123"); $req -> setToken("666666"); $req -> setTown("123"); $req -> setZip("123"); //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.CustomRetailerRequest; using suning_api_sdk.BizResponse.CustomRetailerResponse; using suning_api_sdk.Models.CustomRetailerModel; JsydbtborderCreateRequest request = new JsydbtborderCreateRequest(); request.address="123"; request.businessHallName="123"; request.businessHallNo="123"; request.city="123"; request.companyName="123"; request.county="123"; request.doOrderPriceMode="123"; request.email="123"; request.extContent="123"; request.installDate="123"; request.invoiceAddress="123"; request.invoiceCity="123"; request.invoiceContent="123"; request.invoiceCounty="123"; request.invoiceName="123"; request.invoicePhone="123"; request.invoiceProvice="123"; request.invoiceState="123"; request.invoiceType="123"; request.isUseBalance="123"; request.mobile="mobile"; request.name="123"; request.needInstall="123"; request.orderPriceSnap="123"; request.paymentType="123"; request.phone="123"; request.poNo="123"; request.promiseDate="123"; request.promiseTimeRange="123"; request.promiseTimeRangeCode="123"; request.province="123"; request.regAddr="123"; request.regBank="123"; request.regBankAccount="123"; request.regCode="123"; request.regCompanyName="123"; request.regPhone="123"; request.remark="123"; request.reservedDateStr="123"; request.reservedTimeRange="123"; request.reservingDate="123"; request.selectedInvoiceTitle="123"; request.sku="123"; request.submitState="123"; request.thirdOrder="123"; request.token="666666"; request.town="123"; request.zip="123"; //开启日志调试,当测试稳定之后建议设置为 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); JsydbtborderCreateResponse response = client.Execute(request);
调用示例(PYTHON)
复制全部代码
# -*- coding: utf-8 -*- import suning.api request = suning.api.retailer.JsydbtborderCreateRequest() request.address="123"; request.businessHallName="123"; request.businessHallNo="123"; request.city="123"; request.companyName="123"; request.county="123"; request.doOrderPriceMode="123"; request.email="123"; request.extContent="123"; request.installDate="123"; request.invoiceAddress="123"; request.invoiceCity="123"; request.invoiceContent="123"; request.invoiceCounty="123"; request.invoiceName="123"; request.invoicePhone="123"; request.invoiceProvice="123"; request.invoiceState="123"; request.invoiceType="123"; request.isUseBalance="123"; request.mobile="mobile"; request.name="123"; request.needInstall="123"; request.orderPriceSnap="123"; request.paymentType="123"; request.phone="123"; request.poNo="123"; request.promiseDate="123"; request.promiseTimeRange="123"; request.promiseTimeRangeCode="123"; request.province="123"; request.regAddr="123"; request.regBank="123"; request.regBankAccount="123"; request.regCode="123"; request.regCompanyName="123"; request.regPhone="123"; request.remark="123"; request.reservedDateStr="123"; request.reservedTimeRange="123"; request.reservingDate="123"; request.selectedInvoiceTitle="123"; request.sku="123"; request.submitState="123"; request.thirdOrder="123"; request.token="666666"; request.town="123"; request.zip="123"; 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)