Updated delete action from the API to be more homogeneous