Протокол AV5 для интеграции систем продажи электронных билетов перевозчиков и системы GDS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

568 lines
23 KiB

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3. elementFormDefault="qualified"
  4. attributeFormDefault="qualified">
  5. <xs:import schemaLocation="avs5rs_common.xsd" namespace=""/>
  6. <xs:complexType name="Station">
  7. <xs:sequence>
  8. <xs:element name="id" type="IDType" minOccurs="1"/>
  9. <xs:element name="name" type="NameType" minOccurs="1"/>
  10. <xs:element name="okato" type="OkatoType" minOccurs="0"/>
  11. <xs:element name="region" type="SimpleStringType" minOccurs="0"/>
  12. </xs:sequence>
  13. </xs:complexType>
  14. <xs:simpleType name="TripType">
  15. <xs:restriction base="xs:string">
  16. <xs:enumeration value="INTERNATIONAL"/>
  17. <xs:enumeration value="INTERREGIONAL"/>
  18. <xs:enumeration value="ADJACENT_INTERREGIONAL"/>
  19. <xs:enumeration value="INTERMUNICIPAL"/>
  20. <xs:enumeration value="MUNICIPAL"/>
  21. </xs:restriction>
  22. </xs:simpleType>
  23. <xs:simpleType name="TripStatus">
  24. <xs:restriction base="xs:string">
  25. <xs:enumeration value="ON_SALE"/>
  26. <xs:enumeration value="SUSPENDED"/>
  27. <xs:enumeration value="CANCELED"/>
  28. <xs:enumeration value="DISPATCHED"/>
  29. <xs:enumeration value="UNKNOWN"/>
  30. </xs:restriction>
  31. </xs:simpleType>
  32. <xs:simpleType name="TripClass">
  33. <xs:restriction base="xs:string">
  34. <xs:enumeration value="REGULAR"/>
  35. <xs:enumeration value="CUSTOM"/>
  36. </xs:restriction>
  37. </xs:simpleType>
  38. <xs:simpleType name="TicketClass">
  39. <xs:restriction base="xs:string">
  40. <xs:enumeration value="PASSENGER"/>
  41. <xs:enumeration value="BAGGAGE"/>
  42. <xs:enumeration value="WITHOUT_SEAT"/>
  43. </xs:restriction>
  44. </xs:simpleType>
  45. <xs:simpleType name="GenderType">
  46. <xs:restriction base="xs:string">
  47. <xs:enumeration value="MALE"/>
  48. <xs:enumeration value="FEMALE"/>
  49. </xs:restriction>
  50. </xs:simpleType>
  51. <xs:simpleType name="ErrorCode">
  52. <xs:restriction base="xs:string">
  53. <xs:enumeration value="INTERNAL"/>
  54. <xs:enumeration value="NOT_FOUND"/>
  55. <xs:enumeration value="SEAT_OCCUPIED"/>
  56. <xs:enumeration value="PERSONAL_DATA_INCORRECT"/>
  57. </xs:restriction>
  58. </xs:simpleType>
  59. <xs:simpleType name="TicketStatus">
  60. <xs:restriction base="xs:string">
  61. <xs:enumeration value="RESERVED"/>
  62. <xs:enumeration value="SOLD"/>
  63. <xs:enumeration value="CANCELED"/>
  64. <xs:enumeration value="RETURNED"/>
  65. </xs:restriction>
  66. </xs:simpleType>
  67. <xs:complexType name="Trip">
  68. <xs:sequence>
  69. <xs:element name="id" type="IDType" minOccurs="1"/>
  70. <xs:element name="name" type="NameType" minOccurs="1"/>
  71. <xs:element name="num" type="xs:string" minOccurs="0"/>
  72. <xs:element name="dispatchDate" type="xs:dateTime" minOccurs="1"/>
  73. <xs:element name="arrivalDate" type="xs:dateTime" minOccurs="1"/>
  74. <xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
  75. <xs:element name="dispatchStationName" type="NameType" minOccurs="1"/>
  76. <xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
  77. <xs:element name="arrivalStationName" type="NameType" minOccurs="1"/>
  78. <xs:element name="price" type="xs:decimal" minOccurs="1"/>
  79. <xs:element name="carrierName" type="NameType" minOccurs="0"/>
  80. <xs:element name="carrierInn" type="InnType" minOccurs="1"/>
  81. <xs:element name="busInfo" type="xs:string" minOccurs="1"/>
  82. <xs:element name="platform" type="xs:string" minOccurs="0"/>
  83. <xs:element name="type" type="TripType" minOccurs="1"/>
  84. <xs:element name="status" type="TripStatus" minOccurs="1"/>
  85. <xs:element name="tripClass" type="TripClass" minOccurs="0"/>
  86. <xs:element name="seatCount" type="xs:int" minOccurs="1"/>
  87. <xs:element name="freeSeatCount" type="xs:int" minOccurs="1"/>
  88. <xs:element name="routeKey" type="RouteKey" minOccurs="0"/>
  89. </xs:sequence>
  90. </xs:complexType>
  91. <xs:complexType name="Seat">
  92. <xs:sequence>
  93. <xs:element name="id" type="IDType" minOccurs="1"/>
  94. <xs:element name="num" type="xs:int" minOccurs="1"/>
  95. </xs:sequence>
  96. </xs:complexType>
  97. <xs:complexType name="Passenger">
  98. <xs:sequence>
  99. <xs:element name="firstName" type="xs:string" minOccurs="1"/>
  100. <xs:element name="lastName" type="xs:string" minOccurs="1"/>
  101. <xs:element name="middleName" type="xs:string" minOccurs="0"/>
  102. <xs:element name="docNum" type="xs:string" minOccurs="0"/>
  103. <xs:element name="docSeries" type="xs:string" minOccurs="0"/>
  104. <xs:element name="docTypeId" type="IDType" minOccurs="1"/>
  105. <xs:element name="birthday" type="xs:date" minOccurs="0"/>
  106. <xs:element name="citizenshipISO2" minOccurs="0">
  107. <xs:simpleType>
  108. <xs:restriction base="xs:string">
  109. <xs:length value="2"/>
  110. </xs:restriction>
  111. </xs:simpleType>
  112. </xs:element>
  113. <xs:element name="gender" type="GenderType" minOccurs="0"/>
  114. <xs:element name="phone" type="xs:string" minOccurs="0"/>
  115. <xs:element name="info" type="xs:string" minOccurs="0"/>
  116. </xs:sequence>
  117. </xs:complexType>
  118. <xs:complexType name="Sale">
  119. <xs:sequence>
  120. <xs:element name="seatId" type="IDType" minOccurs="0"/>
  121. <xs:element name="ticketTypeId" type="IDType" minOccurs="1"/>
  122. <xs:element name="Passenger" type="Passenger" minOccurs="0"/>
  123. </xs:sequence>
  124. </xs:complexType>
  125. <xs:complexType name="TripStop">
  126. <xs:sequence>
  127. <xs:element name="id" type="IDType" minOccurs="1"/>
  128. <xs:element name="name" type="NameType" minOccurs="1"/>
  129. <xs:element name="regionName" type="NameType" minOccurs="0"/>
  130. <xs:element name="dispatchDate" type="xs:dateTime" minOccurs="1"/>
  131. <xs:element name="arrivalDate" type="xs:dateTime" minOccurs="1"/>
  132. <xs:element name="stopTime" type="xs:int" minOccurs="0"/>
  133. <xs:element name="distance" type="xs:int" minOccurs="0"/>
  134. <xs:element name="price" type="xs:decimal" minOccurs="1"/>
  135. </xs:sequence>
  136. </xs:complexType>
  137. <xs:complexType name="TicketType">
  138. <xs:sequence>
  139. <xs:element name="id" type="IDType" minOccurs="1"/>
  140. <xs:element name="name" type="NameType" minOccurs="1"/>
  141. <xs:element name="price" type="xs:decimal" minOccurs="1"/>
  142. <xs:element name="ticketClass" type="TicketClass" minOccurs="1"/>
  143. </xs:sequence>
  144. </xs:complexType>
  145. <xs:complexType name="DocumentType">
  146. <xs:sequence>
  147. <xs:element name="id" type="IDType" minOccurs="1"/>
  148. <xs:element name="name" type="NameType" minOccurs="1"/>
  149. </xs:sequence>
  150. </xs:complexType>
  151. <xs:complexType name="Ticket">
  152. <xs:sequence>
  153. <xs:element name="id" type="IDType" minOccurs="1"/>
  154. <xs:element name="number" type="xs:string" minOccurs="0"/>
  155. <xs:element name="series" type="xs:string" minOccurs="0"/>
  156. <xs:element name="created" type="xs:dateTime" minOccurs="1"/>
  157. <xs:element name="returned" type="xs:dateTime" minOccurs="1"/>
  158. <xs:element name="status" type="TicketStatus" minOccurs="1"/>
  159. <xs:element name="ticketClass" type="TicketClass" minOccurs="1"/>
  160. <xs:element name="typeId" type="IDType" minOccurs="1"/>
  161. <xs:element name="routeNum" type="xs:string" minOccurs="0"/>
  162. <xs:element name="routeName" type="NameType" minOccurs="1"/>
  163. <xs:element name="busInfo" type="xs:string" minOccurs="1"/>
  164. <xs:element name="carrierName" type="xs:string" minOccurs="0"/>
  165. <xs:element name="carrierInn" type="InnType" minOccurs="1"/>
  166. <xs:element name="platform" type="xs:string" minOccurs="0"/>
  167. <xs:element name="dispatchDate" type="xs:dateTime" minOccurs="1"/>
  168. <xs:element name="arrivalDate" type="xs:dateTime" minOccurs="1"/>
  169. <xs:element name="dispatchStation" type="xs:string" minOccurs="1"/>
  170. <xs:element name="arrivalStation" type="xs:string" minOccurs="1"/>
  171. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  172. <xs:element name="Passenger" type="Passenger" minOccurs="0"/>
  173. <xs:element name="fare" type="xs:decimal" minOccurs="1"/>
  174. <xs:element name="fees" type="xs:decimal" minOccurs="1"/>
  175. <xs:element name="repayment" type="xs:decimal" minOccurs="0"/>
  176. <xs:element name="insuranceInfo" type="xs:string" minOccurs="1"/>
  177. </xs:sequence>
  178. </xs:complexType>
  179. <xs:element name="EchoRequest">
  180. <xs:complexType>
  181. <xs:sequence>
  182. <xs:element name="message" type="xs:string" minOccurs="1"/>
  183. </xs:sequence>
  184. </xs:complexType>
  185. </xs:element>
  186. <xs:element name="EchoResponse">
  187. <xs:complexType>
  188. <xs:complexContent>
  189. <xs:extension base="AbstractResponse">
  190. <xs:sequence>
  191. <xs:element name="Body">
  192. <xs:complexType>
  193. <xs:sequence>
  194. <xs:element name="message" minOccurs="1" type="xs:string"/>
  195. </xs:sequence>
  196. </xs:complexType>
  197. </xs:element>
  198. </xs:sequence>
  199. </xs:extension>
  200. </xs:complexContent>
  201. </xs:complexType>
  202. </xs:element>
  203. <xs:element name="GetDispatchStationsRequest">
  204. <xs:complexType>
  205. </xs:complexType>
  206. </xs:element>
  207. <xs:element name="GetDispatchStationsResponse">
  208. <xs:complexType>
  209. <xs:complexContent>
  210. <xs:extension base="AbstractResponse">
  211. <xs:sequence>
  212. <xs:element name="Body">
  213. <xs:complexType>
  214. <xs:sequence>
  215. <xs:element name="Station" type="Station" maxOccurs="unbounded"/>
  216. </xs:sequence>
  217. </xs:complexType>
  218. </xs:element>
  219. </xs:sequence>
  220. </xs:extension>
  221. </xs:complexContent>
  222. </xs:complexType>
  223. </xs:element>
  224. <xs:element name="GetArrivalStationsRequest">
  225. <xs:complexType>
  226. <xs:sequence>
  227. <xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
  228. </xs:sequence>
  229. </xs:complexType>
  230. </xs:element>
  231. <xs:element name="GetArrivalStationsResponse">
  232. <xs:complexType>
  233. <xs:complexContent>
  234. <xs:extension base="AbstractResponse">
  235. <xs:sequence>
  236. <xs:element name="Body">
  237. <xs:complexType>
  238. <xs:sequence>
  239. <xs:element name="Station" type="Station" maxOccurs="unbounded"/>
  240. </xs:sequence>
  241. </xs:complexType>
  242. </xs:element>
  243. </xs:sequence>
  244. </xs:extension>
  245. </xs:complexContent>
  246. </xs:complexType>
  247. </xs:element>
  248. <xs:element name="SearchTripsRequest">
  249. <xs:complexType>
  250. <xs:sequence>
  251. <xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
  252. <xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
  253. <xs:element name="date" type="xs:date" minOccurs="1"/>
  254. </xs:sequence>
  255. </xs:complexType>
  256. </xs:element>
  257. <xs:element name="SearchTripsResponse">
  258. <xs:complexType>
  259. <xs:complexContent>
  260. <xs:extension base="AbstractResponse">
  261. <xs:sequence>
  262. <xs:element name="Body">
  263. <xs:complexType>
  264. <xs:sequence>
  265. <xs:element name="Trip" type="Trip" maxOccurs="unbounded"/>
  266. </xs:sequence>
  267. </xs:complexType>
  268. </xs:element>
  269. </xs:sequence>
  270. </xs:extension>
  271. </xs:complexContent>
  272. </xs:complexType>
  273. </xs:element>
  274. <xs:element name="GetFreeSeatsRequest">
  275. <xs:complexType>
  276. <xs:sequence>
  277. <xs:element name="tripId" type="IDType" minOccurs="1"/>
  278. <xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
  279. <xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
  280. </xs:sequence>
  281. </xs:complexType>
  282. </xs:element>
  283. <xs:element name="GetFreeSeatsResponse">
  284. <xs:complexType>
  285. <xs:complexContent>
  286. <xs:extension base="AbstractResponse">
  287. <xs:sequence>
  288. <xs:element name="Body">
  289. <xs:complexType>
  290. <xs:sequence>
  291. <xs:element name="Seat" type="Seat" maxOccurs="unbounded"/>
  292. </xs:sequence>
  293. </xs:complexType>
  294. </xs:element>
  295. </xs:sequence>
  296. </xs:extension>
  297. </xs:complexContent>
  298. </xs:complexType>
  299. </xs:element>
  300. <xs:element name="GetTicketTypesRequest">
  301. <xs:complexType>
  302. <xs:sequence>
  303. <xs:element name="tripId" type="IDType" minOccurs="1"/>
  304. <xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
  305. <xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
  306. </xs:sequence>
  307. </xs:complexType>
  308. </xs:element>
  309. <xs:element name="GetTicketTypesResponse">
  310. <xs:complexType>
  311. <xs:complexContent>
  312. <xs:extension base="AbstractResponse">
  313. <xs:sequence>
  314. <xs:element name="Body">
  315. <xs:complexType>
  316. <xs:sequence>
  317. <xs:element name="TicketType" type="TicketType" maxOccurs="unbounded" minOccurs="1"/>
  318. </xs:sequence>
  319. </xs:complexType>
  320. </xs:element>
  321. </xs:sequence>
  322. </xs:extension>
  323. </xs:complexContent>
  324. </xs:complexType>
  325. </xs:element>
  326. <xs:element name="GetDocumentTypesRequest">
  327. <xs:complexType>
  328. <xs:sequence>
  329. <xs:element name="tripId" type="IDType" minOccurs="1"/>
  330. <xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
  331. <xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
  332. </xs:sequence>
  333. </xs:complexType>
  334. </xs:element>
  335. <xs:element name="GetDocumentTypesResponse">
  336. <xs:complexType>
  337. <xs:complexContent>
  338. <xs:extension base="AbstractResponse">
  339. <xs:sequence>
  340. <xs:element name="Body">
  341. <xs:complexType>
  342. <xs:sequence>
  343. <xs:element name="DocumentType" type="DocumentType" maxOccurs="unbounded" minOccurs="1"/>
  344. </xs:sequence>
  345. </xs:complexType>
  346. </xs:element>
  347. </xs:sequence>
  348. </xs:extension>
  349. </xs:complexContent>
  350. </xs:complexType>
  351. </xs:element>
  352. <xs:element name="GetTripStopsRequest">
  353. <xs:complexType>
  354. <xs:sequence>
  355. <xs:element name="tripId" type="IDType" minOccurs="1"/>
  356. </xs:sequence>
  357. </xs:complexType>
  358. </xs:element>
  359. <xs:element name="GetTripStopsResponse">
  360. <xs:complexType>
  361. <xs:complexContent>
  362. <xs:extension base="AbstractResponse">
  363. <xs:sequence>
  364. <xs:element name="Body">
  365. <xs:complexType>
  366. <xs:sequence>
  367. <xs:element name="Stop" type="TripStop" maxOccurs="unbounded" minOccurs="1"/>
  368. </xs:sequence>
  369. </xs:complexType>
  370. </xs:element>
  371. </xs:sequence>
  372. </xs:extension>
  373. </xs:complexContent>
  374. </xs:complexType>
  375. </xs:element>
  376. <xs:element name="BookOrderRequest">
  377. <xs:complexType>
  378. <xs:sequence>
  379. <xs:element name="tripId" type="IDType" minOccurs="1"/>
  380. <xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
  381. <xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
  382. <xs:element name="Sale" type="Sale" minOccurs="0" maxOccurs="unbounded"/>
  383. <xs:element name="Agent" type="Agent" minOccurs="0"/>
  384. </xs:sequence>
  385. </xs:complexType>
  386. </xs:element>
  387. <xs:element name="BookOrderResponse">
  388. <xs:complexType>
  389. <xs:complexContent>
  390. <xs:extension base="AbstractResponse">
  391. <xs:sequence>
  392. <xs:element name="Body">
  393. <xs:complexType>
  394. <xs:sequence>
  395. <xs:element name="orderId" type="IDType" minOccurs="1"/>
  396. <xs:element name="lifetime" type="xs:int" minOccurs="1"/>
  397. </xs:sequence>
  398. </xs:complexType>
  399. </xs:element>
  400. </xs:sequence>
  401. </xs:extension>
  402. </xs:complexContent>
  403. </xs:complexType>
  404. </xs:element>
  405. <xs:element name="GetOrderRequest">
  406. <xs:complexType>
  407. <xs:sequence>
  408. <xs:element name="orderId" type="IDType" minOccurs="1"/>
  409. </xs:sequence>
  410. </xs:complexType>
  411. </xs:element>
  412. <xs:element name="GetOrderResponse">
  413. <xs:complexType>
  414. <xs:complexContent>
  415. <xs:extension base="AbstractResponse">
  416. <xs:sequence>
  417. <xs:element name="Body">
  418. <xs:complexType>
  419. <xs:sequence>
  420. <xs:element name="orderId" type="IDType" minOccurs="1"/>
  421. <xs:element name="Ticket" type="Ticket" minOccurs="1" maxOccurs="unbounded"/>
  422. </xs:sequence>
  423. </xs:complexType>
  424. </xs:element>
  425. </xs:sequence>
  426. </xs:extension>
  427. </xs:complexContent>
  428. </xs:complexType>
  429. </xs:element>
  430. <xs:element name="ConfirmOrderRequest">
  431. <xs:complexType>
  432. <xs:sequence>
  433. <xs:element name="orderId" type="IDType" minOccurs="1"/>
  434. <xs:element name="Agent" type="Agent" minOccurs="1"/>
  435. </xs:sequence>
  436. </xs:complexType>
  437. </xs:element>
  438. <xs:element name="ConfirmOrderResponse">
  439. <xs:complexType>
  440. <xs:complexContent>
  441. <xs:extension base="AbstractResponse">
  442. <xs:sequence>
  443. <xs:element name="Body">
  444. <xs:complexType>
  445. <xs:sequence>
  446. <xs:element name="orderId" type="IDType" minOccurs="1"/>
  447. <xs:element name="Ticket" type="Ticket" minOccurs="1" maxOccurs="unbounded"/>
  448. </xs:sequence>
  449. </xs:complexType>
  450. </xs:element>
  451. </xs:sequence>
  452. </xs:extension>
  453. </xs:complexContent>
  454. </xs:complexType>
  455. </xs:element>
  456. <xs:element name="CancelTicketRequest">
  457. <xs:complexType>
  458. <xs:sequence>
  459. <xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
  460. <xs:element name="Agent" type="Agent" minOccurs="1"/>
  461. </xs:sequence>
  462. </xs:complexType>
  463. </xs:element>
  464. <xs:element name="CancelTicketResponse">
  465. <xs:complexType>
  466. <xs:complexContent>
  467. <xs:extension base="AbstractResponse">
  468. <xs:sequence>
  469. <xs:element name="Body">
  470. <xs:complexType>
  471. <xs:sequence>
  472. <xs:element name="Ticket" type="Ticket" minOccurs="1" maxOccurs="unbounded"/>
  473. </xs:sequence>
  474. </xs:complexType>
  475. </xs:element>
  476. </xs:sequence>
  477. </xs:extension>
  478. </xs:complexContent>
  479. </xs:complexType>
  480. </xs:element>
  481. <xs:element name="ReturnTicketRequest">
  482. <xs:complexType>
  483. <xs:sequence>
  484. <xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
  485. <xs:element name="Agent" type="Agent" minOccurs="1"/>
  486. </xs:sequence>
  487. </xs:complexType>
  488. </xs:element>
  489. <xs:element name="ReturnTicketResponse">
  490. <xs:complexType>
  491. <xs:complexContent>
  492. <xs:extension base="AbstractResponse">
  493. <xs:sequence>
  494. <xs:element name="Body">
  495. <xs:complexType>
  496. <xs:sequence>
  497. <xs:element name="Ticket" type="Ticket" minOccurs="1" maxOccurs="unbounded"/>
  498. </xs:sequence>
  499. </xs:complexType>
  500. </xs:element>
  501. </xs:sequence>
  502. </xs:extension>
  503. </xs:complexContent>
  504. </xs:complexType>
  505. </xs:element>
  506. <xs:element name="UpdateTicketRequest">
  507. <xs:complexType>
  508. <xs:sequence>
  509. <xs:element name="ticketId" type="IDType"/>
  510. <xs:element name="Passenger" type="Passenger" />
  511. </xs:sequence>
  512. </xs:complexType>
  513. </xs:element>
  514. <xs:element name="UpdateTicketResponse">
  515. <xs:complexType>
  516. <xs:complexContent>
  517. <xs:restriction base="AbstractResponse"/>
  518. </xs:complexContent>
  519. </xs:complexType>
  520. </xs:element>
  521. </xs:schema>