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#

  • GET JSON
  • POST JSON
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#

  • GET JSON
  • POST JSON

Code

Description

Request Level Parameters

id

The License Key issued by Melissa.

t

Optional. Serves as a unique request identifier.

units

This specifies the returned distance unit scale.

Record Level Parameters

endLatitude

The street route starting latitude.

endLongitude

The street route ending longitude.

startLatitude

The street route starting latitude.

startLongitude

The street route starting longitude.

Code

Description

Request Level Parameters

CustomerID

The License Key issued by Melissa.

TransmissionReference

Optional. Serves as a unique request identifier.

Units

This specifies the returned distance unit scale.

Record Level Parameters

EndLatitude

The street route starting latitude.

EndLongitude

The street route ending longitude.

RecordID

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.

StartLatitude

The street route starting latitude.

StartLongitude

The street route starting longitude.

Headers#

  • GET JSON
  • POST JSON
Content-Type: application/json; charset=utf-8
Accept: application/json

Response#

  • GET JSON
  • POST JSON
{
    "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 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.

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 HH:MM:SS.

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

SR01

IP Address Found

Route distance was calculated successfully.

SR11

IP Address Not Found

Input or syntax error. The distance calculation could not be performed.

SR12

Proxy IP Address

Route distance could not be calculated.