Request

Response

    Updates a specific flag. Flags
    PATCH

    flags/{flagId}

    Update a specific flag.

    Resource Information

    Method and URI
    PATCH
    https://developer.api.autodesk.com/construction/tradetapp/v2/flags/{flagId}
    Authentication Context
    User context required
    Required OAuth Scopes
    data:write
    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.
    general-contractor-company-id
    string
    This header is required only for users who belong to a parent enterprise company in TradeTapp. It specifies the BuildingConnected company ID of the child general contractor company for which the request should be performed. Otherwise, it is impossible to know for which child general contractor company the user intends to perform the request.

    For users who do not belong to a parent enterprise company, this header is not required and should be omitted. If provided for such users, the provided value must match the user’s current general contractor company, otherwise the request will be rejected with a 400 Bad Request error.

    Content-Type*
    string
    Must be application/json
    * Required

    Request

    URI Parameters

    flagId
    int
    The unique identifier of the flag.

    Request

    Body Structure

    Expand all
    eventDate
    string
    The date of the event for which this flag was created in ISO-8601 full-date format (YYYY-MM-DD).
    name
    string
    The name of the flag.

    Max length: 100

    priority
    enum:string
    The priority of the flag Possible values: HIGH, MEDIUM, LOW
    summary
    string
    The summary note for this flag.

    Max length: 500

    type
    enum:string
    The type of the flag. Possible values: GENERAL, INSURANCE, SAFETY, FINANCIAL, PROJECT, COMMUNICATION, OTHER
    triggerAlert
    boolean
    Indicates whether this flag should display an alert when opening the invite associated with this flag in the TradeTapp app.
    state
    object
    The properties to update the state of a flag.
    value*
    enum:string
    The state of the flag. Possible values: RESOLVED, ACTIVE
    summary
    string
    The summary of the state of the flag. If the flag is in the “resolved” state, then this is the resolution summary. If the flag is in the “active” state after being moved from “resolved”, then this is the re-opened summary.

    Max length: 500

    * Required

    Response

    HTTP Status Code Summary

    200
    OK
    OK
    400
    Bad Request
    The parameters of the requested operation are invalid.
    401
    Unauthorized
    The provided bearer token is not valid.
    403
    Forbidden
    The user or service represented by the bearer token does not have permission to perform this operation.
    404
    Not Found
    The requested resource could not be found.
    409
    Conflict
    Multiple objects were found when only one was expected.
    429
    Too Many Requests
    Rate limit exceeded; wait some time before retrying. The ‘Retry-After’ header might provide the amount of the time to wait.
    500
    Internal Server Error
    An unknown error occurred on the server.

    Response

    Body Structure (200)

    Expand all
    id
    int
    The internal unique ID of a flag. This is a unique identifier for the company’s flag data object.
    company
    object
    A subcontractor company.
    id
    string
    Subcontractor’s BC company ID. This is a unique identifier for the company in BuildingConnected.
    uniqueId
    string
    The internal unique ID that is set by the GC for the subcontractor. This may be populated from an external system via a subcontractor backlog upload or other.
    name
    string
    Name of the subcontractor company.
    taxId
    string
    The Tax ID of the subcontractor company with which this resource is associated. If the provided the tax ID contains hyphens, the hyphens will be removed before searching for the company associated with this tax ID since tax IDs are stored without hypens in the database.
    taxType
    enum:string
    The Tax ID type of the subcontractor company. Use this field in conjunction with the taxId to uniquely identify the subcontractor company. Possible values: US_FEIN, US_SSN, CAN_BN, OTHER
    name
    string
    Name of the flag.

    Max length: 100

    type
    enum:string
    The type of the flag. Possible values: GENERAL, INSURANCE, SAFETY, FINANCIAL, PROJECT, COMMUNICATION, OTHER
    priority
    enum:string
    The priority of the flag. Possible values: HIGH, MEDIUM, LOW
    eventDate
    string
    The date of the event for which this flag was created in ISO-8601 full-date format (YYYY-MM-DD).
    summary
    string
    The summary note for this flag.

    Max length: 500

    triggerAlert
    boolean
    Indicates whether this flag should display an alert when opening the invite associated with this flag in the TradeTapp app.
    isVisibleInPlatform
    boolean
    Indicates whether this flag is visible to TradeTapp users only, or to users who belong to the associated company in BuildingConnected but do not have a TradeTapp account.

    true: The flag is visible to BuildingConnected users in the associated company who do not have a TradeTapp account.

    false: (default) The flag is visible to TradeTapp users only.

    flagProposalId
    int
    Not currently supported.
    updatedAt
    datetime: ISO 8601
    The date / time that the flag was last updated. ISO-8601 date-time format (YYYY-MM-DDTHH:mm:ss.sssZ).
    createdAt
    datetime: ISO 8601
    The date / time that the flag was originally created. ISO-8601 date-time format (YYYY-MM-DDTHH:mm:ss.sssZ).
    createdBy
    object
    A TradeTapp user.
    id
    string
    Autodesk ID of the user. Returns null if the user has not yet linked their Autodesk account.
    email
    string
    Email of the user.
    firstName
    string
    The first name of the user.
    lastName
    string
    The last name of the user.
    state
    object
    The current state of the flag.
    createdAt
    datetime: ISO 8601
    The date and time when the flag state was created, in ISO 8601 format (YYYY-MM-DDThh:mm:ss.SSSZ).
    updatedAt
    datetime: ISO 8601
    The date and time when the flag state was last updated, in ISO 8601 format (YYYY-MM-DDThh:mm:ss.SSSZ).
    value
    enum:string
    The state of the flag. Possible values: ACTIVE, RESOLVED
    summary
    string
    A summary that describes the flag state.
    createdBy
    object
    The user who created this flag state.
    id
    string
    Autodesk ID of the user. Returns null if the user has not yet linked their Autodesk account.
    email
    string
    Email of the user.
    firstName
    string
    The first name of the user.
    lastName
    string
    The last name of the user.

    Example

    OK

    Request

    curl -v 'https://developer.api.autodesk.com/construction/tradetapp/v2/flags/1234' \
      -X 'PATCH' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '{
            "eventDate": "2017-05-21",
            "name": "Safety Concern",
            "priority": "HIGH",
            "summary": "This application has a high safety concern due to a high number of injuries.",
            "type": "GENERAL",
            "triggerAlert": true,
            "state": {
              "value": "RESOLVED",
              "summary": "This flag has been resolved because concerns have been addressed."
            }
          }'
    
    Show More

    Response

    {
      "id": 1234,
      "company": {
        "id": "59d2b8660675250927442cbf",
        "uniqueId": "98h2fbd84k9s322chr",
        "name": "Gr8 Builders",
        "taxId": 321654876,
        "taxType": "US_FEIN"
      },
      "name": "Safety Concern",
      "type": "GENERAL",
      "priority": "HIGH",
      "eventDate": "2017-05-21",
      "summary": "This application has a high safety concern due to a high number of injuries.",
      "triggerAlert": true,
      "isVisibleInPlatform": false,
      "flagProposalId": 1234,
      "updatedAt": "2017-05-04T14:11:35.100929Z",
      "createdAt": "2017-05-04T14:11:35.100929Z",
      "createdBy": {
        "id": "ABCDEF3XYZABCD1M",
        "email": "user@example.com",
        "firstName": "Jane",
        "lastName": "Doe"
      },
      "state": {
        "createdAt": "2017-05-04T14:11:35.100929Z",
        "updatedAt": "2017-05-04T14:11:35.100929Z",
        "value": "ACTIVE",
        "summary": "This flag was re-opened due to safety concerns arising once more.",
        "createdBy": {
          "id": "ABCDEF3XYZABCD1M",
          "email": "user@example.com",
          "firstName": "Jane",
          "lastName": "Doe"
        }
      }
    }
    
    Show More