work with json api routes and structure