Global Phone:Response
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 |
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 |
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 |
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”
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”
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”
Suggestions
- This is an array of Response Record Elements. This can only be returned for single-record requests.
Protocol Syntax JSON “Suggestions”:”string”