Table of Contents

Class FormatInsights

Namespace
Vonage.IdentityInsights.GetInsights
Assembly
Vonage.dll

Validates the format of a phone number and provides information based on that format.

public record FormatInsights : IEquatable<FormatInsights>
Inheritance
FormatInsights
Implements
Inherited Members

Constructors

FormatInsights(string, string, string, string, string[], string, string, bool, InsightStatus)

Validates the format of a phone number and provides information based on that format.

public FormatInsights(string CountryCode, string CountryName, string CountryPrefix, string OfflineLocation, string[] TimeZones, string NumberInternational, string NumberNational, bool IsFormatValid, InsightStatus Status)

Parameters

CountryCode string

Two character country code for phone_number. This is in ISO 3166-1 alpha-2 format.

CountryName string

The full name of the country where the phone_number is registered.

CountryPrefix string

The numeric prefix for the country where the phone_number is registered.

OfflineLocation string

The location where the number was originally assigned, based on its prefix. This does not represent the real-time location of the device. The value indicates the country of origin or, when available, the specific geographical area associated with the number. Only landline and mobile numbers are eligible for offline location data.

TimeZones string[]

List of time zones corresponding to the format.offline_location field, or a single-element list with the default "unknown" time zone if no other time zone was found or if the number is invalid. Time zone values follow the tz database identifiers.

NumberInternational string

The phone_number from your request, formatted in international E.164 format.

NumberNational string

The phone_number from your request, formatted according to the local convention of the country it belongs to.

IsFormatValid bool

Phone number format validation involves verifying the length and prefix details at various levels to ensure accuracy and compliance with global numbering standards. A valid format means the number can be legitimately assigned by carriers to users. However, it does not guarantee that the number is currently assigned to a carrier or that it is reachable.

Status InsightStatus

Indicates the status of the information returned for the specified phone number.

Properties

CountryCode

Two character country code for phone_number. This is in ISO 3166-1 alpha-2 format.

[JsonPropertyName("country_code")]
public string CountryCode { get; init; }

Property Value

string

CountryName

The full name of the country where the phone_number is registered.

[JsonPropertyName("country_name")]
public string CountryName { get; init; }

Property Value

string

CountryPrefix

The numeric prefix for the country where the phone_number is registered.

[JsonPropertyName("country_prefix")]
public string CountryPrefix { get; init; }

Property Value

string

IsFormatValid

Phone number format validation involves verifying the length and prefix details at various levels to ensure accuracy and compliance with global numbering standards. A valid format means the number can be legitimately assigned by carriers to users. However, it does not guarantee that the number is currently assigned to a carrier or that it is reachable.

[JsonPropertyName("is_format_valid")]
public bool IsFormatValid { get; init; }

Property Value

bool

NumberInternational

The phone_number from your request, formatted in international E.164 format.

[JsonPropertyName("number_international")]
public string NumberInternational { get; init; }

Property Value

string

NumberNational

The phone_number from your request, formatted according to the local convention of the country it belongs to.

[JsonPropertyName("number_national")]
public string NumberNational { get; init; }

Property Value

string

OfflineLocation

The location where the number was originally assigned, based on its prefix. This does not represent the real-time location of the device. The value indicates the country of origin or, when available, the specific geographical area associated with the number. Only landline and mobile numbers are eligible for offline location data.

[JsonPropertyName("offline_location")]
public string OfflineLocation { get; init; }

Property Value

string

Status

Indicates the status of the information returned for the specified phone number.

[JsonPropertyName("status")]
public InsightStatus Status { get; init; }

Property Value

InsightStatus

TimeZones

List of time zones corresponding to the format.offline_location field, or a single-element list with the default "unknown" time zone if no other time zone was found or if the number is invalid. Time zone values follow the tz database identifiers.

[JsonPropertyName("time_zones")]
public string[] TimeZones { get; init; }

Property Value

string[]