XML - результаты поиска/Поиск туров/Интерфейс - Результаты поиска — различия между версиями
Материал из TourClient - Руководство пользователя
Jeka (обсуждение | вклад) м |
Jeka (обсуждение | вклад) м |
||
Строка 10: | Строка 10: | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
− | < | + | <Request> |
− | <dataOffset>0</dataOffset> | + | <TourSearchRequest> |
− | + | <dataOffset>0</dataOffset> | |
− | + | <dataLimit>50</dataLimit> | |
− | <seatStatus>3</seatStatus> | + | |
− | + | <seatStatus>3</seatStatus> | |
− | <cityId>1000</cityId> | + | |
− | + | <cityId>1000</cityId> | |
− | + | <countryId>12</countryId> | |
− | + | <roomSizeId>14</roomSizeId> | |
− | <adults>2</adults> | + | |
− | + | <adults>2</adults> | |
− | + | <children>0</children> | |
− | <childAge1>0</childAge1> | + | |
− | + | <childAge1>0</childAge1> | |
− | + | <childAge2>0</childAge2> | |
− | <durationFrom>7</durationFrom> | + | |
− | + | <durationFrom>7</durationFrom> | |
− | + | <durationTill>14</durationTill> | |
− | <departureFrom>2014-07-25</departureFrom> | + | |
− | + | <departureFrom>2014-07-25</departureFrom> | |
− | + | <departureTill>2014-08-10</departureTill> | |
− | <ticket>1</ticket> | + | |
− | + | <ticket>1</ticket> | |
− | <priceFrom>500</priceFrom> | + | |
− | + | <priceFrom>500</priceFrom> | |
− | + | <priceTill>50000</priceTill> | |
− | + | <currency>3</currency> | |
− | <operatorIds> | + | |
− | + | <operatorIds> | |
− | + | <id>111</id> | |
− | + | <id>222</id> | |
− | + | <id>333</id> | |
− | + | </operatorIds> | |
− | <resortIds> | + | |
− | + | <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> | + | |
− | + | <allocCatId>7</allocCatId> | |
− | + | <allocRate>3.56</allocRate> | |
− | <allocationIds> | + | |
− | + | <allocationIds> | |
− | + | <id>111</id> | |
− | + | <id>222</id> | |
− | + | <id>333</id> | |
− | + | </allocationIds> | |
− | <mealIds> | + | |
− | + | <mealIds> | |
− | + | <id>111</id> | |
− | + | <id>222</id> | |
− | + | <id>333</id> | |
− | + | </mealIds> | |
− | + | ||
− | + | <roomViewIds> | |
− | + | <id>111</id> | |
− | + | <id>222</id> | |
− | + | <id>333</id> | |
− | + | </roomViewIds> | |
− | <roomTypeIds> | + | |
− | + | <roomTypeIds> | |
− | + | <id>111</id> | |
− | + | <id>222</id> | |
− | + | <id>333</id> | |
− | + | </roomTypeIds> | |
− | </TourSearchRequest> | + | |
− | <TourExtraEntities> | + | </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> | |
− | </TourExtraEntities> | + | <entity>Operator</entity> |
+ | </TourExtraEntities> | ||
+ | </Request> | ||
</source> | </source> |
Версия 16:08, 8 июля 2014
Работа с сервисом осуществляется путем отправки POST запросов на адрес http://tourclient.ru/f/exml/user_id/tours_export .
Параметр request должен содержать xml запроса.
В результате сервис вернет ответ в формате xml.
Запрос к сервису
<?xml version="1.0" encoding="UTF-8"?> <Request> <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> </Request>
Ответ сервиса
Сервис возвращает ответ, содержащий массив объектов Тур (Tours) и объект Статус поиска (SearchStatus)
<?xml version="1.0" encoding="UTF-8"?> <Result> <Tours> <Tour>...</Tour> <Tour>...</Tour> <Tour>...</Tour> ... </Tours> <SearchStatus> ... </SearchStatus> </Result>