0% found this document useful (0 votes)
24 views

Updated Product Master API Documentation With Images

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Updated Product Master API Documentation With Images

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Product Master API Documentation

Base URL

https://demo.creativebees.in/system_test/api/

Authentication

Login

Endpoint: /login

Method: POST

Description: Authenticates a user and provides a token.

Request Body:

"email": "[email protected]",

"password": "12345678"

Logout

Endpoint: /logout

Method: POST

Description: Logs out the user by invalidating the session token.

Product Management

1. Create Product

Endpoint: /product/create

Method: POST

Authorization: Bearer Token


Description: Adds a product to the database.

Request Parameters:

top_category (String, Required) - The top-level category.

category (String, Required) - Product category.

sub_category (String, Required) - Sub-category of the product.

product_name (String, Required) - Product name.

quantity (Integer, Required) - Quantity in stock.

price (Float, Required) - Price of the product.

status (String, Required) - Availability status.

file (File, Optional) - Product document (PDF, DOC, DOCX; max 2048 KB).

image (File, Optional) - Product image (JPEG, PNG, JPG, GIF, SVG; max 2048 KB).
Add Product Page

2. Read Product

Endpoint: /product/read

Method: GET

Authorization: Bearer Token

Description: Retrieves all products from the database.

3. Update Product

Endpoint: /product/update/{id}

Method: POST

Authorization: Bearer Token

Description: Updates the specified product by ID.

Request Parameters: Similar to Create Product parameters.


Edit Product Page

4. Delete Product

Endpoint: /product/delete/{id}

Method: DELETE

Authorization: Bearer Token

Description: Deletes a product by ID.

Delete Confirmation

New Endpoints
5. Filter Products

Endpoint: /product/filter

Method: GET

Authorization: Bearer Token

Description: Filters products based on provided criteria.

Request Parameters:

"filters": [

{"column": "product_name", "value": "app"},

{"column": "category", "value": 1}

}
Filter Products Page

6. Modify Product Status

Endpoint: /modify/{id}

Method: PATCH

Authorization: Bearer Token

Description: Toggles the product's status between 'active' and 'inactive'.

Manage Status Popup


View Product Popup

You might also like