openapi: 3.0.0 info: description: >- This is the set of endpoints to interact with the ČD (Czech Railways) booking system. Connections searching, booking tickets, seat reservations and more. The endpoints typically consume and produce JSON strings. version: "1.0.0" title: ČD API contact: email: cdapi@cdt.cz tags: - name: locations description: From/To/Via locations (destinations) for connection searching - name: connections description: Timetable connections (routes) - name: tickets description: Tickets booking - name: addservices description: 'Reservations of seats, couchettes, berths, bikes and more' - name: schemas description: Graphical schemas of trains - name: payments description: Payments and travel documents - name: documents description: Travel documents - name: refunds description: Refunds of travel documents - name: consts description: Fixed data to compose API requests servers: - url: /v1 paths: /locations: get: tags: - locations summary: Search locations of any type according to a name mask description: May be used to implement a locations whisperer. operationId: searchLocation parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/mask' - $ref: '#/components/parameters/maxObjCount' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/Locations' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' '/locations/{type}': get: tags: - locations summary: Search locations of a given type according to a name mask description: May be used to implement a locations whisperer. operationId: searchLocationOfSpecificType parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/type' - $ref: '#/components/parameters/mask' - $ref: '#/components/parameters/maxObjCount' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/Locations' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' '/locations/{type}/{key}': get: tags: - locations summary: Get details of a location with a given type and key description: May be used to check the key value. operationId: getLocation parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/type' - $ref: '#/components/parameters/key' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/Location' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /connections/set: post: tags: - connections summary: Search a connection based on its description description: Useful when connections are sought in the partner system. operationId: setConnections parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/desc' requestBody: $ref: '#/components/requestBodies/bookingRequestFull' responses: '201': description: created content: application/json: schema: $ref: '#/components/schemas/SearchConnectionInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /connections/search: post: tags: - connections summary: Search connections with given parameters description: General connections searching. operationId: searchConnections parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - name: fromType in: query description: 'from location type (1 = municipality, 2 = municipality part, 3 = station)' required: false schema: type: integer format: int32 enum: [1,2,3] default: 3 - name: from in: query description: from location key required: true schema: type: integer format: int32 minimum: 1 example: 5457076 - name: toType in: query description: 'to location type (1 = municipality, 2 = municipality part, 3 = station)' required: false schema: type: integer format: int32 enum: [1,2,3] default: 3 - name: to in: query description: to location key required: true schema: type: integer format: int32 minimum: 1 example: 5433425 - name: viaType in: query description: 'via location type (1 = municipality, 2 = municipality part, 3 = station)' required: false schema: type: integer format: int32 enum: [1,2,3] default: 3 - name: via in: query description: via location key required: false schema: type: integer format: int32 minimum: 1 - name: changeType in: query description: 'change location type (1 = municipality, 2 = municipality part, 3 = station)' required: false schema: type: integer format: int32 enum: [1,2,3] default: 3 - name: change in: query description: change location key required: false schema: type: integer format: int32 minimum: 1 - $ref: '#/components/parameters/dateTime' - name: prev in: query description: false = connections departing after the given time (default), true = connections arriving before the given time required: false schema: type: boolean - $ref: '#/components/parameters/maxConnCount' requestBody: $ref: '#/components/requestBodies/connParmsAndBookingRequest' responses: '201': description: created content: application/json: schema: $ref: '#/components/schemas/SearchConnectionInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /connections/{handle}: post: tags: - connections summary: Get a page from a connections list with a given handle description: Allows browsing a connection list. To be used after /connections/search. operationId: getConnectionsPage parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/pathHandle' - $ref: '#/components/parameters/connIdOptional' - name: prev in: query description: false = connections following the connection connId (default), true = connections preceding the connection connId required: false schema: type: boolean - name: listedCount in: query description: count of the displayed connections to be kept in the result required: false schema: type: integer format: int32 default: 0 - $ref: '#/components/parameters/maxAddConnCount' requestBody: $ref: '#/components/requestBodies/bookingRequestSimple' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/ConnectionListInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /connections/{handle}/{connId}: post: tags: - connections summary: Get details of a connection connId from list with given handle description: Gets details of a connection and respective price offer if required. operationId: getConnection parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/pathHandle' - $ref: '#/components/parameters/pathConnId' requestBody: $ref: '#/components/requestBodies/bookingRequestFull' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/ConnectionInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /tickets: post: tags: - tickets summary: Get a price offer for a connection description: Recalculates a price offer for a given connection and creates a bookingId if requir. operationId: createPriceOffersForConnection parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/handle' - $ref: '#/components/parameters/connId' requestBody: $ref: '#/components/requestBodies/bookingRequestFull' responses: '201': description: created content: application/json: schema: $ref: '#/components/schemas/PriceOffersInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /tickets/{bookingId}: get: tags: - tickets summary: Recalculate the price offer for a given bookingId operationId: computePriceOffers parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' - $ref: '#/components/parameters/priceRequestFlags' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/PriceOffersInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' put: tags: - tickets summary: Select a particular price offer (alternative ticket) description: Supports selection among alternative available ticket types. operationId: selectOfferType parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' - $ref: '#/components/parameters/offerType' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/PriceOfferInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' delete: tags: - tickets summary: Release a price offer with a given bookingId description: Releases a price offer and subsequently makes the bookingId invalid. operationId: releasePriceOffer parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' responses: '200': description: 'the code 200 is returned also in the case when the price offer does not exist (e.g. hes already been released)' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /tickets/{bookingId}/info: get: tags: - tickets summary: Get info about price offer with a given bookingId operationId: getPriceOfferInfo parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/FixedPriceOfferInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /tickets/{bookingId}/book: put: tags: - tickets summary: Book all reservations within a price offer with a given bookingId description: Should be called prior to storing the offer to the basket and prior to payment. operationId: fixPriceOffer parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/name' - $ref: '#/components/parameters/inCardNumber' - $ref: '#/components/parameters/birthDate' - $ref: '#/components/parameters/companyName' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/FixedPriceOfferInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /reservations/{bookingId}: get: tags: - addservices summary: Get possible and selected reservations within a price offer with a given bookingId description: Evaluation of possible and selected reservations on the trains of connection. operationId: getReservationsInfo parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/ReservationsInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' put: tags: - addservices summary: Set reservations within a price offer with a given bookingId description: Setting reservations on the trains of connection operationId: setReservations parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' requestBody: $ref: '#/components/requestBodies/reservationInfo' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/ReservationsInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /bikeprice/{bookingId}: post: tags: - addservices summary: Precalculate price for bike transport description: Caclulates preliminary price for bike transport and eventually storage during transport (w/o reservations) operationId: computeBikeRoutePrice parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' - $ref: '#/components/parameters/bikesCount' requestBody: $ref: '#/components/requestBodies/bikesInfo' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/BikeRoutePrice' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /bikes/{bookingId}: put: tags: - addservices summary: Set bike transport description: Setting bike transport informations for price offer with a given bookingId operationId: setBikes parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' - $ref: '#/components/parameters/bikesCount' requestBody: $ref: '#/components/requestBodies/bikesInfo' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/AvailableAdditionalServices' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /dogsprice/{bookingId}: get: tags: - addservices summary: Precalculate price for dogs transport description: Caclulates preliminary price for dogs transport operationId: computeDogsPrice parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' - $ref: '#/components/parameters/dogsCount' - $ref: '#/components/parameters/direction' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/LuggageDogPrice' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /dogs/{bookingId}: put: tags: - addservices summary: Set dogs transport description: Setting dogs transport informations for price offer with a given bookingId operationId: setDogs parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' - $ref: '#/components/parameters/dogsCount' - $ref: '#/components/parameters/direction' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/AvailableAdditionalServices' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /addservices/{bookingId}: get: tags: - addservices summary: Get possible and selected additional services (reservations, bikes) within a price offer with a given bookingId description: Evaluation of possible and selected additional services on the trains of connection. operationId: getAvailableAdditionalServices parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/AvailableAdditionalServices' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /schemas: post: tags: - schemas summary: Get a graphical train reservation schema operationId: getTrainSchema parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' requestBody: $ref: '#/components/requestBodies/schemaRequest' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/CoachesSchema' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /payments/{bookingId}: put: tags: - payments summary: Get travel documents after payment of a price offer with a given bookingId description: | Marks the price offer documents as sold and returns travel documents data. The request must be signed, it must contain the X-Hash parameter with signature (URL encoded Base64). The RSA SHA1 hash of the string "payments|{bookingId}|{partnerBookingId}|{partnerMarket}" gets checked, alternatively "payments|{bookingId}" or "payments|{bookingId}|{partnerBookingId}" or "payments|{bookingId}||{partnerMarket}", in UTF-8. operationId: sellTickets parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/xHash' - $ref: '#/components/parameters/bookingId' - $ref: '#/components/parameters/partnerBookingId' - $ref: '#/components/parameters/partnerMarket' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/SellInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' get: tags: - payments summary: Get sold travel documents data for a price offer with a given bookingId description: Getting information about previously sold documents (incl. refund indications). operationId: getSoldTickets parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/bookingId' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/SellInfo' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /documents/{documentId}: get: tags: - documents summary: Get a travel document with a given documentId description: Returns PDF file or PNG image operationId: getDocumentData parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/documentId' responses: '200': description: PDF or PNG file returned content: application/pdf: schema: type: string format: binary image/png: schema: type: string format: binary '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /refundpossible/{ticketId}: get: tags: - refunds summary: Check the possibility of returning a ticket with a given ticketId operationId: getRefundInfo parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/ticketId' - $ref: '#/components/parameters/emailRefund' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/RefundResult' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /refunds/{ticketId}: post: tags: - refunds summary: Refund a ticket with a given ticketId description: | Posts a ticket refund request. The request must be signed, it must contain the X-Hash parameter with signature (URL encoded Base64). The RSA SHA1 hash of the string "refunds|{ticketId}|{email}" gets checked in UTF-8. operationId: refundTicket parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/xHash' - $ref: '#/components/parameters/ticketId' - $ref: '#/components/parameters/emailRefund' responses: '200': description: success '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': description: RefundErrors content: application/json: schema: $ref: '#/components/schemas/RefundResult' default: $ref: '#/components/responses/Default' get: tags: - refunds summary: Get a ticket refund status operationId: getRefundInfo parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/ticketId' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/RefundsInfos' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /refunds: get: tags: - refunds summary: Get refunded tickets status changes since a given time operationId: getRefundsInfos parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/dateTimeFrom' - $ref: '#/components/parameters/lastId' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/RefundsInfos' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /releaseres/{sjtTicketId}: post: tags: - refunds summary: Releases a OneTicket reservation with a given ticketId description: | Posts a release request to a OneTicket reservation.
This operation is available only for CENDIS partner and only for releasing reservations issued on CD ticket office.
This call only releases the allocated place in reservation system CD, without regard to claim status.
The request must be signed, it must contain the X-Hash parameter with signature (URL encoded Base64). The RSA SHA1 hash of the string "releaseres|{sjtTicketId}" gets checked in UTF-8. operationId: releaseSjtRes parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/xHash' - $ref: '#/components/parameters/sjtTicketId' responses: '200': description: success '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/Default' /consts/passengers: get: tags: - consts summary: Possible passenger types and respective reductions operationId: getPassengerTypes parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/PassengerMapData' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' /consts/locations/{type}: get: tags: - consts summary: Possible connection destinations of a given type operationId: getLocations parameters: - $ref: '#/components/parameters/xUser' - $ref: '#/components/parameters/xDesc' - $ref: '#/components/parameters/xIP' - $ref: '#/components/parameters/xLang' - $ref: '#/components/parameters/type' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/Locations' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' default: $ref: '#/components/responses/Default' components: parameters: xUser: name: X-User in: header required: true description: partner access key (identification) schema: type: string example: 'test' xDesc: name: X-Desc in: header required: false description: optional partner description (e.g. application version) schema: type: string xIP: name: X-IP in: header required: false description: end user IP address (if not equal to the caller address) schema: type: string xLang: name: X-Lang in: header required: false description: 'client language (cs = Czech, en = English, de = German)' schema: type: string enum: [cs, en, de] default: cs xCurrency: name: X-Currency in: header required: false description: 'currency code (CZK = Czech crown)' schema: type: string enum: [CZK] default: CZK xHash: name: X-Hash in: header required: true description: signature of a request or a reply schema: type: string example: 'podpis' type: name: type in: path description: 'location type limitation (1 = municipality, 2 = municipality part, 3 = station)' required: true schema: type: integer format: int32 enum: [1,2,3] example: 3 key: name: key in: path description: location key (number) required: true schema: type: integer format: int32 example: 5457076 bookingId: name: bookingId in: path description: ticket offer identification required: true schema: type: string documentId: name: documentId in: path description: travel document identification required: true schema: type: string ticketId: name: ticketId in: path description: six digit ČD transaction code required: true schema: type: string sjtTicketId: name: sjtTicketId in: path description: Single tariff system (OneTicket) transaction code (in format CD12345.abcdef) required: true schema: type: string pathHandle: name: handle in: path description: connection list access handle required: true schema: type: integer format: int32 pathConnId: name: connId in: path description: connection identification required: true schema: type: integer format: int32 mask: name: name in: query description: string mask to check against location names required: false schema: type: string example: 'ce bu' maxObjCount: name: maxCount in: query description: maximum count of locations to be returned required: false schema: type: integer minimum: 1 maximum: 100 default: 10 maxConnCount: name: maxCount in: query description: 'maximum count of connections to be returned (-1 = none, 0 = all found)' required: false schema: type: integer format: int32 default: 5 maxAddConnCount: name: maxCount in: query description: maximum count of added connections required: false schema: type: integer format: int32 default: 5 desc: name: desc in: query description: | obligatory connection description 1. particular trains within connection are separated with „*“ (asterisk), 2. particular items within a train are separated with „,“ (comma), 3. items within a train are (all obligatory):
a. train number,
b. departure date,
c. departure station key,
d. arrival station key,
e. departure time 0:00 to 23:59,
f. arrival time 0:01 to 24:00 required: true schema: type: string example: '506,2019-04-10,5434364,5457076,13:15,16:19' handle: name: handle in: query description: connection list access handle required: true schema: type: integer format: int32 connId: name: connId in: query description: connection identification required: true schema: type: integer format: int32 connIdOptional: name: connId in: query description: optional reference connection identification required: false schema: type: integer format: int32 dateTime: name: dateTime in: query description: 'date and time of the journey (yyyy-MM-dd H:mm or d.M.yyyy H:mm, unspecified = now)' required: false schema: type: string dateTimeFrom: name: dateTime in: query description: 'moment (date and time) since which the refund information should be returned' required: false schema: type: string lastId: name: lastId in: query description: | last event ID (information about refunds after this ID should be returned); this parameter, if specified, takes precedence over dateTimeFrom parameter required: false schema: type: integer format: int32 priceRequestFlags: name: flags in: query description: > request flags (original flags are used if not specified); a bit combination of mode and flags
Mode is one of the values:
0 - connection mode (preferably on-line price, ticket counter price if not available),
1 - ticket mode (preferably on-line price, none if not available),
2 - ticket counter mode (ticket counter price),
3 - combined mode (both on-line and ticket counter prices if available),
and these flags may be added:
16 - Business class if possible (additional flag for 1st class journey),
64 - delayed train offers accepted,
4096 - basic price information only (e.g. for listing of connections),
8192 - reservation mode (ticket price not included, only possible reservations are offered),
32768 - optimal offer only,
65536 - create price offer ID (bookingId),
131072 - only optimal + one alternative offers,
524288 - no couchttes and berths,
2097152 - the alternative offer only (the other from 131072),
4194304 - optimal + alternative + OneTicket offer if possible Flags 32768, 131072, 2097152 and 4194304 have sense, only if 4096 is not set, and only one of them may be used. If none of them is set, the default is 131072. required: false schema: type: integer format: int32 offerType: name: offerType in: query description: > offer type; one ot the values:
1 = optimal ČD offer,
2 = flexi offer,
3 = 1st class proposal,
4 = "buy earlier" proposal,
5 = basic tickets offer,
7 = In card 25 proposal,
8 = In card 50 proposal,
9 = monthly commuter ticket,
10 = weekly pass,
11 = network ticket,
12 = alternative offer,
13 = alternative sleeping offer,
14 = ticket only for part of the route,
15 = network ticket, except for Summer tickets,
16 = ten-day commuter ticket,
20 = optimal offer with Integrated public transport system (IDS) ticket,
21 = alternative offer with Integrated public transport system (IDS) ticket,
22 = offer with Integrated public transport system (IDS) network ticket,
23 = offer with alternative Integrated public transport system (IDS) network ticket,
25 = Single tariff system (OneTicket) ticket
required: false schema: type: integer format: int32 example: 1 email: name: email in: query description: the customer e-mail required: true schema: type: string emailRefund: name: email in: query description: the customer e-mail (just to check; must be the same as set during the ticket purchase) required: true schema: type: string name: name: name in: query description: 'the customer name to be printed on travel documents, optional if In Karta number is required' required: false schema: type: string inCardNumber: name: inCardNumber in: query description: 'In Karta number, obligatory when required by the passenger reduction' required: false schema: type: integer format: int64 birthDate: name: birthDate in: query description: 'birthdate of the In Karta holder, obligatory when required by the passenger reduction' required: false schema: type: string companyName: name: companyName in: query description: 'In Karta company, obligatory when required by the passenger reduction' required: false schema: type: string partnerBookingId: name: partnerBookingId in: query description: optional transaction key set by the partner system (to be printed on travel documents) required: false schema: type: string partnerMarket: name: partnerMarket in: query description: optional identification of the partner's commission model. required: false schema: type: string bikesCount: name: count in: query description: 'count of bikes; 0 or missing = no bikes' required: false schema: type: integer format: int32 dogsCount: name: count in: query description: 'count of dogs; 0 or missing = no dogs' required: false schema: type: integer format: int32 direction: name: direction in: query description: 'direction(s) to be counted (2 = there, 4 = back, 1 = there and back)' required: false schema: type: integer format: int32 requestBodies: bookingRequestSimple: content: application/json: schema: type: object properties: bookingRequest: $ref: '#/components/schemas/BookingRequest' example: bookingRequest: flags: 4097 class: 2 passengers: - count: 1 id: 5 bookingRequestFull: content: application/json: schema: type: object properties: bookingRequest: $ref: '#/components/schemas/BookingRequest' example: bookingRequest: flags: 196609 class: 2 passengers: - count: 1 id: 5 connParmsAndBookingRequest: content: application/json: schema: type: object properties: connParms: $ref: '#/components/schemas/ConnectionParmsInfo' bookingRequest: $ref: '#/components/schemas/BookingRequest' example: connParms: maxChange: 4 bookingRequest: flags: 4097 class: 2 passengers: - count: 1 id: 5 reservationInfo: content: application/json: schema: type: object properties: reservationInfo: $ref: '#/components/schemas/SetReservationInfo' bikesInfo: content: application/json: schema: type: object properties: bikesInfo: $ref: '#/components/schemas/SetBikesInfo' schemaRequest: content: application/json: schema: type: object properties: schemaRequest: $ref: '#/components/schemas/SchemaRequest' responses: BadRequest: description: Bad request content: application/json: schema: $ref: '#/components/schemas/Exception' Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Exception' Forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Exception' NotFound: description: Not found content: application/json: schema: $ref: '#/components/schemas/Exception' Default: description: server error content: application/json: schema: $ref: '#/components/schemas/Exception' schemas: Locations: type: object properties: data: type: array items: $ref: '#/components/schemas/Location' Location: type: object properties: name: type: string description: location name type: type: integer format: int32 description: 'location type (1 = municipality, 2 = municipality part, 3 = station)' typeName: type: string description: location type name state: type: string description: country name region: type: string description: district (region) name key: type: integer format: int32 description: location key LocationStatus: type: object properties: location: $ref: '#/components/schemas/Location' status: type: integer format: int32 description: 'location searching status: 0 = OK, 1 = not found, 2 = not unique, 4 = no stations at the vicinity of the location' TrainInfo: type: object properties: trainNum: type: string description: train number trainName: type: string description: train name trainType: type: string description: train type trainTypeName: type: string description: train type name fixedCodes: type: array items: $ref: '#/components/schemas/FixedCodeInfo' info: type: string description: 'additional Location information' RemarksInfo: type: object properties: remarks: type: array items: $ref: '#/components/schemas/RemarkInfo' RemarkInfo: type: object properties: type: type: integer format: int32 description: > remark type, a bit combination of the following flags:
2 = operator,
8 = information remark,
16 = important remark
text: type: string description: remark text FixedCodeInfo: type: object properties: text: type: string description: remark sign (abbreviation) as text code: type: integer format: int32 description: remark sign as numeric code desc: type: string description: text description descExt: type: string description: text description with possible section limitation StationInfo: type: object properties: name: type: string description: station name fixedCodes: type: array items: $ref: '#/components/schemas/FixedCodeInfo' description: fixed codes key: type: integer format: uint description: station key TrainRouteInfo: type: object properties: station: $ref: '#/components/schemas/StationInfo' fixedCodes: type: array items: $ref: '#/components/schemas/FixedCodeInfo' description: fixed codes related to train/station arr: type: string description: 'arrival date and time (if defined), format yyyy-mm-dd H:mm' dep: type: string description: 'departure date and time (if defined), format yyyy-mm-dd H:mm' flags: type: integer format: ushort description: > train stopping flags, a bit combination of the following values:
1 - no exit,
2 - no boarding,
other (undocumented) values may by present dist: type: string description: 'continuous distance (if defined)' TrainDataInfo: type: object properties: train: $ref: '#/components/schemas/TrainInfo' route: type: array items: $ref: '#/components/schemas/TrainRouteInfo' description: train route remarks: $ref: '#/components/schemas/RemarksInfo' ConnectionParmsInfo: type: object properties: maxChange: type: integer format: int32 description: max. count of changes (default = 4) maxTime: type: integer format: int32 description: max. time for a change [minutes] (default = 240) minTime: type: integer format: int32 description: min. time for a change [minutes] (default = individually set by data) useBeds: type: boolean description: 'use berths/couchettes (true = berths/couchettes overnight, false = seats only, default = no limit)' deltaMax: type: integer format: int32 description: maximum difference from the shortest distance in percent (default = no limit) fcSearchIds: type: array items: type: integer format: int32 description: > codes of special connection properties.
- positive code must be met by all connection trains,
- negative code must be met by at least one connection train.
Possible code values are:
1 - for passengers using wheelchairs,
2 - for passengers with children,
3 - for passengers with bike,
4 - ČD trains,
5 - no special historic trains,
6 - ČD and affiliate operators trains,
7 - trains without obligatory reservation,
9 - trains having (also) 1st class carriages,
10 - trains having a restaurant carriage, bistro carriage or in-seat refreshment service,
11 - carriage for transporting passenger automobiles and motocycles,
12 - quiet compartment,
13 - power sockets,
14 - WiFi,
15 - ladies' compartment,
16 - trains having (also) sleeping or couchette car,
17 - ČD trains and non-commercial trains of other carriers,
18 - train integrated into the Single tariff system (OneTicket) trTypeIds: type: array items: type: integer format: int32 description: > transport means limitation.
Possible values are:
150 - highest-quality long-distance trains (SuperCity, railjet, ICE, ...),
151 - higher-quality long-distance trains (EC, IC, Ex, ...),
152 - long-distance trains (R, ...),
153 - regional trains (Sp, Os, ...),
154 - bus,
155 - ferries,
156 - other
SearchConnectionInfo: type: object properties: result: type: integer format: int32 description: > search status; unspecified = OK, error otherwise and particular bits have the following meaning:
1 - locations from/to OK, but no connection found
2 - journey date out of admissible range
16 - locations form/via/to overlapping (equal)
32 - location from invalid
1024 - location to invalid
32768 - location via invalid
1048576 - location change invalid
16777216 - searching timeout (1 always set as well)
33554432 - connections list empty due to missing price offer
67108864 - connections list empty due to exceeding maximum passengers count
134217728 - connections list empty due to a passengers combination that cannot be processed
from: $ref: '#/components/schemas/LocationStatus' to: $ref: '#/components/schemas/LocationStatus' via: type: array items: $ref: '#/components/schemas/LocationStatus' change: type: array items: $ref: '#/components/schemas/LocationStatus' handle: type: integer format: int32 description: 'connection list handle' connInfo: $ref: '#/components/schemas/ConnectionListInfo' ConnectionListInfo: type: object properties: allowPrev: type: boolean description: 'previous connections may be available' allowNext: type: boolean description: 'next connections may be available' connections: type: array items: $ref: '#/components/schemas/ConnectionInfo' ConnectionInfo: type: object properties: id: type: integer format: int32 description: connection ID trains: type: array items: $ref: '#/components/schemas/ConnectionTrainInfo' remarks: $ref: '#/components/schemas/RemarksInfo' priceOffers: $ref: '#/components/schemas/PriceOffersInfo' ConnectionTrainInfo: type: object properties: trainData: $ref: '#/components/schemas/TrainDataInfo' linkDist: type: integer format: int32 description: move distance in minutes from previous connection train distance: type: string description: distance passed [m or km] timeLength: type: string description: time length [h and/or min] delay: type: string description: 'delay (number = delay in minutes, 0 = on time, unspecified = delay unknown)' stdChange: type: integer format: int32 description: | standard change time in minutes at the train departure station
PassengerMapData: type: object properties: passengers: type: array items: $ref: '#/components/schemas/PassengerMapPassenger' countries: type: array items: $ref: '#/components/schemas/Country' PassengerMapPassenger: type: object properties: id: type: integer format: int32 description: unique passenger type ID typeName: type: string description: passenger type name ageFrom: type: integer format: int32 description: minimum age ageTo: type: integer format: int32 description: maximum age allowedCards: type: array items: type: integer format: int32 description: list of admissible reduction IDs isDefault: type: boolean description: default passenger type indication Country: type: object properties: name: type: string description: country name cards: type: array items: $ref: '#/components/schemas/Card' description: complete admissible reduction ID list Card: type: object description: single reduction type data properties: id: type: integer format: int32 description: reduction ID name: type: string description: reduction name collectDataType: type: integer format: int32 enum: [0,1,2] default: 0 description: | data needed to use a reduction.
Possible values:
0 - no additional specification required,
1 - In Karta number and birthdate required,
2 - In Karta number and company name required BookingRequest: type: object description: price offer request parameters properties: connHandleThere: type: integer format: int32 description: optional handle of connection list for direction THERE connIdThere: type: integer format: int32 description: optional connection ID for direction THERE flags: type: integer format: int32 description: > request flags (default flags are used when unspecified); a bit combination of mode and flags
Mode is one of the values:
0 - connection mode (preferably on-line price, ticket counter price if not available),
1 - ticket mode (preferably on-line price, none if not available),
2 - ticket counter mode (ticket counter price),
3 - combined mode (both on-line and ticket counter prices if available),
and these flags may be added:
16 - Business class if possible (additional flag for 1st class journey),
64 - delayed train offers accepted,
4096 - basic price information only (e.g. for listing of connections),
8192 - reservation mode (ticket price not included, only possible reservations are offered),
32768 - optimal offer only,
65536 - create price offer ID (bookingId),
131072 - only optimal + one alternative offers,
524288 - no couchttes and berths,
2097152 - the alternative offer only (the other from 131072),
4194304 - optimal + alternative + OneTicket offer if possible Flags 32768, 131072, 2097152 and 4194304 have sense, only if 4096 is not set, and only one of them may be used. The complete offer is returned in the case that none is used (i.e. optimal + all alternatives). example: 4097 class: type: integer format: int32 description: 'class; 0 or unspecified = default' example: 2 passengers: type: array items: $ref: '#/components/schemas/Passenger' description: 'passenger data (unspecified = 1 adult)' example: count: 1 id: 5 Passenger: type: object description: 'one passenger data' properties: count: type: integer format: int32 description: 'passengers count' id: type: integer format: int32 description: 'passenger type ID (see consts)' cards: type: array items: type: integer format: int32 description: 'reduction IDs (see consts) or unspecified' age: type: integer format: int32 minimum: 1 maximum: 200 description: 'optional age' PriceOffersInfo: type: object description: 'price offers for a single (optionally return) connection' properties: bookingId: type: string description: 'price offer handle or unspecified when not assigned' offers: type: array items: $ref: '#/components/schemas/PriceOfferInfo' description: 'price offers list or unspecified' flags: type: integer format: int32 description: > offer flags; a bit combination of the following flags:
2 - international ticket included availClasses: type: integer format: int32 description: > available classes; a bit combination of the following flags:
1 - 1st class,
2 - 2nd class,
4 - Business class errCode: type: integer format: int32 description: error code errText: type: string description: error description PriceOfferInfo: type: object description: 'single price offer (for ticket selection)' properties: offerType: type: integer format: int32 description: > 'price offer type; one of the following values:
0 - unspecified,
1 - optimal,
2 - flexible,
5 - basic,
11 - network,
12 - alternative,
20 - regional (IDS),
25 - Single tariff system (OneTicket)' basicPriceFlags: type: integer format: int32 description: > price offer flags; a bit combination of the following flags:
1 - ticket counter price,
2 - can proceed with the offer (is valid),
4 - price from indication,
8 - reservation fee included,
16 - Business class reservation fee included,
32 - price in the next step,
64 - reservation free of charge,
128 - reservation possible,
512 - price not available,
1024 - large group offer (for order),
2048 - 1st class supplement mode (a combination of 1st and 2nd class tickets),
4096 - Business class reservation may be available,
16384 - global price,
32768 - ticket with an Obligatory Train,
65536 - regional (IDS) ticket,
262144 - Single tariff system (OneTicket) ticket,
8388608 - offer for delayed train. price: type: integer format: int32 description: 'price in hellers' tickets: type: array items: $ref: '#/components/schemas/OfferTicket' description: 'particular tickets wthin the offer' timeoutMin: type: integer format: int32 description: 'offer validity [minutes]' FixedPriceOfferInfo: type: object description: 'Fixed price offer data' properties: price: type: integer format: int32 description: 'the result price in hellers' ticketsIds: type: array items: $ref: '#/components/schemas/TicketIdInfo' description: 'ČD transaction codes for ticket refunds (at some circumstances a single document may contain several transaction codes)' OfferTicket: type: object description: 'simplified information about a single ticket (for price selection)' properties: offerTicketType: type: integer format: int32 description: > item type:
0 - free of charge,
1 - national ticket,
3 - international ticket NRT,
4 - special international ticket (VJE),
5 - IRT,
6 - obligatory reservation,
7 - Business class reservation,
11 - other reservation,
12 - regional cross-border (MPS) ticket,
13 - regional (IDS) ticket,
14 - Single tariff system (OneTicket) ticket,
15 - obligatory OneTicket reservation,
16 - other OneTicket reservation. summaryItemType: type: integer format: int32 description: 'classification: 0 = none, 1 = ticket, 2 = reservation, 3 = ticket and reservation' documentId: type: integer format: int32 description: 'internal document ID' reducId: type: integer format: int32 description: 'internal reduction ID' service: type: integer format: int32 description: 'service type (reservation only; 1 = seat, 2 = couchette, 3 berth)' km: type: integer format: int32 description: 'kilometers (or 0) - for conditions' documentName: type: string description: 'document name' reducName: type: string description: 'reduction name' class: type: integer format: int32 description: 'class (1,2) or unspecified when not to be listed' persons: type: integer format: int32 description: 'ticket passengers count (in the tariff sense)' personsExact: type: integer format: int32 description: 'handled passengers count' validFrom: type: string description: 'start of validity (date and time)' validTo: type: string description: 'end od validity (date and time); unspecified = default' priceKc: type: integer format: int32 description: 'price in hellers or unspecified' priceEur: type: integer format: int32 description: 'price in EUR cents or unspecified' obligatoryTrain: type: integer format: int32 description: 'obligatory train number or 0 (for IRT tickets see firstTrainThereIdx/firstTrainBackIdx)' obligatoryTrainType: type: string description: 'obligatory train type (for IRT tickets see firstTrainThereIdx/firstTrainBackIdx)' example: 'R' obligatoryTrainFrom: type: string description: 'obligatory section start station name' obligatoryTrainTo: type: string description: 'obligatory section end station name' bcsStationKey: type: integer format: int32 description: 'border crossing station key nebo 0' firstTrainThereIdx: type: integer format: int32 description: 'first train index in direction THERE or unspecified' lastTrainThereIdx: type: integer format: int32 description: 'last train index in direction THERE or unspecified' firstTrainBackIdx: type: integer format: int32 description: 'first train index in direction BACK or unspecified' lastTrainBackIdx: type: integer format: int32 description: 'last train index in direction BACK or unspecified' usedCompartments: type: array items: type: string description: 'used compartment types, 6-character strings; see UIC element 51 (reservation only)' AvailableAdditionalServices: type: object description: 'possible and selected additional services (including reservations)' properties: dogs: $ref: '#/components/schemas/LuggageDogInfo' reservations: $ref: '#/components/schemas/ReservationsInfo' bikes: $ref: '#/components/schemas/BikesInfo' LuggageDogInfo: type: object description: 'possible and selected luggage or dogs transport information' properties: count: type: integer format: int32 description: 'set number of dogs or luggage' price: type: integer format: int32 description: 'price for dogs or luggage transport in hellers' direction: type: integer format: int32 description: 'set travel direction(s) for dogs or luggage transport (2 = there, 4 = back, 1 = there and back)' singlePrice: type: integer format: int32 description: 'unit price for dogs or luggage transport in hellers' maxCount: type: integer format: int32 description: 'maximum possible number of dogs or luggage' possibleDirections: type: integer format: int32 description: > possible directions for dogs or luggage transport; a combination of the following flags:
1 - there and back,
2 - there,
4 - back tickets: type: array items: $ref: '#/components/schemas/OfferTicket' description: 'travel documents for dogs or luggage transport' err: type: integer format: int32 description: | error setting luggage or dogs; possible values:
1 - general error,
2 - required service not possible with the reservation service set,
3 - required service not compatible with reserved compartment type,
4 - impermissible combination of services,
5 - service not admissible in OneTicket mode LuggageDogPrice: type: object description: 'price for dogs transport' properties: price: type: integer format: int32 description: 'price for dogs transport in hellers' err: type: integer format: int32 description: | error calculating dogs price; possible values:
1 - general error,
2 - required dogs transport type not possible with the reservation service set,
3 - required dogs transport type not compatible with reserved compartment type,
4 - impermissible combination of services,
5 - service not admissible in OneTicket mode ReservationsInfo: type: object description: 'possible and selected reservations information' properties: trains: type: array items: $ref: '#/components/schemas/TrainReservationInfo' description: 'information about reservations on trains' TrainReservationInfo: type: object description: 'possible and selected reservations information on one train' properties: trainId: type: integer format: int32 description: 'train ID within connection' back: type: boolean description: 'way BACK?' trainName: type: string description: 'combined train name (type + number + name)' trainTypeId: type: integer format: int32 description: 'train type ID' stationFrom: type: string description: 'from station name' stationTo: type: string description: 'to station name' schemaInfo: $ref: '#/components/schemas/TrainReservationSchemaInfo' #description: 'train reservation graphical schema (if available)' possibleReservations: $ref: '#/components/schemas/PossibleReservationsInfo' #description: 'possible reservations information; train not subject to reservation when missing' selectedReservations: $ref: '#/components/schemas/SelectedReservationInfoWithResult' #description: 'selected reservations information; nothing selected when missing' TrainReservationSchemaInfo: type: object description: 'information necessary to display train reservation schema' properties: trainResNum: type: string description: 'train number for schema invoke; may be defined also when schema is not available' fromResNum: type: integer format: int32 description: 'station from reservation key' toResNum: type: integer format: int32 description: 'station to reservation key' depDateTime: type: string description: 'date and time of departure from origin station' PossibleReservationsInfo: type: object description: 'data about possible reservations' properties: resTypes: type: integer format: int32 description: > possible reservation types; a combination of the following flags:
1 - reservation selected,
2 - automatic seat,
4 - schema available,
8 - designated seat,
16 - adjacent seat,
256 - automatic couchette,
512 - automatic ladies couchette,
32768 - automatic berth,
65536 - automatic berth deluxe
0 = reservations not possible minCount: type: integer format: int32 description: 'minimum count od items' maxCount: type: integer format: int32 description: 'maximum count od items' obligatory: type: boolean description: 'is reservation obligatory?' globalPrice: type: boolean description: 'IRT ticket?' seatCompartments: type: integer format: int32 description: > possible compartment types; a combination of the following flags:
1 - undefined,
2 - table,
4 - children,
8 - children cinema,
16 - wheelchair,
32 - disabled passengers,
64 - quiet compartment,
256 - pram,
512 - business class,
1024 - family coach,
2048 - place with Wi-Fi,
134217728 - panorama coach. seatPlaces: type: integer format: int32 description: > possible seat location types; a combination of the following flags:
1 - window,
2 - middle,
4 - corridor
couchetteCompartments: type: integer format: int32 description: > possible couchette compartment types; a combination of the following flags:
1 - undefined,
16 - wheelchair,
32 - disabled passengers,
128 - ladies compartment,
2048 - place with Wi-Fi,
16384 - whole (private) compartment,
32768 - 4-couchettes compartment,
65536 - 6-couchettes compartment. berthCompartments: type: integer format: int32 description: > possible berth compartment types; a combination of the following flags:
1 - undefined,
1048576 - berth Single,
2097152 - berth Double,
8388608 - berth T3,
16777216 - berth T4
berthDeluxeCompartments: type: integer format: int32 description: > possible deluxe berth compartment types; a combination of the following flags:
1 - undefined,
1048576 - berth Single,
2097152 - berth Double,
8388608 - berth T3,
16777216 - berth T4
couchetteBerthCanChangePosition: type: boolean description: 'selection of position for couchettes/berths available?' berthMixedSexOnly: type: boolean description: 'only mixed berth compartments (sex undefined)?' SelectedReservationInfo: type: object description: 'selected reservations data' properties: resType: type: integer format: int32 description: > selected reservation type; a combination of the following flags:
1 - reservation selected,
2 - automatic seat,
4 - schema available,
8 - designated seat,
16 - adjacent seat,
256 - automatic couchette,
512 - automatic ladies couchette,
32768 - automatic berth,
65536 - automatic berth deluxe
count: type: integer format: int32 description: 'selected reservations count' coach: type: integer format: int32 description: 'selected coach number (designated or adjacent seat context)' places: type: array items: type: integer format: int32 description: 'selected seat numbers (designated or adjacent seat context)' compartment: type: integer format: int32 description: > selected compartment types; a combination of the following flags:
1 - undefined,
2 - table,
4 - children,
8 - children cinema,
16 - wheelchair,
32 - disabled passengers,
64 - quiet compartment,
128 - ladies compartment,
256 - pram,
512 - business class,
1024 - family coach,
2048 - place with Wi-Fi,
16384 - whole (private) compartment,
32768 - 4-couchettes compartment,
65536 - 6-couchettes compartment,
1048576 - berth Single,
2097152 - berth Double,
8388608 - berth T3,
16777216 - berth T4,
134217728 - panorama coach. place: type: integer format: int32 description: 'selected seat type (0 = no limitation, 1 = window if possible, 2 = middle if possible, 4 = corridor if possible)' berthMaleCount: type: integer format: int32 description: 'berths - men count' berthFemaleCount: type: integer format: int32 description: 'berths - women count' berthTogether: type: boolean description: 'mixed compartment?' couchetteBerthMalePositions: $ref: '#/components/schemas/CouchetteBerthReservationPositions' #description: 'required positions of couchettes (for men and women) or berths for men' berthFemalePositions: $ref: '#/components/schemas/CouchetteBerthReservationPositions' #description: 'required positions of berths for women' SelectedReservationInfoWithResult: allOf: - $ref: '#/components/schemas/SelectedReservationInfo' - type: object description: 'selected and resulted reservations' properties: price: type: integer format: int32 description: 'reservation price for this train in hellers' errCode: type: integer format: int32 description: 'ARES negative reply code' errText: type: string description: 'ARES negative reply text' usedCompartments: type: array items: type: string description: 'Effectively used compartment types, 6-character strings. See UIC element 51. Count depends on reservation type.' notices: type: array items: $ref: '#/components/schemas/SpecialCharacteristicsNotice' description: 'Notices to places with special features.' tickets: type: array items: $ref: '#/components/schemas/OfferTicket' description: 'respective travel documents' CouchetteBerthReservationPositions: type: object description: 'Required couchettes/berths positions. The required positions may not be met by the reservation system.' properties: top: type: integer format: int32 minimum: 0 maximum: 2 description: 'required count upper (max 2)' middle: type: integer format: int32 minimum: 0 maximum: 2 description: 'required count middle (max 2)' bottom: type: integer format: int32 minimum: 0 maximum: 2 description: 'required count lower (max 2)' BikesInfo: type: object description: 'possible and selected bike transport type' properties: count: type: integer format: int32 description: number of bikes currently set maxcount: type: integer format: int32 description: maximum number of bikes allowed price: type: integer format: int32 description: 'total price for bikes in hellers' tickets: type: array items: $ref: '#/components/schemas/OfferTicket' description: 'travel documents for bikes transport (without reservations)' routePrice: type: integer format: int32 description: 'price for bikes transport only (without reservations) in hellers' err: type: integer format: int32 description: | error setting bikes; possible values:
1 - general error,
2 - required bike transport type not possible with the reservation service set,
3 - required bike transport type not compatible with reserved compartment type,
4 - impermissible combination of services,
5 - service not admissible in OneTicket mode trains: type: array items: $ref: '#/components/schemas/TrainBikeService' description: 'bike transport settings on individual trains' BikeRoutePrice: type: object description: 'price for bikes transport (eventually including storage price, but without reservations price)' properties: routePrice: type: integer format: int32 description: 'price for bikes transport only (without reservations) in hellers' err: type: integer format: int32 description: | error calculating bikes price; possible values:
1 - general error,
2 - required bike transport type not possible with the reservation service set,
3 - required bike transport type not compatible with reserved compartment type,
4 - impermissible combination of services,
5 - service not admissible in OneTicket mode TrainBikeService: type: object description: 'possible and selected bike transport type for one train' properties: trainId: type: integer format: int32 description: 'train ID within connection' back: type: boolean description: 'way BACK?' trainName: type: string description: 'combined train name (type + number + name)' trainTypeId: type: integer format: int32 description: 'train type ID' stationFrom: type: string description: 'from station name' stationTo: type: string description: 'to station name' possibleBikeTypes: type: integer format: int32 description: > possible bike transport types; a combination of the following flags:
1 - no bike transport in this train,
2 - only combined seat and bike reservation,
4 - only reservation for bike,
8 - transport under passenger's own suprevision, no bike reservation,
16 - transport under passenger's own suprevision, combined seat and bike reservation,
32 - transport under passenger's own suprevision, reservation only for bike,
64 - transport under conductor's suprevision, no bike reservation,
256 - transport under conductor's suprevision, reservation only for bike selecteBikes: description: 'selected bike transport type on this train; null = no bike transport' $ref: '#/components/schemas/SelectedBikesInfo' SelectedBikesInfo: type: object description: 'selected bike transport type for one train' properties: selectedBikeType: type: integer format: int32 description: > selected bike transport type for this train; possible values:
1 - no bike transport in this train,
2 - only combined seat and bike reservation,
4 - only reservation for bike,
8 - transport under passenger's own suprevision, no bike reservation,
16 - transport under passenger's own suprevision, combined seat and bike reservation,
32 - transport under passenger's own suprevision, reservation only for bike,
64 - transport under conductor's suprevision, no bike reservation,
256 - transport under conductor's suprevision, reservation only for bike resPrice: type: integer format: int32 description: 'total price for bike reservations in this train, in hellers' resTickets: type: array items: $ref: '#/components/schemas/OfferTicket' description: 'respective travel documents' errCode: type: integer format: int32 description: 'ARES negative reply code' errText: type: string description: 'ARES negative reply text' bikeResError: type: integer format: int32 description: > booking error; possible values:
1 - more bikes than persons,
2 - places selected not suitable for bikes,
3 - places allocated not usable usedCompartments: type: array items: type: string description: 'Effectively used compartment types, 6-character strings. See UIC element 51. Count depends on reservation type.' SetReservationInfo: type: object description: 'setting reservations on trains' properties: trains: type: array items: $ref: '#/components/schemas/TrainSetReservationInfo' description: 'list of reservations to be set; the reservations are set only for listed trains, the other remain unchanged' example: trains: - trainId: 0 resType: 2 count: 1 TrainSetReservationInfo: allOf: - $ref: '#/components/schemas/SelectedReservationInfo' - type: object description: 'setting of train reservations' properties: trainId: type: integer format: int32 description: 'connection train ID' SpecialCharacteristicsNotice: type: object description: 'notice to places with special features' properties: icon: type: integer format: int32 description: > notice type/icon:
0 = normal/no icon,
1 = bike,
2 = disabled passenger,
3 = silent compartment,
4 = parents with kids,
5 = ladies only,
6 = passengers with stroller,
7 = RailJet Business reserve
title: type: string description: notice title text: type: string description: notice text SetBikesInfo: type: object description: 'setting bike reservations on trains' properties: trains: type: array items: $ref: '#/components/schemas/TrainBikeInfo' description: 'list of bike reservations to be set; necessary only if count > 0; bike reservations are set only for listed trains, other trains remain unchanged' example: trains: - trainId: 0 bikeType: 4 TrainBikeInfo: type: object description: 'setting of train reservations' properties: trainId: type: integer format: int32 description: 'connection train ID' bikeType: type: integer format: int32 description: | required bike transport type for this train; possible values:
1 - no bike transport in this train,
2 - only combined seat and bike reservation,
4 - only reservation for bike,
8 - transport under passenger's own suprevision, no bike reservation,
16 - transport under passenger's own suprevision, combined seat and bike reservation,
32 - transport under passenger's own suprevision, reservation only for bike,
64 - transport under conductor's suprevision, no bike reservation,
256 - transport under conductor's suprevision, reservation only for bike #Schemata SchemaRequest: type: object properties: flags: type: integer format: int32 description: > schema request flags; a bit combination of the following values:
1 - color occupied seats,
2 - only metadata without image,
4 - one coach only schemaInfo: $ref: '#/components/schemas/TrainReservationSchemaInfo' #description: 'information needed for train identification, see TrainReservationInfo.ReservationSchemaInfo (obligatory)' coachNumber: type: string description: 'coach number - obligatory when one coach required' selfReservedSeats: type: array items: type: integer format: int32 description: 'list of reserved seats in coach coachNumber to be drawn as owned reservations' schemaWidth: type: integer format: int32 description: | fixed width of required schema bitmap (obligatory);
regardless on the image orientation (horizontal/vertical) this parameter is always width schemaMaxHeight: type: integer format: int32 description: | maximal height of required schema bitmap (optional);
verticalSchema: type: boolean description: 'vertical orientation? (default = horizontal)' default: false class: type: integer format: int32 description: | selected class (1/2) (optional, default = no limitation);
other class seats cannot be selected for reservation example: flags: 1 schemaInfo: trainResNum: '506' fromResNum: 5434364 toResNum: 5457076 depDateTime: '2019-04-10' schemaWidth: 500 schemaMaxHeight: 500 verticalSchema: false CoachesSchema: type: object properties: coachSchemas: type: array items: $ref: '#/components/schemas/CoachSchema' description: 'coach schemas - when required only' legend: type: array items: $ref: '#/components/schemas/SchemaLegendItem' description: 'legend with description of colors used to paint seats backgrounds - when required only' CoachSchema: type: object description: 'coach schema' properties: coachNumber: type: string description: 'coach reservation number' places: type: array items: $ref: '#/components/schemas/CoachPlace' description: 'coach seats' direction: type: integer format: int32 description: 'drive direction (1 = left, 2 = right, 0 = not available)' imgData: type: string description: | Base64 (PNG) schema image file with occupied seats rendered CoachPlace: type: object description: 'one schema seat' properties: number: type: integer format: int32 description: 'seat number' status: type: integer format: int32 description: 'seat status (1 = free, 2 = occupied, 3 = not required class)' features: type: array items: type: string description: 'seat properties - text description' rect: $ref: '#/components/schemas/CoachPlaceRect' #description: 'seat coordinates' class: type: integer format: int32 description: 'seat class' CoachPlaceRect: type: object description: | coordinates to draw seat background and define clickable area; coordinates are in pixels related to coach schema image properties: left: type: integer format: int32 description: 'top left x' top: type: integer format: int32 description: 'top left y' width: type: integer format: int32 description: 'seat width' height: type: integer format: int32 description: 'seat height' SchemaLegendItem: type: object description: 'schema legend item' properties: isBackground: type: boolean description: 'false = text color, true = background color' text: type: string description: 'text description' color: $ref: '#/components/schemas/Color' #description: 'respective color' Color: type: object description: 'color encoding' properties: r: type: integer minimum: 0 maximum: 255 description: 'R part (red)' g: type: integer minimum: 0 maximum: 255 description: 'G part (green)' b: type: integer minimum: 0 maximum: 255 description: 'B part (blue)' alpha: type: integer minimum: 0 maximum: 255 description: 'Alpha channel' #Prodej SellInfo: type: object description: 'information about sold tickets' properties: tickets: type: array items: $ref: '#/components/schemas/SellTicketInfo' SellTicketInfo: type: object description: 'information about single sold ticket' properties: documentType: type: integer format: int32 description: | document format and type. Possible values are:
1 - travel document in PDF,
2 - travel document in PNG,
3 - information about refund (e.g. corrective tax document) in PDF documentId: type: string description: 'document identification for its download' ticketsIds: type: array items: $ref: '#/components/schemas/TicketIdInfo' description: | ČD transaction codes for ticket refunds (at some circumstances a single document may contain several transaction codes); the order of items corresponds to FixedPriceOfferInfo TicketIdInfo: type: object description: 'ČD transaction code for ticket refund' properties: ticketId: type: string description: 'ČD transaction code' apiOfferType: type: integer format: int32 description: document type (0 or missing = standard document, 1 = OneTicket document) orderNumber: type: integer format: int64 description: 'ČD order number' tariffs: type: array items: $ref: '#/components/schemas/TicketTariff' description: 'tariff information' reservations: type: array items: $ref: '#/components/schemas/TicketReservation' description: 'information about reservations' mustPrint: type: boolean description: 'must the ticket be printed?' isReturned: type: boolean description: 'ticket refund status (true = refund has been required, ticket now invalid)' TicketTariff: type: object description: 'tariff information about ticket' properties: documentCount: type: integer format: int32 description: 'count of documents' price: type: integer format: int32 description: 'total price in hellers' tariff: type: string description: 'tariff name (including class and obligatory section)' validFrom: type: string description: 'validity from' validTo: type: string description: | validity to; optional, e.g. reservations have only validity from conditions: type: array items: type: string description: 'list of ticket tariff conditions' firstTrainThereIdx: type: integer format: int32 description: 'first train index in direction THERE or unspecified' lastTrainThereIdx: type: integer format: int32 description: 'last train index in direction THERE or unspecified' firstTrainBackIdx: type: integer format: int32 description: 'first train index in direction BACK or unspecified' lastTrainBackIdx: type: integer format: int32 description: 'last train index in direction BACK or unspecified' TicketReservation: type: object description: 'information about one reservation' properties: coach: type: string description: 'coach number (OBSOLETE)' places: type: array items: type: integer format: int32 description: 'places numbers (OBSOLETE)' placesData: type: array items: $ref: '#/components/schemas/ReservationPlaces' description: 'information about reserved places' firstTrainThereIdx: type: integer format: int32 description: 'first train index in direction THERE or unspecified' lastTrainThereIdx: type: integer format: int32 description: 'last train index in direction THERE or unspecified' firstTrainBackIdx: type: integer format: int32 description: 'first train index in direction BACK or unspecified' lastTrainBackIdx: type: integer format: int32 description: 'last train index in direction BACK or unspecified' ReservationPlaces: type: object description: 'information about reserved places in one coach' properties: coach: type: string description: 'coach number' places: type: array items: type: integer format: int32 description: 'places numbers' RefundResult: type: object description: | information about ticket refund possibility or ticket refund result.
Empty result means that refund would be possible at this moment, or refund was successful. properties: price2Refund: type: integer format: int32 description: 'amount to be refunded in hellers' errors: type: array description: errors list items: $ref: '#/components/schemas/RefundError' RefundError: type: object description: information about single refund error properties: code: type: integer format: int32 description: error code text: type: string description: error text RefundsInfos: type: object description: information about ticket(s) refund status properties: data: type: array items: $ref: '#/components/schemas/RefundInfo' RefundInfo: type: object description: elementary information about single ticket refund status (single database log record) properties: id: type: integer format: int32 description: event ID dateTime: type: string description: date and time of the event creation type: type: integer enum: [1,2] description: | event type:
1=REFUND (information about refund settlement status),
2=TICKETCHANGE (change of ticket properties) ticketId: type: string description: 'corresponding ČD transaction code' refundAmount: type: integer format: int32 description: 'amount to be returned in hellers (when type=1 only)' refundRejected: type: boolean description: 'refund request was rejected (when type=1 only)' newTicketId: type: string description: 'new ČD transaction code (when type=2 only)' newTickets: type: array items: $ref: '#/components/schemas/SellTicketInfo' description: 'informations about new tickets (when type=2 only)' Exception: type: object properties: exceptionCode: type: integer format: int32 description: error code exceptionMessage: type: string description: error description