Reverse GeoCoder:Request: Difference between revisions
Jump to navigation
Jump to search
Created page with "← Reverse GeoCoder Web Service Reference {| class="mw-collapsible" cellspacing="2" style="background-color:#f9f9f9; border:1px..." |
No edit summary |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ReverseGeoCoderNav | |||
|InputOutputCollapse= | |||
}} | |||
{ | |||
{{CustomTOC}} | |||
|- | |||
| | 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== | |||
{{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> | |||
==Field Names== | |||
This is a list of the request field names and their protocol naming conventions. | |||
{| class="alternate01 sortable" | |||
!Field Name !! Level !! REST !! JSON | |||
|- | |||
|Transmission Reference||rowspan="7" valign="center"|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. | |||
<h3 class="h3grey">Transmission Reference</h3> | |||
:''Optional.'' | |||
:This is a string value that serves as a unique identifier for this set of records. It is returned as sent. | |||
:{| class="alternate01" | |||
!Protocol !! Syntax | |||
|- | |- | ||
| | |JSON||<code>"TransmissionReference":"'''''string'''''"</code> | ||
|- | |- | ||
| | |REST||<code>?t = '''''string'''''</code> | ||
|- | |- | ||
| | |XML||<code><TransmissionReference>'''''string'''''</TransmissionReference></code> | ||
|} | |||
<h3 class="h3grey">License Key</h3> | |||
:''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. | |||
:{| class="alternate01" | |||
!Protocol !! Syntax | |||
|- | |- | ||
| | |JSON||<code>"CustomerID":"'''''string'''''"</code> | ||
|- | |||
|REST||<code>&id = '''''string'''''</code> | |||
|- | |||
|XML||<code><CustomerID>'''''string'''''</CustomerID></code> | |||
|} | |} | ||
<h3 class="h3grey">Latitude</h3> | |||
:''Required.'' | |||
:The latitude geographic coordinate in decimal format. | |||
:{| class="alternate01" | |||
!Protocol !! Syntax | |||
|- | |||
|JSON||<code>"Latitude":"'''''string'''''"</code> | |||
|- | |||
|REST||<code>&lat = '''''string'''''</code> | |||
|- | |- | ||
| | |XML||<code><Latitude>'''''string'''''</Latitude></code> | ||
|} | |||
| | |||
! | |||
<h3 class="h3grey">Longitude</h3> | |||
:''Required.'' | |||
:The longitude geographic coordinate in decimal format. | |||
:{| class="alternate01" | |||
!Protocol !! Syntax | |||
|- | |- | ||
| | |JSON||<code>"Longitude":"'''''string'''''"</code> | ||
|- | |- | ||
| | |REST||<code>&long = '''''string'''''</code> | ||
|- | |- | ||
| | |XML||<code><Longitude>'''''string'''''</Longitude></code> | ||
|} | |} | ||
<h3 class="h3grey">MaxDistance</h3> | |||
:''Optional.'' | |||
:The requested maximum distance (in miles). The maximum possible distance is 10 miles. If no MaxDistance is specified, the default is 10 miles. | |||
:{| class="alternate01" | |||
!Protocol !! Syntax | |||
|- | |||
|JSON||<code>"MaxDistance":"'''''string'''''"</code> | |||
|- | |||
|REST||<code>&dist = '''''string'''''</code> | |||
|- | |||
|XML||<code><MaxDistance>'''''string'''''</MaxDistance></code> | |||
|} | |||
<h3 class="h3grey">MaxRecords</h3> | |||
:''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. | |||
:{| class="alternate01" | |||
!Protocol !! Syntax | |||
|- | |||
|JSON||<code>"MaxRecords":"'''''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. | |||
|} | |||
= | <h3 class="h3grey">Format</h3> | ||
:''Optional.'' | |||
:The desired format of the response. Possible values for this option are "json" or "xml". The default value is "xml". | |||
:{| class="alternate01" | |||
!Protocol !! Syntax | |||
|- | |||
|REST||<code>&format = '''''string'''''</code> | |||
|} | |||
[[Category:Reverse GeoCoder | [[Category:Reverse GeoCoder]] | ||
[[Category:Reference]] | [[Category:Reference]] |
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