api:customer:delete
Table of Contents
API : Customer Delete
Introduction
This request will delete the specified customer.
A customer can only be deleted if the customer has no products or services in active use. Deleting the customer also deletes the employees that belong to the customer.
The customer is not removed from the database: it is kept with state DELETED and deletedAt set, together with its invoices and change log, and Telecom X staff can look it up through Deleted customers. Products that belong to the customer itself are deleted, each with a change log entry (section Products) holding a copy of the product.
Request
| URL | https://api.telecomx.dk/customer/CUSTOMER_ID | |
|---|---|---|
| Method | DELETE | |
| Access level | RESELLER if customer belongs to the reseller or a sub reseller. RESELLER_ADMIN. ADMIN. |
|
| Param | CUSTOMER_ID | Id of the customer (24 hex-char string) |
Query example
DELETE https://api.telecomx.dk/customer/1234567890abcdef12345678
Response
| Json object | ||
|---|---|---|
| success | Boolean | True on success |
Example
{ "success": true }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | id | Customer id is invalid |
| 403 | access_denied | Insufficient access level |
| 404 | customer | Customer not found |
| 409 | customer | Customer cannot be deleted |
| 409 | customer | Only Mister Møller may delete a reseller |
| 409 | voice_accounts | Cannot delete customer because of active SIP or MVNO accounts |
| 409 | billing_customer_voice_accounts | Cannot delete customer because of active SIP or MVNO accounts being billed to this customer |
| 409 | billing_customer_employees | Cannot delete customer because of employees being billed to this customer |
| 409 | billing_customer_extensions | Cannot delete customer because of PBX extensions being billed to this customer |
| 409 | internetrequest | Cannot delete customer because of active Internet Requests |
| 409 | internet | Cannot delete customer because of active Internet accounts |
| 409 | billing_customer_internet_account | Cannot delete customer because of Internet Accounts being billed to this customer |
| 409 | currentinvoice | Cannot delete customer because of current invoice items |
| 409 | features | Customer provides IPTV and cannot be deleted |
| 409 | dns | Cannot delete customer because of active domains |
| 409 | parentReseller | Reseller has customers that must be deleted first |
| 409 | networkdevices | Cannot delete customer because of active network devices |
| 500 | internal_error | <Unspecified> |
api/customer/delete.txt · Last modified: by Telecom X AI