List ProductDiscounts - MarcoLagalla/marette_backend GitHub Wiki

Name List ProductDiscounts
Description List all discounts registered for the given restaurant
URL webapp/restaurant/<int:id>/products/discounts
Allowed methods GET
Authorizations GET (AllowAny)

GET

Retrieve the list of all available ProductTags for the given restaurant:

[
    {
        "id": 2,
        "title": "-1€",
        "type": "Fisso",
        "value": "1.00"
    },
    {
        "id": 3,
        "title": "-2€",
        "type": "Fisso",
        "value": "2.00"
    },
    {
        "id": 4,
        "title": "-15",
        "type": "Fisso",
        "value": "15.00"
    }
]

Return codes

Status Description
HTTP_200_OK return product discounts list
HTTP_404_NOT_FOUND restaurant with this ID not found
HTTP_204_NO_CONTENT empty list
⚠️ **GitHub.com Fallback** ⚠️