This server provides GET, POST, PATCH, AND DELETE Requests and Responses for FOOD-DELIGHT


Welcome

Welcome to Food Delight. You can use the GET, POST, PATCH, & DELETE requests for our seafood restaurant.


Getting Started

This is where the fun starts! The documentation is organized as follows:


Documentation

API Endpoints

Our endpoints provide the appropriate GET, POST, PATCH & DELETE requests and responses for the many route parameters of our restaurant's API.

Parameters

Each route parameter are shown in the parameter drop down.

Request Body

The Request Body drop down of each endpoint showcases if a body is required and also what to include in the body of the respected request.

Status Codes

The Status Codes drop down of each endpoint showcases the status codes associated with each endpoint. You will also find a snippet of code as an example of a successful operation.


Endpoints

/login

User can get information based on a single username

  • username[string](required): the username the customer is searching for
  • password[string](required): the password for the account
  • remember me[checkbox]: don't really have a purpose...yet, it was just in the html code

Body Not Required

/menu

User can get a list of the menu items or use the specific query parameters to get certain food items

  • all[string](required): will return a list of all menu items
  • name[string]: will return the food based on the name that was typed in, correct spelling and spaces are necessary
  • type[string]: will return the foods that are under the specific type that was typed in, correct spelling are necessary

Body Not Required

/login :

  • 200: Successful/OK
  • 400: "Request body is not permitted at this endpoint
  • 400: "Query parameters do not meet the requirements"

/menu:

  • 200: Successful/OK
  • 400: "Request body is not permitted at this endpoint"
  • 400: "Query parameters do not meet the requirements"
  • 400: "ID is not a number"
  • 400: That ID does not exist
  • 400: There are no food items with that name
  • 400: We do not have that category of foods yet


/register

Adds the new user information to the logins database

Body parameters:
  • username(required): type username of choice as a string value on the html form
  • password(required): type password of choice as a string value on the html form
  • email(required): type email of choice as a string value on the html form
  • street number(required): type street address number of choice as an integer value on the html form
  • street name(required): type street address name of choice as a string value on the html form
  • city(required): type city of choice as a string value on the html form
  • zipcode(required): type zipcode of choice as an integer value on the html form
  • phone number(required): type phone number of choice as an integer value on the html form
  • Body parameters:
    • username(required): type username of choice as a string value on the html form
    • password(required): type password of choice as a string value on the html form
    • email(required): type email of choice as a string value on the html form
    • street number(required): type street address number of choice as an integer value on the html form
    • street name(required): type street address name of choice as a string value on the html form
    • city(required): type city of choice as a string value on the html form
    • zipcode(required): type zipcode of choice as an integer value on the html form
    • phone number(required): type phone number of choice as an integer value on the html form
    • /order

      Adds the new order to the customer_order database

      Body parameters:
      • username[string](required): type username of the customer ordering
      • menu item[dropdown menu](required): select one food item from the drop down menu

      Body parameters:
        • username[string](required): type username of the customer ordering
        • menu item[dropdown menu](required): select one food item from the drop down menu


        /register

        • 200: Successful/OK
        • 400: Query not permitted at this endpoint

        /order

        • 200: Successful/OK
        • 400: Query not permitted at this endpoint


        /forgotpassword

        This endpoint lets you update password when user sends a reset password request

        Body Parameters:
        • email[string](required): email associated with the forgotten password
        • Body Parameters:
          • email[string](required): email associated with the forgotten password

          /order

          This endpoint lets you update an order with a different food item from the menu

          Query Parameters:
          • id[integer](required): the order ID to look up the order to update the food item on

          Body Parameters:
          • foodname[string](required): different food item from the menu

          /forgotpassword

          • 200: Successful/OK
          • 400: Body parameters requirements not met
          • 400: Account does not exist

          /order

          • 200: Successful/OK
          • 400: Body parameters requirements not met
          • 400: Query parameters do not meet the requirements
          • 400: ID is not a number
          • 400: We do not have that order


          /order/:id

          Deletes an order

          Params Parameter:
          • [integer](required): the order ID

          Body Not Permitted

          /logins/:id

          Deletes an account

          Params Parameter:
          • id[integer](required): the account ID

          Body Not Permitted

          /order/:id

          • 200: Successful/OK
          • 400: Request body is not permitted at this endpoint
          • 400: Not a valid order ID
          • 400: Query parameters do not meet the requirements
          • 400: That order ID does not exist

          /logins/id

          • 200: Successful/OK
          • 400: Request body is not permitted at this endpoint
          • 400: Not a valid order ID
          • 400: Query parameters do not meet the requirements
          • 400: That order ID does not exist