PC*MILER|Rail Web Services
Public Member Functions | List of all members
IRestService Interface Reference

Public Member Functions

ReportResponse GetRouteReport (RouteReportRequest Request)
 RouteReport API will generate a requested report. More...
 
RouteResponse GetRoutePathRest (RouteRequest Request)
 RoutePath API will generate the Lat/Lon route path. More...
 
GeocodeResponse GeocodeStation (StationFormat Format, string Name, string Railroad, bool? TerminalSwitching, bool? IntermodalOnlyStations)
 GeocodeStation API for locating rail freight station(s). More...
 
GeocodeResponse GetStationLocations (string SPLC)
 GetStationLocations API for locating rail freight station(s) by SPLC code in the database. Up to one station in an array will be returned in this release. More...
 

Detailed Description

PC*MILER|Rail REST Service

Member Function Documentation

◆ GetRouteReport()

ReportResponse GetRouteReport ( RouteReportRequest  Request)

RouteReport API will generate a requested report.

This is a POST request. The request body is JSON.

REST URI:
/route/Report
Parameters
RequestJSON route report request object.
Returns
ReportResponse containing a report based on the Report parameter.
JSON Example:
{
  "Stops": [{
    "Format": "StationState",
    "Name": "Denver, CO",
    "Railroad": "BNSF"
  },
  {
    "Format": "StationState",
    "Name": "Los angeles ca",
    "Railroad": "BNSF"
  }],
  "Options": {
    "RoutingPreference": "Practical",
    "TerminalSwitching": true,
    "AmtrakRoutes": true,
    "IntermodalOnlyStations": true,
    "DistUnit": "Miles"
  },
  "Report": "Detailed"
}

◆ GetRoutePathRest()

RouteResponse GetRoutePathRest ( RouteRequest  Request)

RoutePath API will generate the Lat/Lon route path.

This is a POST request. The request body is JSON.

REST URI:
/route/Path
Parameters
RequestJSON route path list.
Returns
PathResponse containing a list of Lat/Lons.
JSON Example:
{
  "Stops": [{
    "Format": "StationState",
    "Name": "Denver, CO",
    "Railroad": "BNSF"
  },
  {
    "Format": "StationState",
    "Name": "Los angeles ca",
    "Railroad": "BNSF"
  }],
  "Options": {
    "RoutingPreference": "Practical",
    "TerminalSwitching": true,
    "AmtrakRoutes": true,
    "IntermodalOnlyStations": true,
    "DistUnit": "Miles"
  }
}

◆ GeocodeStation()

GeocodeResponse GeocodeStation ( StationFormat  Format,
string  Name,
string  Railroad,
bool?  TerminalSwitching,
bool?  IntermodalOnlyStations 
)

GeocodeStation API for locating rail freight station(s).

REST URI:
/geocode/Station?format={Format}&name={Name}&railroad={Railroad}&terminalSwitching={TerminalSwitching}&intermodalOnlyStation={IntermodalOnlyStations}
Parameters
FormatSee Station Format for more information.
NameSee Station Name for more information.
Railroad(Optional) 2 to 4 character Standard Carrier Alpha Code.
TerminalSwitching(Optional) See Terminal Switching for more information.
IntermodalOnlyStations(Optional) See Intermodal Only Stations for more information.
Returns
GeocodeResponse containing a list of GeocodeInfo

◆ GetStationLocations()

GeocodeResponse GetStationLocations ( string  SPLC)

GetStationLocations API for locating rail freight station(s) by SPLC code in the database. Up to one station in an array will be returned in this release.

REST URI:
/poi/Station?splc={splc}
Parameters
SPLCSPLC code.
Returns
GeocodeResponse containing a list of GeocodeInfo