add API routes for building and units