This endpoint allows you to check if a phone number has been ported from its original mobile network operator to another.
Following an example of a Phone Number Portability
curl --request POST \
--url https://api.trustfull.com/1.0/phone-mnp \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: [your_app_key]' \
--data '
{
"transaction_id": "your_transaction_id",
"phone_number": "39349xxxxxxx"
}'
Here's a detailed explanation of all fields needed for the api call:
name | type |
---|---|
transaction_id | string A unique identifier for the transaction. Duplicate values are not allowed. Ex: 4115d9d9-28f4-4100-8701-cafe2adbc4c2 |
phone_number | string The phone number to analyze, in international format. Ex: 39349xxxxxxx |
Response
Following is an example of the response:
{
"is_valid_format": true,
"is_ported": true,
"original_network_name": "Vodafone",
"original_network_code": "22235",
"current_network_name": "Tim",
"current_network_code": "22234",
"ported_times": 5,
"first_ported":"2017-01-01",
"last_ported":"2020-01-01"
}
Here's a detailed explanation of all fields returned:
name | type |
---|---|
is_valid_format | boolean Indicates if the phone number you provided has a valid format Ex: true |
is_ported | ?boolean The total number of data breaches recorded for this phone number Ex: 5 |
original_network_name | ?string The network operator that the number was originally assigned to Ex: Vodafone Italia S.p.A |
original_network_code | ?string The network operator code that the number was originally assigned to Ex: 22209 |
current_network_name | ?string An arbitrary string specifying the current network operator name of the inspected phone number Ex: Fastweb - full mvno TIM |
current_network_code | ?string The network operator code that the number was originally assigned to Ex: 22209 |
ported_times | ?integer Will indicate the number of times this phone number changed network operator. This signal is country-specific. Write an email to [email protected] if you want to know the coverage. Ex: 5 |
first_ported | ?string A string in the format YYYY-MM-DD indicates the first portability event. This signal is country-specific. Write an email to [email protected] if you want to know the coverage. Ex: 2017-01-01 |
last_ported | ?string A string in the format YYYY-MM-DD indicates the last portability event. This signal is country-specific. Write an email to [email protected] if you want to know the coverage. Ex: 2020-01-01 |
FAQ
Following are some common questions for this specific API:
Why do need to pass a transaction_id?
This value is useful to refer to a specific transaction in the system. Using only the phone number can lead to collision in case of duplicated call for the same phone number. Transaction id must be unique across all trustfull api endpoints.
What is the supported phone_number_format?
The phone_number parameter must be submitted in international format, using digits only. This means the number should include the country code directly followed by the national number, without any leading zeros, plus symbols, spaces, or special characters.
What happen if i pass an invalid phone_number?
We strongly encourage you to validate the phone number format before making a request, or to use our Phone Validation endpoint
If the phone_number provided has an invalid format, the response will only include the is_valid_format field (false)βcharged at the same rate as a standard API call.