TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
FliggyFlightAgentAuxproductDimensionFlightPushRequest req = new FliggyFlightAgentAuxproductDimensionFlightPushRequest();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicPushDTO obj1 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryPriceDynamicPushDTO();
obj1.setTraceId("ABCDE12345");
obj1.setCabinClass(1L);
obj1.setAgentId(1234L);
obj1.setDepartureAirport("PEK");
obj1.setDepartureDate("20250901");
obj1.setFareFamily("Fly");
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTO> list3 = new ArrayList<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTO>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTO obj4 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTO();
list3.add(obj4);
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryMetadataDTO obj6 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryMetadataDTO();
obj6.setSize("30 × 40 × 50CM,L+W+H<=157cm");
obj6.setPiece(1L);
obj6.setWeight(30L);
obj6.setType("StandardCheckInBaggage");
obj6.setIsAllWeight(true);
list5.setMetadata(obj6);
obj4.setLevel("chargeable");
FliggyFlightAgentAuxproductDimensionFlightPushRequest.PriceDTO obj8 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.PriceDTO();
obj8.setTotalAmount("100.5");
obj8.setCurrency("CNY");
list7.setPrice(obj8);
obj4.setPassengerTypes("ADT");
obj4.setType("Baggage");
obj1.setServices(list3);
obj1.setArrivalAirport("PVG");
obj1.setChannelId("1234");
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTO> list10 = new ArrayList<FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTO>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTO obj11 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTO();
list10.add(obj11);
obj11.setDepartureTime("202509011520");
obj11.setMarketingFlightNumber("123");
obj11.setMarketingCarrier("AK");
obj11.setOperatingFlightNumber("123");
obj11.setDepartureAirport("PEK");
obj11.setStopCities("TYO");
obj11.setArrivalTime("202509011520");
obj11.setCodeShare(true);
obj11.setOperatingCarrier("FD");
obj11.setArrivalAirport("PVG");
obj1.setSegments(list10);
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.CabinClass = 1L;
obj1.AgentId = 1234L;
obj1.DepartureAirport = "PEK";
obj1.DepartureDate = "20250901";
obj1.FareFamily = "Fly";
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTODomain> list3 = new List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTODomain>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTODomain obj4 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryServiceDTODomain();
list3.Add(obj4);
FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryMetadataDTODomain obj5 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.AncillaryMetadataDTODomain();
obj5.Size = "30 × 40 × 50CM,L+W+H<=157cm";
obj5.Piece = 1L;
obj5.Weight = 30L;
obj5.Type = "StandardCheckInBaggage";
obj5.IsAllWeight = true;
obj4.Metadata= obj5;
obj4.Level = "chargeable";
FliggyFlightAgentAuxproductDimensionFlightPushRequest.PriceDTODomain obj6 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.PriceDTODomain();
obj6.TotalAmount = "100.5";
obj6.Currency = "CNY";
obj4.Price= obj6;
obj4.PassengerTypes = "ADT";
obj4.Type = "Baggage";
obj1.Services= list3;
obj1.ArrivalAirport = "PVG";
obj1.ChannelId = "1234";
List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTODomain> list8 = new List<FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTODomain>();
FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTODomain obj9 = new FliggyFlightAgentAuxproductDimensionFlightPushRequest.FlightSegmentInfoDTODomain();
list8.Add(obj9);
obj9.DepartureTime = "202509011520";
obj9.MarketingFlightNumber = "123";
obj9.MarketingCarrier = "AK";
obj9.OperatingFlightNumber = "123";
obj9.DepartureAirport = "PEK";
obj9.StopCities = "TYO";
obj9.ArrivalTime = "202509011520";
obj9.CodeShare = true;
obj9.OperatingCarrier = "FD";
obj9.ArrivalAirport = "PVG";
obj1.Segments= list8;
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->cabin_class="1";
$ancillary_price_dynamic_push_dto->agent_id="1234";
$ancillary_price_dynamic_push_dto->departure_airport="PEK";
$ancillary_price_dynamic_push_dto->departure_date="20250901";
$ancillary_price_dynamic_push_dto->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_push_dto->services = $services;
$ancillary_price_dynamic_push_dto->arrival_airport="PVG";
$ancillary_price_dynamic_push_dto->channel_id="1234";
$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_push_dto->segments = $segments;
$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=0a29bd91-c7fe-4144-a5e4-fcba6f00b79f' \
-d 'sign=C3899E116CC1BC319399301AE19CE3E1' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-09-06+05%3A21%3A25' \
-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);
})