This request will create a number or a series of numbers.
This is used by an ADMIN to add number series purchased from Erhvervsstyrelsen or international numbers. When adding series, a max of 1000 numbers can be part of a series.
| URL | https://api.telecomx.dk/number | ||
|---|---|---|---|
| Method | POST | ||
| Access level | RESELLER_ADMIN with PORTING feature, or ADMIN. | ||
| Body | _id | String | If creating a single number - then the phone number in E.164 format. If creating a series, then the first number, a dash, and the last number in E.164 format (e.g. +4570305050-+4570305059). A series must be 10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800,900,1000 numbers. |
| state | String | Initial state of the number, limited to: AVAILABLE - can be assigned by OWNER/RESELLER/ADMIN at the set price. If a customer is already set, then it is only available to that customer. LOCKED - cannot be assigned. |
|
| type | String | [optional] Type of number: FIXED - landline number. FIXEDTDC - Landline number on the TDC network. INTERNATIONAL - Non danish number. MVNOTELENOR - Mobile phone number on Telenor network. MVNOTDC - Mobile phone number on TDC network. |
|
| customer | Id | Id of customer who owns it, if state is IN_USE, PORTING_IN, PORTING_OUT or AVAILABLE). | |
| rangeOwner | Boolean | True if the number is part of an range that originally was assigned to Telecom X by Erhvervsstyrelsen. | |
| wholesale | Number | The price of purchasing the number for the reseller. Only available for RESELLERs and ADMINs. If the number is part of a series, this is the resellers price for the whole series. Range 0–100000. | |
| price | Number | The price of purchasing the number for the customer. If the number is part of a series, this is the price for the whole series, as the number can only be purchased together with the whole series. Range 0–100000. | |
{
"_id": "+4570305000-+4570305999",
"state": "LOCKED",
"type": "FIXED",
"customer": null,
"rangeOwner": true,
"wholesale": 90000.00,
"price": 100000.00
}
| JSON object | ||
|---|---|---|
| success | Boolean | True on success. |
| count | Integer | Number of numbers created. |
{ "success": true, "count": 1000 }
| Error code | Message | Description |
|---|---|---|
| 422 | _id | Id does not contain a valid number or range of numbers |
| 422 | state | Numbers can only be added with the state AVAILABLE or LOCKED |
| 409 | _id | One or more of the numbers already exists |
| 409 | _id | The number already exists |
| 422 | _id | Number is not a valid E.164 number |
| 422 | type | Type is not valid |
| 422 | series | Size of number series is invalid |
| 404 | <field> | A required body field is missing. |
| 404 | customer | Customer not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |