Defining the API routes