0% found this document useful (0 votes)
6 views2 pages

Product Task DotNet

The document outlines the development of a web API for managing product entries with functionalities including adding, retrieving, updating, and deleting products and categories. Key features include validation for unique product codes, automatic profit calculation, and support for multiple product images. Suggested API endpoints are provided for product and category management, along with requirements for coding standards.

Uploaded by

zampadiyaajay78
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Product Task DotNet

The document outlines the development of a web API for managing product entries with functionalities including adding, retrieving, updating, and deleting products and categories. Key features include validation for unique product codes, automatic profit calculation, and support for multiple product images. Suggested API endpoints are provided for product and category management, along with requirements for coding standards.

Uploaded by

zampadiyaajay78
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

Task Definition

Objective: Develop a web API to manage product entries with the following functionalities:

Add Product:

Input fields include in form:

Product Name

Category Name

Sale Price

Color

Quantity

Manufacture Price

Product Code (must be unique and exactly 6 digits, zero-padded)

Product Images (support for multiple images)

Description:

Validation:

Ensure the Product Code is unique in the database. If a duplicate code is entered, return an error
message.

Format the Product Code to always display as 6 digits (e.g., input 1 should be stored as 000001).

Profit Calculation:

Automatically calculate profit for each product using the formula: Profit = Sale Price - Manufacture Price.

Return the calculated profit along with the product details upon successful addition.

Image Handling:

Allow users to associate multiple images with a single product.

Suggested API Endpoints


Add Product: Endpoint to create a new product entry.

Get Product Details: Endpoint to retrieve details of a product.

Update Product: Endpoint to modify an existing product’s details.

Delete Product: Endpoint to remove a product from the database.

List Products: Endpoint to retrieve a list of all products with optional filtering options. we can search on
any field.

Add Category: Endpoint to create a new category.

Get Categories: Endpoint to retrieve a list of all categories.

Update Category: Endpoint to modify an existing category.

Delete Category: Endpoint to remove a category from the database.(with checks to ensure it's not in use
in product.)

Make sure, that you follow the coding standard.

You might also like