Delete Restriction
Soft delete a restriction rule. The rule is marked as inactive but not permanently removed.Endpoint
Path Parameters
UUID of the restriction rule to delete
Request Body
Optional reason for deletion (3-200 characters)Stored for audit purposes and compliance.
Response
Indicates if the request was successful
Deleted restriction rule with:
isActive = falsedeletedAttimestampdeletedReason(if provided)
Examples
Response Example
Implementation Details
Fromsrc/api/v1/controllers/restrictionRule.controller.ts:24-31:
Restore Restriction
Restore a soft-deleted restriction rule, making it active again.Endpoint
Path Parameters
UUID of the restriction rule to restore
Response
Indicates if the request was successful
Restored restriction rule with:
isActive = truedeletedAt = nulldeletedReason = null
Example
Response Example
Implementation Details
Fromsrc/api/v1/controllers/restrictionRule.controller.ts:33-38:
Best Practices
Always include a deletion reason
Always include a deletion reason
Providing a clear reason helps with:
- Compliance and auditing
- Understanding historical decisions
- Debugging configuration issues
- “Número ya no es de alto riesgo”
- “Promoción temporal finalizada”
- “Error de configuración, recreando correctamente”
Use restore for temporary changes
Use restore for temporary changes
Instead of deleting and recreating, use:
- Delete with reason: “Deshabilitado temporalmente durante mantenimiento”
- Restore when ready
Query deleted rules for audit
Query deleted rules for audit
Use the List endpoint with
isActive=false to review deleted rules:Error Responses
Related Endpoints
Create Restriction
Create new restriction rule
Update Restriction
Modify existing rule
List Restrictions
View all restriction rules