Reference Guide#
Introduction#
Welcome to the Street Route service documentation.
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#
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=\
&endLatitude=33.649870\
&endLongitude=-117.582960\
&format=JSON\
&startLatitude=33.637520\
&startLongitude=-117.606920" \
-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}},
"Records":[{
"EndLatitude":"",
"EndLongitude":"",
"RecordID":"",
"StartLatitude":"",
"StartLongitude":""
},
{
"EndLatitude":"",
"EndLongitude":"",
"RecordID":"",
"StartLatitude":"",
"StartLongitude":""
}],
"TransmissionReference":"",
"Units":""
}'
Request Parameters#
Code |
Description |
---|---|
Request Level Parameters |
|
|
The License Key issued by Melissa. |
|
Optional. Serves as a unique request identifier. |
|
This specifies the returned distance unit scale. |
Record Level Parameters |
|
|
The street route starting latitude. |
|
The street route ending longitude. |
|
The street route starting latitude. |
|
The street route starting longitude. |
Code |
Description |
---|---|
Request Level Parameters |
|
|
The License Key issued by Melissa. |
|
Optional. Serves as a unique request identifier. |
|
This specifies the returned distance unit scale. |
Record Level Parameters |
|
|
The street route starting latitude. |
|
The street route ending longitude. |
|
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. |
|
The street route starting latitude. |
|
The street route starting longitude. |
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 |
---|---|
TotalRecords |
Total number of records. |
TransmissionReference |
A pass-through of the input TransmissionReference field. |
TransmissionResults |
Lists error codes from any errors caused by the most recent request as a whole. |
Units |
This is a string value that is the set unit of measurment for the TotalDrivingDistance field. |
Version |
The current service version number. |
Record Level Response Fields#
Output Name |
Description |
---|---|
RecordID |
The number of the record.
Always |
Results |
Comma delimited status, error codes, and change codes for the record. |
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. |
Travel Time |
This is a string value of the travel time for the record in the format |
Result Codes#
Melissa 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. |