TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest req = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PlaceOrderDTO obj1 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PlaceOrderDTO();
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CargoList> list3 = new ArrayList<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CargoList>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CargoList obj4 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CargoList();
list3.add(obj4);
obj4.setUnit("pcs");
obj4.setHscode("12345678");
obj4.setQuantity(1L);
obj4.setDeclarationValue("1");
obj4.setPrice("1");
obj4.setNameCn("无线耳机");
obj4.setCurrency("USD");
obj4.setNameEn("wireless headsets");
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProductType> list7 = new ArrayList<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProductType>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProductType obj8 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProductType();
list7.add(obj8);
obj8.setCode("battery");
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Children> list11 = new ArrayList<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Children>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Children obj12 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Children();
list11.add(obj12);
obj12.setCode("inlayBattery");
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.LeafNode> list15 = new ArrayList<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.LeafNode>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.LeafNode obj16 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.LeafNode();
list15.add(obj16);
obj16.setCode("oneLessHundredWh");
obj16.setName("单块电池≤100Wh");
list13.setChildren(list15);
obj12.setName("内置/配置电池");
list9.setChildren(list11);
obj8.setName("电池");
list5.setProductType(list7);
obj4.setPurpose("喝水生活用品");
obj4.setMaterial("塑料");
obj1.setCargoList(list3);
obj1.setOriginZipCode("518000");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DeliverWarehouseExpressDto obj17 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DeliverWarehouseExpressDto();
obj17.setLogisticsCompany("UPS");
obj17.setTrackingNumbers(""111111","22222“");
obj17.setPackageQuantity("2");
obj1.setDeliverWarehouseExpress(obj17);
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PackageList> list19 = new ArrayList<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PackageList>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PackageList obj20 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PackageList();
list19.add(obj20);
obj20.setQuantity("2");
obj20.setLength("5");
obj20.setWidth("10");
obj20.setWeight("3");
obj20.setType("box");
obj20.setHeight("2");
obj1.setPackageList(list19);
obj1.setDestinationCountryCode("US");
obj1.setWarehouseCode("ASP_YH_SZJC");
obj1.setProductCode("EX_ASP_standard3C");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ConsignorAddress obj21 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ConsignorAddress();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Address obj22 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Address();
obj22.setZip("518000");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Country obj23 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Country();
obj23.setCode("CN");
obj23.setAreaId(1L);
obj23.setName("china");
obj22.setCountry(obj23);
obj22.setAddress("阿里西溪园区");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Town obj24 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Town();
obj24.setCode("330009");
obj24.setAreaId(330009L);
obj24.setName("测试街道");
obj22.setTown(obj24);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Province obj25 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Province();
obj25.setCode("330000");
obj25.setAreaId(330000L);
obj25.setName("浙江省");
obj22.setProvince(obj25);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.City obj26 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.City();
obj26.setCode("330100");
obj26.setAreaId(330100L);
obj26.setName("杭州市");
obj22.setCity(obj26);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.District obj27 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.District();
obj27.setCode("330108");
obj27.setName("滨江区");
obj22.setDistrict(obj27);
obj21.setAddress(obj22);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Contact obj28 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Contact();
obj28.setPhoneCode("+86");
obj28.setMobileNo("13798909890");
obj28.setEmail("aaa@test.com\"");
obj21.setContact(obj28);
obj21.setContactPerson("张三");
obj21.setCompanyNameCn("测试公司名称");
obj1.setConsignorAddress(obj21);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ExpressCustomsDto obj29 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ExpressCustomsDto();
obj29.setDeclarationAmount("15");
obj29.setNeedCustomsClearance("1");
obj29.setDeclarationCurrency("USD");
obj29.setVatType("VAT");
obj29.setVatNumber("IM1234567890");
obj29.setTaxpayerId("999999999999");
obj29.setEoriNumber("ESB80000000");
obj1.setExpressCustoms(obj29);
obj1.setNeedPickup(false);
obj1.setDestinationZipCode("07005");
obj1.setSupplyChainBizId("1001");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ConsigneeAddress obj30 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ConsigneeAddress();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Address obj31 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Address();
obj31.setZip("07005");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Country obj32 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Country();
obj32.setCode("US");
obj32.setAreaId(228L);
obj32.setName("United States of America");
obj32.setPhoneCode("+1");
obj31.setCountry(obj32);
obj31.setAddress("address1");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Province obj33 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Province();
obj33.setCode("922878740000000000");
obj33.setAreaId("100");
obj33.setName("New Jersey");
obj31.setProvince(obj33);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Town obj34 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Town();
obj34.setCode("922878740000000001");
obj34.setAreaId("101");
obj34.setName("Wall township");
obj31.setTown(obj34);
obj31.setAddress2("address2");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.City obj35 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.City();
obj35.setCode("922878746212000000");
obj35.setName("Absecon heights\"");
obj31.setCity(obj35);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.District obj36 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.District();
obj36.setCode("330009");
obj36.setAreaId("330009");
obj36.setName("测试街道");
obj31.setDistrict(obj36);
obj30.setAddress(obj31);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Contact obj37 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Contact();
obj37.setPhoneArea("+86");
obj37.setPhoneCode("0755");
obj37.setMobileNo("13909899009");
obj37.setEmail("test@163.com");
obj30.setContact(obj37);
obj30.setAddressEmail("test2@163.com");
obj30.setCompanyNameEn("test company name");
obj30.setContactPerson("simon test");
obj30.setType("CONSIGNEE");
obj30.setCompanyNameCn("test company name");
obj1.setConsigneeAddress(obj30);
obj1.setTradeBizId("20499906501020531");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactAddress obj38 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactAddress();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Address obj39 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Address();
obj39.setZip("518000");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Country obj40 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Country();
obj40.setCode("CN");
obj40.setName("中国");
obj40.setAreaId(1L);
obj39.setCountry(obj40);
obj39.setAddress("阿里西溪园区");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Town obj41 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Town();
obj41.setCode("330009");
obj41.setName("测试街道");
obj41.setAreaId(330009L);
obj39.setTown(obj41);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Province obj42 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Province();
obj42.setCode("330009");
obj42.setName("测试地址");
obj42.setAreaId(330009L);
obj39.setProvince(obj42);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.City obj43 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.City();
obj43.setCode("330009");
obj43.setName("测试地址");
obj43.setAreaId(330009L);
obj39.setCity(obj43);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.District obj44 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.District();
obj44.setCode("330009");
obj44.setName("测试地址");
obj39.setDistrict(obj44);
obj38.setAddress(obj39);
obj38.setContactPerson("张三");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Contact obj45 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Contact();
obj45.setMobileNo("19089899009");
obj45.setEmail("test@mail.com");
obj45.setPhoneCode("+86");
obj38.setContact(obj45);
obj38.setCompanyNameCn("测试公司");
obj1.setPickupAddress(obj38);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactAddress obj46 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactAddress();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Address obj47 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Address();
obj47.setZip("518000");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Country obj48 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Country();
obj48.setCode("330009");
obj48.setName("测试地址");
obj48.setAreaId(330009L);
obj47.setCountry(obj48);
obj47.setAddress("测试地址");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Town obj49 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Town();
obj49.setCode("330009");
obj49.setName("测试地址");
obj49.setAreaId(330009L);
obj47.setTown(obj49);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Province obj50 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Province();
obj50.setCode("330009");
obj50.setName("测试地址");
obj50.setAreaId(330009L);
obj47.setProvince(obj50);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.City obj51 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.City();
obj51.setCode("330009");
obj51.setName("测试地址");
obj51.setAreaId(330009L);
obj47.setCity(obj51);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.District obj52 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.District();
obj52.setCode("330009");
obj52.setName("测试地址");
obj47.setDistrict(obj52);
obj46.setAddress(obj47);
obj46.setContactPerson("张三");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Contact obj53 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.Contact();
obj53.setMobileNo("18909890990");
obj53.setEmail("test@163.com");
obj53.setPhoneCode("+86");
obj46.setContact(obj53);
obj46.setCompanyNameCn("测试公司名称");
obj1.setReturnAddress(obj46);
obj1.setTradePlatform("ICBU");
obj1.setTradeBizMode("SEMI_MANAGED");
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.SolutionDTO obj54 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.SolutionDTO();
obj54.setTrunkLineName("半托管_无忧UPS Expedited");
obj54.setTrunkLineSkuCode("UPS-Expedited-BTG");
obj54.setHeadPickupType("provider_paid_pickup");
obj54.setHeadPickupSkuId(17157L);
obj54.setHeadPickupSolutionId(122333L);
obj54.setHeadPickupSpCode("SP_CN_000281");
obj54.setExpectPickupTime(1724140800000L);
obj1.setSolutionDto(obj54);
req.setParamnQuery(obj1);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest req = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PlaceOrderDTODomain obj1 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PlaceOrderDTODomain();
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CargoListDomain> list3 = new List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CargoListDomain>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CargoListDomain obj4 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CargoListDomain();
list3.Add(obj4);
obj4.Unit = "pcs";
obj4.Hscode = "12345678";
obj4.Quantity = 1L;
obj4.DeclarationValue = "1";
obj4.Price = "1";
obj4.NameCn = "无线耳机";
obj4.Currency = "USD";
obj4.NameEn = "wireless headsets";
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProductTypeDomain> list6 = new List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProductTypeDomain>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProductTypeDomain obj7 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProductTypeDomain();
list6.Add(obj7);
obj7.Code = "battery";
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ChildrenDomain> list9 = new List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ChildrenDomain>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ChildrenDomain obj10 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ChildrenDomain();
list9.Add(obj10);
obj10.Code = "inlayBattery";
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.LeafNodeDomain> list12 = new List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.LeafNodeDomain>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.LeafNodeDomain obj13 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.LeafNodeDomain();
list12.Add(obj13);
obj13.Code = "oneLessHundredWh";
obj13.Name = "单块电池≤100Wh";
obj10.Children= list12;
obj10.Name = "内置/配置电池";
obj7.Children= list9;
obj7.Name = "电池";
obj4.ProductType= list6;
obj4.Purpose = "喝水生活用品";
obj4.Material = "塑料";
obj1.CargoList= list3;
obj1.OriginZipCode = "518000";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DeliverWarehouseExpressDtoDomain obj14 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DeliverWarehouseExpressDtoDomain();
obj14.LogisticsCompany = "UPS";
obj14.TrackingNumbers = ""111111","22222“";
obj14.PackageQuantity = "2";
obj1.DeliverWarehouseExpress= obj14;
List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PackageListDomain> list16 = new List<AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PackageListDomain>();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PackageListDomain obj17 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.PackageListDomain();
list16.Add(obj17);
obj17.Quantity = "2";
obj17.Length = "5";
obj17.Width = "10";
obj17.Weight = "3";
obj17.Type = "box";
obj17.Height = "2";
obj1.PackageList= list16;
obj1.DestinationCountryCode = "US";
obj1.WarehouseCode = "ASP_YH_SZJC";
obj1.ProductCode = "EX_ASP_standard3C";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ConsignorAddressDomain obj18 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ConsignorAddressDomain();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.AddressDomain obj19 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.AddressDomain();
obj19.Zip = "518000";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CountryDomain obj20 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CountryDomain();
obj20.Code = "CN";
obj20.AreaId = 1L;
obj20.Name = "china";
obj19.Country= obj20;
obj19.Address = "阿里西溪园区";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.TownDomain obj21 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.TownDomain();
obj21.Code = "330009";
obj21.AreaId = 330009L;
obj21.Name = "测试街道";
obj19.Town= obj21;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProvinceDomain obj22 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProvinceDomain();
obj22.Code = "330000";
obj22.AreaId = 330000L;
obj22.Name = "浙江省";
obj19.Province= obj22;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CityDomain obj23 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CityDomain();
obj23.Code = "330100";
obj23.AreaId = 330100L;
obj23.Name = "杭州市";
obj19.City= obj23;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DistrictDomain obj24 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DistrictDomain();
obj24.Code = "330108";
obj24.Name = "滨江区";
obj19.District= obj24;
obj18.Address= obj19;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactDomain obj25 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactDomain();
obj25.PhoneCode = "+86";
obj25.MobileNo = "13798909890";
obj25.Email = "aaa@test.com\"";
obj18.Contact= obj25;
obj18.ContactPerson = "张三";
obj18.CompanyNameCn = "测试公司名称";
obj1.ConsignorAddress= obj18;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ExpressCustomsDtoDomain obj26 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ExpressCustomsDtoDomain();
obj26.DeclarationAmount = "15";
obj26.NeedCustomsClearance = "1";
obj26.DeclarationCurrency = "USD";
obj26.VatType = "VAT";
obj26.VatNumber = "IM1234567890";
obj26.TaxpayerId = "999999999999";
obj26.EoriNumber = "ESB80000000";
obj1.ExpressCustoms= obj26;
obj1.NeedPickup = false;
obj1.DestinationZipCode = "07005";
obj1.SupplyChainBizId = "1001";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ConsigneeAddressDomain obj27 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ConsigneeAddressDomain();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.AddressDomain obj28 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.AddressDomain();
obj28.Zip = "07005";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CountryDomain obj29 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CountryDomain();
obj29.Code = "US";
obj29.AreaId = 228L;
obj29.Name = "United States of America";
obj29.PhoneCode = "+1";
obj28.Country= obj29;
obj28.Address = "address1";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProvinceDomain obj30 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProvinceDomain();
obj30.Code = "922878740000000000";
obj30.AreaId = "100";
obj30.Name = "New Jersey";
obj28.Province= obj30;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.TownDomain obj31 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.TownDomain();
obj31.Code = "922878740000000001";
obj31.AreaId = "101";
obj31.Name = "Wall township";
obj28.Town= obj31;
obj28.Address2 = "address2";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CityDomain obj32 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CityDomain();
obj32.Code = "922878746212000000";
obj32.Name = "Absecon heights\"";
obj28.City= obj32;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DistrictDomain obj33 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DistrictDomain();
obj33.Code = "330009";
obj33.AreaId = "330009";
obj33.Name = "测试街道";
obj28.District= obj33;
obj27.Address= obj28;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactDomain obj34 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactDomain();
obj34.PhoneArea = "+86";
obj34.PhoneCode = "0755";
obj34.MobileNo = "13909899009";
obj34.Email = "test@163.com";
obj27.Contact= obj34;
obj27.AddressEmail = "test2@163.com";
obj27.CompanyNameEn = "test company name";
obj27.ContactPerson = "simon test";
obj27.Type = "CONSIGNEE";
obj27.CompanyNameCn = "test company name";
obj1.ConsigneeAddress= obj27;
obj1.TradeBizId = "20499906501020531";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactAddressDomain obj35 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactAddressDomain();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.AddressDomain obj36 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.AddressDomain();
obj36.Zip = "518000";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CountryDomain obj37 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CountryDomain();
obj37.Code = "CN";
obj37.Name = "中国";
obj37.AreaId = 1L;
obj36.Country= obj37;
obj36.Address = "阿里西溪园区";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.TownDomain obj38 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.TownDomain();
obj38.Code = "330009";
obj38.Name = "测试街道";
obj38.AreaId = 330009L;
obj36.Town= obj38;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProvinceDomain obj39 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProvinceDomain();
obj39.Code = "330009";
obj39.Name = "测试地址";
obj39.AreaId = 330009L;
obj36.Province= obj39;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CityDomain obj40 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CityDomain();
obj40.Code = "330009";
obj40.Name = "测试地址";
obj40.AreaId = 330009L;
obj36.City= obj40;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DistrictDomain obj41 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DistrictDomain();
obj41.Code = "330009";
obj41.Name = "测试地址";
obj36.District= obj41;
obj35.Address= obj36;
obj35.ContactPerson = "张三";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactDomain obj42 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactDomain();
obj42.MobileNo = "19089899009";
obj42.Email = "test@mail.com";
obj42.PhoneCode = "+86";
obj35.Contact= obj42;
obj35.CompanyNameCn = "测试公司";
obj1.PickupAddress= obj35;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactAddressDomain obj43 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactAddressDomain();
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.AddressDomain obj44 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.AddressDomain();
obj44.Zip = "518000";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CountryDomain obj45 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CountryDomain();
obj45.Code = "330009";
obj45.Name = "测试地址";
obj45.AreaId = 330009L;
obj44.Country= obj45;
obj44.Address = "测试地址";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.TownDomain obj46 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.TownDomain();
obj46.Code = "330009";
obj46.Name = "测试地址";
obj46.AreaId = 330009L;
obj44.Town= obj46;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProvinceDomain obj47 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ProvinceDomain();
obj47.Code = "330009";
obj47.Name = "测试地址";
obj47.AreaId = 330009L;
obj44.Province= obj47;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CityDomain obj48 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.CityDomain();
obj48.Code = "330009";
obj48.Name = "测试地址";
obj48.AreaId = 330009L;
obj44.City= obj48;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DistrictDomain obj49 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.DistrictDomain();
obj49.Code = "330009";
obj49.Name = "测试地址";
obj44.District= obj49;
obj43.Address= obj44;
obj43.ContactPerson = "张三";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactDomain obj50 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.ContactDomain();
obj50.MobileNo = "18909890990";
obj50.Email = "test@163.com";
obj50.PhoneCode = "+86";
obj43.Contact= obj50;
obj43.CompanyNameCn = "测试公司名称";
obj1.ReturnAddress= obj43;
obj1.TradePlatform = "ICBU";
obj1.TradeBizMode = "SEMI_MANAGED";
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.SolutionDTODomain obj51 = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest.SolutionDTODomain();
obj51.TrunkLineName = "半托管_无忧UPS Expedited";
obj51.TrunkLineSkuCode = "UPS-Expedited-BTG";
obj51.HeadPickupType = "provider_paid_pickup";
obj51.HeadPickupSkuId = 17157L;
obj51.HeadPickupSolutionId = 122333L;
obj51.HeadPickupSpCode = "SP_CN_000281";
obj51.ExpectPickupTime = 1724140800000L;
obj1.SolutionDto= obj51;
req.ParamnQuery_ = obj1;
AlibabaOnetouchLogisticsExpressLogisticsOrderCreateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest;
$paramn_query = new PlaceOrderDTO;
$cargo_list = new CargoList;
$cargo_list->unit="pcs";
$cargo_list->hscode="12345678";
$cargo_list->quantity="1";
$cargo_list->declaration_value="1";
$cargo_list->price="1";
$cargo_list->name_cn="无线耳机";
$cargo_list->currency="USD";
$cargo_list->name_en="wireless headsets";
$product_type = new ProductType;
$product_type->code="battery";
$children = new Children;
$children->code="inlayBattery";
$children = new LeafNode;
$children->code="oneLessHundredWh";
$children->name="单块电池≤100Wh";
$children->children = $children;
$children->name="内置/配置电池";
$product_type->children = $children;
$product_type->name="电池";
$cargo_list->product_type = $product_type;
$cargo_list->purpose="喝水生活用品";
$cargo_list->material="塑料";
$paramn_query->cargo_list = $cargo_list;
$paramn_query->origin_zip_code="518000";
$deliver_warehouse_express = new DeliverWarehouseExpressDto;
$deliver_warehouse_express->logistics_company="UPS";
$deliver_warehouse_express->tracking_numbers="[\"111111\",\"22222“]";
$deliver_warehouse_express->package_quantity="2";
$paramn_query->deliver_warehouse_express = $deliver_warehouse_express;
$package_list = new PackageList;
$package_list->quantity="2";
$package_list->length="5";
$package_list->width="10";
$package_list->weight="3";
$package_list->type="box";
$package_list->height="2";
$paramn_query->package_list = $package_list;
$paramn_query->destination_country_code="US";
$paramn_query->warehouse_code="ASP_YH_SZJC";
$paramn_query->product_code="EX_ASP_standard3C";
$consignor_address = new ConsignorAddress;
$address = new Address;
$address->zip="518000";
$country = new Country;
$country->code="CN";
$country->area_id="1";
$country->name="china";
$address->country = $country;
$address->address="阿里西溪园区";
$town = new Town;
$town->code="330009";
$town->area_id="330009";
$town->name="测试街道";
$address->town = $town;
$province = new Province;
$province->code="330000";
$province->area_id="330000";
$province->name="浙江省";
$address->province = $province;
$city = new City;
$city->code="330100";
$city->area_id="330100";
$city->name="杭州市";
$address->city = $city;
$district = new District;
$district->code="330108";
$district->name="滨江区";
$address->district = $district;
$consignor_address->address = $address;
$contact = new Contact;
$contact->phone_code="+86";
$contact->mobile_no="13798909890";
$contact->email="aaa@test.com\"";
$consignor_address->contact = $contact;
$consignor_address->contact_person="张三";
$consignor_address->company_name_cn="测试公司名称";
$paramn_query->consignor_address = $consignor_address;
$express_customs = new ExpressCustomsDto;
$express_customs->declaration_amount="15";
$express_customs->need_customs_clearance="1";
$express_customs->declaration_currency="USD";
$express_customs->vat_type="VAT";
$express_customs->vat_number="IM1234567890";
$express_customs->taxpayer_id="999999999999";
$express_customs->eori_number="ESB80000000";
$paramn_query->express_customs = $express_customs;
$paramn_query->need_pickup="false";
$paramn_query->destination_zip_code="07005";
$paramn_query->supply_chain_biz_id="1001";
$consignee_address = new ConsigneeAddress;
$address = new Address;
$address->zip="07005";
$country = new Country;
$country->code="US";
$country->area_id="228";
$country->name="United States of America";
$country->phone_code="+1";
$address->country = $country;
$address->address="address1";
$province = new Province;
$province->code="922878740000000000";
$province->area_id="100";
$province->name="New Jersey";
$address->province = $province;
$town = new Town;
$town->code="922878740000000001";
$town->area_id="101";
$town->name="Wall township";
$address->town = $town;
$address->address2="address2";
$city = new City;
$city->code="922878746212000000";
$city->name="Absecon heights\"";
$address->city = $city;
$district = new District;
$district->code="330009";
$district->area_id="330009";
$district->name="测试街道";
$address->district = $district;
$consignee_address->address = $address;
$contact = new Contact;
$contact->phone_area="+86";
$contact->phone_code="0755";
$contact->mobile_no="13909899009";
$contact->email="test@163.com";
$consignee_address->contact = $contact;
$consignee_address->address_email="test2@163.com";
$consignee_address->company_name_en="test company name";
$consignee_address->contact_person="simon test";
$consignee_address->type="CONSIGNEE";
$consignee_address->company_name_cn="test company name";
$paramn_query->consignee_address = $consignee_address;
$paramn_query->trade_biz_id="20499906501020531";
$pickup_address = new ContactAddress;
$address = new Address;
$address->zip="518000";
$country = new Country;
$country->code="CN";
$country->name="中国";
$country->area_id="1";
$address->country = $country;
$address->address="阿里西溪园区";
$town = new Town;
$town->code="330009";
$town->name="测试街道";
$town->area_id="330009";
$address->town = $town;
$province = new Province;
$province->code="330009";
$province->name="测试地址";
$province->area_id="330009";
$address->province = $province;
$city = new City;
$city->code="330009";
$city->name="测试地址";
$city->area_id="330009";
$address->city = $city;
$district = new District;
$district->code="330009";
$district->name="测试地址";
$address->district = $district;
$pickup_address->address = $address;
$pickup_address->contact_person="张三";
$contact = new Contact;
$contact->mobile_no="19089899009";
$contact->email="test@mail.com";
$contact->phone_code="+86";
$pickup_address->contact = $contact;
$pickup_address->company_name_cn="测试公司";
$paramn_query->pickup_address = $pickup_address;
$return_address = new ContactAddress;
$address = new Address;
$address->zip="518000";
$country = new Country;
$country->code="330009";
$country->name="测试地址";
$country->area_id="330009";
$address->country = $country;
$address->address="测试地址";
$town = new Town;
$town->code="330009";
$town->name="测试地址";
$town->area_id="330009";
$address->town = $town;
$province = new Province;
$province->code="330009";
$province->name="测试地址";
$province->area_id="330009";
$address->province = $province;
$city = new City;
$city->code="330009";
$city->name="测试地址";
$city->area_id="330009";
$address->city = $city;
$district = new District;
$district->code="330009";
$district->name="测试地址";
$address->district = $district;
$return_address->address = $address;
$return_address->contact_person="张三";
$contact = new Contact;
$contact->mobile_no="18909890990";
$contact->email="test@163.com";
$contact->phone_code="+86";
$return_address->contact = $contact;
$return_address->company_name_cn="测试公司名称";
$paramn_query->return_address = $return_address;
$paramn_query->trade_platform="ICBU";
$paramn_query->trade_biz_mode="SEMI_MANAGED";
$solution_dto = new SolutionDTO;
$solution_dto->trunk_line_name="半托管_无忧UPS Expedited";
$solution_dto->trunk_line_sku_code="UPS-Expedited-BTG";
$solution_dto->head_pickup_type="provider_paid_pickup";
$solution_dto->head_pickup_sku_id="17157";
$solution_dto->head_pickup_solution_id="122333";
$solution_dto->head_pickup_sp_code="SP_CN_000281";
$solution_dto->expect_pickup_time="1724140800000";
$paramn_query->solution_dto = $solution_dto;
$req->setParamnQuery(json_encode($paramn_query));
$resp = $c->execute($req, $sessionKey);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.onetouch.logistics.express.logistics.order.create' \
-d 'partner_id=apidoc' \
-d 'session=e27c823a-c12c-4fb2-b339-862c006c87c6' \
-d 'sign=52FEF7346064CAA6E76FD0B7AF588C9A' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-02-05+09%3A43%3A06' \
-d 'v=2.0' \
-d 'paramn_query=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaOnetouchLogisticsExpressLogisticsOrderCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.paramn_query=""
try:
resp= req.getResponse(sessionkey)
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.onetouch.logistics.express.logistics.order.create");
add_param(pRequest,"paramn_query","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.onetouch.logistics.express.logistics.order.create', {
'paramn_query':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})