api:number:get
Table of Contents
API : Number Get
Introduction
This request will return the the specified number.
Request
| URL | https://api.telecomx.dk/number/NUMBER_ID | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer who owns the number. RESELLER if customer belongs to the reseller. ADMIN. |
|
| Param | NUMBER_ID | Id of the number (The phone number in E.164 format) |
| Query | expand | 'true' to expand voiceAccount, customer, employee and preReservedBy with *Name and porting with portingDate and portingStatus |
Query example
https://api.telecomx.dk/number/+4570305050
Response
| JSON object | ||
|---|---|---|
| _id | String | The phone number in E.164 format. |
| state | String | State of the number: 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. IN_USE - assigned to a voice account and in use. IN_USE_DATASHARING - assigned to an account for datasharing sim, see simNumber PORTING_IN - currently being ported in. PORTING_OUT - currently waiting to be ported out. OUT_PORTED has been outported. CLOSED was in use, now in 6 month wait period before it available again. PRE_RESERVED - reserved by a reseller for a potential customer, will timeout in 14 days. |
| type | String | Type of number: FIXED - landline number. INTERNATIONAL - Non danish number. MVNOTELENOR - Mobile phone number on Telenor network. |
| voiceAccount | Id | Id of the voice account (SIP/MVNO) using it, if state is IN_USE. |
| voiceAccountName | String | Name of the voice account (if expand=true). |
| customer | Id | Id of customer who owns it, if state is IN_USE, PORTING_IN, PORTING_OUT or AVAILABLE). |
| customerName | String | Name of the customer (if expand=true). |
| employee | Id | Id of employee using the number, if known and state is IN_USE, PORTING_IN or PORTING_OUT. Used for identifying the daily user of the number, e.g. in billing. |
| employeeName | String | Name of the employee (if expand=true). |
| name | String | Daily user and/or department, if employee is not used and state is IN_USE, PORTING_IN or PORTING_OUT. Used for identifying the daily user/role of the number, e.g. in billing. |
| rangeOwner | Boolean | True if the number is part of an range that originally was assigned to Telecom X by Erhvervsstyrelsen. |
| range | String | If the number is part of a range and should only be assigned/sold as a range, then this is a string of first number a dash and the last number (e.g. +4570305050-+4570305059), only valid for fixed line. If the number is an MVNO number, then the series must be split into single numbers by an ADMIN before they can be used for MVNO accounts. |
| porting | Id | If the number is part of a porting and state is PORTING_IN or PORTING_OUT, then this is the id of the porting. |
| portingDate | Date | The date and time the number will be ported in (if porting and date is set and expand=true). |
| portingStatus.date | Date | The date and time the porting entered the current stage (if porting and expand=true). |
| portingStatus.stage | String | The current stage of the porting, see list of porting stages . (if expand=true). |
| portingStatus.message | String | Optional message about the stage of the porting (if porting and expand=true). |
| portingStatus.employee | Id | Id of the employee who caused the porting to move to the current stage, null if done by system (if porting and expand=true). |
| live | Date | The date and time this number went live (state changed to IN_USE). |
| closed | Date | If state is CLOSED, this is the date the number was closed. A closed number will remain closed for 6 months before it is released for re-use. |
| preReserved | Date | If state=PRE_RESERVED this is the date it was pre-reserved. Pre-reservations lasts for 14 days before the number is released again. |
| preReservedBy | Id | Id of the reseller who has pre-reserved the number and is the only one who can release it or assign it to a customer. |
| preReservedByName | String | Name of the reseller (if expand=true). |
| 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. |
| 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. |
| listed | Boolean | True if the number should be listed in public phone books and number lookup services. |
| product | Id | Id of “NUMBER_RENT” product, overrides the customer's number rent product for this number. |
| simNumber | String | ICC number of datasharing sim card that this number is in use o (state IN_USE_DATASHARING only). |
Note that properties holding no value may be omitted from the object.
Example
{ _id: '+4570305050', state: 'IN_USE', type: 'FIXED', voiceAccount: '1234567890ABCDEF12345678', customer: '1234567890ABCDEF12345677', employee: '1234567890ABCDEF12345679', name: null, rangeOwner: true, range: '+4570305050-+4570305059', porting: null, live: '2014-01-01T12:34:56.789Z', closed: null, preReserved: null, preReservedBy: null, wholesale: 8000.00, price: 10000.00, listed: true, product: '1234567890ABCDEF12345678', simNumber: null }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | not_found | Number not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/number/get.txt · Last modified: 2023/06/14 09:48 by Per Møller