Sandbox
We also offer a sandbox environment where you can test our endpoints with some example responses that may occur while using the Number Validation API.
The URL for the sandbox environment is https://api.cm.com/number-validation-sandbox/v1 followed by the endpoint. The authentication is the same as the regular service, for more information see Authentication.
To get started using the sandbox environment, contact us requesting sandbox credentials.
Number Check
Depending on the phone number you use from the options in the table below, you can get one of the responses described. For more information regarding the number check endpoint, see Number Check.
connectionType needs to be set to hlr in the request, regardless of the response's source.
| phoneNumber | operator | mcc | mnc | source | roaming | isActive | isPorted |
|---|---|---|---|---|---|---|---|
+31610000001 | KPN | 204 | 08 | hlr | null | false | null |
+31610000002 | KPN | 204 | 08 | hlr | null | true | null |
+31610000003 | Odido | 204 | 16 | mnp | null | false | true |
+31610000004 | KPN | 204 | 08 | hlr | { "country": "Germany", "callingCode": 49, "regionCode": "de", "operator": "T-Mobile DE", "mcc": "262", "mnc": "01" } | true | null |
+31610000005 | KPN | 204 | 08 | prefix | null | false | false |
+31610000006 | KPN | null | null | static | null | null | null |
+31610000006 is an example response for when there is an issue with our supplier.
Example
Request URL
POST https://api.cm.com/number-validation-sandbox/v1/number/check
Request headers
Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE
Request body
{
"phoneNumber": "+31610000002",
"connectionType": "hlr"
}
Response
{
"format": {
"e164": "+31610000002",
"international": "+31 6 10000002",
"national": "06 10000002",
"rfc3966": "tel:+31-6-10000002"
},
"type": "mobile",
"country": "Netherlands",
"callingCode": 31,
"regionCode": "nl",
"operator": "KPN",
"mcc": "204",
"mnc": "08",
"source": "hlr",
"roaming": null,
"isValid": true,
"isActive": true,
"isPorted": null
}
Updated 1 day ago