XML - результаты поиска/Поиск туров — различия между версиями
Материал из TourClient - Руководство пользователя
Jeka (обсуждение | вклад) (→Ответ сервиса) |
Jeka (обсуждение | вклад) (→Объект Тур) |
||
Строка 109: | Строка 109: | ||
<source lang="xml"> | <source lang="xml"> | ||
− | + | <Tour> | |
− | + | <id>3145968261@511</id> | |
− | + | <operatorId>308</operatorId> | |
− | + | ||
− | + | <cityId>1000</cityId> | |
− | + | <countryId>12</countryId> | |
− | + | <roomSizeId>14</roomSizeId> | |
− | + | ||
− | + | <departure>2014-07-10</departure> | |
− | + | <arrival>2014-07-17</arrival> | |
− | + | <duration>7</duration> | |
− | + | <ticket>1</ticket> | |
− | + | <directFlight>false</directFlight> | |
− | + | ||
− | + | <price>18000</price> | |
− | + | <currency>2</currency> | |
− | + | <priceIsApprox>true</priceIsApprox> | |
− | + | ||
− | + | <priceOrig>500</priceOrig> | |
− | + | <currencyOrig>1</currencyOrig> | |
− | + | ||
− | + | <prevPriceOrig>0</prevPriceOrig> | |
− | + | <priceDiffPercent>0</priceDiffPercent> | |
− | + | ||
− | + | <ch1From>0</ch1From> | |
− | + | <ch1Till>0</ch1Till> | |
− | + | <ch2From>0</ch2From> | |
− | + | <ch2Till>0</ch2Till> | |
− | + | ||
− | + | <resortId>4</resortId> | |
− | + | <resortPlaceId>2392</resortPlaceId> | |
− | + | <allocationId>12395</allocationId> | |
− | + | <allocCatId>7</allocCatId> | |
− | + | <mealId>2</mealId> | |
− | + | <roomTypeId>4</roomTypeId> | |
− | + | <roomViewId>22</roomViewId> | |
− | + | ||
− | + | <isStop>false</isStop> | |
− | + | <isStopAllocation>false</isStopAllocation> | |
+ | <isStopFlight>false</isStopFlight> | ||
+ | |||
+ | <OnlineSeatsState> | ||
+ | <allocation>1</allocation> | ||
+ | <flightThereEco>1</flightThereEco> | ||
+ | <flightBackEco>1</flightBackEco> | ||
+ | <flightThereBus>2</flightThereBus> | ||
+ | <flightBackBus>2</flightBackBus> | ||
<isStopFlight>false</isStopFlight> | <isStopFlight>false</isStopFlight> | ||
− | + | <isStopAllocation>false</isStopAllocation> | |
− | + | </OnlineSeatsState> | |
− | + | ||
− | + | <ExtraCharges> | |
− | + | <visa> | |
− | + | <min>25</min> | |
− | + | <max>25</max> | |
− | + | <currency>1</currency> | |
− | + | </visa> | |
− | + | <feeFuel> | |
− | + | <min>0</min> | |
− | + | <max>40</max> | |
− | + | <currency>1</currency> | |
− | + | </feeFuel> | |
− | + | </ExtraCharges> | |
− | + | ||
− | + | ||
− | + | <City> | |
− | + | <id>1000</id> | |
− | + | <name>Москва</name> | |
− | + | </City> | |
− | + | ||
− | + | <Country> | |
− | + | <id>12</id> | |
− | + | <name>Египет</name> | |
− | + | </Country> | |
− | + | ||
− | + | <Operator> | |
− | + | <id>308</id> | |
− | + | <name>Troyka</name> | |
− | + | </Operator> | |
− | + | ||
− | + | <RoomSize> | |
− | + | <id>14</id> | |
− | + | <name>DBL</name> | |
− | + | <description>2-е взрослых</description> | |
− | + | <adults>2</adults> | |
− | + | <children>0</children> | |
− | + | </RoomSize> | |
− | + | ||
− | + | <Resort> | |
− | + | <id>4</id> | |
− | + | <name>Хургада</name> | |
− | + | </Resort> | |
− | + | ||
− | + | <ResortPlace> | |
− | + | <id>2392</id> | |
− | + | <name>Эль-Дахар</name> | |
− | + | </ResortPlace> | |
− | + | ||
− | + | <Allocation> | |
− | + | <id>12395</id> | |
− | + | <name>Sea View</name> | |
− | + | <rate>2.5</rate> | |
− | + | </Allocation> | |
− | + | ||
− | + | <AllocCat> | |
− | + | <id>7</id> | |
− | + | <name>2*</name> | |
− | + | </AllocCat> | |
− | + | ||
− | + | <Meal> | |
− | + | <id>1</id> | |
− | + | <name>AI</name> | |
− | + | <description>питание+напитки местного производства</description> | |
− | + | </Meal> | |
− | + | ||
− | + | <RoomType> | |
− | + | <id>13</id> | |
− | + | <name>Executive</name> | |
− | + | <description>улучш. номер "Executive"</description> | |
− | + | </RoomType> | |
− | + | ||
− | + | <RoomView> | |
− | + | <id>22</id> | |
− | + | <name>ROH</name> | |
− | + | <description>без опред. вида из номера</description> | |
− | + | </RoomView> | |
− | + | ||
− | + | </Tour> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</source> | </source> | ||
===Статус поиска=== | ===Статус поиска=== |
Версия 16:38, 4 июля 2014
Запрос к сервису
<?xml version="1.0" encoding="UTF-8"?> <root> <TourSearchRequest> <dataOffset>0</dataOffset> <dataLimit>50</dataLimit> <seatStatus>3</seatStatus> <cityId>1000</cityId> <countryId>12</countryId> <roomSizeId>14</roomSizeId> <adults>2</adults> <children>0</children> <childAge1>0</childAge1> <childAge2>0</childAge2> <durationFrom>7</durationFrom> <durationTill>14</durationTill> <departureFrom>2014-07-25</departureFrom> <departureTill>2014-08-10</departureTill> <ticket>1</ticket> <priceFrom>500</priceFrom> <priceTill>50000</priceTill> <currency>3</currency> <operatorIds> <id>111</id> <id>222</id> <id>333</id> </operatorIds> <resortIds> <id>111</id> <id>222</id> <id>333</id> </resortIds> <resortPlaceIds> <id>111</id> <id>222</id> <id>333</id> </resortPlaceIds> <allocCatId>7</allocCatId> <allocRate>3.56</allocRate> <allocationIds> <id>111</id> <id>222</id> <id>333</id> </allocationIds> <mealIds> <id>111</id> <id>222</id> <id>333</id> </mealIds> <roomViewIds> <id>111</id> <id>222</id> <id>333</id> </roomViewIds> <roomTypeIds> <id>111</id> <id>222</id> <id>333</id> </roomTypeIds> </TourSearchRequest> </root>
Ответ сервиса
Поисковый сервис возвращает ответ, содержащий массив объектов Тур (Tours) и объект Статус поиска (SearchStatus)
<?xml version="1.0" encoding="UTF-8"?> <root> <Tours> <Tour>...</Tour> <Tour>...</Tour> <Tour>...</Tour> ... </Tours> <SearchStatus> ... </SearchStatus> </root>
Объект Тур
<Tour> <id>3145968261@511</id> <operatorId>308</operatorId> <cityId>1000</cityId> <countryId>12</countryId> <roomSizeId>14</roomSizeId> <departure>2014-07-10</departure> <arrival>2014-07-17</arrival> <duration>7</duration> <ticket>1</ticket> <directFlight>false</directFlight> <price>18000</price> <currency>2</currency> <priceIsApprox>true</priceIsApprox> <priceOrig>500</priceOrig> <currencyOrig>1</currencyOrig> <prevPriceOrig>0</prevPriceOrig> <priceDiffPercent>0</priceDiffPercent> <ch1From>0</ch1From> <ch1Till>0</ch1Till> <ch2From>0</ch2From> <ch2Till>0</ch2Till> <resortId>4</resortId> <resortPlaceId>2392</resortPlaceId> <allocationId>12395</allocationId> <allocCatId>7</allocCatId> <mealId>2</mealId> <roomTypeId>4</roomTypeId> <roomViewId>22</roomViewId> <isStop>false</isStop> <isStopAllocation>false</isStopAllocation> <isStopFlight>false</isStopFlight> <OnlineSeatsState> <allocation>1</allocation> <flightThereEco>1</flightThereEco> <flightBackEco>1</flightBackEco> <flightThereBus>2</flightThereBus> <flightBackBus>2</flightBackBus> <isStopFlight>false</isStopFlight> <isStopAllocation>false</isStopAllocation> </OnlineSeatsState> <ExtraCharges> <visa> <min>25</min> <max>25</max> <currency>1</currency> </visa> <feeFuel> <min>0</min> <max>40</max> <currency>1</currency> </feeFuel> </ExtraCharges> <City> <id>1000</id> <name>Москва</name> </City> <Country> <id>12</id> <name>Египет</name> </Country> <Operator> <id>308</id> <name>Troyka</name> </Operator> <RoomSize> <id>14</id> <name>DBL</name> <description>2-е взрослых</description> <adults>2</adults> <children>0</children> </RoomSize> <Resort> <id>4</id> <name>Хургада</name> </Resort> <ResortPlace> <id>2392</id> <name>Эль-Дахар</name> </ResortPlace> <Allocation> <id>12395</id> <name>Sea View</name> <rate>2.5</rate> </Allocation> <AllocCat> <id>7</id> <name>2*</name> </AllocCat> <Meal> <id>1</id> <name>AI</name> <description>питание+напитки местного производства</description> </Meal> <RoomType> <id>13</id> <name>Executive</name> <description>улучш. номер "Executive"</description> </RoomType> <RoomView> <id>22</id> <name>ROH</name> <description>без опред. вида из номера</description> </RoomView> </Tour>