Resource URL | Method |
---|---|
${baseURL}/gnv | GET |
?msisdn=$msisdn
In this case, tyntec‘s application will return the requested number information on the given MSISDN ($msisdn).
To prevent incurring avoidable costs due to malformed requests, tyntec‘s application server performs a consistency check on the provided MSISDN and callbackUrl before processing the request.
2. Synchronous vs asynchronous responses
The time needed to retrieve number information is typically around ~350 ms. But sometimes it can take up to several seconds to receive the number information, e.g., when operators respond very slowly. Therefore, tyntec’s Global Number Verification service can be queried for a synchronous or asynchronous response. The default response is synchronous and the requested number information is given in the body of the “HTTP 200 OK” response of tyntec’s application server. The asynchronous response can be triggered with the request parameter:
?callbackUrl=$callbackUrl
In this case, tyntec’s application will POST the requested number information to your webserver at the given URL ($callbackUrl). tyntec‘s application will retry for a maximum of 48 hours to POST the number information after 1, 5, 10, 20, 30, 60 minutes if your server does not answer ‚200 OK‘ within two seconds.
curl -u username:password -X GET -H "Accept: application/json" https://rest.tyntec.com/nis/v1/gnv?msisdn=+491622943176
curl -u username:password -X GET -H "Accept: application/json" https://rest.tyntec.com/nis/v1/gnv?msisdn=+491622943176&callbackUrl=https://rest.customer.com/inbound/
{ "requestId":"12-86cfafba-8677-f42b-5050-ece6af6abf01", "msisdn":"+491622943176", "nrhMCC":"262", "nrhMNC":"02", "nrhTtId“:15, "nrhOperator":"Vodafone", "nrhCountry":"DEU", "nrhTimezone":"+0100", "nrhTechnology":"GSM", "imsiMCC":"262", "imsiMNC":"02", "imsiTtId":15, "imsiOperator":"Vodafone", "imsiCountry":"DEU", "imsiTimezone":"+0100", "imsiTechnology":"GSM", "hlrCC":"49", "hlrNDC":"162", "hlrMCC":"262", "hlrMNC":"02", "hlrTtId":"15, "hlrOperator":"Vodafone", "hlrCountry":"DEU", "hlrTimezone":"+0100", "hlrTechnology":"GSM", "mscCC":"49", "mscNDC":"162", "mscMCC":"262", "mscMNC":"02", "mscTtId":15, "mscOperator":"Vodafone", "mscCountry":"DEU", "mscTimezone":"+0100", "mscTechnology":"GSM", "ported":"false", "roaming":"false", "presence":"true ", "price":0.001, "currency":"EUR", "priceEffective":"2010-11-01T00:00:00+0000", "errorCode":"0", }
Parameter | Possible Values | Description |
---|---|---|
requestId | UUID according to RFC 4122 | The unique identifier provided for each request. |
msisdn | Phone number according to ITU E.164 | The phone number of interest given in international format. |
nrhMCC | UTF-8 encoded string according to ITU E.212 | A representative MCC (Mobile Country Code) of the NRH’s network (Number Range Holder). |
nrhMNC | UTF-8 encoded string according to ITU E.212 | A representative MNCs (Mobile Network Codes) of the NRH’s network. |
nrhTtId | integer | The respective tyntec ID of the NRH. |
nrhOperator | string | Human readable name of the NRH. |
nrhCountry | Country code following ISO 3166-1 alpha-3 | The three-letter country code where the NRH’s network is located. |
nrhTimezone | +HH:mm (according to ISO 8601) | Local time zone of NRH’s network relative to UTC. |
nrhTechnology | UTF-8 encoded string | The technology used by NRH operator’s network. Possible values are: GSM, MVNO GSM, GSM/CDMA, Satellite, CDMA, iDen, iDen/GSM, Pager, Fixed. |
imsiMCC | UTF-8 encoded string according to ITU E.212 | The MCC of the subscriber’s IMSI (International Mobile Subscriber Identity). |
imsiMNC | UTF-8 encoded string according to ITU E.212 | The MNC of the subscriber’s IMSI. |
imsiTtId | integer | The respective tyntec ID of the subscription network operator. |
imsiOperator | string | Human readable name of the subscription network operator. |
imsiCountry | Country code following ISO 3166-1 alpha-3 | The three-letter country code where the subscription network is located. |
imsiTimezone | +HH:mm (according to ISO 8601) | Local time zone of the subscription network relative to UTC. |
imsiTechnology | UTF-8 encoded string | The technology used by the subscription network. Possible values are: GSM, MVNO GSM, GSM/CDMA, Satellite, CDMA, iDen, iDen/GSM, Pager, Fixed. |
hlrCC | UTF-8 encoded string according to ITU E.214 | The CC (Country Code) of the responding HLR (Home Location Register). |
hlrNDC | UTF-8 encoded string according to ITU E.214 | The NDC (National Dialling Code) of the responding HLR. |
hlrMCC | UTF-8 encoded string according to ITU E.212 | A representative MCC of the HLR’s operator. |
hlrMNC | UTF-8 encoded string according to ITU E.212 | A representative MNC of the HLR’s operator. |
hlrTtId | integer | The respective tyntec ID of the operator’s HLR. |
hlrOperator | string | Human readable name of operator’s HLR. |
hlrCountry | Country code following ISO 3166-1 alpha-3 | The three-letter country code where the HLR is located. |
hlrTimezone | +HH:mm (according to ISO 8601) | Local time zone of the HLR relative to UTC. |
hlrTechnology | UTF-8 encoded string | The technology used by the HLR operator network. Possible values are: GSM, MVNO GSM, GSM/CDMA, Satellite, CDMA, iDen, iDen/GSM, Pager, Fixed. |
mscCC | UTF-8 encoded string according to ITU E.214 | The CC of the MSC (Mobile Switching Center). |
mscNDC | UTF-8 encoded string according to ITU E.214 | The MSC of the NDC. |
mscMCC | UTF-8 encoded string according to ITU E.212 | A representative MCC of the operator’s MSC. |
mscMNC | UTF-8 encoded string according to ITU E.212 | A representative MNC of the operator’s MSC. |
mscTtId | integer | The respective tyntec ID of the operator’s MSC. |
mscCountry | Country code following ISO 3166-1 alpha-3 | The three-letter country code of the network operating the MSC. |
mscTimezone | +HH:mm (according to ISO 8601) | Local time zone of the MSC relative to UTC. |
mscTechnology | UTF-8 encoded string | The technology used by the MSC operator’s network. Possible values are: GSM, MVNO GSM, GSM/CDMA, Satellite, CDMA, iDen, iDen/GSM, Pager, Fixed. |
ported | string | Indicating the porting status true/false/unknown. |
roaming | string | Indicating the roaming status true/false/unknown. |
presence | string | Latest handset status (switched on/off) known by the operator (stored in respective HLR). |
price | float | The price for the query. |
currency | currency code following ISO 4217 | The currency in which the price is given; corresponding to the currency of the invoice. |
priceEffective | Date in the format “yyyy-MM-ddTH-HH:mm:ss”(according to ISO 8601) | The date when the “price” became effective. |
errorCode | The reason for an unsuccessful attempts. | Possible values for error codes are given in a following table. |
HTTP Code | Description |
---|---|
200 OK | Network information will be supplied within the response. |
400 Bad Request | Any of the provided parameters is invalid or callbackUrl is not reachable. |
401 Unauthorized | HTTP basic authentication parameters are invalid. |
403 Forbidden | HTTP basic authentication parameters are missing. |
405 Method Not Allowed | Request method is not support (this service only supports GET). |
415 Not Acceptable | Media type is not supported. |
500 Internal Error |