User Tools

Site Tools


api:deletedcustomer:get

API : Deleted Customer Get

Introduction

This request returns a deleted customer: its master data, when and by whom it was deleted, how many invoices, users and change log entries it has, and which change log sections hold entries for it.

Request

URL https://api.telecomx.dk/deletedcustomer/CUSTOMER_ID
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

Response

The customer as described in Customer Get, without integrations (they hold per-customer secrets), the search data and the call event subscribers. In addition:

JSON object
parentResellerName String Name of the reseller the customer belonged to, null if none.
createdAt Date When the customer was created.
updatedAt Date When the customer was last changed.
deletedAt Date When the customer was deleted.
deletedBy Object _id and name of the employee who deleted the customer, from the change log. Null when the deletion predates the change log.
deletedAtEstimated Boolean True when there is no deletion entry in the change log: deletedAt is then 2022-01-24, meaning “no later than”.
counts.invoices Number Number of invoices of the customer.
counts.employees Number Number of users of the customer.
counts.changeLog Number Number of change log entries of the customer.
changeLogSections Array The change log sections (section, count) that hold entries for the customer, most entries first. Use them with Change log list.

Example

{
  "_id": "619366605a8fe9d7495f1699",
  "name": "Northwind ApS",
  "state": "DELETED",
  "phoneNumber": "+4596630006",
  "emailAddress": "info@example.dk",
  "isReseller": false,
  "features": ["CUSTOMER", "SIP", "MVNO"],
  "addresses": [{ "_id": "619366605a8fe9d7495f169a", "primary": true, "address": "Byvej 17", "zip": "2500", "city": "Valby", "country": "DK" }],
  "finance": { "vatNumber": "29178445", "accountingSystemId": "29178445", "invoiceMethod": "EMAIL", "paymentTerms": "DAYS_7" },
  "parentReseller": "52f4fd7734697b28ccaf77ec",
  "parentResellerName": "PowerNet ApS",
  "createdAt": "2021-11-16T08:12:00.000Z",
  "updatedAt": "2026-09-15T17:53:02.118Z",
  "deletedAt": "2026-09-15T17:53:02.118Z",
  "deletedBy": { "_id": "54e5f7f50a0666950d0f4a87", "name": "Jens Mogensen" },
  "deletedAtEstimated": false,
  "counts": { "invoices": 40, "employees": 9, "changeLog": 2445 },
  "changeLogSections": [{ "section": "Employees", "count": 1468 }, { "section": "Numbers", "count": 701 }, { "section": "MvnoAccounts", "count": 194 }]
}

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>
api/deletedcustomer/get.txt · Last modified: by Telecom X AI

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki