Test all CRUD operations with live API calls
Below are example responses you'll receive from each API endpoint:
[ { "id": 1, "title": "Laptop", "price": 80000, "stock": 10 }, { "id": 2, "title": "Mouse", "price": 500, "stock": 100 } ]
{ "id": 1, "title": "Laptop", "price": 80000, "stock": 10 }
{ "message": "Product not found" }
{ "title": "Keyboard", "price": 1500, "stock": 50 }
{ "id": 3, "title": "Keyboard", "price": 1500, "stock": 50 }
{ "title": "Keyboard" }
{ "message": "All fields are required" }
{ "price": 75000 }
{ "id": 1, "title": "Laptop", "price": 75000, "stock": 10 }
{ "message": "Product not found" }
{ "message": "Product deleted successfully" }
{ "error": "Failed to fetch" }
Retrieve all products from the inventory.
Retrieve a specific product by its ID.
Create a new product in the inventory.
Update an existing product. Leave fields empty to keep current values.
Delete a product from the inventory.