销售规则新增,成功返回taobaoId
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
extend_attributes | String | 可选 | {} | 扩展字段 | |
top_policy_do | TopPolicyDo | 可选 | 国际机票销售规则 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
extend_attributes | String | {} | 扩展字段 |
taobao_id | Number | 123 | 淘宝政策id |
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 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlitripItPolicyAddRequest req = new AlitripItPolicyAddRequest(); req.setExtendAttributes( "{}" ); AlitripItPolicyAddRequest.TopPolicyDo obj1 = new AlitripItPolicyAddRequest.TopPolicyDo(); obj1.setAirline( "CA" ); obj1.setAllowPriceRange( "100-1000" ); obj1.setArrCities( "SHA,NYC" ); obj1.setBuyTicketNotice( "本产品仅限中国大陆国际的乘客预定; 成功预定和出票赠送机上WIFI券" ); obj1.setCabinRestrict( "F,C,Y" ); obj1.setCabinRestrictType( "适用" ); obj1.setChildSaleRebase( "1" ); obj1.setChildSaleRetention( "1" ); obj1.setCodeSharingType( "仅限同集团代码共享适用" ); obj1.setDepCities( "SHA,NYC" ); obj1.setDepDate( "2013-09-11~2013-10-10" ); obj1.setExcludeArrCities( "SHA,NYC" ); obj1.setExcludeDepCities( "SHA,NYC" ); obj1.setFareBasisAllowed( "F%" ); obj1.setFareBasisForbidden( "F%" ); obj1.setFareSource( "平台运价" ); obj1.setFareType( "文件运价" ); obj1.setFlightRestrict( "CA123,CA234-999" ); obj1.setIsSupportRt( "允许" ); obj1.setLuggageRule( "普通乘客:2件, 每件23公斤" ); obj1.setNoshowRule( "起飞前2小时内取消视作误机, 误机不允许改期不允许退票" ); obj1.setPassengerType( "普通" ); obj1.setPolicyId( "12345" ); obj1.setProductType( "普通" ); obj1.setRefundRule( "退票免费" ); obj1.setReissueRule( "改期费为票价的30%" ); obj1.setRemark( "销售规则备注" ); obj1.setRetDate( "2013-09-11~2013-10-10,2014-09-11~2014-10-10" ); obj1.setRtCommissionFormula( "各取各" ); obj1.setSaleDate( "2013-01-01~2013-02-01" ); obj1.setSaleRebase( "12" ); obj1.setSaleRetention( "13" ); obj1.setServiceLevel( "头等" ); obj1.setTransferCities( "SHA" ); obj1.setTransferType( "中转" ); obj1.setTravelType( "单程" ); obj1.setExtendAttributes( "{}" ); obj1.setIsAllowUnionAirline( "允许" ); obj1.setChannelIdDesc( "amadus" ); obj1.setOfficeNo( "OFFICE" ); obj1.setWorkingTime( "09:00MON-18:00FRI,09:00-18:00" ); obj1.setIsCanAllRefund( "是" ); obj1.setRefundFeeAllUnused( "200-72-10%-48-1000-0-*" ); obj1.setRefundCurrencyAllUnused( "CNY" ); obj1.setRefundFeeTypeAllUnused( "全程" ); obj1.setIsCanPartRefund( "是" ); obj1.setRefundFeePartUnused( "200-72-10%-48-1000-0-*" ); obj1.setRefundCurrencyPartUnused( "CNY" ); obj1.setRefundFeeTypePartUnused( "全程" ); obj1.setCanDepChange( "是" ); obj1.setDepChangeFee( "200-72-300-48-1000-0-*" ); obj1.setDepChangeCurrency( "CNY" ); obj1.setDepChangeFeeType( "全程" ); obj1.setCanRetChange( "是" ); obj1.setRetChangeFee( "200-72-300-48-1000-0-*" ); obj1.setRetChangeCurrency( "CNY" ); obj1.setRetChangeFeeType( "全程" ); obj1.setNoshowRestrict( "是" ); obj1.setNoshowTimeRestrict( "10" ); obj1.setNoshowTimeRestrictUnit( "小时" ); obj1.setNoshowRuleType( "不可退票,不可改期" ); obj1.setNoshowFee( "3000" ); obj1.setNoshowCurrency( "CNY" ); obj1.setVipCode( "123abc" ); obj1.setNationality( "CN" ); obj1.setExcludeNationality( "CN" ); obj1.setPassengerAge( "1-99" ); obj1.setGv2ChildRule( "是" ); obj1.setPresalePeriod( "10" ); obj1.setReceipts( "电子行程单" ); obj1.setSupplySource( "供应来源" ); obj1.setCanOj( "不支持缺口程" ); req.setTopPolicyDo(obj1); AlitripItPolicyAddResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 | < alitrip_it_policy_add_response > < extend_attributes >{}</ extend_attributes > < taobao_id >123</ taobao_id > </ alitrip_it_policy_add_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 > |
错误码 | 错误描述 | 解决方案 |
---|