Reverse GeoCoder:Response: Difference between revisions

From Melissa Data Wiki
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ReverseGeoCoderNav
{{ReverseGeoCoderNav
|ResponseCollapse=
|InputOutputCollapse=
}}
}}


Line 6: Line 6:
{{CustomTOC}}
{{CustomTOC}}


==Response==
A response is the result of a request. This consists of returned results codes and returned addresses, depending on the input provided.
A response is the result of a request. This consists of returned results codes and returned addresses, depending on the input provided.


Depending on the protocol used to make the request, the response will be in a certain protocol. Reverse GeoCoder supports three possible response protocols: SOAP, XML, and JSON.
Depending on the protocol used to make the request, the response will be in a certain protocol. Reverse GeoCoder supports these response protocols: XML, and JSON.
 
 
==Field Names==
This is a list of the response field names and their protocol naming conventions.
 
{| class="alternate01 sortable"
!Field Name !! Level !! JSON/XML
|-
|Version||rowspan="5" valign="center"|Response (Base)||Version
|-
|Transmission Reference||TransmissionReference
|-
|Transmission Results||TransmissionResults
|-
|Results||Results
|-
|Total Records||TotalRecords
|-
|Records||rowspan="11" valign="center"|Record||Records
|-
|Address Line 1||AddressLine1
|-
|Suite Name||SuiteName
|-
|Suite Count||SuiteCount
|-
|City||City
|-
|State||State
|-
|Postal Code||PostalCode
|-
|AddressKey||AddressKey
|-
|Latitude||Latitude
|-
|Longitude||Longitude
|-
|Distance||Distance
|}
 
 
==Response Elements==
The following elements are the basic options for each request. These apply to the entire response, not the individual records.
 
<h3 class="h3grey">Version</h3>
:This is a string value that is the current revision number of Reverse GeoCoder.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"Version":"'''''string'''''"</code>
|-
|XML||<code><Version>'''''string'''''</Version></code>
|}
 
 
<h3 class="h3grey">Transmission Reference</h3>
:This is a string value that serves as a unique identifier for this set of records. It is returned as sent by the Request Array, allowing you to match the Response to the Request.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"TransmissionReference":"'''''string'''''"</code>
|-
|XML||<code><TransmissionReference>'''''string'''''</TransmissionReference></code>
|}
 
 
<h3 class="h3grey">Transmission Results</h3>
:This is a string value that lists error codes from any errors caused by the most recent request as a whole.
 
:For a complete list of error codes, see [[Result Code Details#Reverse GeoCoder|Reverse GeoCoder Result Codes]].
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"TransmissionResults":"'''''string'''''"</code>
|-
|XML||<code><TransmissionResults>'''''string'''''</TransmissionResults></code>
|}
 
 
<h3 class="h3grey">Results</h3>
:This is a string value with comma delimited status, error codes, and change codes for the record.
 
:For a complete list of error codes, see [[Result Code Details#Reverse GeoCoder|Reverse GeoCoder Result Codes]].
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"Results":"'''''string'''''"</code>
|-
|XML||<code><Results>'''''string'''''</Results></code>
|}
 
 
<h3 class="h3grey">Total Records</h3>
:Displays the total number of records returned.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"TotalRecords":"'''''string'''''"</code>
|-
|XML||<code><TotalRecords>'''''string'''''</TotalRecords></code>
|}
 
 
==Response Record Elements==
JSON will only contain the Records element.
 
:{| class="alternate01"
!Protocol !! Definition
|-
|JSON||Each record will be contained within [{}] under the Records element.
|-
|XML||
|}
 
Each of the following elements are returned for each record in the Response Array.
 
 
<h3 class="h3grey">AddressLine1</h3>
:Returns the street address (street number and street name) that corresponds to the input geo coordinates.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"AddressLine1":"'''''string'''''"</code>
|-
|XML||<code><AddressLine1>'''''string'''''</AddressLine1></code>
|}
 
 
<h3 class="h3grey">SuiteName</h3>
:Returns the suite name of the address returned. Values that could be returned are: Ste, Apt., etc.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"SuiteName":"'''''string'''''"</code>
|-
|XML||<code><SuiteName>'''''string'''''</SuiteName></code>
|}
 
 
<h3 class="h3grey">SuiteCount</h3>
:Returns the number of suites in a particular building. Zero will be returned if the address has a no suites (a single delivery point).
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"SuiteCount":"'''''string'''''"</code>
|-
|XML||<code><SuiteCount>'''''string'''''</SuiteCount></code>
|}
 
 
<h3 class="h3grey">City</h3>
:Returns the city of the output address.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"City":"'''''string'''''"</code>
|-
|XML||<code><City>'''''string'''''</City></code>
|}
 
 
<h3 class="h3grey">State</h3>
:Returns the State of the output address.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"State":"'''''string'''''"</code>
|-
|XML||<code><State>'''''string'''''</State></code>
|}
 
 
<h3 class="h3grey">PostalCode</h3>
:Returns the Postal Code of the output address.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"PostalCode":"'''''string'''''"</code>
|-
|XML||<code><PostalCode>'''''string'''''</PostalCode></code>
|}
 
 
<h3 class="h3grey">AddressKey</h3>
:Returns a unique identifier for an address. This key can be used with other current and future Melissa Data services.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"AddressKey":"'''''string'''''"</code>
|-
|XML||<code><AddressKey>'''''string'''''</AddressKey></code>
|}
 
 
<h3 class="h3grey">Latitude</h3>
:Returns the latitude geographic coordinate of the output address.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"Latitude":"'''''string'''''"</code>
|-
|XML||<code><Latitude>'''''string'''''</Latitude></code>
|}
 
 
<h3 class="h3grey">Longitude</h3>
:Returns the longitude geographic coordinate of the output address.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"Longitude":"'''''string'''''"</code>
|-
|XML||<code><Longitude>'''''string'''''</Longitude></code>
|}
 
 
<h3 class="h3grey">Distance</h3>
:Returns the distance between the input coordinates and the output coordinates. A distance of zero indicates that an exact address match was returned for the input geographic coordinates.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"Distance":"'''''string'''''"</code>
|-
|XML||<code><Distance>'''''string'''''</Distance></code>
|}
 
 
<h3 class="h3grey">MelissaAddressKey</h3>
:Returns the Melissa Address Key (MAK). This is a globally unique and persistent key for the location, even if parts of the address change. When an address is fully validated this field returns a 10-digit proprietary key for the address.
 
:With AddressKey (US and Canada only), if an address zip code changes, the AddressKey would also change. Melissa Address Key (MAK) is independent and will not change. This makes MAK a good way to permanently identify and locate addresses. Once you have a MAK it can be used as an input in most Melissa services and thus is a good tool for deduping.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"MelissaAddressKey":"'''''string'''''"</code>
|-
|XML||<code><MelissaAddressKey>'''''string'''''</MelissaAddressKey></code>
|}
 
 
<h3 class="h3grey">MelissaAddressKeyBase</h3>
:Returns the Melissa Address Key Base (BaseMAK). Every full address has its own Melissa Address Key (MAK). If that address is a suites or apartment, we will also return a Melissa Address Key Base (BaseMAK) that corresponds to the overall building. This provides a link between all the individual MAK addresses that belong to the same building. This field also returns a 10-digit proprietary key. Note, if we can validate the address to the building but not the suite, we can return just the BaseMAK.
 
:{| class="alternate01"
!Protocol !! Syntax
|-
|JSON||<code>"MelissaAddressKeyBase":"'''''string'''''"</code>
|-
|XML||<code><MelissaAddressKeyBase>'''''string'''''</MelissaAddressKeyBase></code>
|}




[[Category:Reverse GeoCoder]]
[[Category:Reverse GeoCoder]]
[[Category:Reference]]
[[Category:Reference]]

Latest revision as of 18:48, 21 July 2020

← Reverse GeoCoder

Reverse GeoCoder Navigation
Introduction
Licensing
Input/Output
doLookup
  ↳  Request
  ↳  Response
doLookupPostalCodes
  ↳  Request
  ↳  Response
doLookupFromList
  ↳  Request
  ↳  Response
Examples
REST XML
REST JSON
JSON
XML
Result Codes
Result Code Use
Reverse GeoCoder Result Codes
Sample Code



A response is the result of a request. This consists of returned results codes and returned addresses, depending on the input provided.

Depending on the protocol used to make the request, the response will be in a certain protocol. Reverse GeoCoder supports these response protocols: XML, and JSON.


Field Names

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

Field Name Level JSON/XML
Version Response (Base) Version
Transmission Reference TransmissionReference
Transmission Results TransmissionResults
Results Results
Total Records TotalRecords
Records Record Records
Address Line 1 AddressLine1
Suite Name SuiteName
Suite Count SuiteCount
City City
State State
Postal Code PostalCode
AddressKey AddressKey
Latitude Latitude
Longitude Longitude
Distance Distance


Response Elements

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

Version

This is a string value that is the current revision number of Reverse GeoCoder.
Protocol Syntax
JSON "Version":"string"
XML <Version>string</Version>


Transmission Reference

This is a string value that serves as a unique identifier for this set of records. It is returned as sent by the Request Array, allowing you to match the Response to the Request.
Protocol Syntax
JSON "TransmissionReference":"string"
XML <TransmissionReference>string</TransmissionReference>


Transmission Results

This is a string value that lists error codes from any errors caused by the most recent request as a whole.
For a complete list of error codes, see Reverse GeoCoder Result Codes.
Protocol Syntax
JSON "TransmissionResults":"string"
XML <TransmissionResults>string</TransmissionResults>


Results

This is a string value with comma delimited status, error codes, and change codes for the record.
For a complete list of error codes, see Reverse GeoCoder Result Codes.
Protocol Syntax
JSON "Results":"string"
XML <Results>string</Results>


Total Records

Displays the total number of records returned.
Protocol Syntax
JSON "TotalRecords":"string"
XML <TotalRecords>string</TotalRecords>


Response Record Elements

JSON will only contain the Records element.

Protocol Definition
JSON Each record will be contained within [{}] under the Records element.
XML

Each of the following elements are returned for each record in the Response Array.


AddressLine1

Returns the street address (street number and street name) that corresponds to the input geo coordinates.
Protocol Syntax
JSON "AddressLine1":"string"
XML <AddressLine1>string</AddressLine1>


SuiteName

Returns the suite name of the address returned. Values that could be returned are: Ste, Apt., etc.
Protocol Syntax
JSON "SuiteName":"string"
XML <SuiteName>string</SuiteName>


SuiteCount

Returns the number of suites in a particular building. Zero will be returned if the address has a no suites (a single delivery point).
Protocol Syntax
JSON "SuiteCount":"string"
XML <SuiteCount>string</SuiteCount>


City

Returns the city of the output address.
Protocol Syntax
JSON "City":"string"
XML <City>string</City>


State

Returns the State of the output address.
Protocol Syntax
JSON "State":"string"
XML <State>string</State>


PostalCode

Returns the Postal Code of the output address.
Protocol Syntax
JSON "PostalCode":"string"
XML <PostalCode>string</PostalCode>


AddressKey

Returns a unique identifier for an address. This key can be used with other current and future Melissa Data services.
Protocol Syntax
JSON "AddressKey":"string"
XML <AddressKey>string</AddressKey>


Latitude

Returns the latitude geographic coordinate of the output address.
Protocol Syntax
JSON "Latitude":"string"
XML <Latitude>string</Latitude>


Longitude

Returns the longitude geographic coordinate of the output address.
Protocol Syntax
JSON "Longitude":"string"
XML <Longitude>string</Longitude>


Distance

Returns the distance between the input coordinates and the output coordinates. A distance of zero indicates that an exact address match was returned for the input geographic coordinates.
Protocol Syntax
JSON "Distance":"string"
XML <Distance>string</Distance>


MelissaAddressKey

Returns the Melissa Address Key (MAK). This is a globally unique and persistent key for the location, even if parts of the address change. When an address is fully validated this field returns a 10-digit proprietary key for the address.
With AddressKey (US and Canada only), if an address zip code changes, the AddressKey would also change. Melissa Address Key (MAK) is independent and will not change. This makes MAK a good way to permanently identify and locate addresses. Once you have a MAK it can be used as an input in most Melissa services and thus is a good tool for deduping.
Protocol Syntax
JSON "MelissaAddressKey":"string"
XML <MelissaAddressKey>string</MelissaAddressKey>


MelissaAddressKeyBase

Returns the Melissa Address Key Base (BaseMAK). Every full address has its own Melissa Address Key (MAK). If that address is a suites or apartment, we will also return a Melissa Address Key Base (BaseMAK) that corresponds to the overall building. This provides a link between all the individual MAK addresses that belong to the same building. This field also returns a 10-digit proprietary key. Note, if we can validate the address to the building but not the suite, we can return just the BaseMAK.
Protocol Syntax
JSON "MelissaAddressKeyBase":"string"
XML <MelissaAddressKeyBase>string</MelissaAddressKeyBase>