Skip to main content

Create a Routing Profile

Contents

POST /routingprofiles

Creates a new, custom Vehicle Routing Profile. The profile will be added to the Account Manager account associated with your API key.

Resource URL

https://api.trimblemaps.com/routing/v1/routingprofiles

Request

The parameters that can be set in a Vehicle Routing Profile vary based on the type of vehicle and worldwide region. Select your region and vehicle type in the drop-down menu to view the available parameters.

Name Description Data Type
Name (Required) Name of the custom profile. Must be unique in an account.
string
isAccountDefault (Optional) Set to true if this profile should be used as a default profile for the account.
Boolean
copilotOptions > displayRestrictions (Optional) Display road restrictions to drivers in the CoPilot navigation screen
0: Show all restrictions
1: Show only restrictions for profile (Default)
2: Hide all restrictions
int
vehicleType (Required) The vehicle type of the custom profile: Heavy Duty; Light Duty; Medium Duty; Bus; Auto; RV
string
units (Optional) Units of measure for the custom profile vehicle dimensions.
0: English (Default for North America)
1: Metric (Default for Europe)
int
vehicleOptions > vehicleConfig (Optional) An object that describes a vehicle’s dimensions. The vehicleConfig object is optional but, if you include it in your request, all of the dimension-related fields below are required.
object
vehicleOptions > vehicleConfig > height The height of the truck in feet and inches or meters depending on units. Valid range is between 60 and 180 inches in English units, or between 200 and 500 centimeters in Metric.
double
vehicleOptions > vehicleConfig > width The width of the truck in inches or meters depending on units. Valid range is between 60 and 102 inches in English units, or between 200 and 300 centimeters in Metric.
double
vehicleOptions > vehicleConfig > length The length of a straight truck/van or combined vehicle’s trailer in feet and inches or meters depending on units. You do not need to include the tractor’s length in this value for a tractor/trailer. If you have tandem trailers that don’t articulate (rigid connection) then it would be the combined length of the trailers. More than just a legal setting, length is used to calculate turning radius using the maximum straight length to see if the driver can make the turn.

Valid range is between 96 and 840 inches in English units, or between 500 and 2500 centimeters in Metric.

double
vehicleOptions > vehicleConfig > weight The weight of the truck in pounds or kilograms depending on units. Valid range is between 1500 and 156470 pounds in North America; between between 20 and 60 metric tonnes in Metric units in Europe; and between 680.39 and 60000 kilograms in other regions of the world.
double
vehicleOptions > vehicleConfig > maxWeightPerAxleGroup The maximum weight per axle group in pounds or kilograms depending on units.
Valid range is between 800 to 45,000 pounds in English units; between 1 and 20 metric tonnes in Metric units in Europe; and between 1000 and 20000 kilograms in other regions of the world.
double
vehicleOptions > governorSpeedLimit (Optional) Maximum average road speed to use in route calculations that overrides all other road speeds when they are above this value. The format is in mph or kph based on units. The valid range is between 1 and 100 mph. Default is null.
int
vehicleOptions > hazmatType (Optional) Indicates the hazardous material type:
0 - None (Default); 1 - General; 2 - Caustic; 3 - Explosives; 4 - Flammable; 5 - Inhalants; 6 - Radioactive; 7 - HarmfulToWater; 8 - Tunnel
int
vehicleOptions > isPropaneRestricted (Optional) (North America Only) Set to true to avoid tunnels with propane restrictions
boolean
vehicleOptions > tunnelCategory (Optional) (Europe Only) When hazmatType is selected, allow the tunnelCategory parameter. None = 0 (Default); TunnelBCDE = 1; TunnelCDE = 2,TunnelDE = 3, TunnelE = 4
int
routingOptions > restrictionZones > avoid (Optional) (Europe Only) Array of strings that specifies which restriction zones will be avoided when using this custom profile. Options are: environmentalZones and congestionZones.
Array <string>
routingOptions > restrictionZones > allow (Optional) (Europe Only) Array of strings that specifies which restriction zones will be allowed when using this custom profile. Options are: environmentalZones and congestionZones.
Array <string>
routingOptions > restrictionZones > warn (Optional) (Europe Only) Array of strings that specifies which restriction zones will generate a warning when using this custom profile. Options are: environmentalZones and congestionZones.
Array <string>
routingOptions > useStateAndNationalNetwork (Optional) (North America Only) Set to true (Default for vehicles with width exceeding 96 inches or length exceeding 48 feet) to favor the U.S. Federally designated National Network and state-designated extensions to the National Network.
boolean
routingOptions > routeType (Optional) The desired routing algorithm: 0 - Practical (Default); 1 - Shortest; 2 - Fastest
enum
routingOptions > tollRoads (Optional) Indicates whether or not to avoid toll roads when generating a route. Available in dataVersion PCM34 and Later. Use avoidTolls for older versions. 1 - Always Avoid; 2 - Avoid if Possible; 3 - Use (Default)
int
routingOptions > useOpenBorders (Optional) (North America Only) Sets whether or not international borders are open to travel. Set to false to minimize the number of international border crossings, unless they are necessary to reach all of the stops on a route. For example, if all your stops are in the “lower 48” United States, the resulting route will stay in the United States even if the most practical or shortest route would normally involve some Canadian mileage.

The true option ignores international boundaries in generating the best route. True (Default); False

boolean
routingOptions > ferries (Optional) Indicates whether or not to discourage the use of ferries when creating the route. 0 - Use (Default); 1 - Discourage
boolean
routingOptions > elevationLimit (Optional) (North America Only) Sets a customized limit on the elevation of the roads a route will use. Limit will be ignored if routing is deemed impractical with the limit, or a stop is located at an elevation higher than the limit. Elevation unit can be either centimeters or feet, as determined by the units parameter.
int
routingOptions > sideOfStreetAdherenceLevel (Optional) How strict to be in order to avoid the destination being on the opposite side of the street.
0 - Off (Default)
1- Minimal
2 - Moderate
3 - Average
4 - Strict
5 - Adhere
6 - StronglyAdhere
Enum
routingOptions > useAvoidsAndFavors (Optional) Indicates whether or not to obey Route Modifiers, which are roads to avoid or favor in routing. Route Modifiers are created in ContentTools.
boolean
routingOptions > useTraffic (Optional) Indicates whether or not to use traffic data. When set to true, the routing algorithm will consider traffic closures when selecting the route and use historical traffic patterns to calculate the trip’s ETA and travel time. If set to true, and the trip’s departure time is also set to within 15 minutes of the current time, real-time traffic data will be used for the first 15 miles and historical traffic patterns will be used for the remainder of the route. (By default, useTraffic is false, and ETA and travel time are computed using Trimble Maps’s average road speeds by road class.)


With the exception of road closures, traffic data is only used to select the route path a vehicle will take when the routing algorithm (routeType) is set to Fastest. (Fastest routing is not recommended for trucks—autos and vans only.)

boolean

Response

Name Description Data Type
message Indicates the status of the POST operation
int
data Custom Routing Profile object
object
routingProfileId An auto-generated identifier for the newly created profile.
int
lastModified Indicates the last time the routing profile was modified
DateTime

Sample Request

{
  "name": "Test Profile",
  "vehicleType": "Heavy Duty",
  "units": 0,
  "vehicleOptions": {
    "vehicleConfig": {
      "height": 162,
      "width": 102,
      "length": 636,
      "weight": 80000,
      "maxWeightPerAxleGroup": 80000
    },
    "governorSpeedLimit": null,
    "hazmatType": 0
  },
  "routingOptions": {
    "useStateAndNationalNetwork": false,
    "routeType": 0,
    "elevationLimit": null
  }
}

Sample Response

{
  "message": "Successfully created routing profile.",
  "data": {
    "routingProfileId": 979393,
    "name": "Test Profile",
    "isAccountDefault": false,
    "copilotOptions": {
      "displayRestrictions": 2
    },
    "vehicleType": "Heavy Duty",
    "units": 0,
    "vehicleOptions": {
      "vehicleConfig": {
        "height": 162.0,
        "width": 102.0,
        "length": 636.0,
        "weight": 80000.0,
        "maxWeightPerAxleGroup": 80000.0
      },
      "governorSpeedLimit": null,
      "hazmatType": 0,
      "isPropaneRestricted": null,
      "tunnelCategory": null
    },
    "routingOptions": {
      "ferries": "Use",
      "restrictionZones": {
        "allow": [],
        "avoid": [],
        "warn": ["congestionZones", "environmentalZones"]
      },
      "useStateAndNationalNetwork": false,
      "routeType": 0,
      "tollRoads": 3,
      "useOpenBorders": false,
      "elevationLimit": null
    }
  }
}
Last updated July 2, 2024.
API Endpoint:

Contents