This action can be used to add ratings to restaurant.

Request structure

The structure is following:

POST nameValueRequired?
portion_sizedecimalNo, see below
portion_qualitydecimalNo, see below
service_qualitydecimalNo, see below

Only user_id and restaurant_id is required for user to input; if free-form verbal review were not written, empty string must be returned instead of empty (or null) and if ratings are not given, a zero must be given instead, which means “no rating given” and will be handled so.

Ratings (from portion_size to location in the list) are decimals of user’s rating. It is bad practice to have user to input a number, though. Instead asking, for example, how many stars a restaurant will get in this field, so 1-5 star rating would directly map to integers 1-5 and 1-10 star rating would map to 1-5, and for example 3 would convert to 1.5 that will be sent as customer’s rate for the thing.

1 is lowest and 5 highest.

Generic ratings

Sometimes, especially for mobile applications, asking for all these different fields for rating may be too excessive. In that case, client may just ask for 1-5 rating (or any format client wants to use) and then supply that data to each of fields and set generic_review to true.

generic_review defaults to false.


Failure:error array

Expectable errors

See error conventions section for explanation how error system works.

Label Additional data Description
INVALID_INPUTNoneThere is no input. At least *something* needs to be given.
INVALID_MESSAGENoneMessage must not contain binary or only integers or other strange input.
INVALID_RESTAURANT_IDNoneMissing or not int.
MALFORMED_RATING_DATANoneRating can be missing, but if given, it must be proper float.
INVALID_GENERIC_REVIEWNoneThe value given is not true or false.