# 7.9. Approve delete unit request

[![Approve delete unit request.png](https://doc.rncv.lu/uploads/images/gallery/2025-10/scaled-1680-/approve-delete-unit-request.png)](https://doc.rncv.lu/uploads/images/gallery/2025-10/approve-delete-unit-request.png)

<table class="simple-table" id="bkmrk-name-approve-delete-" style="width: 99.52381%; height: 308px;"><thead class="simple-table-header"><tr id="bkmrk-name-approve-delete--1" style="height: 29px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-name" style="width: 20.115774%; height: 29px;">Name</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-approve-delete-unit-" style="width: 79.884226%; height: 29px;">Approve delete unit request</th></tr></thead><tbody><tr id="bkmrk-purpose-allow-approv" style="height: 29px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-purpose" style="width: 20.115774%; height: 29px;">**Purpose**</th><td class="align-left" id="bkmrk-allow-approver-to-va" style="width: 79.884226%; height: 29px;">Allow Approver to validate a unit delete request</td></tr><tr id="bkmrk-linked-user-stories-" style="height: 57px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-linked-user-stories" style="width: 20.115774%; height: 57px;">**Linked user stories**</th><td class="align-left" id="bkmrk-4.39.-editor---delet" style="width: 79.884226%; height: 57px;">[4.39. Editor - Delete a unit](https://doc.rncv.lu/books/architecture-documentation/page/439-editor-delete-a-unit "4.39. Editor - Delete a unit")

[4.49. Approver - Approve deleted unit request](https://doc.rncv.lu/books/architecture-documentation/page/449-approver-approve-deleted-unit-request "4.49. Approver - Approve deleted unit request")

[4.54. Organisation Approver - Approve deleted unit request for organisation](https://doc.rncv.lu/books/architecture-documentation/page/454-organisation-approver-approve-deleted-unit-request-for-organisation "4.54. Organisation Approver - Approve deleted unit request for organisation")

</td></tr><tr id="bkmrk-apis-used-put-%2Funits" style="height: 61px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-apis-used" style="width: 20.115774%; height: 61px;">**APIs used**</th><td class="align-left" id="bkmrk-put-%2Funits%2F%3Cunit-id%3E" style="width: 79.884226%; height: 61px;">**PUT** /units/&lt;unit-id&gt;/approve  
**PUT** /units/&lt;unit-id&gt;/reject  
**PUT** or **PATCH** /units/&lt;unit-id&gt;</td></tr><tr id="bkmrk-scope-this-process-o" style="height: 29px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-scope" style="width: 20.115774%; height: 29px;">**Scope**</th><td class="align-left" id="bkmrk-this-process-only-ha" style="width: 79.884226%; height: 29px;">This process only handles the validation of an already created unit deletion request</td></tr><tr id="bkmrk-roles-system%2C-approv" style="height: 29px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-roles" style="width: 20.115774%; height: 29px;">**Roles**</th><td class="align-left" id="bkmrk-system%2C-approver-%2F-g" style="width: 79.884226%; height: 29px;">System, Approver / Global Approver</td></tr><tr id="bkmrk-input---id-of-the-un" style="height: 45px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input" style="width: 20.115774%; height: 45px;">**Input**</th><td class="align-left" id="bkmrk---id-of-the-unit-tha" style="width: 79.884226%; height: 45px;">- id of the unit that is marked for deletion  
- optionally the information to amend</td></tr><tr id="bkmrk-output---confirmatio" style="height: 29px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-output" style="width: 20.115774%; height: 29px;">**Output**</th><td class="align-left" id="bkmrk---confirmation-that-" style="width: 79.884226%; height: 29px;">- confirmation that the update request has been approved/rejected</td></tr></tbody></table>

## Detailed Process description

### Main Process

<table class="simple-table" id="bkmrk-step-description-act" style="width: 100%; height: 764px;"><thead class="simple-table-header"><tr id="bkmrk-step-description-act-1" style="height: 125px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-step" style="width: 5.959476%; height: 125px;">Step</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-description" style="width: 21.215733%; height: 125px;">Description</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-actor%28s%29" style="width: 9.296782%; height: 125px;">Actor(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input%28s%29" style="width: 14.064362%; height: 125px;">Input(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-output%28s%29" style="width: 17.758812%; height: 125px;">Output(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-decision-points" style="width: 31.704836%; height: 125px;">Decision points</th></tr></thead><tbody><tr id="bkmrk-1-the-system-sends-o" style="height: 109px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-1" style="width: 5.959476%; height: 109px;">**1**</th><td class="align-left" id="bkmrk-the-system-sends-out" style="width: 21.215733%; height: 109px;">The System sends out notifications to the Global approvers and organisation approvers, indicating that an approval a pending.</td><td class="align-left" id="bkmrk-system" style="width: 9.296782%; height: 109px;">System</td><td class="align-left" id="bkmrk---outside-trigger-%28e" style="width: 14.064362%; height: 109px;">- Outside trigger (e.g. Editor sent a delete request)</td><td class="align-left" id="bkmrk---notification-to-th" style="width: 17.758812%; height: 109px;">- notification to the Global and organisation Approvers</td><td class="align-left" id="bkmrk--1" style="width: 31.704836%; height: 109px;"></td></tr><tr id="bkmrk-2-the-approver-verif" style="height: 86px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-2" style="width: 5.959476%; height: 86px;">**2**</th><td class="align-left" id="bkmrk-the-approver-verifie" style="width: 21.215733%; height: 86px;">The Approver verifies if the unit can be deleted</td><td class="align-left" id="bkmrk-approver" style="width: 9.296782%; height: 86px;">Approver</td><td class="align-left" id="bkmrk---unit-deletion-requ" style="width: 14.064362%; height: 86px;">- unit deletion request</td><td class="align-left" id="bkmrk---yes-%2F-no" style="width: 17.758812%; height: 86px;">- yes / no</td><td class="align-left" id="bkmrk-if-the-unit-can-be-d" style="width: 31.704836%; height: 86px;">**If the unit can be deleted:** Go to step 3  
**Else:** Go to secondary process S.1</td></tr><tr id="bkmrk-3-the-system-marks-t" style="height: 141px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-3" style="width: 5.959476%; height: 141px;">**3**</th><td class="align-left" id="bkmrk-the-system-marks-the" style="width: 21.215733%; height: 141px;">The System marks the unit with the flag “is\_deleted = true” and adds the information on the date of validation and the user that validated the request</td><td class="align-left" id="bkmrk-system-1" style="width: 9.296782%; height: 141px;">System</td><td class="align-left" id="bkmrk---unit-with-flag-%E2%80%9Cma" style="width: 14.064362%; height: 141px;">- unit with flag “marked\_for\_deletion = true”</td><td class="align-left" id="bkmrk---unit-with-flag-%E2%80%9Cis" style="width: 17.758812%; height: 141px;">- unit with flag “is\_deleted = true”  
- approver set to the user that triggered the approval  
- approval date set to the current date</td><td class="align-left" id="bkmrk--2" style="width: 31.704836%; height: 141px;"></td></tr><tr id="bkmrk-4-the-system-sets-al" style="height: 93px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-4" style="width: 5.959476%; height: 93px;">**4**</th><td class="align-left" id="bkmrk-the-system-sets-all-" style="width: 21.215733%; height: 93px;">The System sets all the quipments linked to the site with the flag “is\_deleted = true”.</td><td class="align-left" id="bkmrk-system-2" style="width: 9.296782%; height: 93px;">System</td><td class="align-left" id="bkmrk---unit" style="width: 14.064362%; height: 93px;">- unit</td><td class="align-left" id="bkmrk---all-linked-equipme" style="width: 17.758812%; height: 93px;">- all linked equipments marked with the flag “is\_deleted = true”</td><td class="align-left" id="bkmrk--3" style="width: 31.704836%; height: 93px;"></td></tr><tr id="bkmrk-5-the-system-creates" style="height: 125px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-5" style="width: 5.959476%; height: 125px;">**5**</th><td class="align-left" id="bkmrk-the-system-creates-v" style="width: 21.215733%; height: 125px;">The System creates validated update requests with the flag “is\_deleted = true” for each active physical link that are linked to the deleted equipments</td><td class="align-left" id="bkmrk-system-3" style="width: 9.296782%; height: 125px;">System</td><td class="align-left" id="bkmrk---unit-1" style="width: 14.064362%; height: 125px;">- unit</td><td class="align-left" id="bkmrk---new-validated-phys" style="width: 17.758812%; height: 125px;">- new validated physical links with the flag “is\_deleted = true” for each active physical link that is linked to the deleted equipments</td><td class="align-left" id="bkmrk--4" style="width: 31.704836%; height: 125px;"></td></tr><tr id="bkmrk-6-the-approver-gets-" style="height: 85px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-6" style="width: 5.959476%; height: 85px;">**6**</th><td class="align-left" id="bkmrk-the-approver-gets-a-" style="width: 21.215733%; height: 85px;">The Approver gets a confirmation that the approval has been applied</td><td class="align-left" id="bkmrk-approver-1" style="width: 9.296782%; height: 85px;">Approver</td><td class="align-left" id="bkmrk---confirmation-of-th" style="width: 14.064362%; height: 85px;">- confirmation of the validation</td><td class="align-left" id="bkmrk--5" style="width: 17.758812%; height: 85px;">  
</td><td class="align-left" style="width: 31.704836%; height: 85px;">  
</td></tr></tbody></table>

### Secondary Processes

#### S.1. Delete unit request rejected

<table class="simple-table" id="bkmrk-step-description-act-2" style="width: 100%;"><thead class="simple-table-header"><tr id="bkmrk-step-description-act-3"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-step-1" style="width: 5.721097%;">Step</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-description-1" style="width: 21.811681%;">Description</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-actor%28s%29-1" style="width: 9.535161%;">Actor(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input%28s%29-1" style="width: 13.349225%;">Input(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-output%28s%29-1" style="width: 17.548527%;">Output(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-decision-points-1" style="width: 32.03431%;">Decision points</th></tr></thead><tbody><tr id="bkmrk-1-the-system-removes"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-1-1" style="width: 5.721097%;">**1**</th><td class="align-left" id="bkmrk-the-system-removes-t" style="width: 21.811681%;">The System removes the mark\_for\_deletion tag from the unit entry</td><td class="align-left" id="bkmrk-system-4" style="width: 9.535161%;">System</td><td class="align-left" id="bkmrk---unit-marked-for-de" style="width: 13.349225%;">- unit marked for deletion</td><td class="align-left" id="bkmrk---unit-with-the-flag" style="width: 17.548527%;">- unit with the flag “mark\_for\_deletion = false”</td><td class="align-left" id="bkmrk--6" style="width: 32.03431%;"></td></tr><tr id="bkmrk-2-the-approver-gets-"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-2-1" style="width: 5.721097%;">**2**</th><td class="align-left" id="bkmrk-the-approver-gets-a--1" style="width: 21.811681%;">The Approver gets a confirmation that the deletion rejection has been applied</td><td class="align-left" id="bkmrk-approver-2" style="width: 9.535161%;">Approver</td><td class="align-left" id="bkmrk---deletion-request-r" style="width: 13.349225%;">- deletion request rejection confirmation</td><td class="align-left" id="bkmrk--7" style="width: 17.548527%;"></td><td class="align-left" style="width: 32.03431%;">  
</td></tr></tbody></table>

### Exceptions

#### \[400 Bad Request\] Invalid input:

If mandatory fields are missing or invalid, the system returns an error message. If some addresses do not exist in the system, this is also considered as a bad request.

#### \[404 Not Found\] Unit not found

Error returned by the system if the unit is not found.

#### \[409 Conflict\] Unit not marked for deletion

Error returned by the system if the unit being validated is not marked for deletion.

#### \[500 Internal Server Error\] System Error

If the system fails to save changes due to an internal error, it displays an appropriate message and logs the error for further investigation.