Request

Response

    Contracts
    POST

    v1/containers/{containerId}/contracts

    Creates a contract in the specific project.

    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/contracts
    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 contract

    Expand all
    code
    string
    The code of the contract.

    Max length: 255

    name*
    string
    The name of the contract.

    Max length: 1024

    description
    string
    The detailed description of a contract.

    Max length: 2048

    companyId
    string,null
    The ID of a company managed by a BIM 360 Admin. Detailed company information can be retrieved by calling GET projects/:project_id/companies and locating the member_group_id in the response.
    companyUid
    string,null
    The unique ID (UUID) of the company in this account. Detailed company information can be retrieved using this UUID by calling GET companies/:company_id in the response.
    type
    string,null
    The type of contract. For example, consultant or purchase order. The type can be customized by the project admin.
    contactId
    string,null
    The unique identifier of the default contact for the supplier. This ID is generated and managed by the BIM 360 Admin service. The contactId can be used to query user information such as email and company.
    source
    string,null
    The URN of the source entity from which the contract is created.
    additionalContacts
    object
    Not relevant
    sovContactId
    string,null
    Not relevant
    signatoryId
    string,null
    Not relevant
    rfqRecipientId
    string,null,array
    Not relevant
    scoSignatoryId
    string,null
    Not relevant
    costPaymentApplicationContactId
    string,null
    Not relevant
    signedBy
    string,null
    The user who signed the contract. This is the ID of a user managed by BIM 360 Admin.
    ownerId
    string,null
    The user responsible for the purchase. This is the ID of a user managed by BIM 360 Admin.
    mainContractId
    string,null
    The ID of the main contract with which this item is associated.
    completedWorkRetentionPercent
    number,null
    The completed work retention percentage of the contract amount.
    materialsRetentionPercent
    number,null
    The materials retention percentage of the contract amount.
    retentionCap
    number,null
    The maximum percentage of the total contract amount which can be used as the retention amount.
    status
    string,null
    The status of this contract. Possible values: draft, pending, submitted, revise, sent, signed, executed, closed, inReview
    subStatus
    string,null
    The subStatus is used when the contract is in an executed state and may have additional statuses under it. For example, if a contract is “executed” but requires the supplier to provide additional information, the status will be executed and the subStatus will be pending. In other cases, subStatus is always null. Possible values: null, pending, submitted, revise. Default value: null.
    currency
    string
    The code of the currency specified for the contract if it’s awarded in a foreign currency.
    exchangeRate
    number,string,null
    The final exchange rate for the specified currency, applied as a multiplier of the contract’s base currency. For example, 1 base currency = 0.7455 foreign currency.
    forecastExchanageRate
    number,string,null
    The forecast exchange rate. Default value: null.
    forecastExchangeRateUpdatedAt
    datetime: ISO 8601
    The last time that the forecast exchange rate was updated, in ISO 8601 format.
    externalId
    string
    The identifier assigned to an item in its original external ERP system. Use this ID to track and look up data within the integrated system. Note that this value comes from the item’s ID in the external system.

    Max length: 255

    externalSystem
    string
    The name of the external ERP system integrated with Cost Management. Use this name to identify and search for data within the integrated system.

    Max length: 255

    externalMessage
    string
    A message generated by the external ERP system that explains the sync status of the integration. For example, common values include success or fail to indicate the result of the integration operation.

    Max length: 255

    lastSyncTime
    datetime: ISO 8601
    The date and time when the item was last synchronized with the external ERP system. This value is updated by the external system and is in ISO 8601 format.
    integrationState
    string,null
    The state of the item during the integration with the external ERP system (such as SignNow). An item can be a budget, contract, main contract, main contract item, cost item, expense, expense item, change order, or schedule of value. For more details, see Integrate with External System tutorial. Possible values:

    locked: the item is currently locked within the ERP system, preventing modifications until unlocked. To unlock and modify the item, use the relevant PATCH endpoint to set integrationState to null. For example, for a budget, call PATCH budgets. For a contract, call PATCH contracts. For more details, see the Help documentation.

    integrated: the item has been successfully added to the ERP system.

    failed: the item encountered an error during the integration process and was not successfully added to the ERP system. For example, if a user tries to integrate contracts from an ERP system and the updates fail, the integrationState can be set to failed. Retry the sync process or analyze the issue if it continues to fail.

    null: The item has not been integrated with the ERP system. This is default value.

    For more information regarding integrations within the Cost Management system, see Integrations in Cost Management.

    * 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)

    Expand all
    code
    string
    The code of the contract.

    Max length: 255

    name
    string
    The name of the contract.

    Max length: 1024

    description
    string
    The detailed description of a contract.

    Max length: 2048

    companyId
    string,null
    The ID of a company managed by a BIM 360 Admin. Detailed company information can be retrieved by calling GET projects/:project_id/companies and locating the member_group_id in the response.
    companyUid
    string,null
    The unique ID (UUID) of the company in this account. Detailed company information can be retrieved using this UUID by calling GET companies/:company_id in the response.
    type
    string,null
    The type of contract. For example, consultant or purchase order. The type can be customized by the project admin.
    contactId
    string,null
    The unique identifier of the default contact for the supplier. This ID is generated and managed by the BIM 360 Admin service. The contactId can be used to query user information such as email and company.
    source
    string,null
    The URN of the source entity from which the contract is created.
    additionalContacts
    object
    Not relevant
    sovContactId
    string,null
    Not relevant
    signatoryId
    string,null
    Not relevant
    rfqRecipientId
    string,null,array
    Not relevant
    scoSignatoryId
    string,null
    Not relevant
    costPaymentApplicationContactId
    string,null
    Not relevant
    signedBy
    string,null
    The user who signed the contract. This is the ID of a user managed by BIM 360 Admin.
    ownerId
    string,null
    The user responsible for the purchase. This is the ID of a user managed by BIM 360 Admin.
    mainContractId
    string,null
    The ID of the main contract with which this item is associated.
    completedWorkRetentionPercent
    number,null
    The completed work retention percentage of the contract amount.
    materialsRetentionPercent
    number,null
    The materials retention percentage of the contract amount.
    retentionCap
    number,null
    The maximum percentage of the total contract amount which can be used as the retention amount.
    status
    string,null
    The status of this contract. Possible values: draft, pending, submitted, revise, sent, signed, executed, closed, inReview
    subStatus
    string,null
    The subStatus is used when the contract is in an executed state and may have additional statuses under it. For example, if a contract is “executed” but requires the supplier to provide additional information, the status will be executed and the subStatus will be pending. In other cases, subStatus is always null. Possible values: null, pending, submitted, revise. Default value: null.
    currency
    string
    The code of the currency specified for the contract if it’s awarded in a foreign currency.
    exchangeRate
    number,string,null
    The final exchange rate for the specified currency, applied as a multiplier of the contract’s base currency. For example, 1 base currency = 0.7455 foreign currency.
    forecastExchanageRate
    number,string,null
    The forecast exchange rate. Default value: null.
    forecastExchangeRateUpdatedAt
    datetime: ISO 8601
    The last time that the forecast exchange rate was updated, in ISO 8601 format.
    externalId
    string
    The identifier assigned to an item in its original external ERP system. Use this ID to track and look up data within the integrated system. Note that this value comes from the item’s ID in the external system.

    Max length: 255

    externalSystem
    string
    The name of the external ERP system integrated with Cost Management. Use this name to identify and search for data within the integrated system.

    Max length: 255

    externalMessage
    string
    A message generated by the external ERP system that explains the sync status of the integration. For example, common values include success or fail to indicate the result of the integration operation.

    Max length: 255

    lastSyncTime
    datetime: ISO 8601
    The date and time when the item was last synchronized with the external ERP system. This value is updated by the external system and is in ISO 8601 format.
    integrationState
    string,null
    The state of the item during the integration with the external ERP system (such as SignNow). An item can be a budget, contract, main contract, main contract item, cost item, expense, expense item, change order, or schedule of value. For more details, see Integrate with External System tutorial. Possible values:

    locked: the item is currently locked within the ERP system, preventing modifications until unlocked. To unlock and modify the item, use the relevant PATCH endpoint to set integrationState to null. For example, for a budget, call PATCH budgets. For a contract, call PATCH contracts. For more details, see the Help documentation.

    integrated: the item has been successfully added to the ERP system.

    failed: the item encountered an error during the integration process and was not successfully added to the ERP system. For example, if a user tries to integrate contracts from an ERP system and the updates fail, the integrationState can be set to failed. Retry the sync process or analyze the issue if it continues to fail.

    null: The item has not been integrated with the ERP system. This is default value.

    For more information regarding integrations within the Cost Management system, see Integrations in Cost Management.

    Example

    Success

    Request

    curl -v 'https://developer.api.autodesk.com/cost/v1/containers/e94b9bc8-1775-4d76-9b1d-c613e120ccff/contracts' \
      -X 'POST' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '{
            "code": "GC-01",
            "name": "Site Management Staff",
            "description": "Site Management Staff",
            "companyId": "GF8XKPKWM38E",
            "companyUid": "683904a0-47ce-4146-ac2d-a3840f00e0f4",
            "type": "consultant",
            "contactId": "CED9LVTLHNXV",
            "source": "urn:adsk.service-name:us.prd:customer:1234",
            "additionalContacts": {
              "sovContactId": "CED9LVTLHNXV",
              "signatoryId": "CED9LVTLHNXV",
              "rfqRecipientId": "CED9LVTLHNXV",
              "scoSignatoryId": "CED9LVTLHNXV",
              "costPaymentApplicationContactId": "CED9LVTLHNXV"
            },
            "signedBy": "CED9LVTLHNXV",
            "ownerId": "CED9LVTLHNXV",
            "mainContractId": "",
            "completedWorkRetentionPercent": "50",
            "materialsRetentionPercent": "50",
            "retentionCap": "50",
            "status": "open",
            "subStatus": "open",
            "currency": "USD",
            "exchangeRate": "1000.0000",
            "forecastExchanageRate": "1000.0000",
            "forecastExchangeRateUpdatedAt": "2019-09-06T01:24:22.678Z",
            "externalId": "10010-99-AB",
            "externalSystem": "Sage300",
            "externalMessage": "Success.",
            "lastSyncTime": "2019-09-05T01:00:12.989Z",
            "integrationState": "locked"
          }'
    
    Show More

    Response

    {
      "code": "GC-01",
      "name": "Site Management Staff",
      "description": "Site Management Staff",
      "companyId": "GF8XKPKWM38E",
      "companyUid": "683904a0-47ce-4146-ac2d-a3840f00e0f4",
      "type": "consultant",
      "contactId": "CED9LVTLHNXV",
      "source": "urn:adsk.service-name:us.prd:customer:1234",
      "additionalContacts": {
        "sovContactId": "CED9LVTLHNXV",
        "signatoryId": "CED9LVTLHNXV",
        "rfqRecipientId": "CED9LVTLHNXV",
        "scoSignatoryId": "CED9LVTLHNXV",
        "costPaymentApplicationContactId": "CED9LVTLHNXV"
      },
      "signedBy": "CED9LVTLHNXV",
      "ownerId": "CED9LVTLHNXV",
      "mainContractId": "",
      "completedWorkRetentionPercent": "50",
      "materialsRetentionPercent": "50",
      "retentionCap": "50",
      "status": "open",
      "subStatus": "open",
      "currency": "USD",
      "exchangeRate": "1000.0000",
      "forecastExchanageRate": "1000.0000",
      "forecastExchangeRateUpdatedAt": "2019-09-06T01:24:22.678Z",
      "externalId": "10010-99-AB",
      "externalSystem": "Sage300",
      "externalMessage": "Success.",
      "lastSyncTime": "2019-09-05T01:00:12.989Z",
      "integrationState": "locked"
    }
    
    Show More