Street Route:Request

From Melissa Data Wiki
Revision as of 23:44, 1 September 2021 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

← Street Route Cloud API

Street Route Navigation
Introduction
Licensing
Input/Output
Request Fields
Response Fields
Examples
REST JSON
Batch JSON
Result Codes
Result Code Use
Street Route Result Codes
Sample Code



A request consists of a protocol to make a call to the service, detailing desired elements. Your License Key is required.

Street Route supports the JSON and REST protocols to access the service.


URL

Use URL
Standard http://streetroute.melissadata.net/v1/WEB/StreetRoute/getDistance
Secure https://streetroute.melissadata.net/v1/WEB/StreetRoute/getDistance


Header

HTTP headers need to match the protocols and formats being used.

Street Route requires the values of Content-Type and Accept.

Example JSON Request Header

{
    "Content-Type": "application/json; charset=utf-8",
    "Accept": "application/json"
}


Field Names

This is a list of the request field names and their protocol naming conventions.

Field Name Level REST JSON
Transmission Reference Request t TransmissionReference
License Key id CustomerID
Units units Units
Record ID Record RecordID
Start Latitude startLatitude StartLatitude
Start Longitude startLongitude StartLongitude
End Latitude endLatitude EndLatitude
End Longitude endLongitude EndLongitude


Minimum Inputs

The following are the possible minimum input requirements.

  1. Start Latitude, Start Longitude, End Latitude, and End Longitude.


Request Elements

The following elements set the basic options for each request. These apply to the entire request, not the individual records.

Transmission Reference

Optional.
This is a string value that serves as a unique identifier for this set of records. It is returned as sent.
Protocol Syntax
JSON "TransmissionReference":"string"
REST ?t = string


License Key

Required.
This is a string value containing the License Key issued to the customer by Melissa for Street Route.
If this element is absent, the Web Service will return an error. To receive a License Key, please contact your Melissa sales representative at 1-800-MELISSA.
Protocol Syntax
JSON "CustomerID":"string"
REST &id = string


Units

Optional.
This specifies the returned distance unit scale.
Unit Syntax
Miles mi
Kilometers km


Protocol Syntax
JSON "Units":"string"
REST &units = string


Request Record Elements

REST will only contain the Records element.

Protocol Definition
JSON Each record will be contained within [{}] under the Records element.
REST The REST interface only allows a single record per request.


Record ID

Optional.
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.
Protocol Syntax
JSON "RecordID":"string"


Start Latitude

Required.
The street route starting latitude.
Protocol Syntax
JSON "StartLatitude":"string"
REST &startLatitude = string


Start Longitude

Required.
The street route starting longitude.
Protocol Syntax
JSON "StartLongitude":"string"
REST &startLongitude = string


End Latitude

Required.
The street route ending latitude.
Protocol Syntax
JSON "EndLatitude":"string"
REST &endLatitude = string


End Longitude

Required.
The street route ending longitude.
Protocol Syntax
JSON "EndLongitude":"string"
REST &endLongitude = string