Skip to content

API Endpoints

Dylan edited this page Sep 17, 2019 · 3 revisions

API Endpoints

/

  • / Renders the main page. Does NOT return JSON

/checks

GET Routes

  • /checks returns JSON of all 'checks' entries
  • /checks/paid returns JSON of all paid checks
  • /checks/unpaid returns JSON of all unpaid checks
  • /checks/:id returns single check by ID

POST Routes

  • /checks/seat creates a new 'check' or a new gues seating, returns json with ID data

PUT Routes

  • /checks/:id Updates check by ID

DELETE Routes

  • /checks/delete/:id

/menu

GET Routes

  • /menu returns JSON of all menu entries
  • /menu/:section returns JSON of all menu entries by section / category

POST Routes

  • /menu/add Creates a new menu entry, returns JSON with ID

DELETE Routes

  • /menu/:id Deletes a menu entry by ID

/order

GET Routes

  • /order returns JSON of all order entries
  • /order/paid returns JSON of all paid checks
  • /order/unpaid returns JSON of all unpaid checks
  • /order/:id returns single check by ID / category

PUT Routes

  • /order/:id Updates check by ID

/servers

GET Routes

  • /servers returns JSON of all waitstaff entries
  • /servers/:code Validates the user access code

POST Routes

  • /servers/add Creates a new waitstaff/server entry, returns JSON with ID

/inventory

GET Routes

  • /inventory returns JSON of all inventory entries
  • /inventory/categories returns a JSON of all the unique categories in the inventory

POST Routes

  • /inventory/add Creates a new inventory entry, returns JSON with the ID and other information

PUT Routes

  • /inventory/:id Updates the inventory with the given id. The body of the request must have: name, unitOfMeasurement, and category

DELETE Routes

  • /inventory/delete/:id Removes an inventory item with the given id

Clone this wiki locally