Get budget totals
Módulo Finance
GET/budgets/{id}/summarybudgets.summary
Returns estimate, committed, actual and variance as NULL-aware totals. Unpriced lines are excluded from each sum and counted in `unpriced_count`. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requiere la capacidad finance.budget.read.
- Alcances de OAuth: finance.
- Estados de error: 400, 401, 404, 422, 429. Los errores son detalles de problema RFC 9457.
Parámetros de ruta y de consulta
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string (uuid) | Sí | Identifier of the budget. |
Respuesta 200: BudgetSummary
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| budget_id | string (uuid) | Sí | Identifier of the budget. |
| estimate | MoneyTotal | Sí | A money aggregate that never coerces unpriced inputs to zero. |
| committed | MoneyTotal | Sí | A money aggregate that never coerces unpriced inputs to zero. |
| actual | MoneyTotal | Sí | A money aggregate that never coerces unpriced inputs to zero. |
| variance | MoneyTotal | Sí | A money aggregate that never coerces unpriced inputs to zero. |
{
"budget_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"estimate": {
"total_minor": 1250000,
"currency": "USD",
"unpriced_count": 2
},
"committed": {
"total_minor": 1250000,
"currency": "USD",
"unpriced_count": 2
},
"actual": {
"total_minor": 1250000,
"currency": "USD",
"unpriced_count": 2
},
"variance": {
"total_minor": 1250000,
"currency": "USD",
"unpriced_count": 2
}
}Ejemplos de código
curl -X GET "$XOS_BASE_URL/budgets/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/summary" \
-H "Authorization: Bearer $XOS_API_KEY"const { data } = await xos.budgets.summary("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f");response = xos.budgets.summary("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f")xos budgets summary 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f