TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
FliggyFlightAgentAuxproductDimensionFlightPushRequest req = new FliggyFlightAgentAuxproductDimensionFlightPushRequest();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicPushDTO obj1 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicPushDTO();
obj1.setTraceId("ABCDE12345");
obj1.setAgentId(1234L);
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicDTO> list3 = new ArrayList<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicDTO>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicDTO obj4 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicDTO();
list3.add(obj4);
obj4.setCabinClass(1L);
obj4.setDepartureAirport("PEK");
obj4.setDepartureDate("20250901");
obj4.setFareFamily("Fly");
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTO> list7 = new ArrayList<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTO>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTO obj8 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTO();
list7.add(obj8);
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryMetadataDTO obj10 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryMetadataDTO();
obj10.setSize("30 × 40 × 50CM,L+W+H<=157cm");
obj10.setPiece(1L);
obj10.setWeight(30L);
obj10.setType("StandardCheckInBaggage");
obj10.setIsAllWeight(true);
list9.setMetadata(obj10);
obj8.setLevel("chargeable");
FliggyFlightAgentAuxproductDimensionFlightPushRequest.PriceDTO obj12 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.PriceDTO();
obj12.setTotalAmount("100.5");
obj12.setCurrency("CNY");
list11.setPrice(obj12);
obj8.setPassengerTypes("ADT");
obj8.setType("Baggage");
list5.setServices(list7);
obj4.setArrivalAirport("PVG");
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTO> list15 = new ArrayList<FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTO>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTO obj16 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTO();
list15.add(obj16);
obj16.setDepartureTime("202509011520");
obj16.setMarketingFlightNumber("123");
obj16.setMarketingCarrier("AK");
obj16.setOperatingFlightNumber("123");
obj16.setDepartureAirport("PEK");
obj16.setStopCities("TYO");
obj16.setArrivalTime("202509011520");
obj16.setCodeShare(true);
obj16.setOperatingCarrier("FD");
obj16.setArrivalAirport("PVG");
list13.setSegments(list15);
obj1.setAncillaryPriceDynamicDtoList(list3);
obj1.setChannelId("1234");
req.setAncillaryPriceDynamicPushDto(obj1);
FliggyFlightAgentAuxproductDimensionFlightPushResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
FliggyFlightAgentAuxproductDimensionFlightPushRequest req = new FliggyFlightAgentAuxproductDimensionFlightPushRequest();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicPushDTODomain obj1 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicPushDTODomain();
obj1.TraceId = "ABCDE12345";
obj1.AgentId = 1234L;
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicDTODomain> list3 = new List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicDTODomain>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicDTODomain obj4 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicDTODomain();
list3.Add(obj4);
obj4.CabinClass = 1L;
obj4.DepartureAirport = "PEK";
obj4.DepartureDate = "20250901";
obj4.FareFamily = "Fly";
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTODomain> list6 = new List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTODomain>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTODomain obj7 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTODomain();
list6.Add(obj7);
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryMetadataDTODomain obj8 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryMetadataDTODomain();
obj8.Size = "30 × 40 × 50CM,L+W+H<=157cm";
obj8.Piece = 1L;
obj8.Weight = 30L;
obj8.Type = "StandardCheckInBaggage";
obj8.IsAllWeight = true;
obj7.Metadata= obj8;
obj7.Level = "chargeable";
FliggyFlightAgentAuxproductDimensionFlightPushRequest.PriceDTODomain obj9 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.PriceDTODomain();
obj9.TotalAmount = "100.5";
obj9.Currency = "CNY";
obj7.Price= obj9;
obj7.PassengerTypes = "ADT";
obj7.Type = "Baggage";
obj4.Services= list6;
obj4.ArrivalAirport = "PVG";
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTODomain> list11 = new List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTODomain>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTODomain obj12 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTODomain();
list11.Add(obj12);
obj12.DepartureTime = "202509011520";
obj12.MarketingFlightNumber = "123";
obj12.MarketingCarrier = "AK";
obj12.OperatingFlightNumber = "123";
obj12.DepartureAirport = "PEK";
obj12.StopCities = "TYO";
obj12.ArrivalTime = "202509011520";
obj12.CodeShare = true;
obj12.OperatingCarrier = "FD";
obj12.ArrivalAirport = "PVG";
obj4.Segments= list11;
obj1.AncillaryPriceDynamicDtoList= list3;
obj1.ChannelId = "1234";
req.AncillaryPriceDynamicPushDto_ = obj1;
FliggyFlightAgentAuxproductDimensionFlightPushResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new FliggyFlightAgentAuxproductDimensionFlightPushRequest;
$ancillary_price_dynamic_push_dto = new AncillaryPriceDynamicPushDTO;
$ancillary_price_dynamic_push_dto->trace_id="ABCDE12345";
$ancillary_price_dynamic_push_dto->agent_id="1234";
$ancillary_price_dynamic_dto_list = new AncillaryPriceDynamicDTO;
$ancillary_price_dynamic_dto_list->cabin_class="1";
$ancillary_price_dynamic_dto_list->departure_airport="PEK";
$ancillary_price_dynamic_dto_list->departure_date="20250901";
$ancillary_price_dynamic_dto_list->fare_family="Fly";
$services = new AncillaryServiceDTO;
$metadata = new AncillaryMetadataDTO;
$metadata->size="30 × 40 × 50CM,L+W+H<=157cm";
$metadata->piece="1";
$metadata->weight="30";
$metadata->type="StandardCheckInBaggage";
$metadata->is_all_weight="true";
$services->metadata = $metadata;
$services->level="chargeable";
$price = new PriceDTO;
$price->total_amount="100.5";
$price->currency="CNY";
$services->price = $price;
$services->passenger_types="ADT";
$services->type="Baggage";
$ancillary_price_dynamic_dto_list->services = $services;
$ancillary_price_dynamic_dto_list->arrival_airport="PVG";
$segments = new FlightSegmentInfoDTO;
$segments->departure_time="202509011520";
$segments->marketing_flight_number="123";
$segments->marketing_carrier="AK";
$segments->operating_flight_number="123";
$segments->departure_airport="PEK";
$segments->stop_cities="TYO";
$segments->arrival_time="202509011520";
$segments->code_share="true";
$segments->operating_carrier="FD";
$segments->arrival_airport="PVG";
$ancillary_price_dynamic_dto_list->segments = $segments;
$ancillary_price_dynamic_push_dto->ancillary_price_dynamic_dto_list = $ancillary_price_dynamic_dto_list;
$ancillary_price_dynamic_push_dto->channel_id="1234";
$req->setAncillaryPriceDynamicPushDto(json_encode($ancillary_price_dynamic_push_dto));
$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=taobao.fliggy.flight.agent.auxproduct.dimension.flight.push' \
-d 'partner_id=apidoc' \
-d 'session=40d53cab-45e2-4fbf-b539-c69d71c7ee38' \
-d 'sign=52D6C28F6A58AADC078C647470A9A9D8' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-10-24+01%3A00%3A42' \
-d 'v=2.0' \
-d 'ancillary_price_dynamic_push_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.FliggyFlightAgentAuxproductDimensionFlightPushRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.ancillary_price_dynamic_push_dto="数据结构示例JSON格式"
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,"taobao.fliggy.flight.agent.auxproduct.dimension.flight.push");
add_param(pRequest,"ancillary_price_dynamic_push_dto","数据结构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('taobao.fliggy.flight.agent.auxproduct.dimension.flight.push', {
'ancillary_price_dynamic_push_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})