Skip to main content
DELETE
/
api
/
Usuario
/
Eliminar
/
{id}
Delete User
curl --request DELETE \
  --url https://api.example.com/api/Usuario/Eliminar/{id}
{
  "status": true,
  "value": true,
  "msg": "<string>"
}

Endpoint

DELETE /api/Usuario/Eliminar/{id}
Deletes a user from the Sistema Venta application by their unique identifier.

Path Parameters

id
integer
required
Unique identifier of the user to delete

Response

The endpoint returns a Response<bool> wrapper indicating whether the deletion was successful.
status
boolean
required
Indicates if the user was successfully deleted
value
boolean
True if the user was deleted, false otherwise
msg
string
Error message if status is false

Example Request

curl -X DELETE "https://api.example.com/api/Usuario/Eliminar/3" \
  -H "Content-Type: application/json"

Example Response

{
  "status": true,
  "value": true,
  "msg": null
}

Implementation Details

  • Controller: UsuarioController.cs:113
  • Service Method: IUsuarioService.Eliminar(int)
  • Route Constraint: {id:int} - ID must be an integer
  • Response Type: Response<bool>
  • HTTP Status: Always returns 200 OK (check status field for actual result)

Notes

  • The user ID must be a valid integer
  • Deletion may fail if the user has associated records (sales, transactions, etc.) due to foreign key constraints
  • If the user doesn’t exist, the operation will return status: false with an appropriate error message
  • This operation is permanent and cannot be undone
  • Consider implementing a soft delete (setting esActivo to 0) instead of hard delete for data integrity

Build docs developers (and LLMs) love