Request

Response

    Retrieves flags for many companies. Flags
    GET

    flags

    Retrieves a list of risk flags for subcontractor companies.

    Use this endpoint to get flags that general contractors have created to capture risks or concerns related to qualifications, bids, or ongoing projects. You can filter results by company, type, priority, state, or date range. You can also include the state history of each flag.

    Resource Information

    Method and URI
    GET
    https://developer.api.autodesk.com/construction/tradetapp/v2/flags
    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.
    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.

    * Required

    Request

    Query String Parameters

    cursorState
    string
    An opaque cursor token that identifies where the next page of paginated results should start. It is returned in each paginated response so that it can be provided in the next request to continue paginated results. If a paginated response contains no cursorState value, there are no further pages to return. Omit this parameter to initiate a paginated request or to restart pagination.
    limit
    int
    The maximum number of records to return per page. A page may contain fewer records than the limit if fewer records exist or if the last page is returned. Default: 20. Maximum: 100.
    sort
    string
    A comma-separated list of fields to sort by. Supported fields are name, type, priority, eventDate, createdAt, and updatedAt. Sorting by priority in descending order returns results in the order HIGH, MEDIUM, LOW. Sorting by type follows alphabetical order.

    For example: eventDate desc,name asc.

    include
    string
    A sub-resource to include in the response. Currently only stateHistory is supported. If include=stateHistory is provided, the response includes a history of the flag states. If not included, the state history is omitted.
    filter[company.id]
    string
    The subcontractor company’s BC ID.
    filter[type]
    enum:string
    The type of flag or proposed flag. Possible values: GENERAL, INSURANCE, SAFETY, FINANCIAL, PROJECT, COMMUNICATION, OTHER
    filter[priority]
    enum:string
    The priority of the flag or proposed flag. Possible values: HIGH, MEDIUM, LOW
    filter[eventDate]
    string
    The required date or date range of the event for which the flag or proposed flag was created.

    Use the ISO 8601 date format YYYY-MM-DD for a single date, or YYYY-MM-DD..YYYY-MM-DD for a range.

    Ranges can be open-ended: YYYY-MM-DD.. or ..YYYY-MM-DD.

    The lower bound is inclusive; the upper bound is exclusive.

    filter[triggerAlert]
    boolean
    Indicates whether the flag should trigger an alert modal when the subcontractor profile is opened in TradeTapp.

    true — The flag triggers an alert.

    false — The flag does not trigger an alert.

    filter[state]
    enum:string
    The state of the flag. Possible values: ACTIVE, RESOLVED
    filter[company.uniqueId]
    string
    The general contractor’s internal unique reference ID for the subcontractor company. This ID may be populated from an external system such as an ERP or CRM, or entered manually in TradeTapp.
    filter[company.taxId]
    string
    The tax ID of the subcontractor’s company. If hyphens are present in the tax ID, they are removed before filtering because tax IDs are stored without hyphens.
    filter[company.taxType]
    enum:string
    The tax ID type of the subcontractor’s company. Use this field with filter[company.taxId] to uniquely identify the company. Possible values: US_FEIN, US_SSN, CAN_BN, OTHER
    filter[createdAt]
    string
    The date and time range when the flags were originally created. Use the ISO 8601 format YYYY-MM-DDThh:mm:ss.SSSZ for a single timestamp, or YYYY-MM-DDThh:mm:ss.SSSZ..YYYY-MM-DDThh:mm:ss.SSSZ for a range.

    Ranges can be open-ended: YYYY-MM-DDThh:mm:ss.SSSZ.. or ..YYYY-MM-DDThh:mm:ss.SSSZ.

    The lower bound is inclusive; the upper bound is exclusive.

    filter[updatedAt]
    string
    The date and time range when the flags were last updated. Use the ISO 8601 format YYYY-MM-DDThh:mm:ss.SSSZ for a single timestamp, or YYYY-MM-DDThh:mm:ss.SSSZ..YYYY-MM-DDThh:mm:ss.SSSZ for a range.

    Ranges can be open-ended: YYYY-MM-DDThh:mm:ss.SSSZ.. or ..YYYY-MM-DDThh:mm:ss.SSSZ.

    The lower bound is inclusive; the upper bound is exclusive.

    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.
    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
    pagination
    object
    The pagination details for the top-level list of results in the response.
    limit
    int
    The maximum number of records per page.

    Default: 20. Maximum: 100.

    A page may contain fewer records than the limit if fewer records exist or if the last page is returned.

    cursorState
    string
    An opaque token for cursor-based pagination.

    Use the value returned in a response to request the next page of results.

    Omit this parameter to start a new paginated request or restart pagination.

    If a response contains no cursorState, there are no further pages to return.

    totalResults
    int
    The total number of records matching the query across all pages.
    nextUrl
    string
    The link to the next page of data. If not included, the current page is the last page of results. A page may be empty but still contain a nextUrl. Stop paging only when nextUrl is no longer returned.
    previousUrl
    string
    The link to the previous page of data. If not included, the current page is the first page of results.
    results
    array: object
    The list of flags returned for one or more subcontractor companies.
    stateHistory
    all of
    Flag state history
    object
    results
    array: object
    The list of state changes for the flag. States are returned in chronological order, with the most recent state first.
    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
    all of
    User
    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.
    1
    The user who created this flag state.
    pagination
    object
    The pagination details for the top-level list of results in the response.
    limit
    int
    The maximum number of records per page.

    Default: 20. Maximum: 100.

    A page may contain fewer records than the limit if fewer records exist or if the last page is returned.

    cursorState
    string
    An opaque token for cursor-based pagination.

    Use the value returned in a response to request the next page of results.

    Omit this parameter to start a new paginated request or restart pagination.

    If a response contains no cursorState, there are no further pages to return.

    totalResults
    int
    The total number of records matching the query across all pages.
    nextUrl
    string
    The link to the next page of data. If not included, the current page is the last page of results. A page may be empty but still contain a nextUrl. Stop paging only when nextUrl is no longer returned.
    previousUrl
    string
    The link to the previous page of data. If not included, the current page is the first page of results.
    1
    object
    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?sort=eventDate desc,name asc&include=stateHistory&filter[company.id]=59d2b8660675250927442cbf&filter[type]=GENERAL&filter[priority]=HIGH&filter[eventDate]=2023-05-01T06:00:00.000Z..&filter[triggerAlert]=true&filter[state]=ACTIVE&filter[company.uniqueId]=98h2fbd84k9s322ch&filter[company.taxId]=123456789&filter[company.taxType]=US_FEIN&filter[createdAt]=2023-05-01T06:00:00.000Z..&filter[updatedAt]=2023-05-01T06:00:00.000Z..' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
    

    Response

    {
      "pagination": {
        "limit": 10,
        "cursorState": "cD0xMTA4Ng==",
        "totalResults": 120,
        "nextUrl": "",
        "previousUrl": ""
      },
      "results": [
        {
          "stateHistory": {
            "results": [
              {
                "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"
                }
              }
            ],
            "pagination": {
              "limit": 10,
              "cursorState": "cD0xMTA4Ng==",
              "totalResults": 120,
              "nextUrl": "",
              "previousUrl": ""
            }
          },
          "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