Update restaurant - MarcoLagalla/marette_backend GitHub Wiki
| Name | Update Restaurant |
|---|---|
| Description | allows updating restaurant information |
| URL | restaurant/int:id/update |
| Allowed methods | POST |
| Authorizations | IsAuthenticated, IsBusiness |
| Parameter | Type | Description |
|---|---|---|
<int:id> |
integer | restaurant's ID |
Performs an update of the updatable fields for the restaurant.
| Field | Type | Required | Unique | Comments |
|---|---|---|---|---|
image |
File | no | no | If null returns a placeholder |
activity_name |
string | yes | no | |
activity_description |
string | yes | no | |
city |
string | yes | yes | |
address |
string | yes | yes | |
n_civ |
string | yes | yes | |
cap |
string | yes | yes | valid cap (5 digits) |
restaurant_number |
numeric | yes | no | valid phone number |
p_iva |
numeric | yes | yes | valid P_iva number |
restaurant_category |
pk | yes | no | pk-category |
Authorization token is needed
If all parameters are valid, returns --> HTTP_200_OK or otherwise --> HTTP_400_BAD_REQUEST
If not authorized --> HTTP_401_UNAUTHORIZED