This project is an API with the objective of creating and managing products in an inventory.
- In a terminal window run:
npm install
; - Start server with:
npm start
.
- GET
/api/product
- GET
/api/product/:id
-
POST
/api/product
Content-Type: application/json
{
"name": "Macbook Air M2 Late 22",
"quantity": 5,
"barcode": "1298981289313692931241"
}
-
PUT
/api/product/:id
Content-Type: application/json
{
"name": "iPhone 13 Pro 128GB",
"quantity": 2
}
-
POST
/api/product/deactivate/:id
Content-Type: application/json
{
"comment": "This product is duplicate"
}
- POST
/api/product/reactivate/:id