finished primary api routes