Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

API: Kiosk

Max edited this page Apr 12, 2020 · 5 revisions

API: Kiosk

Models:

Product:

Fields: id (int), name (String); price (Decimal); image (Image path)

  • api/kiosk/product/: lists all products
  • api/kiosk/product/<id>/: endpoint single product (read only)

Favorite:

Fields: id (int), user (User id); product (Product id); position (Int)

  • api/kiosk/favorite/: lists all favorites
  • api/kiosk/favorite/<favorite id>/: endpoint for specific favorite
  • api/kiosk/favorite/user/<user_id>/: lists all favorites for a given user

Transaction:

Fields: id (int); user (User id); product (Product id); time (DateTime); success (Boolean)

  • api/kiosk/transaction/: (get) list all transactions, (post) create new transaction
  • api/kiosk/transaction/<id>/: (get) get specific transaction, (put) update specific transaction
    To create a new transaction a post request has to be send to api/kiosk/transaction/ containing the user id and the id of the product he is supposed to buy. The fields id, time and the success of the transaction will be filled in automatically

Clone this wiki locally