Creating custom routes and endpoints for custom table data