REST API

 

REST (Representational State Transfer) protocol is a simple stateless architecture that usually runs over HTTP.  TrackRoad Web Services has support for both JSON and XML REST.  The same rules and methods apply when using REST with one exception.  After Login, you get a "KEY" which you should use in subsequent calls to REST.  This is unlike SOAP where you must use a SessionID.

Here's an initialization sample code.

 

        private string accountID = "1xxxxxx";
        private string password = "xxxxx";
        private string key = null;

        string serviceUrl = "http://trackservice.trackroad.com/";   // <-- where service can be found

        private ts.TrackService client = null;
        TestInternal.ts.DispatchSpecification dispatchRequest = null;
        TestInternal.ts.GeocodeSpecification geocodeReqest = null;
        TestInternal.ts.DistanceSpecification distanceRequest = null;
        TestInternal.ts.RouteSpecification routeRequest = null;