0% found this document useful (0 votes)
67 views3 pages

Updated Product Master API Documentation-1

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

Updated Product Master API Documentation-1

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

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).

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.

4. Delete Product

Endpoint: /product/delete/{id}

Method: DELETE
Authorization: Bearer Token

Description: Deletes a product by ID.

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}

6. Modify Product Status

Endpoint: /modify/{id}

Method: PATCH

Authorization: Bearer Token

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

You might also like