# Get distance in batch Uses HTTP POST to accept multiple input records and returns the response in JSON format. Endpoint: POST /getDistance ## Request fields (application/json): - `CustomerID` (string, required) The [License Key](https://docs.melissa.com/melissa/license/license-information.html) issued by Melissa. Example: "{REPLACE-WITH-YOUR-LICENSE-KEY}" - `Options` (string) [Options](https://docs.melissa.com/cloud-api/street-route/street-route-reference-guide.html#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" - `TransmissionReference` (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. Example: "mi" - `Records` (array, required) Array of request records. - `Records.EndLatitude` (string, required) The street route ending latitude. Example: 33.64987 - `Records.EndLongitude` (string, required) The street route ending longitude. Example: -117.58296 - `Records.RecordID` (string) This is a string value containing a unique identifier for the current record. Use this to match the record submitted with the record returned. It will return what is inputted. - `Records.StartLatitude` (string, required) The street route starting latitude. Example: 33.63752 - `Records.StartLongitude` (string, required) The street route starting longitude. Example: -117.60692 ## Response 200 fields (application/json): - `Version` (string) The current service version number. - `Units` (string) This is a string value that is the set unit of measurement for the TotalDrivingDistance field. - `TransmissionReference` (string) A pass-through of the input TransmissionReference 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). - `TotalRecords` (string) Total number of records. - `Records` (array) Array of output records. - `Records.RecordID` (string) The number of the record. Always 1 for a single request, otherwise it serves as an index of the array of records. - `Records.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). - `Records.TravelTime` (string) This is a string value of the travel time for the record in the format hh:mm:ss. - `Records.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. ## 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.