Skip to content

Bug: Product API Accepts Negative Quantity POST /api/v1/products #60

Open
@sagarkumar-webkul

Description

@sagarkumar-webkul

🔍 Description:

The API currently allows the creation of products with negative quantity values, which is logically invalid and can lead to inconsistent inventory and sales behavior.


🧪 Steps to Reproduce:

  1. Send a POST request to /api/v1/products
  2. Use the following JSON body:
{
  "name": "Test Product",
  "description": "Negative quantity test",
  "sku": "NEG-001",
  "quantity": -45,
  "price": 100,
  "entity_type": "products"
}

) 

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions