# 7.7. Approve delete site request

[![approve deleted process.png](https://doc.rncv.lu/uploads/images/gallery/2025-10/scaled-1680-/approve-deleted-process.png)](https://doc.rncv.lu/uploads/images/gallery/2025-10/approve-deleted-process.png)

<table class="simple-table" id="bkmrk-name-approve-delete-" style="width: 100%; height: 330px;"><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: 21.215733%; height: 29px;">Name</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-approve-delete-site-" style="width: 78.784267%; height: 29px;">Approve delete site 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: 21.215733%; height: 29px;">**Purpose**</th><td class="align-left" id="bkmrk-allow-approver-to-va" style="width: 78.784267%; height: 29px;">Allow Approver to validate a site delete request</td></tr><tr id="bkmrk-linked-user-stories-" style="height: 79px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-linked-user-stories" style="width: 21.215733%; height: 79px;">**Linked user stories**</th><td class="align-left" id="bkmrk-4.33.-editor---delet" style="width: 78.784267%; height: 79px;">[4.33. Editor - Delete a site](https://doc.rncv.lu/books/architecture-documentation/page/433-editor-delete-a-site "4.33. Editor - Delete a site")

[4.47. Approver - Approve deleted site request](https://doc.rncv.lu/books/architecture-documentation/page/447-approver-approve-deleted-site-request "4.47. Approver - Approve deleted site request")

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

</td></tr><tr id="bkmrk-apis-used-put-%2Fsites" style="height: 61px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-apis-used" style="width: 21.215733%; height: 61px;">**APIs used**</th><td class="align-left" id="bkmrk-put-%2Fsites%2F%3Csite-id%3E" style="width: 78.784267%; height: 61px;">**PUT** /sites/&lt;site-id&gt;/approve  
**PUT** /sites/&lt;site-id&gt;/reject  
**PUT** or PATCH /sites/&lt;site-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: 21.215733%; height: 29px;">**Scope**</th><td class="align-left" id="bkmrk-this-process-only-ha" style="width: 78.784267%; height: 29px;">This process only handles the validation of an already created site 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: 21.215733%; height: 29px;">**Roles**</th><td class="align-left" id="bkmrk-system%2C-approver-%2F-g" style="width: 78.784267%; height: 29px;">System, Approver / Global Approver</td></tr><tr id="bkmrk-input---id-of-the-si" style="height: 45px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input" style="width: 21.215733%; height: 45px;">**Input**</th><td class="align-left" id="bkmrk---id-of-the-site-tha" style="width: 78.784267%; height: 45px;">- id of the site 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: 21.215733%; height: 29px;">**Output**</th><td class="align-left" id="bkmrk---confirmation-that-" style="width: 78.784267%; 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%;"><thead class="simple-table-header"><tr id="bkmrk-step-description-act-1"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-step" style="width: 6.078665%;">Step</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-description" style="width: 21.454112%;">Description</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-actor%28s%29" style="width: 9.415971%;">Actor(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input%28s%29" style="width: 14.183552%;">Input(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-output%28s%29" style="width: 17.401101%;">Output(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-decision-points" style="width: 31.466599%;">Decision points</th></tr></thead><tbody><tr id="bkmrk-1-the-system-sends-o"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-1" style="width: 6.078665%;">**1**</th><td class="align-left" id="bkmrk-the-system-sends-out" style="width: 21.454112%;">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.415971%;">System</td><td class="align-left" id="bkmrk---outside-trigger-%28e" style="width: 14.183552%;">- Outside trigger (e.g. Editor sent a delete request)</td><td class="align-left" id="bkmrk---notification-to-th" style="width: 17.401101%;">- notification to the Global and organisation Approvers</td><td class="align-left" id="bkmrk--1" style="width: 31.466599%;"></td></tr><tr id="bkmrk-2-the-approver-verif"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-2" style="width: 6.078665%;">**2**</th><td class="align-left" id="bkmrk-the-approver-verifie" style="width: 21.454112%;">The Approver verifies if the site can be deleted</td><td class="align-left" id="bkmrk-approver" style="width: 9.415971%;">Approver</td><td class="align-left" id="bkmrk---site-deletion-requ" style="width: 14.183552%;">- Site deletion request</td><td class="align-left" id="bkmrk---yes-%2F-no" style="width: 17.401101%;">- yes / no</td><td class="align-left" id="bkmrk-if-the-site-can-be-d" style="width: 31.466599%;">**If the site can be deleted:** Go to step 3  
**Else:** Go to secondary process S.1</td></tr><tr id="bkmrk-3-the-system-marks-t"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-3" style="width: 6.078665%;">**3**</th><td class="align-left" id="bkmrk-the-system-marks-the" style="width: 21.454112%;">The System marks the site 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.415971%;">System</td><td class="align-left" id="bkmrk---site-with-flag-%E2%80%9Cma" style="width: 14.183552%;">- site with flag “marked\_for\_deletion = true”</td><td class="align-left" id="bkmrk---site-with-flag-%E2%80%9Cis" style="width: 17.401101%;">- site 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.466599%;"></td></tr><tr id="bkmrk-4-the-system-sets-al"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-4" style="width: 6.078665%;">**4**</th><td class="align-left" id="bkmrk-the-system-sets-all-" style="width: 21.454112%;">The System sets all the objects linked to the site with the flag “is\_deleted = true” (blocks, units, equipments).</td><td class="align-left" id="bkmrk-system-2" style="width: 9.415971%;">System</td><td class="align-left" id="bkmrk---site" style="width: 14.183552%;">- site</td><td class="align-left" id="bkmrk---all-linked-objects" style="width: 17.401101%;">- all linked objects marked with the flag “is\_deleted = true”</td><td class="align-left" id="bkmrk--3" style="width: 31.466599%;"></td></tr><tr id="bkmrk-5-the-system-creates"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-5" style="width: 6.078665%;">**5**</th><td class="align-left" id="bkmrk-the-system-creates-v" style="width: 21.454112%;">The System creates validated update requests with the flag “is\_deleted = true” for each active physical link that are connected to at least one unit of the site.</td><td class="align-left" id="bkmrk-system-3" style="width: 9.415971%;">System</td><td class="align-left" id="bkmrk---site-1" style="width: 14.183552%;">- site</td><td class="align-left" id="bkmrk---new-validated-phys" style="width: 17.401101%;">- new validated physical links with the flag “is\_deleted = true” for each active physical link that links at least one unit of the deleted site</td><td class="align-left" id="bkmrk--4" style="width: 31.466599%;"></td></tr><tr id="bkmrk-6-the-approver-gets-"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-6" style="width: 6.078665%;">**6**</th><td class="align-left" id="bkmrk-the-approver-gets-a-" style="width: 21.454112%;">The Approver gets a confirmation that the approval has been applied</td><td class="align-left" id="bkmrk-approver-1" style="width: 9.415971%;">Approver</td><td class="align-left" id="bkmrk---confirmation-of-th" style="width: 14.183552%;">- confirmation of the validation</td><td class="align-left" id="bkmrk--5" style="width: 17.401101%;"></td><td class="align-left" style="width: 31.466599%;">  
</td></tr></tbody></table>

### Secondary Processes

#### S.1. Delete site 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.840286%;">Step</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-description-1" style="width: 20.858164%;">Description</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-actor%28s%29-1" style="width: 9.415971%;">Actor(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input%28s%29-1" style="width: 15.494636%;">Input(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-output%28s%29-1" style="width: 17.162864%;">Output(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-decision-points-1" style="width: 31.228078%;">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.840286%;">**1**</th><td class="align-left" id="bkmrk-the-system-removes-t" style="width: 20.858164%;">The System removes the mark\_for\_deletion tag from the site entry</td><td class="align-left" id="bkmrk-system-4" style="width: 9.415971%;">System</td><td class="align-left" id="bkmrk---site-marked-for-de" style="width: 15.494636%;">- site marked for deletion</td><td class="align-left" id="bkmrk---site-with-the-flag" style="width: 17.162864%;">- site with the flag “mark\_for\_deletion = false”</td><td class="align-left" id="bkmrk--6" style="width: 31.228078%;"></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.840286%;">**2**</th><td class="align-left" id="bkmrk-the-approver-gets-a--1" style="width: 20.858164%;">The Approver gets a confirmation that the deletion rejection has been applied</td><td class="align-left" id="bkmrk-approver-2" style="width: 9.415971%;">Approver</td><td class="align-left" id="bkmrk---deletion-request-r" style="width: 15.494636%;">- deletion request rejection confirmation</td><td class="align-left" id="bkmrk--7" style="width: 17.162864%;"></td><td class="align-left" style="width: 31.228078%;">  
</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\] Site not found

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

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

Error returned by the system if the site 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.