Skip to main content
PUT
https://api.zenflow.com.ar
/
api
/
v1
/
stock
/
product
/
{productId}
Update Product Stock
curl --request PUT \
  --url https://api.zenflow.com.ar/api/v1/stock/product/{productId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "location_id": "<string>",
  "quantity": 123,
  "reason": "<string>"
}
'

Update Product Stock

Set the absolute stock quantity for a product at a specific location.
Requires write:stock scope.

Request

PUT /api/v1/stock/product/{productId}

Path Parameters

productId
integer
required
The product ID

Body Parameters

location_id
string
required
The location ID
quantity
number
required
The new stock quantity
reason
string
Reason for the adjustment

Example

curl -X PUT "https://api.zenflow.com.ar/api/v1/stock/product/100" \
  -H "X-API-Key: zenflow_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "location_id": "LOC-A1",
    "quantity": 75,
    "reason": "Inventory count adjustment"
  }'

Response

{
  "success": true,
  "data": {
    "product_id": 100,
    "location_id": "LOC-A1",
    "previous_quantity": 50,
    "new_quantity": 75,
    "movement_id": "MOV-12345"
  }
}

Error Responses

400 Validation Error

{
  "success": false,
  "error": {
    "code": "validation_error",
    "message": "Location ID is required"
  }
}

400 Invalid Quantity

{
  "success": false,
  "error": {
    "code": "validation_error",
    "message": "Quantity is required and must be a number"
  }
}