> This page is for version v1.
> For other versions, use one of these documentation indexes:
> - v2 (default): https://autodesk-poc.ferndocs.com/v2/llms.txt
> - v1: https://autodesk-poc.ferndocs.com/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://autodesk-poc.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://autodesk-poc.ferndocs.com/_mcp/server.

# Track Aggregated Budget Performance

This tutorial demonstrates how to use the Cost Management API to track the performance of a project budget based on its budget code. The performance tracking item that represents a budget is tracked by one or more timesheets, each of which is linked to one of the tracking item’s instances. The tutorial aggregates the tracking data from all of the timesheets associated with a given budget. The steps include retrieving the budget code, logging and aggregating timesheets, synchronizing the timesheets with Autodesk Cost Management, and adjusting the forecast.

Budget codes are synchronized from Autodesk Cost Management or other external systems e.g. ERP/accounting system (assume they’re always synchronized).

Note that the Cost API timesheets endpoints used in this tutorial are designed only for use with a third party timesheet reporting (tracking) app (e.g. Riskcast, Rhumbix, QuickBooks Time, or ClickUp) that you’ve integrated with Cost Management.

## Before You Begin

* [Register an app](https://aps.autodesk.com/myapps).
* Acquire a [3-legged OAuth token](https://aps.autodesk.com/en/docs/oauth/v2/tutorials/get-3-legged-token/) with `data:create`, `data:read`, and `data:write` scopes.
* Verify that you have access to the relevant BIM 360 account and project.
* Retrieve the project ID for your project. To obtain a project ID, use [GET projects](https://aps.autodesk.com/en/docs/bim360/v1/reference/http/admin-accounts-accountidprojects-GET/).

## Step 1: Retrieve the Budget Code

To retrieve the budget code of the budget you want to track, use the value of `containerId` to call [GET budgets](https://aps.autodesk.com/en/docs/bim360/v1/reference/http/cost-budgets-GET/) with the appropriate filter criteria.

### Request

```bash
curl -v 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/budgets?filter[lastModifiedSince]=2020-03-01T13:00:00Z&limit=100&sort=name,createdAt desc'
\ -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
```

### Response

```json
{
    "pagination": {
        "limit": 20,
        "offset": 0,
        "totalResults": 1,
        "nextUrl": ""
    },
    "results": [
        {
        "id": "683904a0-47ce-4146-ac2d-a3840f00e0f4",
        "parentId": "null",
        "code": "84720010130000GEN",
        "scope": "budgetAndCost",
        "subItems": "",
        "budgetCode": "84720010121001FEE",
        "name": "Contingency",
        "description": "Reserved for contingency",
        "quantity": 50,
        "inputQuantity": 50,
        "ratio": 1,
        "unitPrice": "1000.0000",
        "unit": "LS",
        "originalAmount": 1000,
        "milestoneId": "227e1360-9481-11e8-87fb-215990a8aeb3",
        "internalAdjustment": 1000,
        "approvedOwnerChanges": 1000,
        "pendingOwnerChanges": 1000,
        "originalCommitment": 1000,
        "approvedChangeOrders": 1000,
        "approvedInScopeChangeOrders": 1000,
        "pendingChangeOrders": 1000,
        "reserves": 1000,
        "actualQuantity": 50,
        "actualUnitPrice": "1000.0000",
        "actualCost": 1000,
        "mainContractId": "f6445638-ca68-4e3c-9160-15864de6b818",
        "locations": "",
        "locationPaths": "",
        "plannedStartDate": "2019-01-06",
        "plannedEndDate": "2020-01-06",
        "actualStartDate": "2019-01-06",
        "actualEndDate": "2020-02-10",
        "durationDays": 90,
        "uncommitted": 1000,
        "revised": 1000,
        "projectedCost": 1000,
        "projectedBudget": 1000,
        "forecastFinalCost": 1000,
        "forecastVariance": 1000,
        "forecastCostComplete": 1000,
        "varianceTotal": 1000,
        "externalId": "10010-99-AB",
        "externalSystem": "Sage300",
        "externalMessage": "Success",
        "lastSyncTime": "2019-09-05T01:00:12.989Z",
        "integrationState": "locked",
        "integrationStateChangedAt": "2019-09-05T01:00:12.989Z",
        "integrationStateChangedBy": "CED9LVTLHNXV",
        "createdAt": "2019-01-06T01:24:22.678Z",
        "updatedAt": "2019-09-05T01:00:12.989Z"
        }
    ]
}
```

Note the budget code (`results.budgetCode`) — `84720010121001FEE`.

## Step 2: Log and Aggregate the Timesheets

A field user uses your integrated tracking app to log their progress in the app’s timesheets against the budget code noted in the previous step.

The tracking app aggregates the `inputQuantity` and `outputQuantity` values entered by the user into timesheets by day and budget code. Assume the unit of measurement of `inputQuantity` to be `hr` (hour).

## Step 3: Synchronize Timesheets with Autodesk Cost Management

To capture the aggregated timesheet data from your tracking app, use the budget code noted in step 1 (`84720010121001FEE`) to call [POST time-sheets](https://aps.autodesk.com/en/docs/bim360/v1/reference/http/cost-time-sheets-POST/) to create a timesheet object for the specified budget.

### Request

```bash
curl -X POST 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/time-sheets'
\-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5In0'
\-H 'Content-Type: application/json' \
-d '{
        "budgetCode": "84720010121001FEE",
        "startDate": "2020-01-06",
        "endDate": "2020-01-06",
        "inputQuantity": 100,
        "outputQuantity": 5
    }
```

### Response

```json
{
    "pagination": {
        "limit": 20,
        "offset": 0,
        "totalResults": 1,
        "nextUrl": "..."
    },
    "results": [
        {
        "id": "1df59db0-9484-11e8-a7ec-7ddae203e404",
        "trackingItemId": "c06ab5f6-7015-498b-afc1-572d2d4df44f",
        "budgetCode": "84720010121001FEE",
        "number": "84720010121001FEE-0001",
        "name": "Concrete",
        "inputUnit": "hr",
        "inputQuantity": "100",
        "inputUnitPrice": "100.0000",
        "outputUnit": "cy",
        "outputQuantity": "5",
        "outputUnitPrice": "1000.0000",
        "trackedInputQuantity": "0",
        "trackedOutputQuantity": "0",
        "adjustedOutputQuantity": "0",
        "performanceRatio": "1",
        "locations": "4912f52b-4bf2-4651-a80c-2c30f515c826",
        "creatorId": "GF8XKPKWM38E",
        "changedBy": "GF8XKPKWM38E",
        "createdAt": "2019-01-06T01:24:22.678Z",
        "updatedAt": "2019-09-05T01:00:12.989Z"
        }
    ]
}
```

The new timesheet object is associated with the first (default) tracking item instance of the budget’s performance tracking item.

## Step 4: Adjust the Forecast

The cost engineer analyzes the performance by tracking item instance and creates a forecast adjustment.

---

*Imported from the Autodesk Platform Services documentation: [https://aps.autodesk.com/en/docs/acc/v1/tutorials/cost/cost-track-aggregated-budget-performance](https://aps.autodesk.com/en/docs/acc/v1/tutorials/cost/cost-track-aggregated-budget-performance).*