This repository was archived by the owner on Mar 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
API: Kiosk
Max edited this page Apr 12, 2020
·
5 revisions
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)
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
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 toapi/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