Refactored the API to include a consistent error response, changed response formats for other requests by removing error codes from them. Also added proper HTTP header status for responses.