Aller au contenu
Accueil » API SMS Octopush » MNP – Vérification de portage

MNP – Vérification de portage

POST
https://api.octopush.com/v1/public/contact/mnp-request

Encodage : UTF-8

Authentification

La api-key et le api-login doivent être ajoutés dans un header.

Définition

Permet de vérifier si une ligne téléphonique a été portée vers un autre opérateur.

Paramètres

NomTypeDescription
phone_numbersstring[]Numéros de téléphone au format international +XXZZZZZ :
[
  "+33611223344", 
  "+33611223345",
  ...
]

Exemples Curl

curl -X POST \ 
'https://api.octopush.com/v1/public/contact/mnp-request' \ 
-H 'Content-Type: application/json' \ 
-H 'api-login: ******@email.org' \ 
-H 'api-key: ************' \ 
-H 'cache-control: no-cache' \ 
-d '
{
  "phone_numbers": [
    "+33611223344",
    "+33611223345"
  ]
}'

Code à copier-coller

curl -X POST 'https://api.octopush.com/v1/public/contact/mnp-request' -H 'Content-Type: application/json' -H 'api-login: ******@email.org' -H 'api-key: ************' -H 'cache-control: no-cache' -d '{"phone_numbers": ["+33611223344", "+33611223345"]}'

Retour Server en json

Success : 200 Created

[
  {
    "network_name":"sfr",
    "mcc":"208",
    "mnc":"10",
    "country_name":"France",
    "country_code_iso3":"FRA",
    "country_code":"FR",
    "country_prefix":"33",
    "area":"France",
    "phone_number":"+33611223344",
    "is_ported":false,
    "ported_date":null,
    "line_status":"live",
    "original_network_details":
    {
      "network_name":"sfr",
      "mcc":"208",
      "mnc":"08",
      "country_name":"France",
      "country_code_iso3":"FRA",
      "country_code":"FR",
      "country_prefix":"33"
    }
  },
  {
    "network_name":"sfr",
    "mcc":"208",
    "mnc":"10",
    "country_name":"France",
    "country_code_iso3":"FRA",
    "country_code":"FR",
    "country_prefix":"33",
    "area":"France",
    "phone_number":"+33611223345",
    "is_ported":true,
    "ported_date":'2020-12-03T00:00:00Z',
    "line_status":"live",
    "original_network_details":
    {
      "network_name":"sfr",
      "mcc":"208",
      "mnc":"08",
      "country_name":"France",
      "country_code_iso3":"FRA",
      "country_code":"FR",
      "country_prefix":"33"
    }
  },
]

Failure : 400 BAD REQUEST

{
  "code": 400,
  "message": "Payload validation error.",
  "errors": {
    "phone_numbers": {
      "code": 410,
      "message": "This value should not be blank."
    }
  }
}

Limitations particulières

1 à 200 numéros par requête.

Returned parameters

FieldTypeDescription
network_namestringNetwork name
mncintergerNetwork Network Code
mccintegerNetwork Country Code
statusstringIs the number valid or not ?
country_namestringName of the phone number country.
country_code_iso3stringCountry code of the phone number (3 letters)
country_codestringCountry code of the phone number (2 letters).
areastringGeographical zone of the mobile line.
country_prefixstringNumber prefix.
phone_numberstringFormatted phone number.
phone_number_typestringType of the phone. Possible values and definitions are described in the dictionary.
line_statusstringStatus of the line, depending on the last date of synchronization to network, if the line does exist and does have an owner.
is_portedbooleanIndicate if the number has been ported or not from the original network to the current network.
ported_datestringDate when the number has been ported. Format YYYY-MM-DD HH:II:SS
original_network_detailsstringInformation about the original network. Will contain network_name, mcc, mnc, country_name, country_code_iso3, country_code, area, country_prefix

Return dictionary

ValueDefinition

status

validThe line has an owner.
invalidThe line does not have an owner.
operator_is_not_availableImpossible de get the information.
unknownUnknown status.

line_status

liveThis phone number is live and is assigned to a subscriber who has recently used their phone.
deadThis phone number has been confirmed to be a dead phone number by the phone network and will not receive phone calls or text messages because the phone number is not assigned to an existing SIM card or user.
absent_subscriberThis phone number is assigned to a mobile SIM card, but either:
1. There has been a prolonged period of inactivity from the mobile handset;
2. The mobile phone has been turned off or gone out of radio coverage, and someone has attempted to call or send an SMS to the phone number;
3. The number is allocated to a new SIM card and the SIM card has not yet been registered to a user.
no_teleservice_provisionedThe phone number is assigned to a SIM card which is not allowed to make or receive phone calls. Typically a “data-only SIM”.
not_available_network_onlyThe phone network that owns the phone number does not provide Live/Dead type status but will provide porting information if the phone number has been ported to another network.
no_coverageWe do not currently have coverage to detect the live status of this phone network.
not_applicableUsed if there is no detected phone number.
inconclusiveWe were currently unable to ascertain the status of this number.

phone_type

bad_formatthe number you submitted to be checked could not be identified as a valid international phone number.
mobilea phone number assigned to a mobile phone operator/cell phone operator.
landlinea fixed wired phone in a fixed location such as home or office.
mobile_or_landlinewhere the phone number could belong to either a mobile or landline type phone.
toll_freealso called freephone. the number can be called from within the home country at no cost. there may be a charge to call this number from outside the home country.
premiumthere is a premium charge added to call this number, often there is a service provided on the number and by calling the number the user pays for the service using their phone bill. the callee typically receives revenue from the call.
shared_costthis phone number will charge both the caller and callee at the same time. there will be an additional charge to call this type of number.
voipassigned to a VoIP provider who delivers calls and text messages over the internet to the end-user or service.
stage_and_screenreserved by a regulatory body specifically for use with stage and screen for example used in films when speaking a phone number. no real end-user will be assigned to this number and often they are used as fictitious numbers.
pagerallocated to a device that receives and displays numeric or alphanumeric messages.
universal_access_numbera single phone number that can be used to route calls to multiple destinations depending on parameters such as time of day, where the caller resides, capacity, or more. this is not linked to any specific locality within the country. typically used by companies to provide a single phone number instead of multiple phone numbers.
personal_numbera phone number intended to be used by individuals who may route to multiple locations (home, office, and cell phone. some personal_numbers are charged at a premium number rate.
voicemail_onlyaccess number for voicemail only.
unknownAny number which does not fall into any of the above categories.