# Get distance Uses HTTP GET to accept one input record and returns the response in JSON format. Endpoint: GET /getDistance ## Query parameters: - `id` (string, required) License Key - The License Key issued by Melissa. Example: "{REPLACE-WITH-YOUR-LICENSE-KEY}" - `opt` (string) Options - List options in the following format, with multiple options delimited with a ,. For example: optionName:parameter,optionName:parameter. These options are case-sensitive and camel case. - arriveAt: - Specify the arrival time ISO 8601 UTC. - avoid: - Specify the types of transport obstacles to avoid. - departAt: - Specify the departure date and time in ISO 8601 UTC. Default is now - departs immediately. - routeType: - Specify the type of route. - eco - Balances travel time and fuel efficiency. - fastest - Optimizes for fastest travel time. - shortest - Optimizes for shortest travel distance. - thrilling - Optimized for challenging, hilly, or winding routes. - traffic: - Considers current traffic conditions. Default is true. - travelMode: - Specify the type of vehicle used for the travel mode. Default is car. - vehicleCommercial: - Indicates if the vehicle is a commercial vehicle. Default is false. - vehicleHeight: - Specifies the vehicle height in meters. There are no height restrictions. Default is 0. - vehicleLength: - Specifies the vehicle length in meters. Default is 0. - vehicleMaxSpeed: - Specifies the maximum vehicle speed in km/hr. Default is 0. - vehicleWeight: - Specifies the vehicle weight in kilograms. Minimum value is 1. Example: "avoid:tunnels,routeType:shortest" - `t` (string) Transmission Reference - Serves as a unique request identifier. It is returned as sent. Example: "Test" - `units` (string) Units - This specifies the returned distance unit scale. Use mi for miles and km for kilometers. Enum: "mi", "km" - `endLatitude` (number, required) Ending Latitude - The street route ending latitude. Example: 33.64987 - `endLongitude` (number, required) Ending Longitude - The street route ending longitude. Example: -117.58296 - `startLatitude` (number, required) Starting Latitude - The street route starting latitude. Example: 33.63752 - `startLongitude` (number, required) Starting Longitude - The street route starting longitude. Example: -117.60692 ## Response 200 fields (application/json): - `Results` (string) Comma delimited status, error codes, and change codes for the record. For more information, see [Street Route Result Codes](https://docs.melissa.com/cloud-api/street-route/result-codes.html). - `Units` (string) This is a string value that is the set unit of measurement for the TotalDrivingDistance field. - `TransmissionResults` (string) Lists error codes from any errors caused by the most recent request as a whole. For more information, see [Street Route Result Codes](https://docs.melissa.com/cloud-api/street-route/result-codes.html). - `TravelTime` (string) This is a string value of the travel time for the record in the format hh:mm:ss. - `TotalDrivingDistance` (string) This is a string value with the total driving distance. Refer to the Units field to know what unit of measurement it is. - `TransmissionReference` (string) A pass-through of the input TransmissionReference field. - `Version` (string) The current service version number. ## Response 400 fields (application/json): - `type` (string) The type of error that occurred. - `title` (string) A short summary of the error. - `status` (integer) The HTTP status code for the error. - `errors` (object) - `errors.$.` (array) A detailed message about the error. - `traceId` (string) A unique identifier for the request, useful for debugging.