add router for handling API request