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

374 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="12"/>
  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:sequence>
  57. </xs:complexType>
  58. <xs:complexType name="Agent">
  59. <xs:sequence>
  60. <xs:element name="name" type="NameType" minOccurs="0"/>
  61. <xs:element name="inn" type="InnType" minOccurs="1"/>
  62. </xs:sequence>
  63. </xs:complexType>
  64. <xs:complexType name="Seat">
  65. <xs:sequence>
  66. <xs:element name="id" type="IDType" minOccurs="1"/>
  67. <xs:element name="num" type="xs:int" minOccurs="1"/>
  68. </xs:sequence>
  69. </xs:complexType>
  70. <xs:simpleType name="GenderType">
  71. <xs:restriction base="xs:string">
  72. <xs:enumeration value="MALE"/>
  73. <xs:enumeration value="FEMALE"/>
  74. </xs:restriction>
  75. </xs:simpleType>
  76. <xs:simpleType name="ErrorCode">
  77. <xs:restriction base="xs:string">
  78. <xs:enumeration value="INTERNAL"/>
  79. <xs:enumeration value="NOT_FOUND"/>
  80. <xs:enumeration value="SEAT_OCCUPIED"/>
  81. <xs:enumeration value="PERSONAL_DATA_INCORRECT"/>
  82. </xs:restriction>
  83. </xs:simpleType>
  84. <xs:element name="SetStationInfoRequest">
  85. <xs:complexType>
  86. <xs:sequence>
  87. <xs:element name="stationId" type="IDType" minOccurs="1"/>
  88. <xs:element name="uid" type="UidType" minOccurs="1"/>
  89. </xs:sequence>
  90. </xs:complexType>
  91. </xs:element>
  92. <xs:element name="SetStationInfoResponse">
  93. <xs:complexType>
  94. <xs:complexContent>
  95. <xs:restriction base="AbstractResponse"/>
  96. </xs:complexContent>
  97. </xs:complexType>
  98. </xs:element>
  99. <xs:complexType name="TransitSeat">
  100. <xs:sequence>
  101. <xs:element name="seatId" type="IDType" minOccurs="1"/>
  102. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  103. </xs:sequence>
  104. </xs:complexType>
  105. <xs:element name="TransitBookRequest">
  106. <xs:complexType>
  107. <xs:sequence>
  108. <xs:element name="RouteKey" type="RouteKey"/>
  109. <xs:element name="dispatchStationUid" type="UidType"/>
  110. <xs:element name="arrivalStationUid" type="UidType"/>
  111. <xs:element name="date" type="xs:date"/>
  112. <xs:element name="seatId" type="IDType" maxOccurs="unbounded" minOccurs="1"/>
  113. <xs:element name="Agent" type="Agent" minOccurs="1"/>
  114. </xs:sequence>
  115. </xs:complexType>
  116. </xs:element>
  117. <xs:element name="TransitBookResponse">
  118. <xs:complexType>
  119. <xs:complexContent>
  120. <xs:extension base="AbstractResponse">
  121. <xs:sequence>
  122. <xs:element name="Body">
  123. <xs:complexType>
  124. <xs:sequence>
  125. <xs:element name="TransitTicket" minOccurs="1" maxOccurs="unbounded">
  126. <xs:complexType>
  127. <xs:sequence>
  128. <xs:element name="ticketId" type="IDType" minOccurs="1"/>
  129. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  130. </xs:sequence>
  131. </xs:complexType>
  132. </xs:element>
  133. </xs:sequence>
  134. </xs:complexType>
  135. </xs:element>
  136. </xs:sequence>
  137. </xs:extension>
  138. </xs:complexContent>
  139. </xs:complexType>
  140. </xs:element>
  141. <xs:simpleType name="RelationType">
  142. <xs:restriction base="xs:string">
  143. <xs:enumeration value="OWN"/>
  144. <xs:enumeration value="AGENT"/>
  145. <xs:enumeration value="ATP"/>
  146. </xs:restriction>
  147. </xs:simpleType>
  148. <xs:element name="TransitConfirmRequest">
  149. <xs:complexType>
  150. <xs:sequence>
  151. <xs:element name="RouteKey" type="RouteKey"/>
  152. <xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
  153. <xs:element name="Ticket" maxOccurs="unbounded" minOccurs="1">
  154. <xs:complexType>
  155. <xs:sequence>
  156. <xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="1"/>
  157. <xs:element name="Passenger" type="Passenger" minOccurs="0"/>
  158. <xs:element name="ticketSeries" type="xs:string" minOccurs="1" maxOccurs="1"/>
  159. <xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
  160. <xs:element name="price" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
  161. <xs:element name="relation" type="RelationType" minOccurs="0" maxOccurs="1"/>
  162. </xs:sequence>
  163. </xs:complexType>
  164. </xs:element>
  165. <xs:element name="Agent" type="Agent" minOccurs="0"/>
  166. </xs:sequence>
  167. </xs:complexType>
  168. </xs:element>
  169. <xs:element name="TransitConfirmResponse">
  170. <xs:complexType>
  171. <xs:complexContent>
  172. <xs:restriction base="AbstractResponse"/>
  173. </xs:complexContent>
  174. </xs:complexType>
  175. </xs:element>
  176. <xs:element name="TransitCancelRequest">
  177. <xs:complexType>
  178. <xs:sequence>
  179. <xs:element name="RouteKey" type="RouteKey"/>
  180. <xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
  181. <xs:element name="Agent" type="Agent" minOccurs="0"/>
  182. </xs:sequence>
  183. </xs:complexType>
  184. </xs:element>
  185. <xs:element name="TransitCancelResponse">
  186. <xs:complexType>
  187. <xs:complexContent>
  188. <xs:restriction base="AbstractResponse"/>
  189. </xs:complexContent>
  190. </xs:complexType>
  191. </xs:element>
  192. <xs:complexType name="CarrierType">
  193. <xs:sequence>
  194. <xs:element name="name" type="SimpleStringType" minOccurs="0"/>
  195. <xs:element name="inn" type="InnType" minOccurs="0"/>
  196. </xs:sequence>
  197. </xs:complexType>
  198. <xs:complexType name="Passenger">
  199. <xs:sequence>
  200. <xs:element name="firstName" type="xs:string" minOccurs="1"/>
  201. <xs:element name="lastName" type="xs:string" minOccurs="1"/>
  202. <xs:element name="middleName" type="xs:string" minOccurs="0"/>
  203. <xs:element name="docNum" type="xs:string" minOccurs="0"/>
  204. <xs:element name="docSeries" type="xs:string" minOccurs="0"/>
  205. <xs:element name="docTypeId" type="IDType" minOccurs="1"/>
  206. <xs:element name="birthday" type="xs:date" minOccurs="0"/>
  207. <xs:element name="citizenshipISO2" minOccurs="0">
  208. <xs:simpleType>
  209. <xs:restriction base="xs:string">
  210. <xs:length value="2"/>
  211. </xs:restriction>
  212. </xs:simpleType>
  213. </xs:element>
  214. <xs:element name="gender" type="GenderType" minOccurs="0"/>
  215. <xs:element name="phone" type="xs:string" minOccurs="0"/>
  216. <xs:element name="info" type="xs:string" minOccurs="0"/>
  217. </xs:sequence>
  218. </xs:complexType>
  219. <xs:element name="GetFreeSeatsRequest">
  220. <xs:complexType>
  221. <xs:choice>
  222. <xs:sequence>
  223. <xs:element name="RouteKey" type="RouteKey"/>
  224. <xs:element name="date" type="xs:date"/>
  225. <xs:element name="dispatchStationUid" type="UidType"/>
  226. <xs:element name="arrivalStationUid" type="UidType"/>
  227. </xs:sequence>
  228. <xs:sequence>
  229. <xs:element name="tripId" type="IDType" minOccurs="1"/>
  230. <xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
  231. <xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
  232. </xs:sequence>
  233. </xs:choice>
  234. </xs:complexType>
  235. </xs:element>
  236. <xs:element name="GetFreeSeatsResponse">
  237. <xs:complexType>
  238. <xs:complexContent>
  239. <xs:extension base="AbstractResponse">
  240. <xs:sequence>
  241. <xs:element name="Body">
  242. <xs:complexType>
  243. <xs:choice>
  244. <xs:element name="Seat" type="Seat" maxOccurs="unbounded"/>
  245. <xs:element name="TransitSeat" type="TransitSeat" maxOccurs="unbounded"/>
  246. </xs:choice>
  247. </xs:complexType>
  248. </xs:element>
  249. </xs:sequence>
  250. </xs:extension>
  251. </xs:complexContent>
  252. </xs:complexType>
  253. </xs:element>
  254. <xs:element name="TransitTripInfoRequest">
  255. <xs:complexType>
  256. <xs:sequence>
  257. <xs:element name="RouteKey" type="RouteKey"/>
  258. <xs:element name="date" type="xs:date"/>
  259. <xs:element name="dispatchStationUid" type="UidType" minOccurs="0"/>
  260. <xs:element name="arrivalStationUid" type="UidType" minOccurs="0"/>
  261. </xs:sequence>
  262. </xs:complexType>
  263. </xs:element>
  264. <xs:complexType name="TransitTicket">
  265. <xs:sequence>
  266. <xs:element name="dispatchStationUid" type="UidType"/>
  267. <xs:element name="dispatchStationName" type="SimpleStringType"/>
  268. <xs:element name="arrivalStationUid" type="UidType"/>
  269. <xs:element name="arrivalStationName" type="SimpleStringType"/>
  270. <xs:element name="Passenger" type="Passenger"/>
  271. <xs:element name="ticketId" type="IDType" minOccurs="1"/>
  272. <xs:element name="ticketSeries" type="xs:string" minOccurs="0" maxOccurs="1"/>
  273. <xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
  274. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  275. <xs:element name="Agent" type="Agent"/>
  276. <xs:element name="price" type="xs:decimal"/>
  277. <xs:element name="passengerGone" type="xs:boolean"/>
  278. </xs:sequence>
  279. </xs:complexType>
  280. <xs:element name="TransitTripInfoResponse">
  281. <xs:complexType>
  282. <xs:complexContent>
  283. <xs:extension base="AbstractResponse">
  284. <xs:sequence>
  285. <xs:element name="Body">
  286. <xs:complexType>
  287. <xs:sequence>
  288. <xs:element name="Ticket" type="TransitTicket" maxOccurs="unbounded"/>
  289. <xs:element name="maxSeats" type="xs:int"/>
  290. <xs:element name="freeSeats" type="xs:int"/>
  291. <xs:element name="Carrier" type="CarrierType" minOccurs="0"/>
  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="TransitRouteInfoRequest">
  301. <xs:complexType>
  302. <xs:sequence>
  303. <xs:element name="RouteKey" type="RouteKey"/>
  304. </xs:sequence>
  305. </xs:complexType>
  306. </xs:element>
  307. <xs:complexType name="RouteItem">
  308. <xs:sequence>
  309. <xs:element name="order" type="xs:int"/>
  310. <xs:element name="stationName" type="SimpleStringType"/>
  311. <xs:element name="stationUid" type="UidType"/>
  312. <xs:element name="distance" type="xs:integer"/>
  313. <xs:element name="arrivalTime" type="xs:time"/>
  314. <xs:element name="dispatchTime" type="xs:time"/>
  315. </xs:sequence>
  316. </xs:complexType>
  317. <xs:element name="TransitRouteInfoResponse">
  318. <xs:complexType>
  319. <xs:complexContent>
  320. <xs:extension base="AbstractResponse">
  321. <xs:sequence>
  322. <xs:element name="Body">
  323. <xs:complexType>
  324. <xs:sequence>
  325. <xs:element name="name" type="SimpleStringType"/>
  326. <xs:element name="RouteItem" type="RouteItem" maxOccurs="unbounded"/>
  327. </xs:sequence>
  328. </xs:complexType>
  329. </xs:element>
  330. </xs:sequence>
  331. </xs:extension>
  332. </xs:complexContent>
  333. </xs:complexType>
  334. </xs:element>
  335. </xs:schema>