changed endpoint to use id instead of name