Fixed URL structure of api
Fixed redis key for karmas
Added validator for request
Followed flake8
api views handle bad request
Changed to return response as JSON when view of api failed