Endpoint
GET /v1/budget/allocations
Authentication
Requires a developer API key in theAuthorization header.
Request Headers
| Header | Value |
|---|---|
Authorization | Bearer <api_key> |
Example Request
curl https://api.grantex.dev/v1/budget/allocations \
-H "Authorization: Bearer gx_..."
Response — 200 OK
{
"allocations": [
{
"id": "ba_01HXYZ...",
"grantId": "grnt_01HXYZ...",
"initialBudget": 100.00,
"remainingBudget": 94.50,
"currency": "USD",
"createdAt": "2026-04-05T12:00:00.000Z",
"updatedAt": "2026-04-05T14:30:00.000Z"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
allocations | array | Array of budget allocation objects |
allocations[].id | string | Unique budget allocation ID |
allocations[].grantId | string | The grant this budget is attached to |
allocations[].initialBudget | number | The original budget amount |
allocations[].remainingBudget | number | Current remaining budget |
allocations[].currency | string | Currency code |
allocations[].createdAt | string | ISO-8601 creation timestamp |
allocations[].updatedAt | string | ISO-8601 last update timestamp |
Error Responses
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Invalid or missing API key |
SDK Examples
import Grantex from '@grantex/sdk';
const grantex = new Grantex({ apiKey: 'gx_...' });
const { allocations } = await grantex.budgets.allocations();
for (const a of allocations) {
console.log(`${a.grantId}: ${a.remainingBudget}/${a.initialBudget} ${a.currency}`);
}
from grantex import Grantex
grantex = Grantex(api_key="gx_...")
result = grantex.budgets.allocations()
for a in result.allocations:
print(f"{a.grant_id}: {a.remaining_budget}/{a.initial_budget} {a.currency}")