Checks that the phone number provided is in a valid format within the country for the dial prefix provided. Note that this doesn't actually check that the phone number exists, just that it is in a valid format. If the error key returns false, it means that the phone number is valid.
Note: The return value includes the provided phone number, re-formatted correctly in local format, in the data.num key. Additionally, the dial prefix is also returned in the data.cc key. Therefore, it is simple to re-build this into AVANSER format as follows: +{cc}-{num}.
| Error Code | Error Type | Error Message |
|---|---|---|
| -1019 | INVALID-PHONE-NUMBER | Invalid phone number |
- Avanser Productionhttps://p3.avanser.com/app/checknumber
- AVANSER Mock Serverhttps://avanser.redocly.app/_mock/user-api/references/checknumber
curl -i -X GET \
'https://p3.avanser.com/app/checknumber?cc=string&phone=string&token=YOUR_API_KEY_HERE'Phone number format validation result.
The time that the API response left the server, represented as the number of seconds since the UNIX epoch.
The number of seconds that it took to process the API request.
Boolean indicating whether there was an error returned by the API request.
{ "timestamp": 1508979483, "exection": 0.00013305497169495, "error": false, "data": { "country": "AU", "cc": 61, "num": "0412345678", "type": "mobile" } }