存储CRM客户中的意向单
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
intention_order | IntentionOrderSaveRequest | 可选 | 意向单结构 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
value | IntentionOrderResponse | {} | 返回值接口 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaIntentionOrderSaveRequest req = new AlibabaIntentionOrderSaveRequest(); AlibabaIntentionOrderSaveRequest.IntentionOrderSaveRequest obj1 = new AlibabaIntentionOrderSaveRequest.IntentionOrderSaveRequest(); obj1.setBuyerFax( "001-123456789" ); obj1.setBuyerTelephone( "001-123456789" ); obj1.setBuyerEmail( "xxx@alibaba.com" ); obj1.setRemark( "xxx,xxx,xxx" ); obj1.setTradeTerm( "FOB" ); obj1.setBuyerZipCode( "201101" ); obj1.setOrderAmount( "1000" ); obj1.setBuyerCity( "NewYork" ); AlibabaIntentionOrderSaveRequest.IntentionOrderLogistics obj2 = new AlibabaIntentionOrderSaveRequest.IntentionOrderLogistics(); obj2.setShipmentFee( "100" ); obj2.setCountry( "The United States" ); obj2.setCity( "NewYork" ); obj2.setCityCode( "NY" ); obj2.setContactPerson( "Jack Wu" ); obj2.setDeparturePort( "ShangHai" ); obj2.setDeliveryDateType( "relative" ); obj2.setAddressId( "12345678" ); obj2.setDeliveryDateRelativeDuration(33L); obj2.setShipmentMethod( "express/air/sea/land:快递/空运/海运/陆运/" ); obj2.setProvince( "California" ); obj2.setDepartureCityCode( "SH" ); obj2.setCountryCode( "US" ); obj2.setDeliveryDateAbsoluteTime( "2019-10-10 10:00:00" ); AlibabaIntentionOrderSaveRequest.Phone obj3 = new AlibabaIntentionOrderSaveRequest.Phone(); obj3.setArea( "8" ); obj3.setCountry( "001" ); obj3.setNumber( "123456789" ); obj2.setFax(obj3); obj2.setDeparturePortCode( "SH" ); obj2.setZip( "201101" ); obj2.setAddress( "#20A, 2345 Belmont Avenue, Durham, NC,America" ); obj2.setDepartureCity( "Shanghai" ); obj2.setProvinceCode( "CA" ); AlibabaIntentionOrderSaveRequest.Phone obj4 = new AlibabaIntentionOrderSaveRequest.Phone(); obj4.setArea( "8" ); obj4.setCountry( "001" ); obj4.setNumber( "123456789" ); obj2.setMobile(obj4); AlibabaIntentionOrderSaveRequest.Phone obj5 = new AlibabaIntentionOrderSaveRequest.Phone(); obj5.setArea( "8" ); obj5.setCountry( "001" ); obj5.setNumber( "123456789" ); obj2.setTelephone(obj5); obj2.setPortCode( "NY" ); obj2.setCarrier( "United Parcel Service of America" ); obj2.setPort( "NewYork" ); obj2.setCarrierCode( "UPS" ); obj2.setAlternateAddress( "#20A, 2345 Belmont Avenue, Durham, NC,America" ); obj2.setProperties( "JSON字符串格式" ); obj1.setIntentionOrderLogistics(obj2); obj1.setCurrency( "USD" ); obj1.setSourceChannelReferId( "12345678" ); obj1.setBuyerProvince( "California" ); obj1.setBuyerContactAddress( "#20A, 2345 Belmont Avenue, Durham, NC,America" ); obj1.setBuyerCountryPort( "NewYork" ); List<AlibabaIntentionOrderSaveRequest.IntentionOrderProduct> list7 = new ArrayList<AlibabaIntentionOrderSaveRequest.IntentionOrderProduct>(); AlibabaIntentionOrderSaveRequest.IntentionOrderProduct obj8 = new AlibabaIntentionOrderSaveRequest.IntentionOrderProduct(); list7.add(obj8); obj8.setProductDesc( "xxx,xxx" ); obj8.setProductSpec( "xxx,xxx" ); obj8.setSkuId( "1234" ); obj8.setQuantity( "100" ); obj8.setOriginalUnitPrice( "12" ); obj8.setUnitPrice( "10" ); obj8.setUnit( "Pieces" ); obj8.setType( "Sample/ Customized/Standard" ); obj8.setName( "mp3 player with bluetooth" ); obj8.setProductId(12345678L); obj8.setProperties( "JSON结构字符串" ); obj1.setIntentionOrderProducts(list7); obj1.setBuyerCountryPortCode( "NY" ); obj1.setIntentionOrderId( "12345678" ); obj1.setBuyerName( "Jack Wu" ); obj1.setBuyerCompanyName( "Alibaba" ); obj1.setBuyerCountryCode( "US" ); obj1.setBuyerCountry( "The United States" ); obj1.setAdvancedAmount( "300" ); obj1.setBuyerProvinceCode( "CA" ); obj1.setBuyerCityCode( "NY" ); obj1.setBuyerMobile( "001-123456789" ); obj1.setProperties( "JSON结构字符串" ); obj1.setStatus( "DRAFT" ); req.setIntentionOrder(obj1); AlibabaIntentionOrderSaveResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 | < alibaba_intention_order_save_response > < value > < intention_id >1234567890</ intention_id > </ value > </ alibaba_intention_order_save_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|