I hava a function in php that returns JSON data to the API call.
Function is
public static function renderJSON($data, $httpResponseCode = 200) {