Global Phone:Request: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 69: | Line 69: | ||
:''Optional.'' | :''Optional.'' | ||
:This is a string value containing the options set by the user | :This is a string value containing the options set by the user. | ||
:{| class="alternate01" | :{| class="alternate01" | ||
Line 77: | Line 77: | ||
|- | |- | ||
|REST||?opt = {string} | |REST||?opt = {string} | ||
|} | |||
:<h4 style="border-bottom:1px solid black;">DefaultCallingCode</h4> | |||
::DefaultCallingCode is used when the country could not be detected from the phone number or country input. | |||
::A calling code is a sequence of digits often found after the leading ‘+’ and is unique to a country/region. | |||
::By default, this value is blank. For more information, please see: https://en.wikipedia.org/wiki/List_of_country_calling_codes. | |||
:<h4 style="border-bottom:1px solid black;">VerifyPhone</h4> | |||
::VerifyPhone sets the level of verification to be done on a phone check. | |||
::{| class="alternate01 sortable" | |||
!Option !! Parameters !! Description | |||
|- | |||
|rowspan="2"|'''VerifyPhone'''||Express||'''''Default.''''' Quickly validates against a database of known phone numbers. | |||
|- | |||
|Premium||Validates against a database of known phone numbers. If a number was last real-time validated more than 30 days ago, then a real-time check will be performed. | |||
|} | |} | ||
Revision as of 17:10, 26 August 2016
Global Phone 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 Customer ID and at least one input phone number. Though not required, an input country name will greatly increase the chances of recognizing and verifying the phone number in question.
Global Phone supports REST and JSON protocols.
Field Names
This is a list of the request field names and their protocol naming conventions.
Field Name | Level | REST Abbreviation | JSON |
---|---|---|---|
Transmission Reference | Request | t | TransmissionReference |
Customer ID | Request | id | CustomerID |
Options | Request | opt | Options |
Record ID | Record | RecordID | |
Phone Number | Record | phone | PhoneNumber |
Country | Record | ctry | Country |
Country Of Origin | Record | ctryOrg | CountryOfOrigin |
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}
Customer ID
- Required.
- This is a string value containing the identification number issued to the customer by Melissa Data for Global Phone.
- If this element is absent, the Web Service will return an error. To receive a customer ID, please contact your Melissa Data sales representative at 1-800-MELISSA.
Protocol Syntax JSON "CustomerID”:”string” REST &id = {string}
Options
- Optional.
- This is a string value containing the options set by the user.
Protocol Syntax JSON "Options”:”string” REST ?opt = {string}
DefaultCallingCode
- DefaultCallingCode is used when the country could not be detected from the phone number or country input.
- A calling code is a sequence of digits often found after the leading ‘+’ and is unique to a country/region.
- By default, this value is blank. For more information, please see: https://en.wikipedia.org/wiki/List_of_country_calling_codes.
VerifyPhone
- VerifyPhone sets the level of verification to be done on a phone check.
Option Parameters Description VerifyPhone Express Default. Quickly validates against a database of known phone numbers. Premium Validates against a database of known phone numbers. If a number was last real-time validated more than 30 days ago, then a real-time check will be performed.
Request Record Elements
JSON will only contain the Records element.
Protocol | Definition |
---|---|
JSON | Each phone number will be contained within [{}] under the Records element. |
REST | The REST interface only allows a single record per request. |
RecordID
- Optional.
- This is a string value containing a unique identifier for the current record. Use this to match the record submitted with the record returned. It will return what is inputted.
Protocol Syntax JSON “RecordID”:”string”
PhoneNumber
- Required.
- The phone number to be verified
Protocol Syntax JSON “PhoneNumber”:”string” REST &phone = {string}
Country
- Optional.
- The suspected country of the input phone number.
- The service accepts the official country name or the ISO2 code.
- Some territories will require a different ISO2 code than the one that is given to them. For more information, please see the FAQ.
Protocol Syntax JSON “Country”:”string” REST &ctry = {string}
CountryOfOrigin
- Optional.
- The country from where the verification is being done. If the Country of Origin differs from the Country, then the outputted phone number will be changed to a callable format from the country of origin.
- The service accepts the official country name or the ISO2 code. Some territories will require a different ISO2 code than the one that is given to them. For more information, please see the FAQ.
Protocol Syntax JSON “CountryOfOrigin”:”string” REST &ctryOrg = {string}