GET /api
| Parameter | Required? | Description |
|---|---|---|
| - | - | - |
GET /api/resetdatabase
| Parameter | Required? | Description |
|---|---|---|
| - | - | - |
GET /categories
| Parameter | Required? | Description |
|---|---|---|
| - | - | - |
POST /categories
| Body Parameters | Required? | Description |
|---|---|---|
name |
Yes | Name of the category |
icon |
Yes | Material Design Icon |
DELETE /categories/:id
| Parameter | Required? | Description |
|---|---|---|
id |
Yes | Database ID of CategoryModel |
GET /products
| Parameter | Required? | Description |
|---|---|---|
| - | - | - |
GET /products/:id
| Parameter | Required? | Description |
|---|---|---|
id |
Yes | ID of the product in the database table |
POST /products
| Body Parameters | Required? | Description |
|---|---|---|
brand |
Yes | Brand of the product |
name |
Yes | Name of the product |
description |
No | Description of the product |
categoryId |
Yes | ID of a Category from database |
price |
No | Name of the product |
discount |
No | Procentual discount, 0 to 100 |
rating |
No | Product rating from 1 to 5 |
imageUrl |
No | Name of the uploaded image file |
DELETE /products/:id
| Parameter | Required? | Description |
|---|---|---|
id |
Yes | Database ID of ProductModel |
GET /orders/:id
| Parameter | Required? | Description |
|---|---|---|
id |
Yes | ID of the user in the database table |
POST /orders
| Query Parameters | Required? | Description |
|---|---|---|
accountId |
Yes | ID of account who created this order |
shippingProgress |
No | Progress of shipping, 1 to 5 |
orderItem |
Yes | List of ordered items (objects). Needs parameter quantity and productId |
GET /accounts
| Query Parameters | Required? | Description |
|---|---|---|
username |
Yes | Name of user account |
password |
Yes | Password of user account |
POST /accounts
| Body Parameters | Required? | Description |
|---|---|---|
username |
Yes | Login username |
password |
Yes | Login password |
firstName |
No | First name of user |
lastName |
No | Last name of user |
street |
No | Street where the user lives |
houseNumber |
No | House number of user |
postalCode |
No | Postal code of users home |
city |
No | Name of users city |
PATCH /account
| Body Parameters | Required? | Description |
|---|---|---|
id |
Yes | Identifier of dataset |
username |
No | Login username |
password |
No | Login password |
firstName |
No | First name of user |
lastName |
No | Last name of user |
street |
No | Street where the user lives |
houseNumber |
No | House number of user |
postalCode |
No | Postal code of users home |
city |
No | Name of users city |