Datawharf Tech Ltd APIs
DEV - Endpoints
/distance
Returns the distance between two train stations
Headers:
- api-key: your API key for authentication
Parameters:
- source - the 3 letter CRS code identifying the source station
- destination - the 3 letter CRS code identifying the destination station
/carbon
Returns the carbon cost of a train service
Headers:
- api-key: your API key for authentication
Parameters:
- source - the 3 letter CRS code identifying the source station
- destination - the 3 letter CRS code identifying the destination station
/station/basic
Returns a basic set of information about a train station
Headers:
- api-key: your API key for authentication
Parameters:
- crs - the 3 letter CRS code for the train station
/station/all
Returns a detailed set of information about a train station
Headers:
- api-key: your API key for authentication
Parameters:
- crs - the 3 letter CRS code for the train station
/lookup/v1
Returns the different IDs which can be used to identify a train service, acting as a translator for different types of ID
Headers:
- api-key: your API key for authentication
Parameters:
All parameters are optional and different combinations can be used depending on the desired purpose
Combination 1:
- rid - the RID for the service - e.g 202209228958808
Combination 2:
- uid - the uid for the service - e.g Y58808
- date - the date of the service in the formatt yyyy-mm-dd - e.g 2022-09-22
Combination 3:
- rsid - the rsid for the service - e.g. SR779000
- date - the date of the service in the formatt yyyy-mm-dd - e.g 2022-09-22
Combination 4:
- headcode - the headcode for the service - e.g. 2J09
- source - the source 3 letter CRS code for the service
- destination - the destination 3 letter CRS code for the service
- datetime - the datetime of the service - e.g. 2022-09-22T16:55
Combination 5:
- source - the source 3 letter CRS code for the service
- destination - the destination 3 letter CRS code for the service
- datetime - the datetime of the service - e.g. 2022-09-22T16:55