api:employee:delete
Table of Contents
API : Employee Delete
Introduction
This request will delete the specified employee.
Request
| URL | https://api.telecomx.dk/employee/EMPLOYEE_ID | ||
|---|---|---|---|
| Method | DELETE | ||
| Access level | MANAGER or OWNER if user belongs to the customer the employee belongs to. RESELLER if customer belongs to the reseller. RESELLER_ADMIN or ADMIN. |
||
| Param | EMPLOYEE_ID | Id | Id of the employee (24 hex-char string) |
| Query | deleteExtensions | Boolean | True to also delete PBX extensions that belongs to this employee. Otherwise they are just unlinked. |
| deleteMvnoAccounts | Boolean | True to also delete MVNO accounts belonging to this employee. Otherwise they are just unlinked. | |
| deleteDate | Date | Can be set if the employee should be deleted at a later point in the future. Format is YYYY-MM-DD. | |
Query examples
DELETE https://api.telecomx.dk/employee/1234567890ABCDEF12345678 DELETE https://api.telecomx.dk/employee/1234567890ABCDEF12345678?deleteExtensions=true DELETE https://api.telecomx.dk/employee/1234567890ABCDEF12345678?deleteExtensions=true&deleteDate=2024-05-15 DELETE https://api.telecomx.dk/employee/1234567890ABCDEF12345678?deleteExtensions=true&deleteDate=2024-05-15&deleteMvnoAccounts=true
Response
| Json object | ||
|---|---|---|
| success | Boolean | True on success |
| deleteDate | Date | Returned if choosing to delete an employee at a specific time |
Example
{ success: true, }
{ success: true, deleteDate: '2024-11-30T20:00:00.000Z' }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | employee | Employee id not found in request URI |
| 403 | access_denied | Insufficient access level |
| 404 | employee | Employee not found |
| 422 | deleteDate | Delete date is too far in the future |
api/employee/delete.txt · Last modified: 2024/12/10 15:01 by Per Møller