curl -X PATCH https://api.yourfinanceapp.com/api/budgets/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 55000.0
}'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"amount": 55000.0,
"month": 1,
"year": 2026,
"categoryId": "660e8400-e29b-41d4-a716-446655440001",
"userId": "770e8400-e29b-41d4-a716-446655440002"
}
Modify an existing budget
curl -X PATCH https://api.yourfinanceapp.com/api/budgets/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 55000.0
}'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"amount": 55000.0,
"month": 1,
"year": 2026,
"categoryId": "660e8400-e29b-41d4-a716-446655440001",
"userId": "770e8400-e29b-41d4-a716-446655440002"
}
403 Forbidden - “No tienes permiso”
400 Bad Request - “El presupuesto supera el límite de la categoría padre. Disponible: $X.”
400 Bad Request - “El monto es menor a la suma de las subcategorías ($X). Ajusta las subcategorías primero.”
404 Not Found - “Presupuesto no encontrado”
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"amount": 55000.0,
"month": 1,
"year": 2026,
"categoryId": "660e8400-e29b-41d4-a716-446655440001",
"userId": "770e8400-e29b-41d4-a716-446655440002"
}
curl -X PATCH https://api.yourfinanceapp.com/api/budgets/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 55000.0
}'