Reference Guide#
Introduction#
Welcome to the service Street Route
Base URL#
https://streetroute.melissadata.net/
Licensing#
The License Key is a software key required to use the web service. You will receive your license key from your Melissa representative. If you don’t have a license key, contact the Melissa sales team at sales@melissa.com or 800-MELISSA ext. 3 (800-635-4772 ext. 3). Without a license key, Street Route will not function.
To set the license key, use the id/CustomerID property in your requests.
Endpoints#
v1/WEB/StreetRoute/getDistance#
Introduction#
Find the distance and general drive time between two points.
Try It Now#
curl -X GET "https://streetroute.melissadata.net/v1/WEB/StreetRoute/getDistance?\
&id={{customerId}}\
&units=\
&startLatitude=33.637520\
&startLongitude=-117.606920\
&endLatitude=33.649870\
&endLongitude=-117.582960\
&format=JSON" \
-H "Content-Type:application/json" \
-H "Accept:application/json"
curl -X POST "http://StreetRoute.melissadata.net/V4/WEB/StreetRoute/doStreetRoute" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '
{
"CustomerID":{{customerId}},
"TransmissionReference":"",
"Units":"",
"Records":
[
{
"RecordID":"",
"StartLatitude":"",
"StartLongitude":"",
"EndLatitude":"",
"EndLongitude":""
},
{
"RecordID":"",
"StartLatitude":"",
"StartLongitude":"",
"EndLatitude":"",
"EndLongitude":""
}
]
}'
Request Parameters#
Code |
Description |
---|---|
t |
Value passed through unchanged to the response for identification or any other purpose. |
id |
The License Key issued by Melissa. |
startLatitude |
The street route starting latitude. |
startLongitude |
The street route starting longitude. |
endLatitude |
The street route ending latitude. |
endLongitude |
The street route ending longitude. |
units |
This specifies the returned distance unit scale. |
Code |
Description |
---|---|
t |
Value passed through unchanged to the response for identification or any other purpose. |
id |
The License Key issued by Melissa. |
startLatitude |
The street route starting latitude. |
startLongitude |
The street route starting longitude. |
endLatitude |
The street route ending latitude. |
endLongitude |
The street route ending longitude. |
units |
This specifies the returned distance unit scale. |
Headers#
Content-Type: application/json; charset=utf-8
Accept: application/json
Response#
{
"Results": "SR01",
"Units": "mi",
"TransmissionResult": "",
"TravelTime": "00:05:05",
"TotalDrivingDistance": "1.866595",
"TransmissionReference": null,
"Version": "1.4.1.0"
}
{
"Version": "1.4.1.0",
"Units": "mi",
"TransmissionReference": "",
"TransmissionResult": "",
"TotalRecords": "2",
"Records": [
{
"RecordID": "",
"Results": "SR12",
"TravelTime": "",
"TotalDrivingDistance": ""
},
{
"RecordID": "",
"Results": "SR12",
"TravelTime": "",
"TotalDrivingDistance": ""
}
]
}
Service Level Response Fields#
Output Name |
Description |
---|---|
Version |
The current service version number. |
Units |
This is a string value that is the set unit of measurment for the TotalDrivingDistance field. |
TransmissionReference |
Optional. Serves as a unique request identifier. |
TransmissionResults |
Lists error codes from any errors caused by the most recent request as a whole. |
TotalRecords |
Total number of records. |
Record Level Response Fields#
Output Name |
Description |
---|---|
RecordID |
The number of the record. Always 1 for a single request, otherwise it serves as an index of the array of records. |
Results |
Comma delimited status, error codes, and change codes for the record. |
Travel Time |
This is a string value of the travel time for the record in the format HH:MM:SS. |
Total Driving Distance |
This is a string value with the total driving distance. Refer to the Units field to know what unit of measurement it is. |
Result Codes#
Melissa Data’s products use a result code system to indicate data quality; the status and any errors. These result codes are four-character codes (two letters followed by two numbers), delimited by commas. Result code definitions are shared among Melissa Data products.
Understanding the Code#
To fully understand result codes, you need to know them. Knowing what codes are possible and what they indicate will be key in building an effective application. It is useful to know all the codes, but this does not necessarily mean you will use them all. Just because you have a toolbox, doesn’t mean you will also try to use a screwdriver along with a hammer on a nail.
Code |
Short Description |
Long Description |
---|---|---|
IS - IP Address Status |
||
|
IP Address Found |
Route distance was calculated successfully. |
|
IP Address Not Found |
Input or syntax error. The distance calculation could not be performed. |
|
Proxy IP Address |
Route distance could not be calculated. |