-
Notifications
You must be signed in to change notification settings - Fork 0
REST API Documentation
ianic1999 edited this page Nov 30, 2021
·
1 revision
Endpoint | Method | Security | Parameters | Response Status | Response Body |
---|---|---|---|---|---|
/register | POST | Public | Body: {id, firstName, lastName, phone, email, password, role} | 200 | |
/login | POST | Public | Body: {phone, password, remember} | 200 | JWT Token |
Endpoint | Method | Security | Parameters | Response Status | Response Body |
---|---|---|---|---|---|
/ | GET | Private | Param: page, perPage | 200 | Page with bookings |
/{id} | GET | Private | Path: id | 200 | Booking |
/ | POST | Public | Body: {time, duration, tableId} | 201 | Booking |
/{id} | PUT | Private | Path: id, Body: {id, time, duration, tableId} |
200 | Booking |
/{id} | DELETE | Private | Path: id | 204 |
Endpoint | Method | Security | Parameters | Response Status | Response Body |
---|---|---|---|---|---|
/ | GET | Public | Param: page, perPage | 200 | Page with feedaback |
/{id} | GET | Public | Path: id | 200 | Feedback |
/ | POST | Public | Body: {text, rating} | 201 | Feedback |
/{id} | DELETE | Private | Path: id | 204 |
Endpoint | Method | Security | Parameters | Response Status | Response Body |
---|---|---|---|---|---|
/ | GET | Public | Param: page, perPage | 200 | Page with menu items |
/{id} | GET | Public | Path: id | 200 | Menu Item |
/ | POST | Private | FormData: name, price, category, image | 201 | Menu Item |
/{id} | PATCH | Private | Path: id, FormData: name, price, category, image |
200 | Menu Item |
/{id} | DELETE | Private | Path: id | 204 |
Endpoint | Method | Security | Parameters | Response Status | Response Body |
---|---|---|---|---|---|
/ | GET | Private | Param: page, perPage | 200 | Page with orders |
/{id} | GET | Private | Path: id | 200 | Order |
/ | POST | Public | Body: {bookingId, menuItemIds} | 201 | Order |
/{id} | DELETE | Private | Path: id | 204 |
Endpoint | Method | Security | Parameters | Response Status | Response Body |
---|---|---|---|---|---|
/ | GET | Public | Param: page, perPage | 200 | Page with tables |
/{id} | GET | Public | Path: id | 200 | Table |
/ | POST | Private | Body: {ordinalNumber, nrOfSpots} | 201 | Table |
/{id} | PUT | Private | Path: id, Body: {id, ordinalNumber, nrOfSpots} |
200 | Table |
/{id} | DELETE | Private | Path: id | 204 |
Endpoint | Method | Security | Parameters | Response Status | Response Body |
---|---|---|---|---|---|
/ | GET | Private | Param: page, perPage | 200 | Page with users |
/{id} | GET | private | Path: id | 200 | User |
/me | GET | private | 200 | User | |
/{id} | PUT | Private | Path: id, Body: {id, firstName, lastName, phone, email, password, role} |
200 | User |
/{id}/activate | POST | Private | Path: id | 200 | |
/{id} | DELETE | Private | Path: id | 204 |