/customer/restaurants

Actions for handling customer’s favorite restaurants.

/customer/restaurants/list

An action that returns restaurants customer has saved to her profile.

This can be used to store favorite restaurants or simply store restaurants customer has used so that they can be later fetched and shown in a list.

Request

POST nameValueRequired?
session_idhash returned by loginYes
chain_id0No
sort_bydistanceNo

Response

The response should be exactly same as with /restaurant/list.

Expectable errors

Label Additional data Description
NO_RESTAURANTSNoneCustomer has no restaurants. Just showing the message returned is ok, maybe instruct customer that she needs to add favorite restaurants if she wants to see them.
In addition to above errors, errors of /restaurant/list. can be present.

/customer/restaurants/set

Adds new restaurant to customer’s favorite restaurants list.

Request

POST nameValueRequired?
session_idhash returned by loginYes
restaurant_id774Yes

Response

ResponseJSON
Success:"success"
Failure:error array

Expectable errors

See error conventions section for explanation how error system works.

Label Additional data Description
INVALID_RESTAURANT_IDNoneIf the given restaurant id is not real restaurant’s id.

/customer/restaurants/delete

Allows deletion of customer’s favorite restaurant.

Request

POST nameValueRequired?
session_idhash returned by loginYes
restaurant_id774Yes

Response

ResponseJSON
Success:"success"
Failure:error array

Expectable errors

See error conventions section for explanation how error system works.

Label Additional data Description
NO_RESTAURANTSNoneTried to delete a restaurant that customer has not added as her favorite restaurant.
INVALID_RESTAURANT_IDNoneIf the given restaurant id is not real restaurant’s id.