Utilities

Parse, validate and format a phone number

Free syntactic validation - no lookup is performed and nothing is written. carrier is empty for number-portability countries such as Australia

get/format-number/

Request

  • Base URL: http://api.smsfusion.com.au
  • URL: http://api.smsfusion.com.au/format-number/
  • Auth: one of:
    • API key in query parameter key
    • HTTP basic

Query parameters

keystring required

API Key as generated from the <a href='https://www.smsfusion.com.au/admin/api/'>admin panel</a>

numstring

A single phone number or <a href='https://www.smsfusion.com.au/help/msisdn/'>MSDISDN</a>

ccstring string

2 character country code <a href='https://en.wikipedia.org/wiki/ISO_3166-2'>ISO 3166-2</a> for formatting local numbers internationally

Response

Successfull response

msisdnstring
countryCodeinteger

Emitted as a JSON number

nationalNumberstring
intlNumberstring
regionstring
typestring
isMobileboolean
validNumberboolean
carrierstring

Empty for number-portability countries such as Australia

Example response

{
  "msisdn": "61412345678",
  "countryCode": 61,
  "nationalNumber": "0412 345 678",
  "intlNumber": "+61412345678",
  "region": "AU",
  "type": "MOBILE"
}

Changes

No recorded changes to this operation across all 1 revision of this API.