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
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 />
Name | Data type | Description |
---|---|---|
Product.name | String | Public name, matches catOutL + num |
Product.internalName | String | Internal name, matches catOutL + num |
Product.displayNumber | String | Publicly announced number (train or line number) |
Product.num | String | Internal product number (e.g. train number) |
Product.line | String | Publicly announced line name, if available |
Product.lineId | String | Line id for use in further requests |
Product.catCode | Integer | Category code, see Response product class categories > Numeric representation below |
Product.cls | String | Category class, same codes as used in requests, see below |
Product.catIn | String | Transport type code for the vehicle when it arrives, in string format. Typically identical to catOut. |
Product.catOut | String | Same as catOutS |
Product.catOutS | String | Transport type code for the vehicle when it departs, in string format. See Response product categories > String representation below. |
Product.catOutL | String | Transport type name for the vehicle when it departs, depending on language parameter Example: “Buss”, “Tåg”, “Tunnelbana” |
Product.operator | String | Operator name. For example: “SL”, ”Skånetrafiken”. |
Product.operatorCode | String | Operator 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
Abbreviation | Name |
---|---|
BLT | Local bus |
BRE | Regional bus |
BXB | Express bus |
BAX | Airport Express bus, such as Flygbussarna |
BBL | Bus |
BRB | Replacement bus |
FLT | Lokal ferry |
JAX | Airport Express Train, such as Arlanda Express |
JLT | Local train |
JRE | Regional train |
JIC | InterCity train |
JST | High speed train |
JEX | Express train |
JBL | Train |
JEN | EuroNight train |
JNT | Night train |
SLT | Tram |
TLT | Taxi |
ULT | Metro |
Numeric representation
Name | Numeric value |
---|---|
High speed trains, Snabbtåg, Arlanda Express | 1 |
Regional trains, InterCity trains, Night trains | 2 |
Express busses, Flygbussar | 3 |
Local trains, Öresundståg | 4 |
Metro, such as tunnelbanan | 5 |
Tram such as Spårvagn, Tvärbanan | 6 |
Busses | 7 |
Ferries | 8 |
Taxi | 9 |
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.
Name | Numeric value |
---|---|
Air traffic | 1 |
High speed trains, Snabbtåg, Arlanda Express | 2 |
Regional trains, InterCity trains | 4 |
Express busses, Flygbussar | 8 |
Local trains Tåg, PågaTåg, Öresundståg | 16 |
Metro, such as tunnelbanan | 32 |
Tram such as Spårvagn, Tvärbanan | 64 |
Busses | 128 |
Ferries and international ferries | 256 |
Taxi | 512 |
In order to select multiple products, these values can be added up.