{"openapi":"3.0.1","info":{"title":"Nou GRS API","description":"Nou GRS backend services API","version":"v1"},"servers":[{"url":"https://serveisgrs.rodalies.gencat.cat/api","description":"Generated server url"}],"paths":{"/trains/{id}":{"get":{"tags":["trains"],"description":"Get train by Id","operationId":"get_1","parameters":[{"name":"id","in":"path","description":"The id (code) of the train","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"core","in":"query","description":"The urban core id. Defaults to 50 - Barcelona","required":false,"schema":{"type":"string","default":"50"}},{"name":"fullResponse","in":"query","description":"The type of response required. If false, only the fields not flagged for full response __(+)__ will present in the response","required":false,"schema":{"type":"boolean","default":false}},{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Renfe Unavailable":{"description":"Renfe Unavailable","value":{"target":null,"code":"error.renfe.unavailable","message":"No va ser possible obtenir resposta del servei [gesmen]","args":["gesmen"],"errors":null}},"Renfe Unavailable Data":{"description":"Renfe Unavailable Data","value":{"target":null,"code":"error.renfe.unavailable_data","message":"Dades no disponibles","args":null,"errors":null}},"Renfe Invalid Data":{"description":"Renfe Invalid Data","value":{"target":null,"code":"error.invalid.data","message":"Les dades rebudes no poden ser parsejades per GRS","args":null,"errors":null}},"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainInfoResponseDTO"}}}}}}},"/timetables":{"get":{"tags":["timetables"],"description":"Get timetables given source and destination station, date and time","operationId":"findAll_1","parameters":[{"name":"originStationId","in":"query","description":"The id of the station where the trips starts","required":true,"schema":{"maxLength":20,"pattern":"^\\d+$","type":"string","description":"The id of the station where the trips starts","format":"number","example":78802},"example":78802},{"name":"destinationStationId","in":"query","description":"The id of the station where the trips ends","required":true,"schema":{"maxLength":20,"pattern":"^\\d+$","type":"string","description":"The id of the station where the trips ends","format":"number","example":79006},"example":79006},{"name":"travelingOn","in":"query","description":"The date of the journey. The current date by default","required":false,"schema":{"type":"string","description":"The date of the journey. The current date by default","format":"date","example":"2017-07-21"},"example":"2017-07-21"},{"name":"fromTime","in":"query","description":"The starting time of the travelingOn date to search for departures at origin station","required":false,"schema":{"maximum":23,"minimum":0,"type":"long","description":"The starting time of the travelingOn date to search for departures at origin station","example":13},"example":13},{"name":"toTime","in":"query","description":"The ending time of the travelingOn date to search for arrivals at destination station","required":false,"schema":{"maximum":23,"minimum":0,"type":"long","description":"The ending time of the travelingOn date to search for arrivals at destination station","example":14},"example":14},{"name":"fullResponse","in":"query","description":"The type of response required. If false, only the fields not flagged for full response __(+)__ will present in the response","required":false,"schema":{"type":"boolean","default":false}},{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Renfe Unavailable":{"description":"Renfe Unavailable","value":{"target":null,"code":"error.renfe.unavailable","message":"No va ser possible obtenir resposta del servei [gesmen]","args":["gesmen"],"errors":null}},"Renfe Unavailable Data":{"description":"Renfe Unavailable Data","value":{"target":null,"code":"error.renfe.unavailable_data","message":"Dades no disponibles","args":null,"errors":null}},"Renfe Invalid Data":{"description":"Renfe Invalid Data","value":{"target":null,"code":"error.invalid.data","message":"Les dades rebudes no poden ser parsejades per GRS","args":null,"errors":null}},"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeTableDTO"}}}}}}},"/stations":{"get":{"tags":["stations"],"description":"Get all stations paginated and sorted","operationId":"findAll","parameters":[{"name":"name","in":"query","description":"The string to filter stations by name. All stations containing this string in its name will be returned","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"One-based page index (0..N)","schema":{"type":"integer","default":0}},{"name":"limit","in":"query","description":"The size of the page to be returned. Maximum page __limit__ is __500__. Any greater value will be treated as 500. For example, size values of 500, 1000, 100000 will get the same response size","schema":{"type":"integer","default":10}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","schema":{"type":"array","items":{"type":"string"}},"example":"sort=id&sort=name,desc"},{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePageStationDTO"}}}}}}},"/stations/{id}":{"get":{"tags":["stations"],"description":"Get station by Id","operationId":"get","parameters":[{"name":"id","in":"path","description":"The id (code) of the station","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationDTO"}}}},"404":{"description":"Resource Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Not Found":{"$ref":"#/components/examples/not_found"}}}}}}}},"/maps":{"get":{"tags":["maps"],"description":"Get all maps","operationId":"findAll_2","parameters":[{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Integration Failed":{"description":"Integration Failed","value":{"target":null,"code":"error.integration.failed","message":"La integració amb el servei [maps] va tornar un error","args":["maps"],"errors":null}},"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapsResponseDTO"}}}}}}},"/lines":{"get":{"tags":["lines"],"description":"Get all lines by type. Paginated and sorted","operationId":"findAll_3","parameters":[{"name":"type","in":"query","description":"Filter lines by type. All lines with type matching this value will be returned","required":false,"schema":{"type":"string","enum":["RODALIES","REGIONAL"]}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}},{"name":"page","in":"query","description":"One-based page index (0..N)","schema":{"type":"integer","default":0}},{"name":"limit","in":"query","description":"The size of the page to be returned. Maximum page __limit__ is __500__. Any greater value will be treated as 500. For example, size values of 500, 1000, 100000 will get the same response size","schema":{"type":"integer","default":10}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","schema":{"type":"array","items":{"type":"string"}},"example":"sort=id&sort=name,desc"},{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePageLineDTO"}}}}}}},"/lines/{id}":{"get":{"tags":["lines"],"description":"Get line by Id","operationId":"get_2","parameters":[{"name":"id","in":"path","description":"The id (code) of the line","required":true,"schema":{"type":"string"}},{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineDTO"}}}},"404":{"description":"Resource Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/init":{"get":{"tags":["init"],"description":"Get APP init data","operationId":"findAll_4","parameters":[{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitDTO"}}}}}}},"/departures":{"get":{"tags":["departures"],"description":"Get all departures from given station","operationId":"findAll_5_1","parameters":[{"name":"stationId","in":"query","description":"The id (code) of the station","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"hour","in":"query","description":"The hour and minutes of departures (HH:mm)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"minute","in":"query","description":"The interval of minutes from which get departures","required":false,"schema":{"type":"integer","format":"int32","default":60}},{"name":"fullResponse","in":"query","description":"The type of response required. If false, only the fields not flagged for full response __(+)__ will present in the response","required":false,"schema":{"type":"boolean","default":false}},{"name":"lang","in":"query","description":"The language code for error messages","schema":{"type":"string","enum":["ca","ca_ES","es","es_ES","en","en_GB"],"default":"ca"},"example":"ca_ES"}],"responses":{"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Renfe Unavailable":{"description":"Renfe Unavailable","value":{"target":null,"code":"error.renfe.unavailable","message":"No va ser possible obtenir resposta del servei [gesmen]","args":["gesmen"],"errors":null}},"Renfe Unavailable Data":{"description":"Renfe Unavailable Data","value":{"target":null,"code":"error.renfe.unavailable_data","message":"Dades no disponibles","args":null,"errors":null}},"Renfe Invalid Data":{"description":"Renfe Invalid Data","value":{"target":null,"code":"error.invalid.data","message":"Les dades rebudes no poden ser parsejades per GRS","args":null,"errors":null}},"Internal Server Error":{"$ref":"#/components/examples/default"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartureResponseDTO"}}}}}}}},"components":{"schemas":{"departuresOriginStation":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The numeric ID (code) of the station.","example":"71704"},"name":{"maxLength":255,"type":"string","description":"The name of the station","example":"Platja de Castelldefels"},"accessible":{"type":"boolean","description":"Indicates if the station is accessible"}},"description":"The first station of the journey"},"departuresDestinationStation":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The numeric ID (code) of the station.","example":"71704"},"name":{"maxLength":255,"type":"string","description":"The name of the station","example":"Platja de Castelldefels"},"accessible":{"type":"boolean","description":"Indicates if the station is accessible"}},"description":"The last station of the journey"},"nextStation":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The numeric ID (code) of the station.","example":"71704"},"name":{"maxLength":255,"type":"string","description":"The name of the station","example":"Platja de Castelldefels"},"accessible":{"type":"boolean","description":"Indicates if the station is accessible"}},"description":"Next station the train will pass through"},"itemStation":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The numeric ID (code) of the station.","example":"71704"},"name":{"maxLength":255,"type":"string","description":"The name of the station","example":"Platja de Castelldefels"},"accessible":{"type":"boolean","description":"Indicates if the station is accessible"}},"description":"The station in step (except origin station)"},"ErrorResponse":{"type":"object","properties":{"target":{"maxLength":255,"type":"string","description":"The field responsible of the error condition. Null for conditions not attributable to specific field","nullable":true,"example":"name"},"code":{"maxLength":255,"type":"string","description":"The code that uniquely identifies the error condition","example":"error.bad.request"},"message":{"maxLength":255,"type":"string","description":"The i18n message that explains the error condition. Message can present placeholders that can be filled with tha values in the args","nullable":true,"example":"The field {} can be true"},"args":{"type":"array","description":"The args to fill the placeholders in the message","nullable":true,"example":["name","description"],"items":{"type":"string","description":"The args to fill the placeholders in the message","nullable":true,"example":"[\"name\",\"description\"]"}}}},"StationBaseDTO":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The numeric ID (code) of the station.","example":"71704"},"name":{"maxLength":255,"type":"string","description":"The name of the station","example":"Platja de Castelldefels"},"accessible":{"type":"boolean","description":"Indicates if the station is accessible"}},"description":"(+) Next station the train will pass through"},"StationInfoDTO":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The numeric ID (code) of the station.","example":"71704"},"name":{"maxLength":255,"type":"string","description":"The name of the station","example":"Platja de Castelldefels"},"accessible":{"type":"boolean","description":"Indicates if the station is accessible"},"arrivalDateHour":{"type":"string","description":"Estimated date and time of arrival of the train at the station","format":"date-time"},"departureDateHour":{"type":"string","description":"Estimated date and time of departure of the train at the station","format":"date-time"},"platform":{"type":"string","description":"Planned platform of the station from which the train will arrive"},"stopType":{"type":"string","description":"(+) Stop type. Its value is \"C\" for commercial stops and \"S\" for non-stop stations."},"stationObservations":{"type":"string","description":"(+) Station-level observations regarding the train"}},"description":"Train passing stations"},"TrainInfoDTO":{"type":"object","properties":{"technicalNumber":{"type":"integer","description":"(+) Technical code number of the train","format":"int64"},"launchingDate":{"type":"string","description":"(+) Train running date","format":"date"},"commercialNumber":{"type":"integer","description":"(+) Commercial key of the train","format":"int64"},"trainType":{"type":"string","description":"(+) Train type"},"line":{"type":"string","description":"(+) Name of the line to which it belongs, if applicable"},"originStation":{"$ref":"#/components/schemas/StationBaseDTO"},"originDateHour":{"type":"string","description":"Departure date and time of the train from its origin station","format":"date-time"},"destinationStation":{"$ref":"#/components/schemas/StationBaseDTO"},"destinationDateHour":{"type":"string","description":"(+) Arrival date and time of the train at its destination","format":"date-time"},"trainObservations":{"type":"string","description":"(+) Train observations"},"trainDisabled":{"type":"boolean","description":"(+) Indicates if the train is disabled or not"},"trainCancelled":{"type":"boolean","description":"(+) Indicates if the train is canceled or not"},"trainAccessible":{"type":"boolean","description":"(+) Indicates whether the train is accessible or not"},"composition":{"type":"string","description":"(+) Indicates if the train runs in double composition (true) or in simple composition (false)"},"nextStation":{"$ref":"#/components/schemas/StationBaseDTO"},"delay":{"type":"integer","description":"(+) Updated delay that the train has with respect to the planning, in the time of making the request. Its value is specified in minutes, rounded to the nearest short. It can be positive (if the train is late) or negative (if the train is early).","format":"int32"},"core":{"type":"string","description":"(+) Core"},"stations":{"type":"array","description":"Train passing stations","items":{"$ref":"#/components/schemas/StationInfoDTO"}}},"description":"The information of the train"},"TrainInfoResponseDTO":{"type":"object","properties":{"requestedAt":{"type":"string","description":"The datetime of the request","format":"date-time"},"train":{"$ref":"#/components/schemas/TrainInfoDTO"}}},"CountyDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The name of the County"},"capitalCityName":{"type":"string","description":"The name of the capital city of the County"}},"description":"The destination county"},"DescriptionDTO":{"type":"object","properties":{"ca":{"maxLength":255,"type":"string","description":"Catalan translation"},"es":{"maxLength":255,"type":"string","description":"Spanish translation"},"en":{"maxLength":255,"type":"string","description":"English translation"}},"description":"Internationalized translation set. Keys represents a valid ISO 639-1 language"},"EcologicalFootprintDTO":{"type":"object","properties":{"interval":{"type":"number","format":"float"},"impacts":{"type":"array","items":{"$ref":"#/components/schemas/EcologicalFootprintImpactDTO"}}},"description":"The estimated ecological footprint of the journey"},"EcologicalFootprintImpactDTO":{"type":"object","properties":{"type":{"type":"string","description":"The type of impact to the environment","enum":["FUEL","CO2","NOX","PM"]},"vehicle":{"type":"string","description":"The type of vehicle that produces the impact","enum":["CAR","MOTO","TRAIN"]},"value":{"type":"number","description":"The numerical value of the impact","format":"float"}}},"FareDTO":{"type":"object","properties":{"ticketType":{"$ref":"#/components/schemas/TicketTypeDTO"},"trainType":{"$ref":"#/components/schemas/TrainTypeDTO"},"price":{"type":"number","description":"The price of the Fare","format":"double","example":20.8},"exception":{"$ref":"#/components/schemas/FareExceptionDTO"},"groupName":{"type":"string","description":"The UI group name"}},"description":"The full list of fares available for the journey"},"FareExceptionDTO":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/DescriptionDTO"}},"description":"Exception description if applicable","nullable":true},"FareTypeDTO":{"type":"object","properties":{"id":{"type":"string","description":"The id (code) of the Fare type","example":"ROD"},"description":{"$ref":"#/components/schemas/DescriptionDTO"},"fares":{"type":"array","description":"The full list of fares available for the journey","items":{"$ref":"#/components/schemas/FareDTO"}},"zones":{"minimum":0,"type":"integer","description":"The number of zones of the journey","format":"int32"},"zonesSingle":{"minimum":0,"type":"integer","description":"The number of zones for the single ticket. Only informed for Rodalies (ROD) fares","format":"int32","nullable":true},"kmLowerBound":{"minimum":0,"type":"integer","description":"The minimum of kilometers for this Fare Type to be applied","format":"int64"},"kmUpperBound":{"minimum":0,"type":"integer","description":"The maximum of kilometers for this Fare Type to be applied","format":"int64"}}},"LineBaseDTO":{"type":"object","properties":{"id":{"maxLength":50,"type":"string","description":"The identifier (code) of the Line"},"name":{"maxLength":255,"type":"string","description":"The name of the Line"}},"description":"The line in step"},"LocalTime":{"type":"object","properties":{"hour":{"type":"integer","format":"int32"},"minute":{"type":"integer","format":"int32"},"second":{"type":"integer","format":"int32"},"nano":{"type":"integer","format":"int32"}},"description":"The arrival time to destination place","example":"13:50:01"},"MeteoDTO":{"type":"object","properties":{"county":{"$ref":"#/components/schemas/CountyDTO"},"toDate":{"type":"string","description":"The date of the forecast","format":"date"},"day":{"type":"integer","format":"int32"},"morningSymbol":{"type":"string","description":"The file name of the weather symbol image for the morning","example":"31.png"},"afternoonSymbol":{"type":"string","description":"The file name of the weather symbol image for the morning","example":"2.png"},"minTemp":{"type":"integer","description":"The minimum temperature in Celsius","format":"int32","example":10},"maxTemp":{"type":"integer","description":"The maximum temperature in Celsius","format":"int32","example":50},"updatedAt":{"type":"string","description":"The date where the report was last updated","format":"date-time"}},"description":"(+) The meteo forecast for the destination station"},"PriceDTO":{"type":"object","properties":{"tags":{"type":"array","description":"The custom tags required for the UI","items":{"$ref":"#/components/schemas/TagDTO"}},"fareTypes":{"type":"array","items":{"$ref":"#/components/schemas/FareTypeDTO"}}},"description":"The list of possible prices for the journey"},"TagDTO":{"type":"object","properties":{"name":{"type":"string","description":"The tag name","example":"senzill"},"description":{"$ref":"#/components/schemas/DescriptionDTO"}},"description":"The custom tags required for the UI"},"TicketTypeDTO":{"type":"object","properties":{"id":{"type":"string","description":"The id (code) of the ticket type","example":"S"},"description":{"$ref":"#/components/schemas/DescriptionDTO"}},"description":"The fare ticket type"},"TimeTableDTO":{"type":"object","properties":{"meteo":{"$ref":"#/components/schemas/MeteoDTO"},"ecoFootprint":{"$ref":"#/components/schemas/EcologicalFootprintDTO"},"prices":{"$ref":"#/components/schemas/PriceDTO"},"transfer":{"$ref":"#/components/schemas/TransferDTO"},"result":{"$ref":"#/components/schemas/TimeTableResultDTO"}}},"TimeTableResultDTO":{"type":"object","properties":{"validFrom":{"type":"string","description":"(+) The starting date of validity for the results","format":"date"},"validTo":{"type":"string","description":"(+) The ending date of validity for the results","format":"date"},"items":{"type":"array","description":"The results (journeys) meeting the specified filtering params","items":{"$ref":"#/components/schemas/TimeTableResultItemDTO"}}},"description":"The list of trains available for the journey"},"TimeTableResultItemDTO":{"type":"object","properties":{"departsAtOrigin":{"$ref":"#/components/schemas/LocalTime"},"arrivesAtDestination":{"$ref":"#/components/schemas/LocalTime"},"duration":{"type":"string","description":"The global duration of the journey","example":"13:50:01"},"globalAccessibility":{"type":"boolean","description":"The global accessibility of the journey"},"steps":{"type":"array","description":"The list of steps for the journey","items":{"$ref":"#/components/schemas/TimeTableStepTrainDTO"}}},"description":"The results (journeys) meeting the specified filtering params"},"TimeTableStepTrainDTO":{"type":"object","properties":{"departsAt":{"type":"string","description":"The departure time","example":"13:50:01"},"arrivesAt":{"type":"string","description":"The arrival time","example":"13:50:01"},"accessible":{"type":"boolean","description":"True if the train is accessible. This field is available in timetables for the current date","nullable":true},"train":{"$ref":"#/components/schemas/TimeTableTrainDTO"},"line":{"$ref":"#/components/schemas/LineBaseDTO"},"station":{"$ref":"#/components/schemas/itemStation"}},"description":"The list of steps for the journey"},"TimeTableTrainDTO":{"type":"object","properties":{"id":{"type":"string","description":"The id (code) of the train","example":"25428"},"trainType":{"$ref":"#/components/schemas/ValueBaseDTO"},"accessible":{"type":"boolean","description":"True if the train is accessible. This field is available in timetables for the current date","nullable":true}},"description":"The train in step"},"TrainTypeDTO":{"type":"object","properties":{"id":{"type":"string","description":"The id (code) of the train type","example":"REG"},"description":{"$ref":"#/components/schemas/DescriptionDTO"}},"description":"The fare train type"},"TransferDTO":{"type":"object","properties":{"number":{"type":"integer","description":"The total number of transfers for the journey","format":"int32"},"stations":{"type":"array","description":"The list of stations available for transfers","items":{"$ref":"#/components/schemas/StationBaseDTO"}}},"description":"The list of available transfers for the journey"},"ValueBaseDTO":{"type":"object","properties":{"code":{"type":"string"},"description":{"$ref":"#/components/schemas/DescriptionDTO"}},"description":"Rodalies train type. This field is mapped from Renfe. At this moment, it's not clear the mapping correlation between Rodalies and Renfe train types"},"ConnectionDTO":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The ID (code) of the connection"},"description":{"$ref":"#/components/schemas/DescriptionDTO"},"imageUrl":{"maxLength":255,"type":"string","description":"URL of the image that represents the connection","example":"https://www.gencat.cat/rodalies/media/img/l5.gif"},"orderNumber":{"type":"integer","description":"The order in which the connection must be displayed within lists","format":"int32"},"type":{"$ref":"#/components/schemas/ConnectionTypeDTO"},"line":{"$ref":"#/components/schemas/LineBaseDTO"}},"description":"Connections available in the station."},"ConnectionTypeDTO":{"type":"object","properties":{"id":{"type":"string","description":"Connection type id","enum":["METRO","TRAIN","RAILWAY","TRAM","RACK_RAILWAY","VALL_DE_NURIA","OTHER"]},"description":{"$ref":"#/components/schemas/DescriptionDTO"}},"description":"Connection type"},"ResponsePageStationDTO":{"type":"object","properties":{"total":{"type":"integer","description":"The total of elements available for the response","format":"int64"},"limit":{"type":"integer","description":"The maximum of elements allowed for a response page","format":"int64"},"numberOfElements":{"type":"integer","description":"The actual number of elements present in the response page","format":"int64"},"offset":{"type":"integer","description":"The zero based position of the first element of the response page","format":"int64"},"first":{"type":"boolean","description":"True if the response page is the first one available "},"last":{"type":"boolean","description":"True if the response page is the last one available "},"totalPages":{"type":"integer","description":"The total of response pages available for the response","format":"int32"},"page":{"type":"integer","description":"The position of the response page in relation to the total of pages","format":"int32"},"included":{"type":"array","items":{"$ref":"#/components/schemas/StationDTO"}}}},"ServiceDTO":{"type":"object","properties":{"id":{"maxLength":120,"type":"string","description":"The ID (code) of the service"},"description":{"$ref":"#/components/schemas/DescriptionDTO"},"imageUrl":{"maxLength":255,"type":"string","description":"URL of the image that represents the service","example":"https://www.gencat.cat/rodalies/media/img/wc.gif"},"orderNumber":{"type":"integer","description":"The order in which the service must be displayed within lists","format":"int32"}},"description":"Services available in the station."},"StationDTO":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The numeric ID (code) of the station.","example":"71704"},"name":{"maxLength":255,"type":"string","description":"The name of the station","example":"Platja de Castelldefels"},"accessible":{"type":"boolean","description":"Indicates if the station is accessible"},"latitude":{"type":"number","description":"Geographical latitude of the station as defined in Google Maps. Format: number(10,8). Ex: 4012345678.12345678"},"longitude":{"type":"number","description":"Geographical longitude of the station as defined in Google Maps. Format: number(10,8). Ex: 4012345678.12345678"},"position":{"maxLength":255,"type":"string","description":"Google Maps URL which represents the station position","example":"https://maps.google.es/?ll=41.6558219378101,1.42071649550986"},"connections":{"type":"array","description":"Connections available in the station. By default they will come sorted by field orderNumber","items":{"$ref":"#/components/schemas/ConnectionDTO"}},"services":{"type":"array","description":"Services available in the station. By default they will come sorted by field orderNumber","items":{"$ref":"#/components/schemas/ServiceDTO"}}}},"MapDTO":{"type":"object","properties":{"id":{"type":"integer","description":"Map identifier","format":"int64"},"name":{"$ref":"#/components/schemas/DescriptionDTO"},"imageUrl":{"maxLength":255,"type":"string","description":"The url containing the map image","example":"https://www.gencat.cat/territori/rodalies/img/Mapa_Rodalia_Barcelona_ATM.png"},"imageMediumUrl":{"maxLength":255,"type":"string","description":"The url containing the medium resolution map image","example":"https://www.gencat.cat/territori/rodalies/img/Mapa_Rodalia_Barcelona_ATM_2048.png"},"imageLowUrl":{"maxLength":255,"type":"string","description":"The url containing the low resolution map image","example":"https://www.gencat.cat/territori/rodalies/img/Mapa_Rodalia_Barcelona_ATM_800.png"}},"description":"The maps are shown in the same order as the origin service"},"MapsResponseDTO":{"type":"object","properties":{"lastModification":{"type":"string","format":"date"},"maps":{"type":"array","description":"The maps are shown in the same order as the origin service","items":{"$ref":"#/components/schemas/MapDTO"}}}},"Pageable":{"type":"object","properties":{"page":{"minimum":0,"type":"integer","format":"int32"},"size":{"minimum":1,"type":"integer","format":"int32"},"sort":{"type":"array","items":{"type":"string"}}}},"LineDTO":{"type":"object","properties":{"id":{"maxLength":50,"type":"string","description":"The identifier (code) of the Line"},"name":{"maxLength":255,"type":"string","description":"The name of the Line"},"type":{"$ref":"#/components/schemas/LineTypeDTO"},"wayStations":{"$ref":"#/components/schemas/DescriptionDTO"},"imageUrl":{"maxLength":255,"type":"string","description":"The url containing the line image"},"orderNumber":{"type":"integer","description":"Define the default lines order","format":"int32"},"journeyDescription":{"type":"string","description":"Description of the Journey"},"originStation":{"$ref":"#/components/schemas/StationBaseDTO"},"destinationStation":{"$ref":"#/components/schemas/StationBaseDTO"},"stations":{"type":"array","description":"List of line stations,","items":{"$ref":"#/components/schemas/StationDTO"}}}},"LineTypeDTO":{"type":"object","properties":{"id":{"type":"string","description":"The type id of the Line","enum":["RODALIES","REGIONAL"]},"description":{"$ref":"#/components/schemas/DescriptionDTO"}},"description":"The type of the Line"},"ResponsePageLineDTO":{"type":"object","properties":{"total":{"type":"integer","description":"The total of elements available for the response","format":"int64"},"limit":{"type":"integer","description":"The maximum of elements allowed for a response page","format":"int64"},"numberOfElements":{"type":"integer","description":"The actual number of elements present in the response page","format":"int64"},"offset":{"type":"integer","description":"The zero based position of the first element of the response page","format":"int64"},"first":{"type":"boolean","description":"True if the response page is the first one available "},"last":{"type":"boolean","description":"True if the response page is the last one available "},"totalPages":{"type":"integer","description":"The total of response pages available for the response","format":"int32"},"page":{"type":"integer","description":"The position of the response page in relation to the total of pages","format":"int32"},"included":{"type":"array","items":{"$ref":"#/components/schemas/LineDTO"}}}},"InitDTO":{"type":"object","properties":{"updatedAt":{"$ref":"#/components/schemas/UpdatedAtDTO"},"minVersion":{"$ref":"#/components/schemas/MinVersionDTO"}}},"MinVersionDTO":{"type":"object","properties":{"android":{"type":"string","description":"Android Mobile app min version that guaranties correct API integration","example":"1.0.0"},"ios":{"type":"string","description":"IOS Mobile app min version that guaranties correct API integration","example":"v1.0.0.release"}},"description":"Mobile apps min versions that guaranties correct API integration"},"UpdatedAtDTO":{"type":"object","properties":{"maps":{"type":"string","description":"Datetime when maps data was last updated","format":"date"},"lines":{"type":"string","description":"Datetime when lines data was last updated","format":"date-time"},"stations":{"type":"string","description":"Datetime when stations (stations + connections + services) data was last updated","format":"date-time"}},"description":"Datetime when data was last updated"},"DepartureResponseDTO":{"type":"object","properties":{"requestedAt":{"type":"string","description":"(+) The datetime of the request","format":"date-time"},"stationId":{"type":"integer","description":"(+) The requested stationId","format":"int64"},"trains":{"type":"array","description":"List of trains departing from the station","items":{"$ref":"#/components/schemas/TrainDepartureDTO"}}}},"StationDepartureDTO":{"type":"object","properties":{"id":{"maxLength":20,"type":"string","description":"The numeric ID (code) of the station.","example":"71704"},"name":{"maxLength":255,"type":"string","description":"The name of the station","example":"Platja de Castelldefels"},"accessible":{"type":"boolean","description":"Indicates if the station is accessible"},"arrivalDateHour":{"type":"string","description":"Estimated date and time of arrival of the train at the station","format":"date-time"},"departureDateHour":{"type":"string","description":"Estimated date and time of departure of the train at the station","format":"date-time"},"platform":{"type":"string","description":"Planned platform of the station from which the train will arrive"},"stopType":{"type":"string","description":"Stop type. Its value is \"C\" for commercial stops and \"S\" for non-stop stations."},"stationObservations":{"type":"string","description":"Station-level observations regarding the train"}},"description":"(+) Train passing stations"},"TrainDepartureDTO":{"type":"object","properties":{"departureDateHourSelectedStation":{"type":"string","description":"Selected departure datetime","format":"date-time"},"platformSelectedStation":{"type":"string","description":"Planned platform of the station from which the train will arrive"},"technicalNumber":{"type":"integer","description":"Technical code number of the train","format":"int64"},"launchingDate":{"type":"string","description":"(+) Train running date","format":"date"},"commercialNumber":{"type":"integer","description":"Commercial key of the train","format":"int64"},"trainType":{"type":"string","description":"Train type"},"line":{"$ref":"#/components/schemas/LineBaseDTO"},"originStation":{"$ref":"#/components/schemas/departuresOriginStation"},"originDateHour":{"type":"string","description":"(+) Departure date and time of the train from its origin station","format":"date-time"},"destinationStation":{"$ref":"#/components/schemas/departuresDestinationStation"},"destinationDateHour":{"type":"string","description":"(+) Arrival date and time of the train at its destination","format":"date-time"},"trainObservations":{"type":"string","description":"(+) Train observations"},"trainDisabled":{"type":"boolean","description":"(+) Indicates if the train is disabled or not"},"trainCancelled":{"type":"boolean","description":"(+) Indicates if the train is canceled or not"},"trainAccessible":{"type":"boolean","description":"Indicates whether the train is accessible or not"},"composition":{"type":"string","description":"(+) Indicates if the train runs in double composition (true) or in simple composition (false)"},"nextStation":{"$ref":"#/components/schemas/nextStation"},"delay":{"type":"integer","description":"(+) Updated delay that the train has with respect to the planning, in the time of making the request. Its value is specified in minutes, rounded to the nearest short. It can be positive (if the train is late) or negative (if the train is early).","format":"int32"},"core":{"type":"string","description":"(+) Core"},"stations":{"type":"array","description":"(+) Train passing stations","items":{"$ref":"#/components/schemas/StationDepartureDTO"}}},"description":"List of trains departing from the station"}},"examples":{"default":{"value":{"target":null,"code":"error.internal.server","message":"Error intern","args":[],"errors":null}},"not_found":{"value":{"target":null,"code":"error.not.found","message":"No trobat","args":[],"errors":null}}}}}