Fix endpoints to use proper ids