XML - результаты поиска/Поиск туров/Интерфейс - Результаты поиска

Материал из TourClient - Руководство пользователя
Перейти к: навигация, поиск

Работа с сервисом осуществляется путем отправки POST запросов на адрес http://tourclient.ru/f/exml/user_id/tours_export .

Параметр request должен содержать xml запроса.

В результате сервис вернет ответ в формате xml.

Запрос к сервису

<?xml version="1.0" encoding="UTF-8"?>
<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>
<TourExtraEntities>
    <entity>OnlineSeatsState</entity>
    <entity>ExtraCharges</entity>
    <entity>City</entity>
    <entity>Country</entity>
    <entity>RoomSize</entity>
    <entity>Resort</entity>
    <entity>ResortPlace</entity>
    <entity>Allocation</entity>
    <entity>AllocCat</entity>
    <entity>Meal</entity>
    <entity>RoomType</entity>
    <entity>RoomView</entity>
    <entity>Operator</entity>
</TourExtraEntities>


Ответ сервиса

Сервис возвращает ответ, содержащий массив объектов Тур (Tours) и объект Статус поиска (SearchStatus)

<?xml version="1.0" encoding="UTF-8"?>
<Result>
    <Tours>
        <Tour>...</Tour>
        <Tour>...</Tour>
        <Tour>...</Tour>
        ...
    </Tours>
    <SearchStatus>
       ...
    </SearchStatus>
</Result>