-
- /product/list - GET - returns all products (Paginated)
- Query Params:
- 'filter' - Optional - searches products by the filter in the fields (name)
- 'categoryId' - Optional - to filter products by category
-
- /product/:id - GET - returns a single product
-
- /product/:id - DELETE - removes a product
-
- /product/:id - PATCH - updates a product
-
- /product/ - POST - creates a product
-
- /product/image - POST - add image to cloud bucket and connect url to product
-
- /category/list - GET - returns all categories (Paginated)
-
- /category/:id - GET - returns a single category
-
- /category/:id - PATCH - update a category
-
- /category/:id - DELETE - removes a category
-
- /category/ - POST - creates a category
-
- /image/:id - GET - returns a image by id
-
- /image/:id - DELETE - removes a image by id
-
- /auth/signup/employee - POST - create a user with the "employee" role
-
- /me/picture - POST - Add user profile picture
-
- /user/list - GET - List all users (Paginated)
- Query Params:
- 'role' - Optional - to filter users by role
- 'filter' - Optional - searches users by the filter in the fields (firstName, lastName, nif, email)
-
- /user/:id/ - GET - Get user by id
-
- /user/:id - DELETE - Remove User
-
- /user/:id - PATCH - Update user by id
-
- /user/:id/product/list - GET - List all products created by the user (Paginated)
-
- /user/:id/category/list - GET - List all categories created by the user (Paginated)
-
- /user/:id/supplier/list - GET - List all suppliers created by the user (Paginated)
-
- /user/:id/role/list - GET - List all user roles
-
- /supplier/list - GET - List all suppliers (Paginated)
-
- /supplier/ - POST - Create Supplier
-
- /supplier/:id - GET - Get supplier by id
-
- /supplier/:id - PATCH - Update supplier by id
-
- /supplier/:id - DELETE - Delete supplier by id
-
- /supplier/:id/product/list - GET - List all products from supplier (Paginated)