api:mvno:checknumber
Table of Contents
API : MVNO Account Check Number
Introduction
This request will check a number and return its current state. This should be used by UI when adding a number to a MVNO account, so that the user may be presented with the current state of the number.
A MVNO account will accept any E.164 formatted phone number, and report the status as to if the number is available, in use, needs to be purchased or perhaps needs to be ported.
Request
| URL | https://api.telecomx.dk/mvno/check/number | ||
|---|---|---|---|
| Method | POST | ||
| Access level | VIEWER, MANAGER or OWNER when user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
||
| Body | Customer | Id | Id of the customer the number should be added to. |
| id | Id | [optional] Id of the MVNO account (if it exists yet). |
|
| number | String | E.164 formatted phone numbers to check. | |
Query example
{
customer: '1234567890ABCDEF12345678',
id: '1234567890ABCDEF12345678',
number: '+4581808888'
}
Response
| JSON object | ||
|---|---|---|
| number | String | The checked number, E.164 formatted. |
| status | String | The status of the number: see status descriptions below. |
| type | String | If number is managed by Telecom X, then this is the type of number: FIXED, FIXEDTDC, MVNOTELENOR, MVNOTDC. |
| price | Double | If status = AVAILABLE_FOR_PURCHASE, then this is the price to purchase the number. If the number is part of a series, each number in the series will have the same price, but only the first number in the series will be the one to pay for, although you cannot buy part of a series. |
| wholesale | Double | If status = AVAILABLE_FOR_PURCHASE, then this is the price the reseller will pay to Telecom X for the number or number-series. This is only available if user is a RESELLER. |
| range | String | If the number is part of a series, this will contain the first number a dash and the last number of the series. |
| currentOperator | String | If status = PORTING_REQUIRED, this is the CPS code of the operator where the number is currently located. |
| currentOperatorName | String | If status = PORTING_REQUIRED, this is the name of the operator where the number is currently located. |
| employee | Id | If the number is in porting or in use, and has been assigned to an employee, this is the id of the employee. |
| employeeName | String | If the number is in porting or in use, and a name has been assigned to it, then this is the name. If an employee has been assigned to it, then this is the name of the employee. |
| Status code | Description |
|---|---|
| RESERVED | The customer owns the number and it can be assigned to the account. |
| IN_PORTING_THIS_ACCOUNT | Number is being ported in, and is already part of the MVNO account. |
| IN_USE_THIS_ACCOUNT | Number is in use by the MVNO account. |
| IN_PORTING_OTHER_ACCOUNT | Number is being ported in, but belongs to another MVNO account. |
| IN_USE_OTHER_ACCOUNT | Number is in use by another MVNO account. |
| AVAILABLE_FOR_PURCHASE | Number is available and will be purchased for the price shown in price if added to the account. The resellers wholesale price will also be available if the user is a reseller. |
| PORTING_REQUIRED | The number is located at another Telecom Service Provider and needs to be ported in before it can be used. If the number is added to the MVNO account a porting will automatically be created. The CPS code and name of the other TSP can be seen in currentOperator and currentOperatorName. |
| UNAVAILABLE | The number is not available (somebody else is using it or it is not for sale). |
| WRONG_TYPE | The number is a landline number, only mobile numbers can be added to a MVNO account. |
| INVALID | The number is invalid or an international number. |
Note that properties holding no value may be omitted from the object.
Example
[ { number: '+4571919997', status: 'AVAILABLE_FOR_PURCHASE', type: 'MVNOTELENOR'', price: 50.00, wholesale: 25.00, currentOperator: null, currentOperatorName: null, employee: null, employeeName: null } ... ]
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 422 | customer | Customer not found |
| 422 | id | MVNO account id invalid |
| 422 | number | Number to check not found |
| 422 | number | number is not valid E.164 formatted |
| 500 | internal_error | <Unspecified> |
api/mvno/checknumber.txt · Last modified: 2023/02/17 13:22 by Per Møller