# 7.8. Approve delete block request

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

<table class="simple-table" id="bkmrk-name-approve-delete-" style="width: 99.642857%; height: 324px;"><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: 19.828816%; height: 29px;">Name</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-approve-delete-block" style="width: 80.171184%; height: 29px;">Approve delete block 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: 19.828816%; height: 29px;">**Purpose**</th><td class="align-left" id="bkmrk-allow-approver-to-va" style="width: 80.171184%; height: 29px;">Allow Approver to validate a block 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: 19.828816%; height: 57px;">**Linked user stories**</th><td class="align-left" id="bkmrk-3.36.-editor---delet" style="width: 80.171184%; height: 57px;">[3.36. Editor - Delete a block](https://doc.rncv.lu/books/architecture-documentation/page/336-editor-delete-a-block "3.36. Editor - Delete a block")

[4.48. Approver - Approve deleted block request](https://doc.rncv.lu/books/architecture-documentation/page/448-approver-approve-deleted-block-request "4.48. Approver - Approve deleted block request")

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

</td></tr><tr id="bkmrk-apis-used-put-%2Fblock" style="height: 61px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-apis-used" style="width: 19.828816%; height: 61px;">**APIs used**</th><td class="align-left" id="bkmrk-put-%2Fblocks%2F%3Cblock-i" style="width: 80.171184%; height: 61px;">**PUT** /blocks/&lt;block-id&gt;/approve  
**PUT** /blocks/&lt;block-id&gt;/reject  
**PUT** or **PATCH** /blocks/&lt;block-id&gt;</td></tr><tr id="bkmrk-scope-this-process-o" style="height: 45px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-scope" style="width: 19.828816%; height: 45px;">**Scope**</th><td class="align-left" id="bkmrk-this-process-only-ha" style="width: 80.171184%; height: 45px;">This process only handles the validation of an already created block 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: 19.828816%; height: 29px;">**Roles**</th><td class="align-left" id="bkmrk-system%2C-approver-%2F-g" style="width: 80.171184%; height: 29px;">System, Approver / Global Approver</td></tr><tr id="bkmrk-input---id-of-the-bl" style="height: 45px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input" style="width: 19.828816%; height: 45px;">**Input**</th><td class="align-left" id="bkmrk---id-of-the-block-th" style="width: 80.171184%; height: 45px;">- id of the block 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: 19.828816%; height: 29px;">**Output**</th><td class="align-left" id="bkmrk---confirmation-that-" style="width: 80.171184%; 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: 661px;"><thead class="simple-table-header"><tr id="bkmrk-step-description-act-1" style="height: 29px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-step" style="width: 5.721097%; height: 29px;">Step</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-description" style="width: 21.334923%; height: 29px;">Description</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-actor%28s%29" style="width: 9.65435%; height: 29px;">Actor(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input%28s%29" style="width: 15.613826%; height: 29px;">Input(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-output%28s%29" style="width: 21.334355%; height: 29px;">Output(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-decision-points" style="width: 26.34145%; height: 29px;">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.721097%; height: 109px;">**1**</th><td class="align-left" id="bkmrk-the-system-sends-out" style="width: 21.334923%; 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.65435%; height: 109px;">System</td><td class="align-left" id="bkmrk---outside-trigger-%28e" style="width: 15.613826%; height: 109px;">- Outside trigger (e.g. Editor sent a delete request)</td><td class="align-left" id="bkmrk---notification-to-th" style="width: 21.334355%; height: 109px;">- notification to the Global and organisation Approvers</td><td class="align-left" id="bkmrk--1" style="width: 26.34145%; height: 109px;"></td></tr><tr id="bkmrk-2-the-approver-verif" style="height: 77px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-2" style="width: 5.721097%; height: 77px;">**2**</th><td class="align-left" id="bkmrk-the-approver-verifie" style="width: 21.334923%; height: 77px;">The Approver verifies if the block can be deleted</td><td class="align-left" id="bkmrk-approver" style="width: 9.65435%; height: 77px;">Approver</td><td class="align-left" id="bkmrk---block-deletion-req" style="width: 15.613826%; height: 77px;">- Block deletion request</td><td class="align-left" id="bkmrk---yes-%2F-no" style="width: 21.334355%; height: 77px;">- yes / no</td><td class="align-left" id="bkmrk-if-the-site-can-be-d" style="width: 26.34145%; height: 77px;">**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-verifie" style="height: 77px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-3" style="width: 5.721097%; height: 77px;">**3**</th><td class="align-left" id="bkmrk-the-system-verifies-" style="width: 21.334923%; height: 77px;">The System verifies if the site has other blocks than the one being deleted</td><td class="align-left" id="bkmrk-system-1" style="width: 9.65435%; height: 77px;">System</td><td class="align-left" id="bkmrk---block-to-be-delete" style="width: 15.613826%; height: 77px;">- Block to be deleted</td><td class="align-left" id="bkmrk---yes-%2F-no-1" style="width: 21.334355%; height: 77px;">- yes / no</td><td class="align-left" id="bkmrk-if-the-site-has-more" style="width: 26.34145%; height: 77px;">**If the site has more blocks:** Go to step 4  
**Else:** Go to E.1</td></tr><tr id="bkmrk-4-the-system-marks-t" style="height: 125px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-4" style="width: 5.721097%; height: 125px;">**4**</th><td class="align-left" id="bkmrk-the-system-marks-the" style="width: 21.334923%; height: 125px;">The System marks the block 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-2" style="width: 9.65435%; height: 125px;">System</td><td class="align-left" id="bkmrk---block-with-flag-%E2%80%9Cm" style="width: 15.613826%; height: 125px;">- block with flag “marked\_for\_deletion = true”</td><td class="align-left" id="bkmrk---block-with-flag-%E2%80%9Ci" style="width: 21.334355%; height: 125px;">- block 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: 26.34145%; height: 125px;"></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-1" style="width: 5.721097%; height: 93px;">**4**</th><td class="align-left" id="bkmrk-the-system-sets-all-" style="width: 21.334923%; height: 93px;">The System sets all the objects linked to the block with the flag “is\_deleted = true” (units, equipments).</td><td class="align-left" id="bkmrk-system-3" style="width: 9.65435%; height: 93px;">System</td><td class="align-left" id="bkmrk---block" style="width: 15.613826%; height: 93px;">- block</td><td class="align-left" id="bkmrk---all-linked-objects" style="width: 21.334355%; height: 93px;">- all linked objects marked with the flag “is\_deleted = true”</td><td class="align-left" id="bkmrk--3" style="width: 26.34145%; height: 93px;"></td></tr><tr id="bkmrk-5-the-system-creates" style="height: 141px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-5" style="width: 5.721097%; height: 141px;">**5**</th><td class="align-left" id="bkmrk-the-system-creates-v" style="width: 21.334923%; height: 141px;">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 block.</td><td class="align-left" id="bkmrk-system-4" style="width: 9.65435%; height: 141px;">System</td><td class="align-left" id="bkmrk---block-1" style="width: 15.613826%; height: 141px;">- block</td><td class="align-left" id="bkmrk---new-validated-phys" style="width: 21.334355%; height: 141px;">- new validated physical links with the flag “is\_deleted = true” for each active physical link that links at least one unit of the deleted block</td><td class="align-left" id="bkmrk--4" style="width: 26.34145%; height: 141px;"></td></tr><tr id="bkmrk-6-the-approver-gets-" style="height: 10px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-6" style="width: 5.721097%; height: 10px;">**6**</th><td class="align-left" id="bkmrk-the-approver-gets-a-" style="width: 21.334923%; height: 10px;">The Approver gets a confirmation that the approval has been applied</td><td class="align-left" id="bkmrk-approver-1" style="width: 9.65435%; height: 10px;">Approver</td><td class="align-left" id="bkmrk---confirmation-of-th" style="width: 15.613826%; height: 10px;">- confirmation of the validation</td><td class="align-left" id="bkmrk--5" style="width: 21.334355%; height: 10px;"></td><td class="align-left" style="width: 26.34145%; height: 10px;">  
</td></tr></tbody></table>

### Secondary Processes

#### S.1. Delete block request rejected

<table class="simple-table" id="bkmrk-step-description-act-2" style="width: 100%; height: 212px;"><thead class="simple-table-header"><tr id="bkmrk-step-description-act-3" style="height: 77px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-step-1" style="width: 6.078665%; height: 77px;">Step</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-description-1" style="width: 20.500596%; height: 77px;">Description</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-actor%28s%29-1" style="width: 9.892729%; height: 77px;">Actor(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input%28s%29-1" style="width: 15.733015%; height: 77px;">Input(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-output%28s%29-1" style="width: 20.760826%; height: 77px;">Output(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-decision-points-1" style="width: 27.034168%; height: 77px;">Decision points</th></tr></thead><tbody><tr id="bkmrk-1-the-system-removes" style="height: 45px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-1-1" style="width: 6.078665%; height: 45px;">**1**</th><td class="align-left" id="bkmrk-the-system-removes-t" style="width: 20.500596%; height: 45px;">The System removes the mark\_for\_deletion tag from the block entry</td><td class="align-left" id="bkmrk-system-5" style="width: 9.892729%; height: 45px;">System</td><td class="align-left" id="bkmrk---block-marked-for-d" style="width: 15.733015%; height: 45px;">- block marked for deletion</td><td class="align-left" id="bkmrk---block-with-the-fla" style="width: 20.760826%; height: 45px;">- block with the flag “mark\_for\_deletion = false”</td><td class="align-left" id="bkmrk--6" style="width: 27.034168%; height: 45px;"></td></tr><tr id="bkmrk-2-the-approver-gets-" style="height: 61px;"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-2-1" style="width: 6.078665%; height: 61px;">**2**</th><td class="align-left" id="bkmrk-the-approver-gets-a--1" style="width: 20.500596%; height: 61px;">The Approver gets a confirmation that the deletion rejection has been applied</td><td class="align-left" id="bkmrk-approver-2" style="width: 9.892729%; height: 61px;">Approver</td><td class="align-left" id="bkmrk---deletion-request-r" style="width: 15.733015%; height: 61px;">- deletion request rejection confirmation</td><td class="align-left" id="bkmrk--7" style="width: 20.760826%; height: 61px;"></td><td class="align-left" style="width: 27.034168%; height: 61px;">  
</td></tr></tbody></table>

### Error Processes

#### E.1. Last block can’t be deleted

<table class="simple-table" id="bkmrk-step-description-act-4" style="width: 100%;"><thead class="simple-table-header"><tr id="bkmrk-step-description-act-5"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-step-2" style="width: 5.959476%;">Step</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-description-2" style="width: 20.143027%;">Description</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-actor%28s%29-2" style="width: 10.369487%;">Actor(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-input%28s%29-2" style="width: 15.852205%;">Input(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-output%28s%29-2" style="width: 20.520177%;">Output(s)</th><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-decision-points-2" style="width: 27.155627%;">Decision points</th></tr></thead><tbody><tr id="bkmrk-1-the-approver-gets-"><th class="simple-table-header-color simple-table-header align-left" id="bkmrk-1-2" style="width: 5.959476%;">**1**</th><td class="align-left" id="bkmrk-the-approver-gets-an" style="width: 20.143027%;">The Approver gets an error indicating that the last block of a site cannot be deleted</td><td class="align-left" id="bkmrk-system-6" style="width: 10.369487%;">System</td><td class="align-left" id="bkmrk---error%3A-last-block-" style="width: 15.852205%;">- Error: last block can’t be deleted</td><td class="align-left" id="bkmrk--8" style="width: 20.520177%;"></td><td class="align-left">  
</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\] Block not found

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

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

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