curl --request PATCH \
--url https://api.example.com/sales/:id \
--header 'Content-Type: application/json' \
--data '
{
"productId": "<string>",
"quantity": 123
}
'Update product or quantity in a sale detail with automatic stock adjustment
curl --request PATCH \
--url https://api.example.com/sales/:id \
--header 'Content-Type: application/json' \
--data '
{
"productId": "<string>",
"quantity": 123
}
'This endpoint updates a specific sale detail by modifying the product or quantity. The system automatically adjusts stock levels to reflect the changes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/andreguti9190/Sistema-de-gestion-de-ventas--Nodejs/llms.txt
Use this file to discover all available pages before exploring further.
idSalesDetails from GET responses){
"productId": "1373fe00-14e4-11f1-9fcd-2418c6c96a00",
"quantity": 20
}
{
"error": true,
"msg": "the id is invalid"
}
{
"error": true,
"msg": "request body is empty"
}
{
"error": true,
"msg": "the data is invalid"
}
productId is provided but not a valid UUIDquantity is less than 0id parameter refers to the sale detail ID (idSalesDetails), not the sale ID (idSales)