Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Custom => Rubiq
Excerpt

Format phone number for out of country calling.

 

Validate phone number and return the correctly formatted valid number ready to be called from a given country.

Endpoint ID:6012
Method:
Status
colourGreen
titleGET
URL:

  /services/phonenumber/format/{phoneNumber}/from/{region}?countryCode={countryCode}&countryCodeFormat={countryCodeFormat} 

 phoneNumber

Phone number to be formatted.

Valid examples

  • +4529254029
  • 29254029 (valid only if country code is specified)
  regionregion Desired country code in which the number to be formatted.
 countryCode

Optional value to identify country of phoneNumber.

 countryCodeFormat 

Optional value to identify countryCode format.

Valid values are

  • ISO2 ( ISO ISO 3166-1 alpha-2 – two letter country codes)
  • ISO3 ( ISO ISO 3166-1 alpha-3 – three letter country codes)
  • ISON ( ISO ISO 3166-1 numeric – three digit country codes)
  • Internet ( Top top level domain names on web)
  • Custom ( Used for legacy phone number beautifier implementation Rubiq (internal RubiqSoft format)
Request body:None

Span
stylewhite-space:pre

Response body:

JSON data with information of formatted phone number 

 

Code Block
titleExample – Format +4529254029 for US
{
  	 "phoneNumber": "011 45 29 25 40 29"
}

   

Status codes:200

Phone number is formatted successfully.

 400

The following sub codes may be returned:

 

400.1Invalid Phone phone number.
400.2Phone number must be in E164 format if country code is not specified.
400.3Invalid Country country code format.
400.4 Invalid phone number format. 
 404No matching country code found for
country code
format
.
 

 

 

 

 

 

 

...

400.5Invalid region.