Street Route:Request: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{StreetRouteNav |InputOutputCollapse= }} {{CustomTOC}} A request consists of a protocol to make a call to the service, detailing desired elements. Your License Key is requ..." |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
Street Route supports the JSON and REST protocols to access the service. | Street Route supports the JSON and REST protocols to access the service. | ||
==URL== | |||
{{URL-StreetRoute}} | |||
==Header== | |||
HTTP headers need to match the protocols and formats being used. | |||
Street Route requires the values of <code>Content-Type</code> and <code>Accept</code>. | |||
===Example JSON Request Header=== | |||
<pre>{ | |||
"Content-Type": "application/json; charset=utf-8", | |||
"Accept": "application/json" | |||
}</pre> | |||
Line 21: | Line 37: | ||
|License Key||id||CustomerID | |License Key||id||CustomerID | ||
|- | |- | ||
|Units|| | |Units||units||Units | ||
|- | |- | ||
|Record ID||rowspan="5"|Record|| ||RecordID | |Record ID||rowspan="5"|Record|| ||RecordID | ||
Line 93: | Line 109: | ||
|JSON||<code>"Units":"'''''string'''''"</code> | |JSON||<code>"Units":"'''''string'''''"</code> | ||
|- | |- | ||
|REST||<code>& | |REST||<code>&units = '''''string'''''</code> | ||
|} | |} | ||
Line 179: | Line 195: | ||
[[Category:Street Route]] | [[Category:Street Route Cloud API]] | ||
[[Category:Reference]] | [[Category:Reference]] |
Latest revision as of 23:44, 1 September 2021
Street Route Navigation | ||||
---|---|---|---|---|
| ||||
| ||||
| ||||
| ||||
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.
- 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