API for stock management using Java, Spring and PostgreSQL
Mappings:
Get all items - returns all items stored in the Product table
Parameter |
Type |
Description |
none |
none |
none |
Get all items with specific name
Parameter |
Type |
Description |
productName |
string |
Required. Name of item to search for |
Get item with specific id
Parameter |
Type |
Description |
id |
UUID |
Required. Id of the item to be returned |
Insert product into database
Parameter |
Type |
Description |
none |
none |
none |
JSON containing fields of the item being saved to the database:
String productName, String description, String category, float price, int stockQuantity
Example:
{
"productName": "anime shirt",
"description": "a black shirt with akame from akame ga kill",
"category": "clothes",
"price": 12.3,
"stockQuantity": 1
}
Update existing product using id
Parameter |
Type |
Description |
id |
UUID |
Required. Id of the item to be updated |
Remove a product from the database
Parameter |
Type |
Description |
id |
UUID |
Required. Id of the item to be deleted |