User Tools

Site Tools


api:number:update

API : Number Update

Introduction

This request will update a number or a series of numbers.

Depending on the users access level, different properties may be updated:

Access level Properties
MANAGER employee, name, listed, addressOverride
OWNER employee, name, listed, addressOverride
RESELLER employee, name, listed, product, addressOverride
RESELLER_ADMIN state, type, customer, employee, name, rangeOwner, live, closed, preReserved, preReservedBy, wholesale, price, listed, product, addressOverride
ADMIN state, type, customer, employee, name, rangeOwner, live, closed, preReserved, preReservedBy, wholesale, price, listed, product, addressOverride

Request

URL https://api.telecomx.dk/number/NUMBER_ID
Method POST
Access level MANAGER or OWNER if belonging to the numbers customer.
RESELLER if customer who owns the numbers belongs to the reseller.
RESELLER_ADMIN.
ADMIN.
Params NUMBER_ID The number to update (E.164 format) or if updating a range, then the first number of the range (E.164 format).
Body _id String If updating a single number - then the phone number in E.164 format. If updating a series, then the first number, a dash, and the last number in E.164 format (e.g. +4570305050-+4570305059).
state String State of the number(s):
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
IN_USE_SMARTWATCH - assigned to an account for smartwatch 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 90 days 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(s):
FIXED - landline number.
INTERNATIONAL - Non danish number.
MVNOTELENOR - Mobile phone number on Telenor network.
FIXEDTDC - Landline number on the TDC 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).
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.
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.
live Date If state is IN_USE, PORTING_IN or PORTING_OUT, this is the date the number was taken into use.
closed Date If state is CLOSED, this is the date the number was closed. A closed number will remain closed for 90 days 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.
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
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.
addressOverride Id Id of one of the customer's addresses; overrides the invoicing address for this number. Only applied when the number has a customer.

Query example

{
  "_id": "+4570305000-+4570305999",
  "state": "AVAILABLE"
}

Response

JSON object
success Boolean True if the number(s) were updated

Example

{
  "success": true
}

Errors

Error code Message Description
422 _id Id does not contain a valid number or range of numbers
422 _id Range too big, max. 1000 numbers in a range
409 range Cannot update part of a range or multiple ranges, must always update a single number or a single range
422 _id Number is not a valid E.164 number
422 type Type is not valid
422 range Range is invalid
422 live Live date is required for state IN_USE
422 live Live date is required for state PORTING_OUT
422 closed Closed date is required for state CLOSED
422 preReserved Pre reserved date is required for state PRE_RESERVED
422 product Product is not valid for the customer
422 state State is not valid
404 voiceAccount Voice account not found
404 porting Porting not found
404 employee Employee not found
404 customer Customer not found
404 addressOverride Address not found
404 preReservedBy Pre reserving reseller not found
409 range Range is invalid, all the numbers in the range does not belong to the range
409 state State cannot be changed at its current state, the voice accounts must instead be deleted
409 closed Numbers cannot be used within 90 days of it being closed
409 state MVNO account is under deletion
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/number/update.txt · Last modified: by Mikkel Meerwaldt Jørgensen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki