Протокол 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.

453 lines
18 KiB

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2001/XMLSchema"
  3. elementFormDefault="qualified"
  4. attributeFormDefault="qualified">
  5. <xs:simpleType name="IDType">
  6. <xs:restriction base="xs:string">
  7. <xs:maxLength value="36"/>
  8. <xs:minLength value="1"/>
  9. </xs:restriction>
  10. </xs:simpleType>
  11. <xs:simpleType name="NameType">
  12. <xs:restriction base="xs:string">
  13. <xs:maxLength value="100"/>
  14. <xs:minLength value="1"/>
  15. </xs:restriction>
  16. </xs:simpleType>
  17. <xs:simpleType name="OkatoType">
  18. <xs:restriction base="xs:string">
  19. <xs:length value="11"/>
  20. </xs:restriction>
  21. </xs:simpleType>
  22. <xs:simpleType name="InnType">
  23. <xs:restriction base="xs:string">
  24. <xs:maxLength value="20"/>
  25. <xs:minLength value="10"/>
  26. </xs:restriction>
  27. </xs:simpleType>
  28. <xs:simpleType name="SimpleStringType">
  29. <xs:restriction base="xs:string">
  30. <xs:maxLength value="100"/>
  31. <xs:minLength value="0"/>
  32. </xs:restriction>
  33. </xs:simpleType>
  34. <xs:complexType name="AbstractResponse">
  35. <xs:sequence>
  36. <xs:element name="Error" minOccurs="0">
  37. <xs:complexType>
  38. <xs:sequence>
  39. <xs:element name="code" type="xs:string" minOccurs="1"/>
  40. <xs:element name="message" type="xs:string" minOccurs="1"/>
  41. </xs:sequence>
  42. </xs:complexType>
  43. </xs:element>
  44. </xs:sequence>
  45. </xs:complexType>
  46. <xs:simpleType name="UidType">
  47. <xs:restriction base="xs:string">
  48. <xs:length value="36"/>
  49. </xs:restriction>
  50. </xs:simpleType>
  51. <xs:complexType name="RouteKey">
  52. <xs:sequence>
  53. <xs:element name="dispatchStationUid" type="UidType"/>
  54. <xs:element name="arrivalStationUid" type="UidType"/>
  55. <xs:element name="dispatchTime" type="xs:time"/>
  56. <xs:element name="carrierCode" type="InnType"/>
  57. </xs:sequence>
  58. </xs:complexType>
  59. <xs:complexType name="Agent">
  60. <xs:sequence>
  61. <xs:element name="name" type="NameType" minOccurs="0"/>
  62. <xs:element name="inn" type="InnType" minOccurs="1"/>
  63. </xs:sequence>
  64. </xs:complexType>
  65. <xs:complexType name="Seat">
  66. <xs:sequence>
  67. <xs:element name="id" type="IDType" minOccurs="1"/>
  68. <xs:element name="num" type="xs:int" minOccurs="1"/>
  69. </xs:sequence>
  70. </xs:complexType>
  71. <xs:simpleType name="GenderType">
  72. <xs:restriction base="xs:string">
  73. <xs:enumeration value="MALE"/>
  74. <xs:enumeration value="FEMALE"/>
  75. </xs:restriction>
  76. </xs:simpleType>
  77. <xs:simpleType name="ErrorCode">
  78. <xs:restriction base="xs:string">
  79. <xs:enumeration value="INTERNAL"/>
  80. <xs:enumeration value="NOT_FOUND"/>
  81. <xs:enumeration value="SEAT_OCCUPIED"/>
  82. <xs:enumeration value="PERSONAL_DATA_INCORRECT"/>
  83. </xs:restriction>
  84. </xs:simpleType>
  85. <xs:element name="SetStationInfoRequest">
  86. <xs:complexType>
  87. <xs:sequence>
  88. <xs:element name="stationId" type="IDType" minOccurs="1"/>
  89. <xs:element name="uid" type="UidType" minOccurs="1"/>
  90. </xs:sequence>
  91. </xs:complexType>
  92. </xs:element>
  93. <xs:element name="SetStationInfoResponse">
  94. <xs:complexType>
  95. <xs:complexContent>
  96. <xs:restriction base="AbstractResponse"/>
  97. </xs:complexContent>
  98. </xs:complexType>
  99. </xs:element>
  100. <xs:complexType name="TransitSeat">
  101. <xs:sequence>
  102. <xs:element name="seatId" type="IDType" minOccurs="1"/>
  103. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  104. </xs:sequence>
  105. </xs:complexType>
  106. <xs:element name="TransitBookRequest">
  107. <xs:complexType>
  108. <xs:sequence>
  109. <xs:element name="RouteKey" type="RouteKey"/>
  110. <xs:element name="dispatchStationUid" type="UidType"/>
  111. <xs:element name="arrivalStationUid" type="UidType"/>
  112. <xs:element name="date" type="xs:date"/>
  113. <xs:element name="seatId" type="IDType" maxOccurs="unbounded" minOccurs="1"/>
  114. <xs:element name="Agent" type="Agent" minOccurs="1"/>
  115. </xs:sequence>
  116. </xs:complexType>
  117. </xs:element>
  118. <xs:element name="TransitBookResponse">
  119. <xs:complexType>
  120. <xs:complexContent>
  121. <xs:extension base="AbstractResponse">
  122. <xs:sequence>
  123. <xs:element name="Body">
  124. <xs:complexType>
  125. <xs:sequence>
  126. <xs:element name="TransitTicket" minOccurs="1" maxOccurs="unbounded">
  127. <xs:complexType>
  128. <xs:sequence>
  129. <xs:element name="ticketId" type="IDType" minOccurs="1"/>
  130. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  131. </xs:sequence>
  132. </xs:complexType>
  133. </xs:element>
  134. </xs:sequence>
  135. </xs:complexType>
  136. </xs:element>
  137. </xs:sequence>
  138. </xs:extension>
  139. </xs:complexContent>
  140. </xs:complexType>
  141. </xs:element>
  142. <xs:simpleType name="RelationType">
  143. <xs:restriction base="xs:string">
  144. <xs:enumeration value="OWN"/>
  145. <xs:enumeration value="AGENT"/>
  146. <xs:enumeration value="ATP"/>
  147. </xs:restriction>
  148. </xs:simpleType>
  149. <xs:element name="TransitConfirmRequest">
  150. <xs:complexType>
  151. <xs:sequence>
  152. <xs:element name="RouteKey" type="RouteKey"/>
  153. <xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
  154. <xs:element name="Ticket" maxOccurs="unbounded" minOccurs="1">
  155. <xs:complexType>
  156. <xs:sequence>
  157. <xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="1"/>
  158. <xs:element name="Passenger" type="Passenger" minOccurs="0"/>
  159. <xs:element name="ticketSeries" type="xs:string" minOccurs="1" maxOccurs="1"/>
  160. <xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
  161. <xs:element name="price" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
  162. <xs:element name="relation" type="RelationType" minOccurs="0" maxOccurs="1"/>
  163. <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
  164. </xs:sequence>
  165. </xs:complexType>
  166. </xs:element>
  167. <xs:element name="Agent" type="Agent" minOccurs="0"/>
  168. </xs:sequence>
  169. </xs:complexType>
  170. </xs:element>
  171. <xs:element name="TransitConfirmResponse">
  172. <xs:complexType>
  173. <xs:complexContent>
  174. <xs:restriction base="AbstractResponse"/>
  175. </xs:complexContent>
  176. </xs:complexType>
  177. </xs:element>
  178. <xs:element name="TransitCancelRequest">
  179. <xs:complexType>
  180. <xs:sequence>
  181. <xs:element name="RouteKey" type="RouteKey"/>
  182. <xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
  183. <xs:element name="Agent" type="Agent" minOccurs="0"/>
  184. </xs:sequence>
  185. </xs:complexType>
  186. </xs:element>
  187. <xs:element name="TransitCancelResponse">
  188. <xs:complexType>
  189. <xs:complexContent>
  190. <xs:restriction base="AbstractResponse"/>
  191. </xs:complexContent>
  192. </xs:complexType>
  193. </xs:element>
  194. <xs:complexType name="CarrierType">
  195. <xs:sequence>
  196. <xs:element name="name" type="SimpleStringType" minOccurs="0"/>
  197. <xs:element name="inn" type="InnType" minOccurs="0"/>
  198. </xs:sequence>
  199. </xs:complexType>
  200. <xs:complexType name="BusType">
  201. <xs:sequence>
  202. <!--Госномер автобуса-->
  203. <xs:element name="lpn" type="SimpleStringType" minOccurs="0"/>
  204. <!--Шаблон. Например 65 Мест Мягкий. или Автобус 46 мест ( Баг: 92, Стоя: 0 )-->
  205. <xs:element name="template" type="SimpleStringType" minOccurs="0"/>
  206. <!-- Модель. Например FIAT FORD HYUNDAI -->
  207. <xs:element name="model" type="SimpleStringType" minOccurs="0"/>
  208. <!-- Тип -->
  209. <xs:element name="type" minOccurs="0">
  210. <xs:simpleType>
  211. <xs:restriction base="xs:string">
  212. <!-- До 5 тон -->
  213. <xs:enumeration value="M1"/>
  214. <!-- От 5 тон -->
  215. <xs:enumeration value="M2"/>
  216. <!-- Тип не указан. Сидения мигкие -->
  217. <xs:enumeration value="SOFT"/>
  218. <!-- Тип не указан. Сидения твердые -->
  219. <xs:enumeration value="HARD"/>
  220. </xs:restriction>
  221. </xs:simpleType>
  222. </xs:element>
  223. <!-- кол-во сидячих мест -->
  224. <xs:element name="maxSeats" type="xs:int"/>
  225. </xs:sequence>
  226. </xs:complexType>
  227. <xs:complexType name="DriverType">
  228. <xs:sequence>
  229. <xs:element name="firstName" type="xs:string" minOccurs="1"/>
  230. <xs:element name="lastName" type="xs:string" minOccurs="1"/>
  231. <xs:element name="middleName" type="xs:string" minOccurs="0"/>
  232. <xs:element name="docNum" type="xs:string" minOccurs="0"/>
  233. <xs:element name="docSeries" type="xs:string" minOccurs="0"/>
  234. <xs:element name="docTypeId" type="IDType" minOccurs="1"/>
  235. <xs:element name="birthday" type="xs:date" minOccurs="0"/>
  236. <xs:element name="citizenshipISO2" minOccurs="0">
  237. <xs:simpleType>
  238. <xs:restriction base="xs:string">
  239. <xs:length value="2"/>
  240. </xs:restriction>
  241. </xs:simpleType>
  242. </xs:element>
  243. <xs:element name="gender" type="GenderType" minOccurs="0"/>
  244. <xs:element name="phone" type="xs:string" minOccurs="0"/>
  245. <xs:element name="appointment" type="xs:string" minOccurs="0"/>
  246. </xs:sequence>
  247. </xs:complexType>
  248. <xs:complexType name="Passenger">
  249. <xs:sequence>
  250. <xs:element name="firstName" type="xs:string" minOccurs="1"/>
  251. <xs:element name="lastName" type="xs:string" minOccurs="1"/>
  252. <xs:element name="middleName" type="xs:string" minOccurs="0"/>
  253. <xs:element name="docNum" type="xs:string" minOccurs="0"/>
  254. <xs:element name="docSeries" type="xs:string" minOccurs="0"/>
  255. <xs:element name="docTypeId" type="IDType" minOccurs="1"/>
  256. <xs:element name="birthday" type="xs:date" minOccurs="0"/>
  257. <xs:element name="citizenshipISO2" minOccurs="0">
  258. <xs:simpleType>
  259. <xs:restriction base="xs:string">
  260. <xs:length value="2"/>
  261. </xs:restriction>
  262. </xs:simpleType>
  263. </xs:element>
  264. <xs:element name="gender" type="GenderType" minOccurs="0"/>
  265. <xs:element name="phone" type="xs:string" minOccurs="0"/>
  266. <xs:element name="info" type="xs:string" minOccurs="0"/>
  267. </xs:sequence>
  268. </xs:complexType>
  269. <xs:element name="GetFreeSeatsRequest">
  270. <xs:complexType>
  271. <xs:choice>
  272. <xs:sequence>
  273. <xs:element name="RouteKey" type="RouteKey"/>
  274. <xs:element name="date" type="xs:date"/>
  275. <xs:element name="dispatchStationUid" type="UidType"/>
  276. <xs:element name="arrivalStationUid" type="UidType"/>
  277. </xs:sequence>
  278. </xs:choice>
  279. </xs:complexType>
  280. </xs:element>
  281. <xs:element name="GetFreeSeatsResponse">
  282. <xs:complexType>
  283. <xs:complexContent>
  284. <xs:extension base="AbstractResponse">
  285. <xs:sequence>
  286. <xs:element name="Body">
  287. <xs:complexType>
  288. <xs:choice>
  289. <xs:element name="TransitSeat" type="TransitSeat" maxOccurs="unbounded"/>
  290. </xs:choice>
  291. </xs:complexType>
  292. </xs:element>
  293. </xs:sequence>
  294. </xs:extension>
  295. </xs:complexContent>
  296. </xs:complexType>
  297. </xs:element>
  298. <xs:element name="TransitTripInfoRequest">
  299. <xs:complexType>
  300. <xs:sequence>
  301. <xs:element name="RouteKey" type="RouteKey"/>
  302. <xs:element name="date" type="xs:date"/>
  303. <xs:element name="dispatchStationUid" type="UidType" minOccurs="0"/>
  304. <xs:element name="arrivalStationUid" type="UidType" minOccurs="0"/>
  305. </xs:sequence>
  306. </xs:complexType>
  307. </xs:element>
  308. <xs:complexType name="TransitTicket">
  309. <xs:all>
  310. <xs:element name="dispatchStationUid" type="UidType"/>
  311. <xs:element name="dispatchStationName" type="SimpleStringType"/>
  312. <xs:element name="arrivalStationUid" type="UidType"/>
  313. <xs:element name="arrivalStationName" type="SimpleStringType"/>
  314. <xs:element name="Passenger" type="Passenger"/>
  315. <xs:element name="ticketId" type="IDType" minOccurs="1"/>
  316. <xs:element name="ticketSeries" type="xs:string" minOccurs="0" maxOccurs="1"/>
  317. <xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
  318. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  319. <xs:element name="Agent" type="Agent"/>
  320. <xs:element name="price" type="xs:decimal"/>
  321. <xs:element name="isGone" type="xs:boolean" minOccurs="0"/>
  322. </xs:all>
  323. </xs:complexType>
  324. <xs:element name="TransitTripInfoResponse">
  325. <xs:complexType>
  326. <xs:complexContent>
  327. <xs:extension base="AbstractResponse">
  328. <xs:sequence>
  329. <xs:element name="Body">
  330. <xs:complexType>
  331. <xs:sequence>
  332. <xs:element name="Ticket" type="TransitTicket" maxOccurs="unbounded" minOccurs="0"/>
  333. <xs:element name="offlineSaleSeats" minOccurs="0">
  334. <xs:simpleType>
  335. <xs:restriction base="xs:string">
  336. <xs:pattern value="(\d\,?)+"/>
  337. </xs:restriction>
  338. </xs:simpleType>
  339. </xs:element>
  340. <xs:element name="Carrier" type="CarrierType" minOccurs="0"/>
  341. <xs:element name="Bus" type="BusType" minOccurs="0"/>
  342. <xs:element name="Driver" type="DriverType" minOccurs="0" maxOccurs="unbounded"/>
  343. </xs:sequence>
  344. </xs:complexType>
  345. </xs:element>
  346. </xs:sequence>
  347. </xs:extension>
  348. </xs:complexContent>
  349. </xs:complexType>
  350. </xs:element>
  351. <xs:element name="TransitRouteInfoRequest">
  352. <xs:complexType>
  353. <xs:sequence>
  354. <xs:element name="RouteKey" type="RouteKey"/>
  355. <xs:element name="date" type="xs:date"/>
  356. </xs:sequence>
  357. </xs:complexType>
  358. </xs:element>
  359. <xs:complexType name="RouteItem">
  360. <xs:sequence>
  361. <xs:element name="order" type="xs:int"/>
  362. <xs:element name="stationName" type="SimpleStringType"/>
  363. <xs:element name="stationUid" type="UidType"/>
  364. <xs:element name="distance" type="xs:integer"/>
  365. <xs:element name="arrivalTime" type="xs:time"/>
  366. <xs:element name="dispatchTime" type="xs:time"/>
  367. </xs:sequence>
  368. </xs:complexType>
  369. <xs:element name="TransitRouteInfoResponse">
  370. <xs:complexType>
  371. <xs:complexContent>
  372. <xs:extension base="AbstractResponse">
  373. <xs:sequence>
  374. <xs:element name="Body">
  375. <xs:complexType>
  376. <xs:sequence>
  377. <xs:element name="name" type="SimpleStringType"/>
  378. <xs:element name="RouteItem" type="RouteItem" maxOccurs="unbounded"/>
  379. </xs:sequence>
  380. </xs:complexType>
  381. </xs:element>
  382. </xs:sequence>
  383. </xs:extension>
  384. </xs:complexContent>
  385. </xs:complexType>
  386. </xs:element>
  387. <xs:element name="TransitUpdateTicketRequest">
  388. <xs:complexType>
  389. <xs:sequence>
  390. <xs:element name="RouteKey" type="RouteKey"/>
  391. <xs:element name="Ticket" maxOccurs="unbounded">
  392. <xs:complexType>
  393. <xs:sequence>
  394. <xs:element name="ticketId" type="IDType" minOccurs="1"/>
  395. <xs:element name="isGone" type="xs:boolean" minOccurs="0"/>
  396. </xs:sequence>
  397. </xs:complexType>
  398. </xs:element>
  399. <xs:element name="Agent" type="Agent" minOccurs="0"/>
  400. </xs:sequence>
  401. </xs:complexType>
  402. </xs:element>
  403. <xs:element name="TransitUpdateTicketResponse">
  404. <xs:complexType>
  405. <xs:complexContent>
  406. <xs:restriction base="AbstractResponse"/>
  407. </xs:complexContent>
  408. </xs:complexType>
  409. </xs:element>
  410. </xs:schema>