> This page is for version v2 (default).
> 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.

# Update a Contract’s Company

This tutorial demonstrates how to get the company list from BIM 360 Admin and update the supplier company of a contract.

## 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:read` and `data:write` scopes.
* Verify that you have access to the relevant BIM 360 account and BIM 360 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/).
* A couple of contracts have been created or imported.

## Step 1: Find a Contract in BIM 360 Cost Management

Find the ID of the contract you want to update by calling [GET Contracts](https://aps.autodesk.com/en/docs/bim360-private/v1/reference/http/cost-contracts-GET/). In this example, assume that the container ID is `e94b9bc8-1775-4d76-9b1d-c613e120ccff` .

### Request

```bash
curl 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/contracts?limit=100&offset=0' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5In0'
```

### Response

```json
{
  "results": [{
      "id": "55254a50-44d9-11e9-99d7-79aa05d3109e",
      "...":"...",
  }],
  "pagination": {
      "totalResults": 1,
      "limit": 100,
      "offset": 0
  }
}
```

In this example, the contract ID is in the first part of the response (`results[0].id`). It’s `55254a50-44d9-11e9-99d7-79aa05d3109e`. You’ll use it in the next step.

## Step 2: Get the Project’s Companies from BIM 360 Admin

Use the project ID (`18ece8b1-204d-11e8-ad71-d73b169f902a`) and account ID(`aade5ed8-f16d-4ec0-9c0a-59f5ff7a2134`) to call [GET companies](https://aps.autodesk.com/en/docs/bim360/v1/reference/http/projects-:project_id-companies-GET/) to get the project’s companies and find the `member_group_id` of the company you want.

### Request

```bash
curl -v 'https://developer.api.autodesk.com/hq/v1/accounts/aade5ed8-f16d-4ec0-9c0a-59f5ff7a2134/projects/18ece8b1-204d-11e8-ad71-d73b169f902a/companies?limit=1&offset=0' -H 'Authorization: Bearer 07YyCEjv3qs8FA7ysntmsuErYXHv'
```

### Response

```json
[
    {
        "id": "fc830fd8-f1ef-4cd6-9163-fb115dc698d7",
        "account_id": "aade5ed8-f16d-4ec0-9c0a-59f5ff7a2134",
        "project_id": "18ece8b1-204d-11e8-ad71-d73b169f902a",
        "name": "Autodesk",
        "trade": "Concrete",
        "address_line_1": "The Fifth Avenue",
        "address_line_2": "#301",
        "city": "New York",
        "postal_code": "10011",
        "state_or_province": "New York",
        "country": "United States",
        "phone": "(503)623-1525",
        "website_url": "http://www.autodesk.com",
        "description": "Autodesk, Inc., is a leader in 3D design, engineering and entertainment software.",
        "created_at": "2016-05-20T02:24:21.400Z",
        "updated_at": "2016-05-20T02:24:21.400Z",
        "erp_id": "c79bf096-5a3e-41a4-aaf8-a771ed329047",
        "tax_id": "213-73-8867",
        "member_group_id": "764893"
    }
]
```

Find the company you want by name in the response and note its `member_group_id` value. This is the company ID. We’ll use it to update the contract’s company.

## Step 3: Update the Contract

Use the container ID (`e94b9bc8-1775-4d76-9b1d-c613e120ccff`), contract ID(`55254a50-44d9-11e9-99d7-79aa05d3109e`), and company ID (`764893`) noted above to call [PATCH contracts/:id](https://aps.autodesk.com/en/docs/bim360/v1/reference/http/cost-contracts-contractId-PATCH/) to update the contract.

### Request

```bash
curl -v 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/contracts/55254a50-44d9-11e9-99d7-79aa05d3109e' -X 'PATCH' -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' -H 'Content-Type: application/json' -d '{"companyId": "764893",}'
```

### Response

You’ll get the full content of the updated contract.

```json
{
  "id": "f6445638-ca68-4e3c-9160-15864de6b818",
  "code": "GC-01",
  "name": "Site Management Staff",
  "description": "Site Management Staff",
  "companyId": "764893",
  "type": "consultant",
  "...": "..."
}
```

Congratulations! You have successfully updated the contract’s company.

---

*Imported from the Autodesk Platform Services documentation: [https://aps.autodesk.com/en/docs/acc/v1/tutorials/cost/update-contract-company-and-contact](https://aps.autodesk.com/en/docs/acc/v1/tutorials/cost/update-contract-company-and-contact).*