List Restaurant - MarcoLagalla/marette_backend GitHub Wiki

Name List Restaurant
Description List registered restaurant
URL api/v1/webapp/restaurant/list
Allowed methods GET
Authorizations GET (AllowAny)

GET

Returns a sub list of the restaurant, other restaurant can be retrieved following the URL provided by paginator.

Field Type Required Unique Comments
page_number numeric no no (Optional)
page_size numeric no no (Optional)

Anyone can retrieve the details.


  {
    "first": 1,
    "previous": null,
    "next": null,
    "last": 1,
    "page_size": 10,
    "page_number": 1,
    "results": [
        {
            "id": 1,
            "slug": "bella-napoli",
            "url": "1/bella-napoli",
            "activity_name": "bella napoli",
            "activity_description": "gsvrfrgdrtfb",
            "image": "/media/placeholder/restaurant/placeholder.png",
            "city": "pavia",
            "address": "dante alighiweri",
            "n_civ": "6757",
            "cap": 21000,
            "restaurant_number": "+393110276102",
            "p_iva": "03419280960",
            "discounts": [],
            "restaurant_category": [
                {
                    "id": 1,
                    "category_name": "Pizzeria"
                },
                {
                    "id": 2,
                    "category_name": "Mensa"
                }
            ],
            "restaurant_rank": 4
        },
     ]
  }

Return codes

Status Description
HTTP_200_OK return restaurant list
HTTP_404_NOT_FOUND user not found