Number Formatting - Output

v1 / v2

Number Formatting - Output

Overview

When making your request it’s possible to choose to have your telephone numbers formatted to match a standard format and then have this format displayed in your result.

This is useful if you need to standardise all your phone numbers into the same format.

The below tables details what you can include in your request using the output_format optional parameter.

By including an output_format your response will detail the output_format you entered along with the formatted telephone number in the results field called formatted_telephone_number.

Input Field
output_format

Output Description

SAMPLE INPUTS

Output Field
formatted_telephone_number

<omitted>
<empty>

  • +44(0)7790606023

  • +447790606023

  • 447790606023

“”

“E164”

ITU-T E.164 formatting which is a general telephone number format and combines:

  • Country code (max 3 digits)

  • Subscriber number (max 12 digits)

  • +44(0)7790606023

  • +447790606023

  • 447790606023

“447790606023”

“PLUS_E164”

Standard E.164 int’l format preceded by +

  • +44(0)7790606023

  • +447790606023

  • 447790606023

“+447790606023”

“USA” (or any other valid ISO3 code)

Number as it would be dialled from within the USA (or any country indicated by the ISO3 code)

  • +44(0)7790606023

  • +447790606023

  • 447790606023

“011447790606023”

<some unsupported value>

Any unsupported value (not matching the above) will cause a HTTP 400 Bad Request error

Curl example using the output_format parameter

curl -I -H "Content-Type: application/json" -X POST -d `{"api_key":"your_api_key_here", "api_secret":"your_api_secret_here", "requests":[{"telephone_number": "07790606023", "output_format": "E164"}]}`

https://api.hlrlookup.com/apiv2/hlr