ResRobot data types

The different ResRobot API endpoints have different response structures, but some parts of the response are shared among all endpoints. In order to ensure that all documentation is correct, and to be able to go more into detail, we have collected these common data types here.

Product

Changes compared to ResRobot v2.0:

  • operatorUrl is no longer available
  • Several fields have been added
"Product": {
    "name": "Länstrafik - Tåg 40",
    "internalName": "Länstrafik - Tåg 40",
    "displayNumber": "40",
    "num": "40",
    "line": "40",
    "lineId": "1275000000036",
    "catOut": "JLT",
    "catIn": "JLT",
    "catCode": "4",
    "cls": "16",
    "catOutS": "JLT",
    "catOutL": "Länstrafik - Tåg",
    "operatorCode": "275",
    "operator": "SL",
    "admin": "275___",
    "routeIdxFrom": 0,
    "routeIdxTo": 1
},
<Product catCode="7" 
         catOutL="Länstrafik - Buss" 
         catOutS="BLT" 
         name="Länstrafik - Buss Grön X" 
         num="Grön X" operator="Västtrafik"
         operatorCode="279" 
         />
NameData typeDescription
Product.nameStringPublic name, matches catOutL + num
Product.internalNameStringInternal name, matches catOutL + num
Product.displayNumberStringPublicly announced number (train or line number)
Product.numStringInternal product number (e.g. train number)
Product.lineStringPublicly announced line name, if available
Product.lineIdStringLine id for use in further requests
Product.catCodeIntegerCategory code, see Response product categories > Numeric representation below
Product.clsStringCategory class, same codes as used in requests, see below
Product.catInStringTransport type code for the vehicle when it arrives, in string format. Typically identical to catOut.
Product.catOutStringSame as catOutS
Product.catOutSStringTransport type code for the vehicle when it departs, in string format. See Response product categories > String representation below.
Product.catOutLStringTransport type name for the vehicle when it departs, depending on language parameter
Example: “Buss”, “Tåg”, “Tunnelbana”
Product.operatorStringOperator name. For example: “SL”, ”Skånetrafiken”.
Product.operatorCodeStringOperator code. For example: “256”, “289”.

Response product categories

Careful!

Request category codes for filtering differ from response category codes. These are response product category codes. Request category codes are described in the next section.

String representation

AbbreviationName
BLTRegional bus
BXBExpress bus
BAXAirport Express bus, such as Flygbussarna
ULTMetro
JAXAirport Express Train, such as Arlanda Express
JLTLocal train
JRERegional train
JICInterCity train
JPTPågaTåg
JEXExpress train
SLTTram
FLTLokal ferry
FUTInternational ferry

Numeric representation

NameNumeric value
High speed trains, Snabbtåg, Arlanda Express1
Regional trains, InterCity trains2
Express busses, Flygbussar3
Local trains Tåg, PågaTåg, Öresundståg4
Metro, such as tunnelbanan5
Tram such as Spårvagn, Tvärbanan6
Busses7
Ferries and international ferries8
Taxi9

Request product category codes

Careful!

Request category codes for filtering differ from response category codes. These are request product category codes. Response category codes are described in the section above.

NameNumeric value
Air traffic1
High speed trains, Snabbtåg, Arlanda Express2
Local trains Tåg, PågaTåg, Öresundståg4
Express busses, Flygbussar8
Regional trains, InterCity trains16
Metro, such as tunnelbanan32
Tram such as Spårvagn, Tvärbanan64
Busses128
Ferries and international ferries256
Taxi512

In order to select multiple products, these values can be added up.