Request

Response

    Timesheet
    POST

    v1/containers/{containerId}/time-sheets

    Creates a timesheet for the specified tracking item instance in the given project.

    Note that Cost API timesheets endpoints are designed only for use with a third party tracking app that you’ve synchronized with Cost Management. For more information, see Performance Tracking.

    Note that this endpoint is compatible with both BIM 360 and Autodesk Construction Cloud (ACC) projects.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/cost/v1/containers/:containerId/time-sheets
    Authentication Context
    user context required
    Required OAuth Scopes
    data:write
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is obtained via a three-legged OAuth flow.
    Content-Type*
    string
    Must be application/json
    region
    string
    The region where the project data resides, to which this request is routed.

    This header is optional because the request is automatically routed to a target region based on the project ID or container ID. Using the header, though, can save lookup time on each API call. For information about verifying the region the data resides in, see the Working with BIM 360 Services in Different Regions section on the API Basics page.

    Possible values: EMEA, US. For the full list of supported regions, see the Regions page.

    * Required

    Request

    URI Parameters

    containerId
    string: UUID
    The ID of the cost container for the project. Each project is assigned a container that stores all of the cost data for the project.

    To find the container ID, see the Retrieve a Cost Container ID tutorial.

    In ACC projects, the container ID is the same as the project ID. To obtain a project ID, use GET projects.

    Request

    Body Structure

    The timesheet

    trackingItemInstanceId
    string,null
    The ID of the tracking item instance to which the timesheet will belong. Required if both trackingItemInstanceNumber and budgetCode are omitted from this request. To find the instance ID, call GET performance-tracking-item-instances and inspect results.id in the response.
    trackingItemInstanceNumber
    string,null
    The user-provided code that represents the tracking item instance to which the timesheet will belong. Required if both trackingItemInstanceId and budgetCode are omitted from this request. To find the instance number, call GET performance-tracking-item-instances and inspect results.number in the response.
    budgetCode
    string,null
    The code that identifies the budget to which the timesheet belongs. Required if both trackingItemInstanceId and trackingItemInstanceNumber are omitted from this request. To find the budget code, call GET budgets and inspect results.code in the response.
    startDate
    string
    The first date of the time period covered by the timesheet.
    endDate*
    string
    The last date of the time period covered by the timesheet. This is also the date that the tracked inputQuantity and outputQuantity values are considered to have been reported.
    inputQuantity*
    number
    The hours worked during the time period covered by the timesheet.
    outputQuantity*
    number
    The quantity of material used during time period covered by the timesheet.
    * Required

    Response

    HTTP Status Code Summary

    201
    Created
    Success
    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 (201)

    id
    string: UUID
    The ID of the timesheet.
    containerId
    string: UUID
    The ID of the cost container for the project to which the timesheet belongs.
    trackingItemInstanceId
    string: UUID
    The ID of the tracking item instance to which the timesheet belongs.
    startDate
    string
    The first date of the time period covered by the timesheet.
    endDate
    string
    The last date of the time period covered by the timesheet. This is also the date that the tracked inputQuantity and outputQuantity values are considered to have been reported.
    inputQuantity
    number
    The hours worked during the time period covered by the timesheet.
    inputUnit
    string
    The input unit of measurement of the timesheet. Currently this value should always be hr.
    outputQuantity
    number
    The quantity of material used during time period covered by the timesheet.
    outputUnit
    string
    The output unit of measurement of the timesheet.
    creatorId
    string,null
    The BIM 360/ACC ID of the user who created the timesheet.
    changedBy
    string,null
    The BIM 360/ACC ID of the user who made the last change to the timesheet.
    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

    Success

    Request

    curl -v 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/time-sheets' \
      -X 'POST' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '{
            "trackingItemInstanceId": "1df59db0-9484-11e8-a7ec-7ddae203e404",
            "trackingItemInstanceNumber": "84720010121001FEE-01",
            "budgetCode": "84720010121001FEE",
            "startDate": "2020-01-06",
            "endDate": "2020-01-06",
            "inputQuantity": "100",
            "outputQuantity": "100"
          }'
    
    Show More

    Response

    {
      "id": "1df59db0-9484-11e8-a7ec-7ddae203e404",
      "containerId": "1df59db0-9484-11e8-a7ec-7ddae203e404",
      "trackingItemInstanceId": "1df59db0-9484-11e8-a7ec-7ddae203e404",
      "startDate": "2020-01-06",
      "endDate": "2020-01-06",
      "inputQuantity": "100",
      "inputUnit": "hr",
      "outputQuantity": "100",
      "outputUnit": "cy",
      "creatorId": "CED9LVTLHNXV",
      "changedBy": "CED9LVTLHNXV",
      "createdAt": "2019-01-06T01:24:22.678Z",
      "updatedAt": "2019-09-05T01:00:12.989Z"
    }
    
    Show More