登录
退出
首页
开放版图
苏宁有货
商家后台
文档中心
文档中心
API文档
消息中心
平台公告
工单
我的工单
提交工单
控制台
SDK调用示例
suning.custom.yskreceive.add/
调用示例(JAVA)
复制全部代码
import com.suning.api.entity.custom.YskreceiveAddRequest; import com.suning.api.entity.custom.YskreceiveAddResponse; YskreceiveAddRequest request = new YskreceiveAddRequest(); Loweroedersquarebean loweroedersquarebean= new Loweroedersquarebean(); loweroedersquarebean.setClientId("123"); loweroedersquarebean.setMemInCardNo("DA5563303"); loweroedersquarebean.setMemOutCardNo("2876556788976"); loweroedersquarebean.setMemType("AP"); loweroedersquarebean.setParentMemberNo("M28655900009"); request.setLoweroedersquarebean(loweroedersquarebean); Orderbodybean orderbodybean= new Orderbodybean(); orderbodybean.setAppointTransTime("20190608150000"); orderbodybean.setBillType("-1"); orderbodybean.setBtocOrderId("345677755"); orderbodybean.setCartNo("C3487654D"); orderbodybean.setDetailCount("10"); orderbodybean.setEffectiveTime("20190608150000"); orderbodybean.setOmsCreatedTime("20190608150000"); orderbodybean.setOrderChannel("PC"); orderbodybean.setOrderId("28223852028901"); orderbodybean.setOrderSource("LCPOS"); orderbodybean.setOrderType("A"); orderbodybean.setSalePlatform("SAP"); orderbodybean.setSapOrderId("210100025801582559"); orderbodybean.setSposOrderId("DA5563303"); orderbodybean.setTmOrderId("TM5563303"); request.setOrderbodybean(orderbodybean); Orderbodyinfobean orderbodyinfobean= new Orderbodyinfobean(); orderbodyinfobean.setAbBankFlag("A"); orderbodyinfobean.setAttiOrg("3457"); orderbodyinfobean.setAttiShopCode("DA5563303"); orderbodyinfobean.setBalancePayTime("20021230115554"); orderbodyinfobean.setBtocOrderItemId("DA5563303"); orderbodyinfobean.setBusinessUnit("AP"); orderbodyinfobean.setCasherId("Y00505000"); orderbodyinfobean.setCasherTerminalId("23578"); orderbodyinfobean.setCouponTotalMoney("10.00"); orderbodyinfobean.setCprototypeEan("C3487654D"); orderbodyinfobean.setCprototypeId("CS2345"); orderbodyinfobean.setCscPrice("18.65"); orderbodyinfobean.setCurrencyType("CNY"); orderbodyinfobean.setDebtId("1"); orderbodyinfobean.setDeliveryArea("330172"); orderbodyinfobean.setDeliveryType("01"); orderbodyinfobean.setDistChannel("50"); orderbodyinfobean.setDistributeType("A"); orderbodyinfobean.setIntegratedLog("1"); orderbodyinfobean.setInvoicePrintAddress("D5678"); orderbodyinfobean.setInvoicePrintAddressPs("A"); orderbodyinfobean.setItemTaxFare("16.20"); orderbodyinfobean.setManagerCardMoney("13"); orderbodyinfobean.setManagerCardNo("weew335667232"); orderbodyinfobean.setMerchantCode("DA55"); orderbodyinfobean.setMnSupplierCode("210100025801582559"); orderbodyinfobean.setNewPayAmount("15.00"); orderbodyinfobean.setOperatorId("Y10001001"); orderbodyinfobean.setOrderItemId("28223852533603"); orderbodyinfobean.setOrderItemStepId("210100025801582559"); orderbodyinfobean.setOrderItemType("10"); orderbodyinfobean.setOrderTime("20190608150000"); orderbodyinfobean.setOriSaleOrg("5005"); orderbodyinfobean.setPartNumber("01002405"); orderbodyinfobean.setPayAmount("15.00"); orderbodyinfobean.setPayOrg("2365"); orderbodyinfobean.setPayStore("2323"); orderbodyinfobean.setPointAmount("10"); orderbodyinfobean.setPointMoney("10.000"); orderbodyinfobean.setPosOrderId("210100025801582559"); orderbodyinfobean.setProductLevel("000029999"); orderbodyinfobean.setProductName("洗衣机"); orderbodyinfobean.setProvideAddress("D025"); orderbodyinfobean.setPurchaseFlag("1"); orderbodyinfobean.setRealPayAmount("10.80"); orderbodyinfobean.setRealSalesPerson("Y00505000"); orderbodyinfobean.setRealSupplierCode("33557890454433"); orderbodyinfobean.setSaleAmount("20"); orderbodyinfobean.setSaleOrg("5006"); orderbodyinfobean.setSalesPerson("000000000"); orderbodyinfobean.setSaleUnit("S01"); orderbodyinfobean.setSapOrderType("YCXS"); orderbodyinfobean.setSapProductCode("0000000004"); orderbodyinfobean.setScsOrderItemId("DA5563303"); orderbodyinfobean.setSerialNumber("C"); orderbodyinfobean.setServiceFee("10.00"); orderbodyinfobean.setShippingCondition("000000000"); orderbodyinfobean.setShopCode("DA5563303"); orderbodyinfobean.setSposOrderItemId("DA5563303"); orderbodyinfobean.setStockArea("D345"); orderbodyinfobean.setStockType("X"); orderbodyinfobean.setStoreCode("DA5563303"); orderbodyinfobean.setSubscription("12"); orderbodyinfobean.setSupplierCode("10001356"); orderbodyinfobean.setSupplierShopType("16"); orderbodyinfobean.setSupProvideAddress("ZE11"); orderbodyinfobean.setTmOrderitemId("1766557"); orderbodyinfobean.setTotalAmount("17.55"); orderbodyinfobean.setTranspInventoryFlag("Y"); orderbodyinfobean.setTransportFee("16"); orderbodyinfobean.setUnitPrice("10.80"); orderbodyinfobean.setVirtualBalanceStartTime("20210309125732"); orderbodyinfobean.setVoucherTotalMoney("15.00"); orderbodyinfobean.setWbLeOrg("210100025801582559sjdh"); orderbodyinfobean.setWbStoreCode("323435464575685ddfg"); orderbodyinfobean.setZxxsl("0.16"); request.setOrderbodyinfobean(orderbodyinfobean); Orderlineusecouponsandpaymentbean orderlineusecouponsandpaymentbean= new Orderlineusecouponsandpaymentbean(); orderlineusecouponsandpaymentbean.setActivityId("12134"); orderlineusecouponsandpaymentbean.setAlipaypayno("232435345"); orderlineusecouponsandpaymentbean.setBankTypeCode("01"); orderlineusecouponsandpaymentbean.setBankTypeName("定金卡"); orderlineusecouponsandpaymentbean.setBillNo("1234567786"); orderlineusecouponsandpaymentbean.setBolnum("124125352342"); orderlineusecouponsandpaymentbean.setCardNo("127182374681265781239581"); orderlineusecouponsandpaymentbean.setCouponruleID("1111"); orderlineusecouponsandpaymentbean.setDepositFlag("01"); orderlineusecouponsandpaymentbean.setEnergizeType("1"); orderlineusecouponsandpaymentbean.setFlowId("123456"); orderlineusecouponsandpaymentbean.setHelpPaySign("AP"); orderlineusecouponsandpaymentbean.setNewBankTypeCode("21"); orderlineusecouponsandpaymentbean.setOldAccountType("1"); orderlineusecouponsandpaymentbean.setParentPayCode("69"); orderlineusecouponsandpaymentbean.setPayAmountZf("16.00"); orderlineusecouponsandpaymentbean.setPayCode("6904"); orderlineusecouponsandpaymentbean.setPayCompany("3456"); orderlineusecouponsandpaymentbean.setPayName("云商卡"); orderlineusecouponsandpaymentbean.setPayOffice("5577"); orderlineusecouponsandpaymentbean.setPayTime("2020-01-16 15:00:00"); orderlineusecouponsandpaymentbean.setPayType("CArd"); orderlineusecouponsandpaymentbean.setPolicyflag("12"); orderlineusecouponsandpaymentbean.setRepaymentCode("55555555"); orderlineusecouponsandpaymentbean.setSellerCode("4356"); orderlineusecouponsandpaymentbean.setSerialNo("01"); orderlineusecouponsandpaymentbean.setStoreCodeSk("DA5563303"); List
orderlineusecouponsandpaymentbeanList =new ArrayList
(); orderlineusecouponsandpaymentbeanList.add(orderlineusecouponsandpaymentbean); request.setOrderlineusecouponsandpaymentbean(orderlineusecouponsandpaymentbeanList); Returnsorderbean returnsorderbean= new Returnsorderbean(); returnsorderbean.setChangeOrderNewItemId("3235346475675"); returnsorderbean.setChangeOrderOldItemId("1232154364563467"); returnsorderbean.setChgType("4"); returnsorderbean.setCreatedTime("20210619120358"); returnsorderbean.setOperatMum("32445"); returnsorderbean.setPreOrderItemId("210100025801582559"); returnsorderbean.setPrePosId("DA5563303"); returnsorderbean.setReason("下错单"); returnsorderbean.setRetType("2"); returnsorderbean.setSpecialReturnFlag("X"); request.setReturnsorderbean(returnsorderbean); //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 { YskreceiveAddResponse response = client.excute(request); System.out.println("返回json/xml格式数据 :" + response.getBody()); } catch (SuningApiException e) { e.printStackTrace(); }
调用示例(PHP)
复制全部代码
$req = new YskreceiveAddRequest(); $loweroedersquarebean= new Loweroedersquarebean(); $loweroedersquarebean-> setClientId("123"); $loweroedersquarebean-> setMemInCardNo("DA5563303"); $loweroedersquarebean-> setMemOutCardNo("2876556788976"); $loweroedersquarebean-> setMemType("AP"); $loweroedersquarebean-> setParentMemberNo("M28655900009"); $req -> setLoweroedersquarebean($loweroedersquarebean); $orderbodybean= new Orderbodybean(); $orderbodybean-> setAppointTransTime("20190608150000"); $orderbodybean-> setBillType("-1"); $orderbodybean-> setBtocOrderId("345677755"); $orderbodybean-> setCartNo("C3487654D"); $orderbodybean-> setDetailCount("10"); $orderbodybean-> setEffectiveTime("20190608150000"); $orderbodybean-> setOmsCreatedTime("20190608150000"); $orderbodybean-> setOrderChannel("PC"); $orderbodybean-> setOrderId("28223852028901"); $orderbodybean-> setOrderSource("LCPOS"); $orderbodybean-> setOrderType("A"); $orderbodybean-> setSalePlatform("SAP"); $orderbodybean-> setSapOrderId("210100025801582559"); $orderbodybean-> setSposOrderId("DA5563303"); $orderbodybean-> setTmOrderId("TM5563303"); $req -> setOrderbodybean($orderbodybean); $orderbodyinfobean= new Orderbodyinfobean(); $orderbodyinfobean-> setAbBankFlag("A"); $orderbodyinfobean-> setAttiOrg("3457"); $orderbodyinfobean-> setAttiShopCode("DA5563303"); $orderbodyinfobean-> setBalancePayTime("20021230115554"); $orderbodyinfobean-> setBtocOrderItemId("DA5563303"); $orderbodyinfobean-> setBusinessUnit("AP"); $orderbodyinfobean-> setCasherId("Y00505000"); $orderbodyinfobean-> setCasherTerminalId("23578"); $orderbodyinfobean-> setCouponTotalMoney("10.00"); $orderbodyinfobean-> setCprototypeEan("C3487654D"); $orderbodyinfobean-> setCprototypeId("CS2345"); $orderbodyinfobean-> setCscPrice("18.65"); $orderbodyinfobean-> setCurrencyType("CNY"); $orderbodyinfobean-> setDebtId("1"); $orderbodyinfobean-> setDeliveryArea("330172"); $orderbodyinfobean-> setDeliveryType("01"); $orderbodyinfobean-> setDistChannel("50"); $orderbodyinfobean-> setDistributeType("A"); $orderbodyinfobean-> setIntegratedLog("1"); $orderbodyinfobean-> setInvoicePrintAddress("D5678"); $orderbodyinfobean-> setInvoicePrintAddressPs("A"); $orderbodyinfobean-> setItemTaxFare("16.20"); $orderbodyinfobean-> setManagerCardMoney("13"); $orderbodyinfobean-> setManagerCardNo("weew335667232"); $orderbodyinfobean-> setMerchantCode("DA55"); $orderbodyinfobean-> setMnSupplierCode("210100025801582559"); $orderbodyinfobean-> setNewPayAmount("15.00"); $orderbodyinfobean-> setOperatorId("Y10001001"); $orderbodyinfobean-> setOrderItemId("28223852533603"); $orderbodyinfobean-> setOrderItemStepId("210100025801582559"); $orderbodyinfobean-> setOrderItemType("10"); $orderbodyinfobean-> setOrderTime("20190608150000"); $orderbodyinfobean-> setOriSaleOrg("5005"); $orderbodyinfobean-> setPartNumber("01002405"); $orderbodyinfobean-> setPayAmount("15.00"); $orderbodyinfobean-> setPayOrg("2365"); $orderbodyinfobean-> setPayStore("2323"); $orderbodyinfobean-> setPointAmount("10"); $orderbodyinfobean-> setPointMoney("10.000"); $orderbodyinfobean-> setPosOrderId("210100025801582559"); $orderbodyinfobean-> setProductLevel("000029999"); $orderbodyinfobean-> setProductName("洗衣机"); $orderbodyinfobean-> setProvideAddress("D025"); $orderbodyinfobean-> setPurchaseFlag("1"); $orderbodyinfobean-> setRealPayAmount("10.80"); $orderbodyinfobean-> setRealSalesPerson("Y00505000"); $orderbodyinfobean-> setRealSupplierCode("33557890454433"); $orderbodyinfobean-> setSaleAmount("20"); $orderbodyinfobean-> setSaleOrg("5006"); $orderbodyinfobean-> setSalesPerson("000000000"); $orderbodyinfobean-> setSaleUnit("S01"); $orderbodyinfobean-> setSapOrderType("YCXS"); $orderbodyinfobean-> setSapProductCode("0000000004"); $orderbodyinfobean-> setScsOrderItemId("DA5563303"); $orderbodyinfobean-> setSerialNumber("C"); $orderbodyinfobean-> setServiceFee("10.00"); $orderbodyinfobean-> setShippingCondition("000000000"); $orderbodyinfobean-> setShopCode("DA5563303"); $orderbodyinfobean-> setSposOrderItemId("DA5563303"); $orderbodyinfobean-> setStockArea("D345"); $orderbodyinfobean-> setStockType("X"); $orderbodyinfobean-> setStoreCode("DA5563303"); $orderbodyinfobean-> setSubscription("12"); $orderbodyinfobean-> setSupplierCode("10001356"); $orderbodyinfobean-> setSupplierShopType("16"); $orderbodyinfobean-> setSupProvideAddress("ZE11"); $orderbodyinfobean-> setTmOrderitemId("1766557"); $orderbodyinfobean-> setTotalAmount("17.55"); $orderbodyinfobean-> setTranspInventoryFlag("Y"); $orderbodyinfobean-> setTransportFee("16"); $orderbodyinfobean-> setUnitPrice("10.80"); $orderbodyinfobean-> setVirtualBalanceStartTime("20210309125732"); $orderbodyinfobean-> setVoucherTotalMoney("15.00"); $orderbodyinfobean-> setWbLeOrg("210100025801582559sjdh"); $orderbodyinfobean-> setWbStoreCode("323435464575685ddfg"); $orderbodyinfobean-> setZxxsl("0.16"); $req -> setOrderbodyinfobean($orderbodyinfobean); $orderlineusecouponsandpaymentbean= new Orderlineusecouponsandpaymentbean(); $orderlineusecouponsandpaymentbean-> setActivityId("12134"); $orderlineusecouponsandpaymentbean-> setAlipaypayno("232435345"); $orderlineusecouponsandpaymentbean-> setBankTypeCode("01"); $orderlineusecouponsandpaymentbean-> setBankTypeName("定金卡"); $orderlineusecouponsandpaymentbean-> setBillNo("1234567786"); $orderlineusecouponsandpaymentbean-> setBolnum("124125352342"); $orderlineusecouponsandpaymentbean-> setCardNo("127182374681265781239581"); $orderlineusecouponsandpaymentbean-> setCouponruleID("1111"); $orderlineusecouponsandpaymentbean-> setDepositFlag("01"); $orderlineusecouponsandpaymentbean-> setEnergizeType("1"); $orderlineusecouponsandpaymentbean-> setFlowId("123456"); $orderlineusecouponsandpaymentbean-> setHelpPaySign("AP"); $orderlineusecouponsandpaymentbean-> setNewBankTypeCode("21"); $orderlineusecouponsandpaymentbean-> setOldAccountType("1"); $orderlineusecouponsandpaymentbean-> setParentPayCode("69"); $orderlineusecouponsandpaymentbean-> setPayAmountZf("16.00"); $orderlineusecouponsandpaymentbean-> setPayCode("6904"); $orderlineusecouponsandpaymentbean-> setPayCompany("3456"); $orderlineusecouponsandpaymentbean-> setPayName("云商卡"); $orderlineusecouponsandpaymentbean-> setPayOffice("5577"); $orderlineusecouponsandpaymentbean-> setPayTime("2020-01-16 15:00:00"); $orderlineusecouponsandpaymentbean-> setPayType("CArd"); $orderlineusecouponsandpaymentbean-> setPolicyflag("12"); $orderlineusecouponsandpaymentbean-> setRepaymentCode("55555555"); $orderlineusecouponsandpaymentbean-> setSellerCode("4356"); $orderlineusecouponsandpaymentbean-> setSerialNo("01"); $orderlineusecouponsandpaymentbean-> setStoreCodeSk("DA5563303"); $req -> setOrderlineusecouponsandpaymentbean(array($orderlineusecouponsandpaymentbean)); $returnsorderbean= new Returnsorderbean(); $returnsorderbean-> setChangeOrderNewItemId("3235346475675"); $returnsorderbean-> setChangeOrderOldItemId("1232154364563467"); $returnsorderbean-> setChgType("4"); $returnsorderbean-> setCreatedTime("20210619120358"); $returnsorderbean-> setOperatMum("32445"); $returnsorderbean-> setPreOrderItemId("210100025801582559"); $returnsorderbean-> setPrePosId("DA5563303"); $returnsorderbean-> setReason("下错单"); $returnsorderbean-> setRetType("2"); $returnsorderbean-> setSpecialReturnFlag("X"); $req -> setReturnsorderbean($returnsorderbean); //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; YskreceiveAddRequest request = new YskreceiveAddRequest(); YskreceiveAddLoweroedersquarebeanReq loweroedersquarebean= new YskreceiveAddLoweroedersquarebeanReq(); loweroedersquarebean.clientId="123"; loweroedersquarebean.memInCardNo="DA5563303"; loweroedersquarebean.memOutCardNo="2876556788976"; loweroedersquarebean.memType="AP"; loweroedersquarebean.parentMemberNo="M28655900009"; request.loweroedersquarebean=loweroedersquarebean; YskreceiveAddOrderbodybeanReq orderbodybean= new YskreceiveAddOrderbodybeanReq(); orderbodybean.appointTransTime="20190608150000"; orderbodybean.billType="-1"; orderbodybean.btocOrderId="345677755"; orderbodybean.cartNo="C3487654D"; orderbodybean.detailCount="10"; orderbodybean.effectiveTime="20190608150000"; orderbodybean.omsCreatedTime="20190608150000"; orderbodybean.orderChannel="PC"; orderbodybean.orderId="28223852028901"; orderbodybean.orderSource="LCPOS"; orderbodybean.orderType="A"; orderbodybean.salePlatform="SAP"; orderbodybean.sapOrderId="210100025801582559"; orderbodybean.sposOrderId="DA5563303"; orderbodybean.tmOrderId="TM5563303"; request.orderbodybean=orderbodybean; YskreceiveAddOrderbodyinfobeanReq orderbodyinfobean= new YskreceiveAddOrderbodyinfobeanReq(); orderbodyinfobean.abBankFlag="A"; orderbodyinfobean.attiOrg="3457"; orderbodyinfobean.attiShopCode="DA5563303"; orderbodyinfobean.balancePayTime="20021230115554"; orderbodyinfobean.btocOrderItemId="DA5563303"; orderbodyinfobean.businessUnit="AP"; orderbodyinfobean.casherId="Y00505000"; orderbodyinfobean.casherTerminalId="23578"; orderbodyinfobean.couponTotalMoney="10.00"; orderbodyinfobean.cprototypeEan="C3487654D"; orderbodyinfobean.cprototypeId="CS2345"; orderbodyinfobean.cscPrice="18.65"; orderbodyinfobean.currencyType="CNY"; orderbodyinfobean.debtId="1"; orderbodyinfobean.deliveryArea="330172"; orderbodyinfobean.deliveryType="01"; orderbodyinfobean.distChannel="50"; orderbodyinfobean.distributeType="A"; orderbodyinfobean.integratedLog="1"; orderbodyinfobean.invoicePrintAddress="D5678"; orderbodyinfobean.invoicePrintAddressPs="A"; orderbodyinfobean.itemTaxFare="16.20"; orderbodyinfobean.managerCardMoney="13"; orderbodyinfobean.managerCardNo="weew335667232"; orderbodyinfobean.merchantCode="DA55"; orderbodyinfobean.mnSupplierCode="210100025801582559"; orderbodyinfobean.newPayAmount="15.00"; orderbodyinfobean.operatorId="Y10001001"; orderbodyinfobean.orderItemId="28223852533603"; orderbodyinfobean.orderItemStepId="210100025801582559"; orderbodyinfobean.orderItemType="10"; orderbodyinfobean.orderTime="20190608150000"; orderbodyinfobean.oriSaleOrg="5005"; orderbodyinfobean.partNumber="01002405"; orderbodyinfobean.payAmount="15.00"; orderbodyinfobean.payOrg="2365"; orderbodyinfobean.payStore="2323"; orderbodyinfobean.pointAmount="10"; orderbodyinfobean.pointMoney="10.000"; orderbodyinfobean.posOrderId="210100025801582559"; orderbodyinfobean.productLevel="000029999"; orderbodyinfobean.productName="洗衣机"; orderbodyinfobean.provideAddress="D025"; orderbodyinfobean.purchaseFlag="1"; orderbodyinfobean.realPayAmount="10.80"; orderbodyinfobean.realSalesPerson="Y00505000"; orderbodyinfobean.realSupplierCode="33557890454433"; orderbodyinfobean.saleAmount="20"; orderbodyinfobean.saleOrg="5006"; orderbodyinfobean.salesPerson="000000000"; orderbodyinfobean.saleUnit="S01"; orderbodyinfobean.sapOrderType="YCXS"; orderbodyinfobean.sapProductCode="0000000004"; orderbodyinfobean.scsOrderItemId="DA5563303"; orderbodyinfobean.serialNumber="C"; orderbodyinfobean.serviceFee="10.00"; orderbodyinfobean.shippingCondition="000000000"; orderbodyinfobean.shopCode="DA5563303"; orderbodyinfobean.sposOrderItemId="DA5563303"; orderbodyinfobean.stockArea="D345"; orderbodyinfobean.stockType="X"; orderbodyinfobean.storeCode="DA5563303"; orderbodyinfobean.subscription="12"; orderbodyinfobean.supplierCode="10001356"; orderbodyinfobean.supplierShopType="16"; orderbodyinfobean.supProvideAddress="ZE11"; orderbodyinfobean.tmOrderitemId="1766557"; orderbodyinfobean.totalAmount="17.55"; orderbodyinfobean.transpInventoryFlag="Y"; orderbodyinfobean.transportFee="16"; orderbodyinfobean.unitPrice="10.80"; orderbodyinfobean.virtualBalanceStartTime="20210309125732"; orderbodyinfobean.voucherTotalMoney="15.00"; orderbodyinfobean.wbLeOrg="210100025801582559sjdh"; orderbodyinfobean.wbStoreCode="323435464575685ddfg"; orderbodyinfobean.zxxsl="0.16"; request.orderbodyinfobean=orderbodyinfobean; YskreceiveAddOrderlineusecouponsandpaymentbeanReq orderlineusecouponsandpaymentbean= new YskreceiveAddOrderlineusecouponsandpaymentbeanReq(); orderlineusecouponsandpaymentbean.activityId="12134"; orderlineusecouponsandpaymentbean.alipaypayno="232435345"; orderlineusecouponsandpaymentbean.bankTypeCode="01"; orderlineusecouponsandpaymentbean.bankTypeName="定金卡"; orderlineusecouponsandpaymentbean.billNo="1234567786"; orderlineusecouponsandpaymentbean.bolnum="124125352342"; orderlineusecouponsandpaymentbean.cardNo="127182374681265781239581"; orderlineusecouponsandpaymentbean.couponruleID="1111"; orderlineusecouponsandpaymentbean.depositFlag="01"; orderlineusecouponsandpaymentbean.energizeType="1"; orderlineusecouponsandpaymentbean.flowId="123456"; orderlineusecouponsandpaymentbean.helpPaySign="AP"; orderlineusecouponsandpaymentbean.newBankTypeCode="21"; orderlineusecouponsandpaymentbean.oldAccountType="1"; orderlineusecouponsandpaymentbean.parentPayCode="69"; orderlineusecouponsandpaymentbean.payAmountZf="16.00"; orderlineusecouponsandpaymentbean.payCode="6904"; orderlineusecouponsandpaymentbean.payCompany="3456"; orderlineusecouponsandpaymentbean.payName="云商卡"; orderlineusecouponsandpaymentbean.payOffice="5577"; orderlineusecouponsandpaymentbean.payTime="2020-01-16 15:00:00"; orderlineusecouponsandpaymentbean.payType="CArd"; orderlineusecouponsandpaymentbean.policyflag="12"; orderlineusecouponsandpaymentbean.repaymentCode="55555555"; orderlineusecouponsandpaymentbean.sellerCode="4356"; orderlineusecouponsandpaymentbean.serialNo="01"; orderlineusecouponsandpaymentbean.storeCodeSk="DA5563303"; List
orderlineusecouponsandpaymentbeanList =new ArrayList
(); orderlineusecouponsandpaymentbeanList.add(orderlineusecouponsandpaymentbean); request.orderlineusecouponsandpaymentbean=orderlineusecouponsandpaymentbeanList; YskreceiveAddReturnsorderbeanReq returnsorderbean= new YskreceiveAddReturnsorderbeanReq(); returnsorderbean.changeOrderNewItemId="3235346475675"; returnsorderbean.changeOrderOldItemId="1232154364563467"; returnsorderbean.chgType="4"; returnsorderbean.createdTime="20210619120358"; returnsorderbean.operatMum="32445"; returnsorderbean.preOrderItemId="210100025801582559"; returnsorderbean.prePosId="DA5563303"; returnsorderbean.reason="下错单"; returnsorderbean.retType="2"; returnsorderbean.specialReturnFlag="X"; request.returnsorderbean=returnsorderbean; //开启日志调试,当测试稳定之后建议设置为 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); YskreceiveAddResponse response = client.Execute(request);
调用示例(PYTHON)
复制全部代码
# -*- coding: utf-8 -*- import suning.api request = suning.api.custom.YskreceiveAddRequest() request. loweroedersquarebean= { clientId:"123", memInCardNo:"DA5563303", memOutCardNo:"2876556788976", memType:"AP", parentMemberNo:"M28655900009", }; request. orderbodybean= { appointTransTime:"20190608150000", billType:"-1", btocOrderId:"345677755", cartNo:"C3487654D", detailCount:"10", effectiveTime:"20190608150000", omsCreatedTime:"20190608150000", orderChannel:"PC", orderId:"28223852028901", orderSource:"LCPOS", orderType:"A", salePlatform:"SAP", sapOrderId:"210100025801582559", sposOrderId:"DA5563303", tmOrderId:"TM5563303", }; request. orderbodyinfobean= { abBankFlag:"A", attiOrg:"3457", attiShopCode:"DA5563303", balancePayTime:"20021230115554", btocOrderItemId:"DA5563303", businessUnit:"AP", casherId:"Y00505000", casherTerminalId:"23578", couponTotalMoney:"10.00", cprototypeEan:"C3487654D", cprototypeId:"CS2345", cscPrice:"18.65", currencyType:"CNY", debtId:"1", deliveryArea:"330172", deliveryType:"01", distChannel:"50", distributeType:"A", integratedLog:"1", invoicePrintAddress:"D5678", invoicePrintAddressPs:"A", itemTaxFare:"16.20", managerCardMoney:"13", managerCardNo:"weew335667232", merchantCode:"DA55", mnSupplierCode:"210100025801582559", newPayAmount:"15.00", operatorId:"Y10001001", orderItemId:"28223852533603", orderItemStepId:"210100025801582559", orderItemType:"10", orderTime:"20190608150000", oriSaleOrg:"5005", partNumber:"01002405", payAmount:"15.00", payOrg:"2365", payStore:"2323", pointAmount:"10", pointMoney:"10.000", posOrderId:"210100025801582559", productLevel:"000029999", productName:"洗衣机", provideAddress:"D025", purchaseFlag:"1", realPayAmount:"10.80", realSalesPerson:"Y00505000", realSupplierCode:"33557890454433", saleAmount:"20", saleOrg:"5006", salesPerson:"000000000", saleUnit:"S01", sapOrderType:"YCXS", sapProductCode:"0000000004", scsOrderItemId:"DA5563303", serialNumber:"C", serviceFee:"10.00", shippingCondition:"000000000", shopCode:"DA5563303", sposOrderItemId:"DA5563303", stockArea:"D345", stockType:"X", storeCode:"DA5563303", subscription:"12", supplierCode:"10001356", supplierShopType:"16", supProvideAddress:"ZE11", tmOrderitemId:"1766557", totalAmount:"17.55", transpInventoryFlag:"Y", transportFee:"16", unitPrice:"10.80", virtualBalanceStartTime:"20210309125732", voucherTotalMoney:"15.00", wbLeOrg:"210100025801582559sjdh", wbStoreCode:"323435464575685ddfg", zxxsl:"0.16", }; request. orderlineusecouponsandpaymentbean= [{ activityId:"12134", alipaypayno:"232435345", bankTypeCode:"01", bankTypeName:"定金卡", billNo:"1234567786", bolnum:"124125352342", cardNo:"127182374681265781239581", couponruleID:"1111", depositFlag:"01", energizeType:"1", flowId:"123456", helpPaySign:"AP", newBankTypeCode:"21", oldAccountType:"1", parentPayCode:"69", payAmountZf:"16.00", payCode:"6904", payCompany:"3456", payName:"云商卡", payOffice:"5577", payTime:"2020-01-16 15:00:00", payType:"CArd", policyflag:"12", repaymentCode:"55555555", sellerCode:"4356", serialNo:"01", storeCodeSk:"DA5563303", }]; request. returnsorderbean= { changeOrderNewItemId:"3235346475675", changeOrderOldItemId:"1232154364563467", chgType:"4", createdTime:"20210619120358", operatMum:"32445", preOrderItemId:"210100025801582559", prePosId:"DA5563303", reason:"下错单", retType:"2", specialReturnFlag:"X", }; 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)