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
- Acquire a 3-legged OAuth token with
data:readanddata:writescopes. - 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.
- 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. In this example, assume that the container ID is e94b9bc8-1775-4d76-9b1d-c613e120ccff .
Request
Response
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 to get the project’s companies and find the member_group_id of the company you want.
Request
Response
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 to update the contract.
Request
Response
You’ll get the full content of the updated contract.
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.