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

395 lines
15 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="Passenger">
  201. <xs:sequence>
  202. <xs:element name="firstName" type="xs:string" minOccurs="1"/>
  203. <xs:element name="lastName" type="xs:string" minOccurs="1"/>
  204. <xs:element name="middleName" type="xs:string" minOccurs="0"/>
  205. <xs:element name="docNum" type="xs:string" minOccurs="0"/>
  206. <xs:element name="docSeries" type="xs:string" minOccurs="0"/>
  207. <xs:element name="docTypeId" type="IDType" minOccurs="1"/>
  208. <xs:element name="birthday" type="xs:date" minOccurs="0"/>
  209. <xs:element name="citizenshipISO2" minOccurs="0">
  210. <xs:simpleType>
  211. <xs:restriction base="xs:string">
  212. <xs:length value="2"/>
  213. </xs:restriction>
  214. </xs:simpleType>
  215. </xs:element>
  216. <xs:element name="gender" type="GenderType" minOccurs="0"/>
  217. <xs:element name="phone" type="xs:string" minOccurs="0"/>
  218. <xs:element name="info" type="xs:string" minOccurs="0"/>
  219. </xs:sequence>
  220. </xs:complexType>
  221. <xs:element name="GetFreeSeatsRequest">
  222. <xs:complexType>
  223. <xs:choice>
  224. <xs:sequence>
  225. <xs:element name="RouteKey" type="RouteKey"/>
  226. <xs:element name="date" type="xs:date"/>
  227. <xs:element name="dispatchStationUid" type="UidType"/>
  228. <xs:element name="arrivalStationUid" type="UidType"/>
  229. </xs:sequence>
  230. </xs:choice>
  231. </xs:complexType>
  232. </xs:element>
  233. <xs:element name="GetFreeSeatsResponse">
  234. <xs:complexType>
  235. <xs:complexContent>
  236. <xs:extension base="AbstractResponse">
  237. <xs:sequence>
  238. <xs:element name="Body">
  239. <xs:complexType>
  240. <xs:choice>
  241. <xs:element name="TransitSeat" type="TransitSeat" maxOccurs="unbounded"/>
  242. </xs:choice>
  243. </xs:complexType>
  244. </xs:element>
  245. </xs:sequence>
  246. </xs:extension>
  247. </xs:complexContent>
  248. </xs:complexType>
  249. </xs:element>
  250. <xs:element name="TransitTripInfoRequest">
  251. <xs:complexType>
  252. <xs:sequence>
  253. <xs:element name="RouteKey" type="RouteKey"/>
  254. <xs:element name="date" type="xs:date"/>
  255. <xs:element name="dispatchStationUid" type="UidType" minOccurs="0"/>
  256. <xs:element name="arrivalStationUid" type="UidType" minOccurs="0"/>
  257. </xs:sequence>
  258. </xs:complexType>
  259. </xs:element>
  260. <xs:complexType name="TransitTicket">
  261. <xs:sequence>
  262. <xs:element name="dispatchStationUid" type="UidType"/>
  263. <xs:element name="dispatchStationName" type="SimpleStringType"/>
  264. <xs:element name="arrivalStationUid" type="UidType"/>
  265. <xs:element name="arrivalStationName" type="SimpleStringType"/>
  266. <xs:element name="Passenger" type="Passenger"/>
  267. <xs:element name="ticketId" type="IDType" minOccurs="1"/>
  268. <xs:element name="ticketSeries" type="xs:string" minOccurs="0" maxOccurs="1"/>
  269. <xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
  270. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  271. <xs:element name="Agent" type="Agent"/>
  272. <xs:element name="price" type="xs:decimal"/>
  273. <xs:element name="isGone" type="xs:boolean" minOccurs="0"/>
  274. </xs:sequence>
  275. </xs:complexType>
  276. <xs:element name="TransitTripInfoResponse">
  277. <xs:complexType>
  278. <xs:complexContent>
  279. <xs:extension base="AbstractResponse">
  280. <xs:sequence>
  281. <xs:element name="Body">
  282. <xs:complexType>
  283. <xs:sequence>
  284. <xs:element name="Ticket" type="TransitTicket" maxOccurs="unbounded"/>
  285. <xs:element name="maxSeats" type="xs:int"/>
  286. <xs:element name="freeSeats" type="xs:int"/>
  287. <xs:element name="Carrier" type="CarrierType" minOccurs="0"/>
  288. </xs:sequence>
  289. </xs:complexType>
  290. </xs:element>
  291. </xs:sequence>
  292. </xs:extension>
  293. </xs:complexContent>
  294. </xs:complexType>
  295. </xs:element>
  296. <xs:element name="TransitRouteInfoRequest">
  297. <xs:complexType>
  298. <xs:sequence>
  299. <xs:element name="RouteKey" type="RouteKey"/>
  300. </xs:sequence>
  301. </xs:complexType>
  302. </xs:element>
  303. <xs:complexType name="RouteItem">
  304. <xs:sequence>
  305. <xs:element name="order" type="xs:int"/>
  306. <xs:element name="stationName" type="SimpleStringType"/>
  307. <xs:element name="stationUid" type="UidType"/>
  308. <xs:element name="distance" type="xs:integer"/>
  309. <xs:element name="arrivalTime" type="xs:time"/>
  310. <xs:element name="dispatchTime" type="xs:time"/>
  311. </xs:sequence>
  312. </xs:complexType>
  313. <xs:element name="TransitRouteInfoResponse">
  314. <xs:complexType>
  315. <xs:complexContent>
  316. <xs:extension base="AbstractResponse">
  317. <xs:sequence>
  318. <xs:element name="Body">
  319. <xs:complexType>
  320. <xs:sequence>
  321. <xs:element name="name" type="SimpleStringType"/>
  322. <xs:element name="RouteItem" type="RouteItem" maxOccurs="unbounded"/>
  323. </xs:sequence>
  324. </xs:complexType>
  325. </xs:element>
  326. </xs:sequence>
  327. </xs:extension>
  328. </xs:complexContent>
  329. </xs:complexType>
  330. </xs:element>
  331. <xs:element name="TransitUpdateTicketRequest">
  332. <xs:complexType>
  333. <xs:sequence>
  334. <xs:element name="RouteKey" type="RouteKey"/>
  335. <xs:element name="Ticket" maxOccurs="unbounded">
  336. <xs:complexType>
  337. <xs:sequence>
  338. <xs:element name="ticketId" type="IDType" minOccurs="1"/>
  339. <xs:element name="isGone" type="xs:boolean" minOccurs="0"/>
  340. </xs:sequence>
  341. </xs:complexType>
  342. </xs:element>
  343. <xs:element name="Agent" type="Agent" minOccurs="0"/>
  344. </xs:sequence>
  345. </xs:complexType>
  346. </xs:element>
  347. <xs:element name="TransitUpdateTicketResponse">
  348. <xs:complexType>
  349. <xs:complexContent>
  350. <xs:restriction base="AbstractResponse"/>
  351. </xs:complexContent>
  352. </xs:complexType>
  353. </xs:element>
  354. </xs:schema>