cURL
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>" } '
Set stock level for a product at a location
write:stock
PUT /api/v1/stock/product/{productId}
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" }'
{ "success": true, "data": { "product_id": 100, "location_id": "LOC-A1", "previous_quantity": 50, "new_quantity": 75, "movement_id": "MOV-12345" } }
{ "success": false, "error": { "code": "validation_error", "message": "Location ID is required" } }
{ "success": false, "error": { "code": "validation_error", "message": "Quantity is required and must be a number" } }