Product Details - MarcoLagalla/marette_backend GitHub Wiki

Name Product Detail
Description Display product information
URL _api/v1/webapp/restaurant/int:id/products/int:p_id/details
Allowed methods GET
Authorizations AllowAny

GET

Parameter Type Description
id int valid restaurant id
p_id int valid product id

Lists all details for the given product of the given restaurant:

{
    "id": 2,
    "name": "Piadina cotta e zola",
    "description": "la piada piu buona del mondo",
    "category": "Panini e Piadine",
    "price": "7.50",
    "iva": 22,
    "tags": [
        {
            "name": "Gluten Free",
            "icon": null,
            "description": "Senza glutine"
        },
        {
            "name": "Piccante",
            "icon": null,
            "description": "Cibo piccante"
        }
    ],
    "discounts": [
        {
            "id": 2,
            "title": "-1€",
            "type": "Fisso",
            "value": "1.00"
        }
    ],
    "final_price": 6.5,
    "image": "media/piadina.jpg",
    "show_image": true,
    "available": true
}

Return codes

Status Description
HTTP_200_OK deleted
HTTP_404_NOT_FOUND product or restaurant not found
⚠️ **GitHub.com Fallback** ⚠️