implement api response codes for delete