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

368 lines
14 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:choice>
  229. </xs:complexType>
  230. </xs:element>
  231. <xs:element name="GetFreeSeatsResponse">
  232. <xs:complexType>
  233. <xs:complexContent>
  234. <xs:extension base="AbstractResponse">
  235. <xs:sequence>
  236. <xs:element name="Body">
  237. <xs:complexType>
  238. <xs:choice>
  239. <xs:element name="TransitSeat" type="TransitSeat" maxOccurs="unbounded"/>
  240. </xs:choice>
  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="TransitTripInfoRequest">
  249. <xs:complexType>
  250. <xs:sequence>
  251. <xs:element name="RouteKey" type="RouteKey"/>
  252. <xs:element name="date" type="xs:date"/>
  253. <xs:element name="dispatchStationUid" type="UidType" minOccurs="0"/>
  254. <xs:element name="arrivalStationUid" type="UidType" minOccurs="0"/>
  255. </xs:sequence>
  256. </xs:complexType>
  257. </xs:element>
  258. <xs:complexType name="TransitTicket">
  259. <xs:sequence>
  260. <xs:element name="dispatchStationUid" type="UidType"/>
  261. <xs:element name="dispatchStationName" type="SimpleStringType"/>
  262. <xs:element name="arrivalStationUid" type="UidType"/>
  263. <xs:element name="arrivalStationName" type="SimpleStringType"/>
  264. <xs:element name="Passenger" type="Passenger"/>
  265. <xs:element name="ticketId" type="IDType" minOccurs="1"/>
  266. <xs:element name="ticketSeries" type="xs:string" minOccurs="0" maxOccurs="1"/>
  267. <xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
  268. <xs:element name="seatNum" type="xs:int" minOccurs="1"/>
  269. <xs:element name="Agent" type="Agent"/>
  270. <xs:element name="price" type="xs:decimal"/>
  271. <xs:element name="isGone" type="xs:boolean" minOccurs="0"/>
  272. </xs:sequence>
  273. </xs:complexType>
  274. <xs:element name="TransitTripInfoResponse">
  275. <xs:complexType>
  276. <xs:complexContent>
  277. <xs:extension base="AbstractResponse">
  278. <xs:sequence>
  279. <xs:element name="Body">
  280. <xs:complexType>
  281. <xs:sequence>
  282. <xs:element name="Ticket" type="TransitTicket" maxOccurs="unbounded"/>
  283. <xs:element name="maxSeats" type="xs:int"/>
  284. <xs:element name="freeSeats" type="xs:int"/>
  285. <xs:element name="Carrier" type="CarrierType" minOccurs="0"/>
  286. </xs:sequence>
  287. </xs:complexType>
  288. </xs:element>
  289. </xs:sequence>
  290. </xs:extension>
  291. </xs:complexContent>
  292. </xs:complexType>
  293. </xs:element>
  294. <xs:element name="TransitRouteInfoRequest">
  295. <xs:complexType>
  296. <xs:sequence>
  297. <xs:element name="RouteKey" type="RouteKey"/>
  298. </xs:sequence>
  299. </xs:complexType>
  300. </xs:element>
  301. <xs:complexType name="RouteItem">
  302. <xs:sequence>
  303. <xs:element name="order" type="xs:int"/>
  304. <xs:element name="stationName" type="SimpleStringType"/>
  305. <xs:element name="stationUid" type="UidType"/>
  306. <xs:element name="distance" type="xs:integer"/>
  307. <xs:element name="arrivalTime" type="xs:time"/>
  308. <xs:element name="dispatchTime" type="xs:time"/>
  309. </xs:sequence>
  310. </xs:complexType>
  311. <xs:element name="TransitRouteInfoResponse">
  312. <xs:complexType>
  313. <xs:complexContent>
  314. <xs:extension base="AbstractResponse">
  315. <xs:sequence>
  316. <xs:element name="Body">
  317. <xs:complexType>
  318. <xs:sequence>
  319. <xs:element name="name" type="SimpleStringType"/>
  320. <xs:element name="RouteItem" type="RouteItem" maxOccurs="unbounded"/>
  321. </xs:sequence>
  322. </xs:complexType>
  323. </xs:element>
  324. </xs:sequence>
  325. </xs:extension>
  326. </xs:complexContent>
  327. </xs:complexType>
  328. </xs:element>
  329. </xs:schema>