User Tools

Site Tools


data:multirequest

Multirequest (from version 2.1)

Multirequest allows you to send several inquiries at once, and the possibility of combining them (the equivalent of SQL' from UNION') Multirequestu aim is to minimize delays due to data or make multiple connections over the network. Multirequest performance is the same as in the case of multiple queries sent in a queue of requests, currently maximum number is 10 (Conditions of the union also counts as a separate question)

Independent inquiries

To send several inquiries <request> simply duplicate sections for each query with mandatory attribute @id (up to 11 alphanumeric characters) that will allow you to locate it in response. for example, to ask both of filters and offers the operator ITAK simply send

<mds>
    <auth>
        <login>login</login>
        <pass>pass</pass>
    </auth>
   <request id="filtry">
     <type>filters</type>
     <conditions>
      <filters>ofr_catalog</filters>   
      <par_adt>2</par_adt>
      <ofr_type>F</ofr_type>
      <ofr_tourOp>ITAK</ofr_tourOp>
     </conditions>
   </request>
   <request id="oferty">  
      <type>groups</type>
     <conditions>
        <limit_count>10</limit_count>
        <par_adt>2</par_adt>
        <ofr_type>F</ofr_type>
        <ofr_tourOp>ITAK</ofr_tourOp>
     </conditions>
   </request>
</mds>

in answer we get response from /response/resp from @id that was used in the query,

<response>
	<resp id="filtry">
		<fdef id="ofr_catalog">
			<f id="KG11"/>
			<f id="KH34"/>
                 <!--...-->
		</fdef>
	</resp>
	<resp id="oferty">
		<grp>
			<ofr id="e7aa87cbf192c51312749c34bdcc9d1600a4a35e84c577d7a4d9292e1a1e2e9d" catalog="L094" tourOp="ITAK" type="F" sweet="0" status="BA" operPrice="938" operCurr="PLN" price="938">
				<obj name="Hotel Karthago El Ksar" city="Sousse" category="45" code="MIRKSAR" room="BU2" service="A" roomDesc="Bungalow 2 os." minPax="2" maxPax="2" minAdt="2" maxAdt="2" xCode="1038" region="Sousse" acomodation="" xAttributes="0x15fcf6030" type="H" serviceDesc="All inclusive" xServiceId="1" country="Tunezja" bookBeds="0" xRoomDesc="7,19," rating="A:7.6/P:8.2/O:7.1/J:7.6/B:6.4/R:7.4/a:7.9/p:8.4/o:7.4/j:7.8/b:6.8/r:7.7" desCode="MIR" xName="Karthago El Ksar" xCity="Sousse" xLat="35.851299" xLong="10.621000"/>
				<trp desCode="MIR" depCode="WAW" depDate="20110407" duration="7" flightCode="WAWMIR" carrierCode="7981" rFlightCode="MIRWAW" rCarrierCode="" depTime="1905" arrTime="2110" rDepTime="1400" rArrTime="1805" type="F" type2="" dstCode="ITAK_MIR" depDesc="Warszawa" desDesc="Monastir" rDepDate="20110414" desDate="20110407" rDesDate="20110414" rDepCode="MIR" rDesCode="WAW" startDate="20110407" tourCode="" busStop="" durationM="7" season="5" depName="Warszawa" busStopDesc="" flightOp="Nouvelair Tunesie" stay="7"/>
			</ofr>
 
			<variants/>
		</grp>
		<grp>
			<ofr id="ca59d64d74d823d7883ba2b0e556399300a4a35e84c577d7a4d9292e1a1e2e9d" catalog="L094" tourOp="ITAK" type="F" sweet="0" status="BA" operPrice="988" operCurr="PLN" price="988">
				<obj name="Hotel Riadh Palms" city="Sousse" category="40" code="MIRRIAD" room="DBL" service="A" roomDesc="pokoj dwuosobowy" minPax="2" maxPax="2" minAdt="2" maxAdt="2" xCode="1501" region="Sousse" acomodation="" xAttributes="0x15f8e2038" type="H" serviceDesc="All inclusive" xServiceId="1" country="Tunezja" bookBeds="0" xRoomDesc="1,7," rating="A:7.5/P:8.3/O:7.2/J:7/B:6.1/R:7.3/a:7.4/p:8.4/o:7.3/j:7.2/b:6.2/r:7.1" desCode="MIR" xName="Riadh Palms" xCity="Sousse" xLat="35.841499" xLong="10.629600"/>
				<trp desCode="MIR" depCode="WAW" depDate="20110407" duration="7" flightCode="WAWMIR" carrierCode="7981" rFlightCode="MIRWAW" rCarrierCode="" depTime="1905" arrTime="2110" rDepTime="1400" rArrTime="1805" type="F" type2="" dstCode="ITAK_MIR" depDesc="Warszawa" desDesc="Monastir" rDepDate="20110414" desDate="20110407" rDesDate="20110414" rDepCode="MIR" rDesCode="WAW" startDate="20110407" tourCode="" busStop="" durationM="7" season="5" depName="Warszawa" busStopDesc="" flightOp="Nouvelair Tunesie" stay="7"/>
			</ofr>
			<variants/>
		</grp>
                <!--...-->
		<count>11</count>
	</resp>
</response>

Combined inquiries (UNION)

To get combined results you must insert joined in union sections and conditions of services example, “promotion”: 2 adults and 1)

Dub-conditions doesn't supports: group_by,order_by,par_adt,par_chd,par_inf,par_chdAg,filters

<mds>
    <auth>
        <login>login</login>
        <pass>pass</pass>
    </auth>
   <request id="promocja1">
     <type>groups</type>
     <conditions>
        <par_adt>2</par_adt>
        <union>
            <conditions>
              <ofr_tourOp>ITAK</ofr_tourOp>
              <ofr_catalog>KG11</ofr_catalog>
              <ofr_type>F</ofr_type>
            </conditions>
            <conditions>
              <ofr_type>NH</ofr_type>
              <ofr_tourOp>NPL</ofr_tourOp>
            </conditions>
            <conditions>
              <ofr_type>F</ofr_type>
              <ofr_tourOp>TRIA</ofr_tourOp>
            </conditions>
        </union>
     </conditions>
   </request>
</mds>

answer:

<response>
	<resp id="promocja1">
		<grp>
			<ofr id="92585d21d3618a3dae988385fb4dee5f48ec7fe919a354d491c2fc6d92232024" catalog="OT" tourOp="TRIA" type="F" sweet="0" status="BA" operPrice="1029" operCurr="PLN" price="1029">
				<obj name="KORFU/Apartamenty***" city="Korfu" category="30" code="2994" room="107" service="O" roomDesc="Studio 2/3 os." minPax="2" maxPax="3" minAdt="2" maxAdt="3" xCode="25091" region="Korfu" acomodation="" xAttributes="0x800000000" type="H" serviceDesc="Bez wyżywienia" xServiceId="4" country="Grecja" bookBeds="0" xRoomDesc="21,31," rating="" desCode="CFU" xName="Korfu -Apartamenty" xCity="Korfu"/>
				<trp desCode="CFU" depCode="KTW" depDate="20110525" duration="7" flightCode="KTWCFU" carrierCode="8375" rFlightCode="CFUKTW" rCarrierCode="8376" depTime="0230" arrTime="0540" rDepTime="1245" rArrTime="1355" type="F" type2="" dstCode="TRIA_CFU" depDesc="Katowice" desDesc="Korfu" rDepDate="20110601" desDate="20110525" rDesDate="20110601" rDepCode="CFU" rDesCode="KTW" startDate="20110525" tourCode="" busStop="" durationM="7" season="0" depName="Katowice" busStopDesc="" flightOp="Small Planet" stay="7"/>
			</ofr>
			<variants/>
		</grp>
 
		<grp>
			<ofr id="a31ccda888ccdc3092aa53a98820656148ec7fe919a354d491c2fc6d92232024" catalog="OT" tourOp="TRIA" type="F" sweet="0" status="BA" operPrice="1049" operCurr="PLN" price="1049">
				<obj name="Apartamenty Andys" city="Agios Stefanos" category="30" code="2791" room="107" service="O" roomDesc="Studio 2/3 os." minPax="2" maxPax="3" minAdt="2" maxAdt="3" xCode="24590" region="Korfu" acomodation="" xAttributes="0x800000000" type="H" serviceDesc="Bez wyżywienia" xServiceId="4" country="Grecja" bookBeds="0" xRoomDesc="21,31," rating="" desCode="AST" xName="Andys -Apartamenty" xCity="Agios Stefanos"/>
				<trp desCode="CFU" depCode="KTW" depDate="20110525" duration="7" flightCode="KTWCFU" carrierCode="8375" rFlightCode="CFUKTW" rCarrierCode="8376" depTime="0230" arrTime="0540" rDepTime="1245" rArrTime="1355" type="F" type2="" dstCode="TRIA_CFU" depDesc="Katowice" desDesc="Korfu" rDepDate="20110601" desDate="20110525" rDesDate="20110601" rDepCode="CFU" rDesCode="KTW" startDate="20110525" tourCode="" busStop="" durationM="7" season="0" depName="Katowice" busStopDesc="" flightOp="Small Planet" stay="7"/>
			</ofr>
			<variants/>
		</grp>
      <!-- ... -->
 
		<count>11</count>
	</resp>
</response>

The request Multirequest - works only with reqest type regions,filters,groups,offers,details

1)
ITAK hotel + flight catalog KG11) or NEC (only hotel) or (TRIA hotel + flight
data/multirequest.txt · Last modified: 2012/10/05 17:18 by marekj