Table of Contents

API : Deleted Customer Numbers

Introduction

This request returns the phone numbers a deleted customer had, one row per number, with the SIP or MVNO account it was on.

The history is rebuilt from the change log (number and account snapshots, from 2022-01-24) and from the copies of deleted SIP and MVNO accounts (from 2026), so numbers the customer had before 2022-01-24 are not included. A number that moved between accounts is shown on the account that held it last.

Request

URL https://api.telecomx.dk/deletedcustomer/CUSTOMER_ID/numbers
Method GET
Access level RESELLER_ADMIN or ADMIN
Param CUSTOMER_ID Id of the deleted customer (24 hex-char string)

Query example

https://api.telecomx.dk/deletedcustomer/619366605a8fe9d7495f1699/numbers

Response

JSON object
historyFrom String The history goes back to this date: 2022-01-24.
truncated Boolean True when the customer had more than 5000 numbers and only the first 5000 are returned.
numbers Array The numbers sorted by number, see below.
Number object
number String The number in E.164 format.
type String FIXED, FIXEDTDC, MVNOTDC, MVNOTELENOR or INTERNATIONAL, null if unknown.
name String Name of the number, if any.
account Object The account the number was on, null if none is known. See below.
from Date Earliest date the number is seen on the customer.
until Date Latest date the number is seen on the customer.
currentState String The number's state now: a number state (e.g. AVAILABLE, IN_USE, CLOSED), OTHER_CUSTOMER when it now belongs to another customer, GONE when the number no longer exists.
Account object
_id Id Id the account had.
kind String SIP or MVNO.
name String Name of the account, if any.
simNumber String ICC of the SIM card (MVNO only).
ratePlan Object _id and name of the rate plan product. name is null if the product no longer exists.
createdAt Date When the account was created, if known.
deletedAt Date When the account was deleted, if known.

Example

{
  "historyFrom": "2022-01-24",
  "truncated": false,
  "numbers": [
    {
      "number": "+4521615141",
      "type": "MVNOTDC",
      "name": "Sales",
      "account": {
        "_id": "6516aa608e0de8d7df465d64",
        "kind": "MVNO",
        "name": null,
        "simNumber": "89450202833010834870",
        "ratePlan": { "_id": "6516a3a70d3680d715ffd06e", "name": "Mobile EU large" },
        "createdAt": "2022-01-27T09:12:44.000Z",
        "deletedAt": null
      },
      "from": "2022-01-27T09:12:44.000Z",
      "until": "2025-03-27T10:02:11.000Z",
      "currentState": "OTHER_CUSTOMER"
    }
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
404 customer Customer not found - also when the customer is not deleted
422 id Customer id is invalid
500 internal_error <Unspecified>