Index: src/webservice/htdocs/index.php
===================================================================
--- src/webservice/htdocs/index.php	(revision b858e6f6273177f7d332d702b6bba8ec3f9cdc60)
+++ src/webservice/htdocs/index.php	(revision a0f53955b124d2dee3c538903d40e9d5e7c877b7)
@@ -49,12 +49,54 @@
 		$app = \Slim\Slim::getInstance("siweather");
 		$body = $app->request->getBody();
-		$json = json_decode($body);
+		$json = json_decode($body, true);
 
-		$location = new IpGeoLocator($app->request->getIp());
-		if($location->city() != $json["city"]){
-			return json_encode(["result" => "unprovenlocation", "message" => "You send "]);
+		$app->response()->header("Content-Type", "application/json");
+
+		$expectedKeys = array("city", "longitude", "latitude");
+		$missingKeys = array();
+		foreach($expectedKeys as $key){
+			if(!array_key_exists($key, $json))
+				$missingKeys[] = $key;
 		}
-		
-		$app->response()->header("Content-Type", "application/json");
+		if(count($missingKeys) > 0){
+			echo json_encode
+			(
+				[
+					"result" => "missingkeys",
+					"message" => "Your request misses the following keys: ". implode(", ", $missingKeys),
+				]
+			);
+			return;
+		}
+
+		if(array_key_exists("locationchecked", $json) && $json["locationchecked"]){
+			// user has checked the location already and we add it now
+			
+		}
+
+		$errorMessage = "";
+		$location = SiWeather\Webservice\IpGeoLocator::locate($app->request->getIp(), $errorMessage);
+		if(is_null($location)){
+			error_log($errorMessage);
+			echo json_encode
+			(
+				[
+					"result" => "unprovenlocation",
+					"message" => "Could not check the city (". $json["city"] .") and location (". $json["longitude"] .", ". $json["latitude"] .") you send with help of your ip address. Please make sure, your data is correct. If your data is correct, please resend your request with the keyword \"locationchecked = true\".",
+				]
+			);
+			return;
+		}
+		elseif($location->city() != $json["city"]){
+			echo json_encode
+			(
+				[
+					"result" => "unprovenlocation",
+					"message" => "The city (". $json[city] .") and location (". $json["longitude"] .", ". $json["latitude"] .") you send, does not suit with your ip address associtated location (city: ". $location->city() ."; Location: ". $location->longitude() .", ". $location->latitude() ."). If your data is correct, please resend your request with the keyword \"locationchecked = true\".",
+				]
+			);
+			return;
+		}
+
 		echo json_encode($json);
 	}
