mensa-kl.de
Mit Fotos und Bewertungen seit 2008.

Rate Meal

Rate a meal or delete a meal rating.

Request

curl -X POST "https://www.mensa-kl.de/api/v1/rate-meal" \
  -H "Authorization: Bearer $AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "meal_id": 123,
    "rating": 5
  }'

Response

Success Response

The data envelope contains the following rating details:

Successful Meal Rating Example

{
  "status": "success",
  "data": {
    "rating_count": 42,
    "rating_average": 4.2,
    "rating_median": 4.0,
    "rating_personal": 5
  }
}

Successful Meal Rating Deletion Example

{
  "status": "success",
  "data": {
    "rating_count": 41,
    "rating_average": 4.19,
    "rating_median": 4.0,
    "rating_personal": null
  }
}

Failure Response

Meal rating can fail for many reasons. Examples: