# Validate phone numbers

Submit a batch request to validate phone numbers.

_Note:_ A License Key and Phone Number are both required for this request.

Endpoint: POST /doGlobalPhone

## Header parameters:

  - `Accept` (string, required)
    Format of the response.
    Enum: "application/json", "*/*"

  - `Content-Type` (string, required)
    Format of the request.
    Enum: "application/json", "application/xml"

## Request fields (application/json):

  - `TransmissionReference` (string)
    This is a string value that serves as a unique identifier for this set of records. It is returned as sent.
    Example: "Test"

  - `Options` (string)
    [Options](https://docs.melissa.com/cloud-api/global-phone/global-phone-reference-guide.html#globalphone-referenceguide-options) - Pass in options you want to set for the request.

List options in the format OptionName:Parameter, with multiple options delimited with a ,. For example: OptionName:Parameter,OptionName:Parameter
- CallerID: - Adds the CallerID to the queried phone, if we found it to be valid (US and Canada Only). Default is False.
- DefaultCallingCode: - The sequence of digits found after the leading +. Blank by Default. This is used when the country could not be detected from the phone number or country input.
- EnableBatchSuggestion: - (Batch Mode Only) Enables records to be corrected using the suggestions engine when there is exactly only 1 suggestion found. Default is False.
- PreferDialingCode: - When there is a mismatch between a phone dialing code (the “+” prefix in a phone number) and country name this controls which is prioritized. Default is True.
- TimeToWait: - Select how long (in seconds) that you would like our Cloud API to wait on a single request before it times out. Select a smaller number if time is of essence, or longer if you would prefer more accurate results. Default set to 2.
- VerifyPhone: - This sets the level of verification to be done on a phone check.
  - Express - Quickly validates against database of known phone numbers. This is the default option.
  - Premium - Validates against a database of known phone numbers. If a number was last real-time validated more than 180 days ago, or has not been real-time validated before, then a real-time check will be performed.
    Example: "TimeToWait:5,CallerID:True"

  - `CustomerID` (string, required)
    Required. The [License Key](https://docs.melissa.com/melissa/license/license-information.html) issued by Melissa.
    Example: "{REPLACE-WITH-YOUR-LICENSE-KEY}"

  - `Records` (array, required)
    Array of phone numbers to be validated.

  - `Records.RecordID` (string)
    A unique identifier for the current record.
    Example: "1"

  - `Records.PhoneNumber` (string, required)
    Required. The phone number to be verified.
    Example: "8006354772"

  - `Records.Country` (string)
    The suspected country of the input phone number as the official country name or the ISO2 code.
    Example: "US"

  - `Records.CountryOfOrigin` (string)
    The country from where the verification is being done as the official country name or the ISO2 code. 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.

## Response 200 fields (application/json):

  - `Version` (string)
    Current revision number of Global Phone.

  - `TransmissionReference` (string)
    A unique identifier for this set of records. Returned as sent.

  - `TransmissionResults` (string)
    Returns result codes for the request as a whole. For more information, see [Global Phone Result Codes](https://docs.melissa.com/cloud-api/global-phone/result-codes.html).

  - `Records` (array)
    Records array.

  - `Records.RecordID` (string)
    A unique identifier for the current record, if sent in the request.

  - `Records.Results` (string)
    Comma delimited string with any result codes for the record. For more information, see [Global Phone Result Codes](https://docs.melissa.com/cloud-api/global-phone/result-codes.html).

  - `Records.PhoneNumber` (string)
    Standardized phone number after a successful call to the service.

  - `Records.AdministrativeArea` (string)
    Administrative area associated with the inputted phone number.

  - `Records.CountryAbbreviation` (string)
    Abbreviation of the country for the inputted phone number.

  - `Records.CountryName` (string)
    Name of the country for the inputted phone number.

  - `Records.Carrier` (string)
    Name of the phone’s carrier.

  - `Records.CallerID` (string)
    Name appended to the targeted phone number.

  - `Records.DST` (string)
    Returns a ‘Y’ (for yes) or ‘N’ (for no) to distinguish whether the region of the inputted phone number observes daylight savings time.

  - `Records.InternationalPhoneNumber` (string)
    The number you would dial, given your output fields, in order to successfully send a call.

  - `Records.Language` (string)
    Predominant language of the phone’s detected geographical location.

  - `Records.Latitude` (string)
    Latitude of the geographically identifiable service area of the exchange.

  - `Records.Locality` (string)
    Locality (city) associated with the phone number passed to the Lookup function.

  - `Records.Longitude` (string)
    Longitude of the geographically identifiable service area of the exchange.

  - `Records.PhoneInternationalPrefix` (string)
    International exit code needed to call a number outside of the dialing country.

  - `Records.PhoneCountryDialingCode` (string)
    Country dialing code, the digit(s) dialed after the international prefix.

  - `Records.PhoneNationPrefix` (string)
    National prefix, must be dialed before an area (city) code when calling a number within the same country but outside the numbering area.

  - `Records.PhoneNationalDestinationCode` (string)
    National destination code that identifies a numbering area within a country (or group of countries) and/or network/services.

  - `Records.PhoneSubscriberNumber` (string)
    Subscriber number associated with the phone number passed in.

  - `Records.UTC` (string)
    Universal time code (UTC) for the time zone associated with the inputted phone number. (+/- hh:mm)

  - `Records.PostalCode` (string)
    US only. ZIP code that corresponds to a locality inside the United States.

  - `Records.Suggestions` (array,null)
    An array of Response Record Elements. This is for single-record requests only.

  - `Records.TimeZoneCode` (string)
    The 3-letter code for the time zone associated with the phone number.

  - `Records.TimeZoneName` (string)
    The full name of the 3-letter time zone code returned by the TimeZoneCode field.

## Response 400 fields (application/json):

  - `type` (string)
    The type of error that occurred.

  - `title` (string)
    A short summary of the error.

  - `status` (integer)
    The HTTP status code for the error.

  - `errors` (object)

  - `errors.$.<PropertyName>` (array)
    A detailed message about the error.

  - `traceId` (string)
    A unique identifier for the request, useful for debugging.


