Reverse GeoCoder:Request: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ReverseGeoCoderNav | {{ReverseGeoCoderNav | ||
| | |InputOutputCollapse= | ||
}} | }} | ||
Line 8: | Line 8: | ||
A request consists of a protocol to make a call to the service, detailing desired elements. The minimum required elements in a request are your License Key and at least one set of geo-coordinates. | A request consists of a protocol to make a call to the service, detailing desired elements. The minimum required elements in a request are your License Key and at least one set of geo-coordinates. | ||
Reverse GeoCoder supports multiple protocols to access the service, including | Reverse GeoCoder supports multiple protocols to access the service, including JSON, REST, and XML. | ||
==URL== | ==URL== | ||
{{URL-ReverseGeoCoder}} | {{URL-ReverseGeoCoder}} | ||
==Header== | |||
HTTP headers need to match the protocols and formats being used. | |||
Reverse GeoCoder 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 32: | Line 44: | ||
|- | |- | ||
|MaxRecords||recs||MaxRecords | |MaxRecords||recs||MaxRecords | ||
|- | |||
|Options||opt||Options | |||
|- | |- | ||
|Format||format|| | |Format||format|| | ||
Line 52: | Line 66: | ||
|REST||<code>?t = '''''string'''''</code> | |REST||<code>?t = '''''string'''''</code> | ||
|- | |- | ||
| | |XML||<code><TransmissionReference>'''''string'''''</TransmissionReference></code> | ||
|} | |} | ||
Line 70: | Line 84: | ||
|REST||<code>&id = '''''string'''''</code> | |REST||<code>&id = '''''string'''''</code> | ||
|- | |- | ||
| | |XML||<code><CustomerID>'''''string'''''</CustomerID></code> | ||
|} | |} | ||
Line 86: | Line 100: | ||
|REST||<code>&lat = '''''string'''''</code> | |REST||<code>&lat = '''''string'''''</code> | ||
|- | |- | ||
| | |XML||<code><Latitude>'''''string'''''</Latitude></code> | ||
|} | |} | ||
Line 102: | Line 116: | ||
|REST||<code>&long = '''''string'''''</code> | |REST||<code>&long = '''''string'''''</code> | ||
|- | |- | ||
| | |XML||<code><Longitude>'''''string'''''</Longitude></code> | ||
|} | |} | ||
Line 118: | Line 132: | ||
|REST||<code>&dist = '''''string'''''</code> | |REST||<code>&dist = '''''string'''''</code> | ||
|- | |- | ||
| | |XML||<code><MaxDistance>'''''string'''''</MaxDistance></code> | ||
|} | |} | ||
Line 134: | Line 148: | ||
|REST||<code>&recs = '''''string'''''</code> | |REST||<code>&recs = '''''string'''''</code> | ||
|- | |- | ||
| | |XML||<code><MaxRecords>'''''string'''''</MaxRecords></code> | ||
|} | |||
<h3 style="background-color:rgb(240,240,240);">Options</h3> | |||
:''Optional.'' | |||
:This is a string value containing the options set by the user. | |||
:{| class="alternate01" | |||
!Protocol !! Syntax | |||
|- | |||
|JSON||<code>"Options":"'''''string'''''"</code> | |||
|- | |||
|REST||<code>?opt = '''''string'''''</code> | |||
|- | |||
|XML||<code><Options>'''''string'''''</Options></code> | |||
|} | |||
:List options in the following format, with multiple options delimited with a ";". | |||
:{| class="alternate01" | |||
!Syntax | |||
|- | |||
|<code>''OptionName'':''Parameter'';''OptionName'':''Parameter''</code> | |||
|} | |||
:<h4 style="border-bottom:1px solid black;">IncludeApartments</h4> | |||
::This options allows you to include records with a non-null baseMAK. | |||
::{| class="alternate01 sortable" | |||
!Option Name !! Parameter !! Description | |||
|- | |||
|rowspan="2"|'''IncludeApartments'''||<code>Off</code>||'''''Default.''''' Non-null baseMAK records are not included. | |||
|- | |||
|<code>On</code>||Records with a non-null baseMAK will be included in your search. | |||
|} | |||
:<h4 style="border-bottom:1px solid black;">IncludeUndeliverable</h4> | |||
::This options allows you to specify if you want to include addresses we have identified as unable to deliver mail to. | |||
::{| class="alternate01 sortable" | |||
!Option Name !! Parameter !! Description | |||
|- | |||
|rowspan="2"|'''IncludeUndeliverable'''||<code>Off</code>||Undeliverable addresses are not included. | |||
|- | |||
|<code>On</code>||'''''Default.''''' Undeliverable addresses are included in your search. | |||
|} | |||
:<h4 style="border-bottom:1px solid black;">IncludeEmptyLots</h4> | |||
::This options allows you to specify if you want to include addresses that are empty lots in your search. | |||
::{| class="alternate01 sortable" | |||
!Option Name !! Parameter !! Description | |||
|- | |||
|rowspan="2"|'''IncludeEmptyLots'''||<code>Off</code>||'''''Default.''''' Empty lots are not included. | |||
|- | |||
|<code>On</code>||Empty lots are included in your search. | |||
|} | |} | ||
Line 141: | Line 216: | ||
:''Optional.'' | :''Optional.'' | ||
:The desired format of the response. Possible values for this option are "json" or "xml". | :The desired format of the response. Possible values for this option are "json" or "xml". The default value is "xml". | ||
:{| class="alternate01" | :{| class="alternate01" |
Latest revision as of 16:10, 25 March 2021
Reverse GeoCoder Navigation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
| ||||||||||
| ||||||||||
| ||||||||||
Sample Code |
A request consists of a protocol to make a call to the service, detailing desired elements. The minimum required elements in a request are your License Key and at least one set of geo-coordinates.
Reverse GeoCoder supports multiple protocols to access the service, including JSON, REST, and XML.
URL
REST, XML, JSON, etc.
Use URL Standard http://reversegeo.melissadata.net/v3/WEB/ReverseGeoCode/DoLookup Secure https://reversegeo.melissadata.net/v3/WEB/ReverseGeoCode/DoLookup
JSONP
Use URL Standard http://reversegeo.melissadata.net/v3/jsonp/ReverseGeoCode/DoLookup Secure https://reversegeo.melissadata.net/v3/jsonp/ReverseGeoCode/DoLookup
Header
HTTP headers need to match the protocols and formats being used.
Reverse GeoCoder 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 | |
Latitude | lat | Latitude | |
Longitude | long | Longitude | |
MaxDistance | dist | MaxDistance | |
MaxRecords | recs | MaxRecords | |
Options | opt | Options | |
Format | format |
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
XML <TransmissionReference>string</TransmissionReference>
License Key
- Required.
- This is a string value containing the License Key issued to you for this product.
- 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
XML <CustomerID>string</CustomerID>
Latitude
- Required.
- The latitude geographic coordinate in decimal format.
Protocol Syntax JSON "Latitude":"string"
REST &lat = string
XML <Latitude>string</Latitude>
Longitude
- Required.
- The longitude geographic coordinate in decimal format.
Protocol Syntax JSON "Longitude":"string"
REST &long = string
XML <Longitude>string</Longitude>
MaxDistance
- Optional.
- The requested maximum distance (in miles). The maximum possible distance is 10 miles. If no MaxDistance is specified, the default is 10 miles.
Protocol Syntax JSON "MaxDistance":"string"
REST &dist = string
XML <MaxDistance>string</MaxDistance>
MaxRecords
- Optional.
- The requested number of records. The Maximum number of records the user can get is 100 records. This is also the default if no MaxRecords is specified.
Protocol Syntax JSON "MaxRecords":"string"
REST &recs = string
XML <MaxRecords>string</MaxRecords>
Options
- Optional.
- This is a string value containing the options set by the user.
Protocol Syntax JSON "Options":"string"
REST ?opt = string
XML <Options>string</Options>
- List options in the following format, with multiple options delimited with a ";".
Syntax OptionName:Parameter;OptionName:Parameter
IncludeApartments
- This options allows you to include records with a non-null baseMAK.
Option Name Parameter Description IncludeApartments Off
Default. Non-null baseMAK records are not included. On
Records with a non-null baseMAK will be included in your search.
IncludeUndeliverable
- This options allows you to specify if you want to include addresses we have identified as unable to deliver mail to.
Option Name Parameter Description IncludeUndeliverable Off
Undeliverable addresses are not included. On
Default. Undeliverable addresses are included in your search.
IncludeEmptyLots
- This options allows you to specify if you want to include addresses that are empty lots in your search.
Option Name Parameter Description IncludeEmptyLots Off
Default. Empty lots are not included. On
Empty lots are included in your search.
Format
- Optional.
- The desired format of the response. Possible values for this option are "json" or "xml". The default value is "xml".
Protocol Syntax REST &format = string