Skip to main content

Set Road Speeds


Represents a RoadSpeedsRequest structure containing the request header and the road speed request body.


<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:SOAP-ENC="" xmlns:xsi="" xmlns:xsd="">
    <m:AuthHeader xmlns:m="">
    <m:SetRoadSpeeds xmlns:m="">

RoadSpeedsRequest Request

Represents a RoadSpeedsRequest structure containing the request header and the road speed request body.

Request Body Members

Represents a road speed for a type of road and state.

Element Definition Required
RoadCategory An enumeration of RoadType. Gets or sets the type of road.
rs.RoadCategory = RoadType.InterStateRural;
Speed An integer value. Gets or sets the speed of the road in miles per hour.
rs.Speed = 65;
Jurisdiction A string value. Gets or sets the jurisdiction abbreviation (state within NA and country outside NA) for the road speed.
rs.Jurisdiction = “NJ”;
AbbreviationFormat An enumeration value. The country abbreviation format for use outside NA. Default is FIPS.
Usage: AbbreviationFormat = CountryAbbreviationType.ISO2
Vehicle An enumeration value. The Vehicle type, either Auto or Truck for which to set road speeds. Default is Truck.
Usage: Vehicle = VehicleType.Auto
Region An enumeration value. The Region which is only required when sending country abbreviations against the WorldWide Data. Default is the default region of the data.
Usage: Region = DataRegion.EU

Calling SetRoadSpeeds

 List<RoadSpeed> roadSpeeds = new List<RoadSpeed>();
    RoadSpeed rs = new RoadSpeed();

    String[] states = new string[] { "AL", "AR", "DE" };
    int [] speeds = new int[] {45,45,35,75,65,65,55,55,65,65,65};  //11 to match 11 items in RoadType Enum

    int cntr;
    for (int i = 0; i < states.Length; i++ )
        for (  cntr = 0; cntr < speeds.Length; cntr++)
            rs = new RoadSpeed();
            rs.RoadCategory = (RoadType)cntr;
            rs.RoadCategorySpecified = true;
            rs.Speed = speeds[cntr];
            rs.SpeedSpecified = true;
            s.Jurisdiction = states[i];

    SetRoadSpeedsRequest request = new SetRoadSpeedsRequest();
    request.Header = new RequestHeader() { DataVersion = DataVersion.ToString(), RequestType = "SetRoadSpeeds" };
    request.Body = new SetRoadSpeedsRequestBody();
    request.Body.RoadSpeeds = roadSpeeds.ToArray();
    request.Body.AbbreviationFormat = CountryAbbreviationType.FIPS;
    request.Body.Vehicle = VehicleType.Auto;
    request.Body.Region = DataRegion.NA;

    // Create the authentication and authorization header
    AuthHeader soapHeader = this.Caller.GenerateAuthHeader(APIName);

    // Create the service client
    ServiceClient service = new ServiceClient();

    // Call API
    Response response = service.SetRoadSpeeds(soapHeader, request);


<soapenv:Envelope xmlns:soapenv="" xmlns:alk="" xmlns:pcm="">
      <alk:Authorization>YOUR API KEY HERE</alk:Authorization>
        <pcm:Body xmlns="">


Represents a RoadSpeedResponse structure containing the response header and the road speeds response body.

RoadSpeedsResponseBody Members.

Gets or sets the custom place response body which contains the custom places that were requested.

Element Definition
Response A responseHeader system object. Represents a general response from the web service which contains no additional output information aside from the header.

Sample Response

<s:Envelope xmlns:s="">
    <SetRoadSpeedsResponse xmlns="">
      <SetRoadSpeedsResult xmlns:i="">
          <Errors i:nil="true" />
Last updated November 23, 2021.