Difference between revisions of "Global Phone:Response"

From Melissa Data Wiki
Jump to navigation Jump to search
Line 72: Line 72:
The following elements are the basic options for each request. These apply to the entire response, not the individual records.
The following elements are the basic options for each request. These apply to the entire response, not the individual records.


<h3 style="background-color:rgb240,240,240;">Version</h3>
<h3 style="background-color:rgb(240,240,240);">Version</h3>
:This is a string value that is the current revision number of Global Phone.
:This is a string value that is the current revision number of Global Phone.


Line 78: Line 78:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“Version”:”string”
|JSON||<code>"Version":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Transmission Reference</h3>
<h3 style="background-color:rgb(240,240,240);">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.
: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.


Line 88: Line 88:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“TransmissionReference”:”string”
|JSON||<code>"TransmissionReference":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Transmission Results</h3>
<h3 style="background-color:rgb(240,240,240);">Transmission Results</h3>
:This is a string value that lists error codes from any errors caused by the most recent request as a whole.
:This is a string value that lists error codes from any errors caused by the most recent request as a whole.


Line 100: Line 100:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“TransmissionResults”:”string”
|JSON||<code>"TransmissionResults":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Total Records</h3>
<h3 style="background-color:rgb(240,240,240);">Total Records</h3>
:Displays the total number of records returned.
:Displays the total number of records returned.


Line 110: Line 110:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“TotalRecords”:”string”
|JSON||<code>"TotalRecords":"'''''string'''''"</code>
|}
|}


Line 126: Line 126:




<h3 style="background-color:rgb240,240,240;">Record ID</h3>
<h3 style="background-color:rgb(240,240,240);">Record ID</h3>
:This is a string value that is a unique identifier for the current record if one was sent in the request. Use this element to match a request record and the corresponding response record.
:This is a string value that is a unique identifier for the current record if one was sent in the request. Use this element to match a request record and the corresponding response record.


Line 132: Line 132:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“RecordID”:”string”
|JSON||<code>"RecordID":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Results</h3>
<h3 style="background-color:rgb(240,240,240);">Results</h3>
:This is a string value with comma delimited status, error codes, and change codes for the record.
:This is a string value with comma delimited status, error codes, and change codes for the record.


Line 144: Line 144:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“Results”:”string”
|JSON||<code>"Results":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Phone Number</h3>
<h3 style="background-color:rgb(240,240,240);">Phone Number</h3>
:This is a string value of the standardized phone number after a successful call to the service.
:This is a string value of the standardized phone number after a successful call to the service.


Line 191: Line 191:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“PhoneNumber”:”string”
|JSON||<code>"PhoneNumber":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Administrative Area</h3>
<h3 style="background-color:rgb(240,240,240);">Administrative Area</h3>
:This is a string that returns the administrative area associated with the inputted phone number.
:This is a string that returns the administrative area associated with the inputted phone number.


Line 203: Line 203:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“AdministrativeArea”:”string”
|JSON||<code>"AdministrativeArea":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Country Abbreviation</h3>
<h3 style="background-color:rgb(240,240,240);">Country Abbreviation</h3>
:This is a string that returns the abbreviation of the country for the inputted phone number.
:This is a string that returns the abbreviation of the country for the inputted phone number.


Line 213: Line 213:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“CountryAbbreviation”:”string”
|JSON||<code>"CountryAbbreviation":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Country Name</h3>
<h3 style="background-color:rgb(240,240,240);">Country Name</h3>
:This is a string that returns the name of the country for the inputted phone number.
:This is a string that returns the name of the country for the inputted phone number.


Line 225: Line 225:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“CountryName”:”string”
|JSON||<code>"CountryName":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Carrier</h3>
<h3 style="background-color:rgb(240,240,240);">Carrier</h3>
:This is a string that returns the name of the phone’s carrier.
:This is a string that returns the name of the phone’s carrier.


Line 235: Line 235:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“Carrier”:”string”
|JSON||<code>"Carrier":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Daylight Savings Time</h3>
<h3 style="background-color:rgb(240,240,240);">Daylight Savings Time</h3>
:This is a string that returns a ‘Y’ (for yes) or ‘N’ (for no) to distinguish whether the region of the inputted phone number observes daylight savings time.
:This is a string that returns a ‘Y’ (for yes) or ‘N’ (for no) to distinguish whether the region of the inputted phone number observes daylight savings time.


Line 247: Line 247:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“DST”:”string”
|JSON||<code>"DST":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">International Phone Number</h3>
<h3 style="background-color:rgb(240,240,240);">International Phone Number</h3>
:This is the number you would dial, given your output fields, in order to successfully send a call.
:This is the number you would dial, given your output fields, in order to successfully send a call.


Line 259: Line 259:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“InternationalPhoneNumber”:”string”
|JSON||<code>"InternationalPhoneNumber":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Language</h3>
<h3 style="background-color:rgb(240,240,240);">Language</h3>
:This is a string that returns the predominant language of the phone’s detected geographical location.
:This is a string that returns the predominant language of the phone’s detected geographical location.


:The field will return the written out form of the language name. For example: “French”.
:The field will return the written out form of the language name. For example: "French".


:Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
:Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Line 273: Line 273:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“Language”:”string”
|JSON||<code>"Language":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Latitude</h3>
<h3 style="background-color:rgb(240,240,240);">Latitude</h3>
:This is a string that returns the latitude of the geographically identifiable service area of the exchange.
:This is a string that returns the latitude of the geographically identifiable service area of the exchange.


Line 287: Line 287:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“Latitude”:”string”
|JSON||<code>"Latitude":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Longitude</h3>
<h3 style="background-color:rgb(240,240,240);">Longitude</h3>
:This is a string that returns the longitude of the geographically identifiable service area of the exchange.
:This is a string that returns the longitude of the geographically identifiable service area of the exchange.


Line 301: Line 301:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“Longitude”:”string”
|JSON||<code>"Longitude":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Locality</h3>
<h3 style="background-color:rgb(240,240,240);">Locality</h3>
:This is a string that returns the locality (city) associated with the phone number passed to the Lookup function.
:This is a string that returns the locality (city) associated with the phone number passed to the Lookup function.


Line 313: Line 313:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“Locality”:”string”
|JSON||<code>"Locality":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">International Prefix</h3>
<h3 style="background-color:rgb(240,240,240);">International Prefix</h3>
:This is a string value that returns the international exit code needed to call a number outside of the dialing country.
:This is a string value that returns the international exit code needed to call a number outside of the dialing country.


Line 325: Line 325:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“PhoneInternationalPrefix”:”string”
|JSON||<code>"PhoneInternationalPrefix":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Country Dialing Code</h3>
<h3 style="background-color:rgb(240,240,240);">Country Dialing Code</h3>
:This is a string that returns a digit, or combination of digits, known as the country dialing code.
:This is a string that returns a digit, or combination of digits, known as the country dialing code.


Line 337: Line 337:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“PhoneCountryDialingCode”:”string”
|JSON||<code>"PhoneCountryDialingCode":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Nation Prefix</h3>
<h3 style="background-color:rgb(240,240,240);">Nation Prefix</h3>
:This is a string that returns a digit, or combination of digits, known as the national prefix.
:This is a string that returns a digit, or combination of digits, known as the national prefix.


Line 351: Line 351:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“PhoneNationPrefix”:”string”
|JSON||<code>"PhoneNationPrefix":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">National Destination Code</h3>
<h3 style="background-color:rgb(240,240,240);">National Destination Code</h3>
:This is a string that returns a digit, or combination of digits, known as the national destination code.
:This is a string that returns a digit, or combination of digits, known as the national destination code.


Line 363: Line 363:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“PhoneNationalDestinationCode”:”string”
|JSON||<code>"PhoneNationalDestinationCode":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Subscriber Number</h3>
<h3 style="background-color:rgb(240,240,240);">Subscriber Number</h3>
:This is string that returns the subscriber number associated with the phone number passed in.
:This is string that returns the subscriber number associated with the phone number passed in.


Line 377: Line 377:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“PhoneSubscriberNumber”:”string”
|JSON||<code>"PhoneSubscriberNumber":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Universal Time Code</h3>
<h3 style="background-color:rgb(240,240,240);">Universal Time Code</h3>
:This is a string that returns the universal time code for the time zone associated with the inputted phone number.
:This is a string that returns the universal time code for the time zone associated with the inputted phone number.


Line 391: Line 391:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“UTC”:”string”
|JSON||<code>"UTC":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Postal Code</h3>
<h3 style="background-color:rgb(240,240,240);">Postal Code</h3>
:The zip code that corresponds to a locality inside the United States.
:The zip code that corresponds to a locality inside the United States.


Line 403: Line 403:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“PostalCode”:”string”
|JSON||<code>"PostalCode":"'''''string'''''"</code>
|}
|}




<h3 style="background-color:rgb240,240,240;">Suggestions</h3>
<h3 style="background-color:rgb(240,240,240);">Suggestions</h3>
:This is an array of Response Record Elements. This can only be returned for single-record requests.
:This is an array of Response Record Elements. This can only be returned for single-record requests.


Line 413: Line 413:
!Protocol !! Syntax
!Protocol !! Syntax
|-
|-
|JSON||“Suggestions”:”string”
|JSON||<code>"Suggestions":"'''''string'''''"</code>
|}
|}



Revision as of 20:58, 5 October 2016

← Global Phone

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



A response is the result of a request. This consists of returned results codes, parsed phone elements, and appended geographic information.

Depending on the protocol used to make the request, the response will be in a certain protocol. Global Phone supports JSON and REST protocols.


Field Names

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

Field Name Level JSON
Version Request Version
Transmission Reference Request TransmissionReference
Transmission Results Request TransmissionResults
Total Records Request TotalRecords
Record ID Record RecordID
Results Record Results
Phone Number Record PhoneNumber
Administrative Area Record AdministrativeArea
Country Abbreviation Record CountryAbbreviation
Country Name Record CountryName
Carrier Record Carrier
Daylight Savings Time Record DST
International Phone Number Record InternationalPhoneNumber
Language Record Language
Latitude Record Latitude
Longitude Record Longitude
Locality Record Locality
International Prefix Record PhoneInternationalPrefix
Country Dialing Code Record PhoneCountryDialingCode
Nation Prefix Record PhoneNationPrefix
National Destination Code Record PhoneNationalDestinationCode
Subscriber Number Record PhoneSubscriberNumber
Universal Time Code Record UTC
Postal Code Record PostalCode
Suggestions Record Suggestions


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 Global Phone.
Protocol Syntax
JSON "Version":"string"


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"


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 Global Phone Result Codes.
Protocol Syntax
JSON "TransmissionResults":"string"


Total Records

Displays the total number of records returned.
Protocol Syntax
JSON "TotalRecords":"string"


Response Record Elements

JSON will only contain the Records element.

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

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


Record ID

This is a string value that is a unique identifier for the current record if one was sent in the request. Use this element to match a request record and the corresponding response record.
Protocol Syntax
JSON "RecordID":"string"


Results

This is a string value with comma delimited status, error codes, and change codes for the record.
For a complete list of codes, see Global Phone Result Codes.
Protocol Syntax
JSON "Results":"string"


Phone Number

This is a string value of the standardized phone number after a successful call to the service.
The phone number will return in varying formats depending on the inputs. If the inputted country and country of origin are the same the returned number will include the National Destination Code + Subscriber Number. For example:
Input Phone Input Country Input Country of Origin Phone Returned
495-728-5802 RU RU 495-728-5802
+7 495-728-5802 RU RU 495-728-5802
+1 495-728-5802 RU RU 495-728-5802
If the inputted country and country of origin differ, the returned number will include a leading ‘+’ followed by the Country Code + National Destination Code + Subscriber Number. The leading ‘+’ represents the International Prefix that is required to dial a number outside of the caller’s country. For example:
Input Phone Input Country Input Country of Origin Phone Returned
495-728-5802 RU US +7 495-728-5802
+7 495-728-5802 RU US +7 495-728-5802
+1 495-728-5802 RU US +7 495-728-5802
If a country is entered and a country of origin is left blank or not passed in, the returned number will match the format of the inputted phone number. For example:
Input Phone Input Country Input Country of Origin Phone Returned
495-728-5802 RU <blank> 495-728-5802
+7 495-728-5802 RU <blank> +7 495-728-5802
+1 495-728-5802 RU <blank> +7 495-728-5802


Protocol Syntax
JSON "PhoneNumber":"string"


Administrative Area

This is a string that returns the administrative area associated with the inputted phone number.
Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "AdministrativeArea":"string"


Country Abbreviation

This is a string that returns the abbreviation of the country for the inputted phone number.
Protocol Syntax
JSON "CountryAbbreviation":"string"


Country Name

This is a string that returns the name of the country for the inputted phone number.
Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "CountryName":"string"


Carrier

This is a string that returns the name of the phone’s carrier.
Protocol Syntax
JSON "Carrier":"string"


Daylight Savings Time

This is a string that returns a ‘Y’ (for yes) or ‘N’ (for no) to distinguish whether the region of the inputted phone number observes daylight savings time.
Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "DST":"string"


International Phone Number

This is the number you would dial, given your output fields, in order to successfully send a call.
This number can change based on whether a Country of Origin is submitted or not.
Protocol Syntax
JSON "InternationalPhoneNumber":"string"


Language

This is a string that returns the predominant language of the phone’s detected geographical location.
The field will return the written out form of the language name. For example: "French".
Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "Language":"string"


Latitude

This is a string that returns the latitude of the geographically identifiable service area of the exchange.
Latitude is the geographic coordinate of the locale, city, municipality, or other geographically identifiable service area of the exchange measured in degrees north or south of the equator.
Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "Latitude":"string"


Longitude

This is a string that returns the longitude of the geographically identifiable service area of the exchange.
Longitude is the geographic coordinate of the locale, city, municipality, or other geographically identifiable service area of the exchange measured in degrees east or west of the Greenwich Meridian.
Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "Longitude":"string"


Locality

This is a string that returns the locality (city) associated with the phone number passed to the Lookup function.
Because of phone portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "Locality":"string"


International Prefix

This is a string value that returns the international exit code needed to call a number outside of the dialing country.
If the input country and country of origin differ, this will return the digit(s) required to be dialed before the country code.
Protocol Syntax
JSON "PhoneInternationalPrefix":"string"


Country Dialing Code

This is a string that returns a digit, or combination of digits, known as the country dialing code.
This will return the digit(s) dialed after the international prefix.
Protocol Syntax
JSON "PhoneCountryDialingCode":"string"


Nation Prefix

This is a string that returns a digit, or combination of digits, known as the national prefix.
The national prefix must be dialed before an area (city) code when calling a number within the same country but outside the numbering area.
For example (US phone number): 1-949-589-5200 where 1 is the national prefix.
Protocol Syntax
JSON "PhoneNationPrefix":"string"


National Destination Code

This is a string that returns a digit, or combination of digits, known as the national destination code.
The national destination code that identifies a numbering area within a country (or group of countries) and/or network/services.
Protocol Syntax
JSON "PhoneNationalDestinationCode":"string"


Subscriber Number

This is string that returns the subscriber number associated with the phone number passed in.
The subscriber number contains significant leading digits that further define the local exchange area and/or service.
Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "PhoneSubscriberNumber":"string"


Universal Time Code

This is a string that returns the universal time code for the time zone associated with the inputted phone number.
UTC returns the time zone specified with the format: +/- hh:mm.
Because of phone number portability, geographical information may not reflect the true location of the owner of the phone number for wireless and VOIP numbers.
Protocol Syntax
JSON "UTC":"string"


Postal Code

The zip code that corresponds to a locality inside the United States.
Since this is US only, all other countries will have PostalCode blank.
Protocol Syntax
JSON "PostalCode":"string"


Suggestions

This is an array of Response Record Elements. This can only be returned for single-record requests.
Protocol Syntax
JSON "Suggestions":"string"