Skip to main content
PUT
/
estoque
/
{estoque_id}
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"
}

Authentication

This endpoint requires a valid Bearer token with admin/superuser privileges.

Path Parameters

estoque_id
integer
required
Unique identifier of the inventory item to updateExample: 1

Request Body

tipo_item
enum
required
Type of inventory item
  • Medicamento - Medication
  • Insumo - Supply
  • Equipamento - Equipment
nome
string
required
Name of the inventory itemExample: Paracetamol
quantidade
integer
required
Quantity available in stockExample: 150
unidade
string
required
Unit of measurementExample: mg, ml, unidade
data_validade
date
required
Expiration date in ISO format (YYYY-MM-DD)Example: 2026-06-30

Response

id
integer
Unique identifier of the updated inventory item
tipo_item
enum
Type of inventory item (Medicamento, Insumo, or Equipamento)
nome
string
Name of the inventory item
quantidade
integer
Quantity available in stock
unidade
string
Unit of measurement
data_validade
date
Expiration date
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 CodeDescription
200Inventory item updated successfully
401Authentication token missing or invalid
403User does not have admin/superuser privileges
404Inventory item with the specified ID not found

Build docs developers (and LLMs) love