Authentication
This endpoint requires a valid Bearer token with admin/superuser privileges.
Path Parameters
Unique identifier of the inventory item to updateExample: 1
Request Body
Type of inventory item
Medicamento - Medication
Insumo - Supply
Equipamento - Equipment
Name of the inventory itemExample: Paracetamol
Quantity available in stockExample: 150
Unit of measurementExample: mg, ml, unidade
Expiration date in ISO format (YYYY-MM-DD)Example: 2026-06-30
Response
Unique identifier of the updated inventory item
Type of inventory item (Medicamento, Insumo, or Equipamento)
Name of the inventory item
Quantity available in stock
curl -X PUT https://api.vidaplus.com/estoque/1 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tipo_item": "Medicamento",
"nome": "Paracetamol",
"quantidade": 150,
"unidade": "mg",
"data_validade": "2026-06-30"
}'
{
"id": 1,
"tipo_item": "Medicamento",
"nome": "Paracetamol",
"quantidade": 150,
"unidade": "mg",
"data_validade": "2026-06-30"
}
Error Codes
| Status Code | Description |
|---|
| 200 | Inventory item updated successfully |
| 401 | Authentication token missing or invalid |
| 403 | User does not have admin/superuser privileges |
| 404 | Inventory item with the specified ID not found |