/customer/products

Actions for handling favorite products of a customer.

/customer/products/list

This action can be used to list all favorite products customer has added to her account.

Request

POST nameValueRequired?
session_idhash returned by loginYes
restaurant_id774Yes

Response

Response is an array of customer’s favorite products.

[
  1,
  54739553,
  545553,
  555
]

Expectable errors

Label Additional data Description
INVALID_RESTAURANT_IDNoneIf the restaurant id passed is not valid.
NO_PRODUCTSNoneIf there was no product with this id for this customer.

/customer/products/set

Customer also wants to add new product for a certain restaurant since she likes that restaurant so much and always wants to order certain product from it.

Request

POST nameValueRequired?
session_idhash returned by loginYes
product_idProduct id as returned by /restaurant/get or /restaurant/productYes
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 restaurant id passed is not valid.
INVALID_PRODUCT_IDNoneIf the product id passed is not valid.

/customer/products/delete

But then, customer accidentally added a product she absolutely hates. Now that product needs to disappear.

Request

POST nameValueRequired?
session_idhash returned by loginYes
product_idProduct id as returned by /restaurant/get or /restaurant/productYes
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 restaurant id passed is not valid.
INVALID_PRODUCT_IDNoneIf the product id passed is not valid.
NO_PRODUCTSNoneIf there was no product with this id for this customer.