Global Phone V3:Request

From Melissa Data Wiki
Revision as of 17:43, 23 December 2016 by Admin (talk | contribs)
Jump to navigation Jump to search

← Global Phone V3 Reference

Global Phone V3 Navigation
Introduction
Licensing
Input/Output
Request Fields
Response Fields
Examples
REST XML
REST JSON
Batch XML
Batch JSON
SOAP
Result Codes
Result Code Use
Global Phone Result Codes
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 (License Key) 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 multiple protocols to access the service, including SOAP, JSON, REST, and XML.


Field Names

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

Field Name Level REST Abbreviation SOAP/JSON/XML
Transmission Reference Request t TransmissionReference
Customer ID Request id CustomerID
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
SOAP ReqGlobalPhone.TransmissionReference = string
JSON “TransmissionReference”:”string"
REST ?t = {string}
XML <TransmissionReference>string</TransmissionReference>


Customer ID

Required.
This is a string value containing the License Key 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 License Key, please contact your Melissa Data sales representative at 1-800-MELISSA.
Protocol Syntax
SOAP ReqGlobalPhone.CustomerID = string
JSON "CustomerID”:”string”
REST &id = {string}
XML <CustomerID>string</CustomerID>


Request Record Elements

SOAP, XML, and XFORMS Web Service’s Request Arrays will contain two elements called Records and RequestRecords. JSON will only contain the Records element.

Protocol Definition
SOAP This element is an array of object variables of the type RequestRecords.
JSON Each phone number will be contained within [{}] under the Records element.
XML There will be one RequestRecord element per phone number being submitted to the Web Service.
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
SOAP ReqGlobalPhone.Records.RequestRecord.RecordID = string
JSON “RecordID”:”string”
XML <RecordID>string</RecordID>


PhoneNumber

Required.
The phone number to be verified
Protocol Syntax
SOAP ReqGlobalPhone.Records.RequestRecord.PhoneNumber = string
JSON “PhoneNumber”:”string”
REST &phone = {string}
XML <PhoneNumber>string</PhoneNumber>


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
SOAP ReqGlobalPhone.Records.RequestRecord.Country = string
JSON “Country”:”string”
REST &ctry = {string}
XML <Country>string</Country>


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
SOAP ReqGlobalPhone.Records.RequestRecord.CountryOfOrigin = string
JSON “CountryOfOrigin”:”string”
REST &ctryOrg = {string}
XML <CountryOfOrigin>string</CountryOfOrigin>