XML - бронирование/Экспорт пришедших заявок — различия между версиями
Материал из TourClient - Руководство пользователя
(→Ответ) |
(→Ответ) |
||
Строка 29: | Строка 29: | ||
<source lang="xml"> | <source lang="xml"> | ||
− | + | <Result> | |
+ | <Count>186</Count> | ||
+ | <Bookings> | ||
+ | <Booking> | ||
+ | <Order> | ||
+ | <id>3832038</id> | ||
+ | <webclient>61285</webclient> | ||
+ | <name>ContName</name> | ||
+ | <phone>12345</phone> | ||
+ | <email>cont@email.yy</email> | ||
+ | <commentary>ContComment</commentary> | ||
+ | <phoneTime>Как можно скорее</phoneTime> | ||
+ | <city /> | ||
+ | </Order> | ||
+ | <Offer> | ||
+ | <booking>3832038</booking> | ||
+ | <allocation>20801</allocation> | ||
+ | <duration>7</duration> | ||
+ | <meal>3</meal> | ||
+ | <roomType>4</roomType> | ||
+ | <price>684</price> | ||
+ | <operator>63</operator> | ||
+ | <departure>2014-12-24</departure> | ||
+ | <roomView>22</roomView> | ||
+ | <roomSize>14</roomSize> | ||
+ | <allspo /> | ||
+ | <city>1000</city> | ||
+ | <offerId>9756346613@511</offerId> | ||
+ | <priceId /> | ||
+ | <ch1from /> | ||
+ | <ch1to /> | ||
+ | <ch2from /> | ||
+ | <ch2to /> | ||
+ | <ch3from /> | ||
+ | <ch3to /> | ||
+ | </Offer> | ||
+ | <Contacts> | ||
+ | <Contact> | ||
+ | <bookingId>3832038</bookingId> | ||
+ | <name>ContName</name> | ||
+ | <phone>12345</phone> | ||
+ | <email>cont@email.yy</email> | ||
+ | <commentary>ContComment</commentary> | ||
+ | <dateCreate>2014-12-19 11:03:24.206345</dateCreate> | ||
+ | <surname>ContSurName</surname> | ||
+ | <patronymic>ContPatronymic</patronymic> | ||
+ | <address>address street 1/15</address> | ||
+ | <passportSeries>11111</passportSeries> | ||
+ | <passportNumber>111111</passportNumber> | ||
+ | <passportIssuedBy>ROVD</passportIssuedBy> | ||
+ | </Contact> | ||
+ | </Contacts> | ||
+ | <Tourists> | ||
+ | <Tourist> | ||
+ | <id>5107428</id> | ||
+ | <sex>Mr</sex> | ||
+ | <name>Name1</name> | ||
+ | <surname>Surname1</surname> | ||
+ | <birthday>1987-01-01</birthday> | ||
+ | <passportSeries>11111</passportSeries> | ||
+ | <passportNumber>111111</passportNumber> | ||
+ | <passportDate>2015-01-01</passportDate> | ||
+ | <booking>3832038</booking> | ||
+ | <citizenship /> | ||
+ | <passportIssue /> | ||
+ | <passportCountry /> | ||
+ | <passportCity /> | ||
+ | <passportDateIssue /> | ||
+ | </Tourist> | ||
+ | </Tourists> | ||
+ | </Booking> | ||
+ | </Bookings> | ||
+ | </Result> | ||
</source> | </source> |
Версия 16:45, 19 декабря 2014
Экспорт пришедших заявок выполняется через выполнение POST запросов на адрес http://tourclient.ru/f/exml/user_id/booking . Где user_id - ID пользователя AgentPassport.
POST-параметр request должен содержать xml запроса.
В результате будет возвращен ответ в формате xml.
Запрос
<?xml version="1.0" encoding="UTF-8"?> <Request> <ExportBooking> <offset>0</offset><!-- Необязательный параметр, если не указан = 0--> <limit>50</limit><!-- Необязательный параметр, если не указан = 50--> <sort><!-- Необязательный параметр, если не указан = id asc--> <name>(id|webclient|name|phone|email|phoneTime|city|)</name><!-- Необязательный параметр, если не указан = id--> <direct>(asc|desc)</direct> <!-- Необязательный параметр, если не указан = asc--> </sort> <updated>123456789</updated> <!-- Необязвтельный параметр --> </ExportBooking> </Request>
Ответ
<Result> <Count>186</Count> <Bookings> <Booking> <Order> <id>3832038</id> <webclient>61285</webclient> <name>ContName</name> <phone>12345</phone> <email>cont@email.yy</email> <commentary>ContComment</commentary> <phoneTime>Как можно скорее</phoneTime> <city /> </Order> <Offer> <booking>3832038</booking> <allocation>20801</allocation> <duration>7</duration> <meal>3</meal> <roomType>4</roomType> <price>684</price> <operator>63</operator> <departure>2014-12-24</departure> <roomView>22</roomView> <roomSize>14</roomSize> <allspo /> <city>1000</city> <offerId>9756346613@511</offerId> <priceId /> <ch1from /> <ch1to /> <ch2from /> <ch2to /> <ch3from /> <ch3to /> </Offer> <Contacts> <Contact> <bookingId>3832038</bookingId> <name>ContName</name> <phone>12345</phone> <email>cont@email.yy</email> <commentary>ContComment</commentary> <dateCreate>2014-12-19 11:03:24.206345</dateCreate> <surname>ContSurName</surname> <patronymic>ContPatronymic</patronymic> <address>address street 1/15</address> <passportSeries>11111</passportSeries> <passportNumber>111111</passportNumber> <passportIssuedBy>ROVD</passportIssuedBy> </Contact> </Contacts> <Tourists> <Tourist> <id>5107428</id> <sex>Mr</sex> <name>Name1</name> <surname>Surname1</surname> <birthday>1987-01-01</birthday> <passportSeries>11111</passportSeries> <passportNumber>111111</passportNumber> <passportDate>2015-01-01</passportDate> <booking>3832038</booking> <citizenship /> <passportIssue /> <passportCountry /> <passportCity /> <passportDateIssue /> </Tourist> </Tourists> </Booking> </Bookings> </Result>