v1/containers/{containerId}/cost-items/{costItemId}/sub-cost-items
Retrieves sub cost items associated with a specific cost item in a project. For more information about cost and sub cost items, see the Help documentation.
Resource Information
| Method and URI | GET https://developer.api.autodesk.com/cost/v1/containers/:containerId/cost-items/:costItemId/sub-cost-items |
| Authentication Context | User context required |
| Required OAuth Scopes | data:read |
| Data Format | JSON |
Request
Headers
| Authorization* string | Must be Bearer <token>, where <token> is a three-legged access token obtained via an Authorization Code flow or a Secure Service Account (SSA) flow.
The SSA flow is designed for headless server-to-server operations. While it functions like a two-legged flow (no user interaction), it is classified as three-legged because it preserves user context. |
| region string | Specifies the region where the project data resides.
By default, the request is routed automatically. However, specifying the region can improve performance by avoiding lookup overhead. Possible values: country or region codes such as To verify your project’s region, refer to the Working with BIM 360 Services in Different Regions section on the API Basics page. |
Request
URI Parameters
| containerId string: UUID | The ID of the project (the container ID is the same as the project ID). To obtain the project ID, see GET projects. |
| costItemId array: string: uuid | A cost item ID to retrieve sub cost items for one cost item in a single request. The response includes all sub cost items associated with the specified cost item. Cost items do not have parent-child relationships, but sub cost items can be structured under other sub cost items. To find the cost item ID, call GET cost-items. |
Request
Query String Parameters
| filter[type] enum:string | The type of the value to break down.
Possible values: estimated, proposed, submitted, approved, committed |
| limit int | The maximum number of records returned per page. Default: 100. A page may contain fewer records than the limit if there are fewer matching items or if it is the last page of results. |
| offset int | The number of records to skip before returning results. Used together with limit to paginate through results, where offset specifies the starting point and limit specifies the number of records to return. |
| sort string | Field to sort sub cost item results by. Only fields stored at the sub cost item database level are supported.
Allowed values: name, position, value, createdAt, updatedAt.
Multiple comma separated attributes are supported. Each attribute can be sorted in asc (default) or desc order. For example, sort=name,createdAt desc. |
Response
HTTP Status Code Summary
| 200 OK | The request was successful, returning the retrieved sub cost items. |
| 400 Bad Request | The parameters are invalid. |
| 401 Unauthorized | The provided bearer token is invalid. |
| 403 Forbidden | Forbidden. The user or service represented by the bearer token does not have permission to perform this operation. |
| 404 Not Found | The resource or endpoint cannot be found. |
| 409 Conflict | The request could not be completed due to a conflict with the current state of the resource. |
| 429 Too Many Requests | Rate limit exceeded. Retry your request after a few minutes. |
| 500 Internal Server Error | An unexpected error occurred on the server. |
| 503 Service Unavailable | Service unavailable. |
Response
Body Structure (200)
| pagination object | Contains pagination information when data is returned page by page. |
| limit int | The maximum number of records returned in the response. |
| offset int | The number of records skipped before returning the page of results. |
| totalResults int | The total number of records that matched the request criteria. |
| nextUrl string | The URL for the next request to retrieve the next page of results. Max length: 2000.
Max length: 2000 |
| results array: object | A list of sub cost items associated with the requested cost items. |
| id string: UUID | The unique ID of the sub cost item. |
| parentId string,null | The unique ID of the parent sub cost item. A sub cost item has a parent Id when it is part of a hierarchical cost structure. Root sub cost items do not have a parent ID. |
| type enum:string | The classification of the sub cost item that indicates its role in cost tracking and approval workflows. Possible values: estimated, proposed, submitted, approved, committed.
Max length: 255 |
| costItemId string | The ID of the cost item to which the sub cost item belongs. |
| code string | The identifier for the sub cost item. If copied from another model, for example, a Contract SOV, it inherits the code. Otherwise, it is manually assigned.
Max length: 255 |
| position number,null | The position of the sub cost item relative to its sibling sub cost items. If a new sub cost item is assigned a position that already exists, the system shifts existing items downward to maintain order. |
| name string | The name of the sub cost item.
Max length: 1024 |
| quantity number,string,null | The planned number of units allocated for the sub cost item. |
| inputQuantity number,string,null | The recorded input quantity, typically used in performance tracking. For example, in labor tracking, inputQuantity represents man-hours utilized. |
| unitPrice number,string,null | The price per individual unit of the sub cost item. |
| unit string | The unit of measurement for the sub cost item. This value is configured in the Unit of measure settings for the project. Common units include ea (Each), gal (Gallon), and various volume, length, and time measurements.
Max length: 1024 |
| value number,string,null | The total value of the sub cost item, calculated as quantity * unitPrice. |
| sovId string,null | Not relevant |
| createdAt datetime: ISO 8601 | The date and time that the item was created, in ISO 8601 format. |
| updatedAt datetime: ISO 8601 | The date and time that the item was last updated, in ISO 8601 format. |
Example
The request was successful, returning the retrieved sub cost items.
Request
curl -v 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/cost-items/eb284d80-f026-11e7-98ee-cb31483cc0ac/sub-cost-items?filter[type]=estimated&limit=100&sort=name,createdAt desc' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
Response
{
"pagination": {
"limit": 20,
"offset": 0,
"totalResults": 1,
"nextUrl": ""
},
"results": [
{
"id": "8f127780-96d6-11e8-81a8-cd51c63a9484",
"parentId": null,
"type": "estimated",
"costItemId": "eb284d80-f026-11e7-98ee-cb31483cc0ac",
"code": "0002",
"position": 1,
"name": "concrete flooring",
"quantity": "1.0000",
"inputQuantity": "1000.0000",
"unitPrice": "1000.0000",
"unit": "ea",
"value": "1000.0000",
"sovId": "8f127780-96d6-11e8-81a8-cd51c63a9484",
"createdAt": "2019-01-06T01:24:22.678Z",
"updatedAt": "2019-09-05T01:00:12.989Z"
}
]
}