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
 1"Product": {
 2    "name": "Länstrafik - Tåg 40",
 3    "internalName": "Länstrafik - Tåg 40",
 4    "displayNumber": "40",
 5    "num": "40",
 6    "line": "40",
 7    "lineId": "1275000000036",
 8    "catOut": "JLT",
 9    "catIn": "JLT",
10    "catCode": "4",
11    "cls": "16",
12    "catOutS": "JLT",
13    "catOutL": "Länstrafik - Tåg",
14    "operatorCode": "275",
15    "operator": "SL",
16    "admin": "275___",
17    "routeIdxFrom": 0,
18    "routeIdxTo": 1
19},
1<Product catCode="7" 
2         catOutL="Länstrafik - Buss" 
3         catOutS="BLT" 
4         name="Länstrafik - Buss Grön X" 
5         num="Grön X" operator="Västtrafik"
6         operatorCode="279" 
7         />
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 class 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
BLTLocal bus
BRERegional bus
BXBExpress bus
BAXAirport Express bus, such as Flygbussarna
BBLBus
BRBReplacement bus
FLTLokal ferry
JAXAirport Express Train, such as Arlanda Express
JLTLocal train
JRERegional train
JICInterCity train
JSTHigh speed train
JEXExpress train
JBLTrain
JENEuroNight train
JNTNight train
SLTTram
TLTTaxi
ULTMetro

Numeric representation

NameNumeric value
High speed trains, Snabbtåg, Arlanda Express1
Regional trains, InterCity trains, Night trains2
Express busses, Flygbussar3
Local trains, Öresundståg4
Metro, such as tunnelbanan5
Tram such as Spårvagn, Tvärbanan6
Busses7
Ferries8
Taxi9

Request product class 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
Regional trains, InterCity trains4
Express busses, Flygbussar8
Local trains Tåg, PågaTåg, Öresundståg16
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.