Show Restaurant - MarcoLagalla/marette_backend GitHub Wiki

Name Restaurant Show
Description Display Restaurant Information
URL api/v1/restaurant/int:id
Allowed methods GET
Authorizations GET (AllowAny)

GET

Parameter Type Description
<int:id> integer valid restaurant's ID

Returns the complete details for the restaurant that matches this ID. Anyone can retrieve the details.

{
    "id": 2,
    "slug": "la-bouvette-dellingegnere",
    "url": "2/la-bouvette-dellingegnere",
    "activity_name": "La Bouvette Dell'Ingegnere",
    "activity_description": "Descrizione",
    "city": "Pavia",
    "address": "Via Adolfo Ferrata 1",
    "n_civ": 1,
    "cap": 15058,
    "restaurant_number": "+390131887693",
    "p_iva": "11359591002",
    "restaurant_rank": 5,
    "restaurant_category": [
        {
            "id": 1,
            "category_name": "Pizzeria"
        },
        {
            "id": 2,
            "category_name": "Mensa"
        }
    ],
    "discounts": [
        {
            "id": 1,
            "title": "Fuori tutto: 20% sui panini",
            "category": "Panini e Piadine",
            "type": "Percentuale",
            "value": "20.00"
        },
        {
            "id": 2,
            "title": "-1€",
            "category": "All",
            "type": "Fisso",
            "value": "1.00"
        }
    ],
    "components": {
        "home": {
            "id": 1,
            "show": true,
            "name": "HOME",
            "description": null,
            "image": "/media/components/home/bouvette_KMaawa1.jpeg"
        },
        "vetrina": {
            "id": 1,
            "name": "VETRINA",
            "menu_giorno": null,
            "show": false
        },
        "menu": null,
        "galleria": null,
        "eventi": null,
        "contattaci": null
    }
}

Return codes

Status Description
HTTP_200_OK return restaurant
HTTP_404_NOT_FOUND restaurant not found
⚠️ **GitHub.com Fallback** ⚠️