Request

Response

    Preferred Contacts
    GET

    preferred-contacts

    Retrieves a list of contacts that the requesting user’s office has marked as preferred. Preferred contacts are prioritized in bidder recommendation results.

    Resource Information

    Method and URI
    GET
    https://developer.api.autodesk.com/construction/buildingconnected/v2/preferred-contacts
    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.
    * Required

    Request

    Query String Parameters

    cursorState
    string
    An opaque cursor token that identifies where the next page of paginated results should start. It’s 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 that the endpoint may return per page.

    Note that a returned page may contain fewer records than the limit under either of these conditions:

    • There are fewer records found than the limit value.
    • The last page of a set is returned.

    Default value: 100

    filter[officeId]
    string
    The ID of the office from your company to retrieve preferred contacts for. This is the office that has set the preference.
    filter[bidderOfficeId]
    string
    The ID of the office from the bidder’s company to retrieve preferred contacts for. This is the office that the preferred contacts are part of.
    projectId
    string
    Using this parameter allows retrieving the preferred contacts of an office that is not part of your company, as long as you are a member of the project whose owning office is the office specified with the filter[officeId] parameter. The filter[officeId] parameter must be present when this parameter is present.

    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 of a response.
    limit
    int
    The maximum number of records to return per page.

    Note that a returned page may contain fewer records than the limit under either of these conditions:

    • There are fewer records found than the limit value.
    • The last or only page is returned.
    cursorState
    string
    An opaque cursor token that identifies where the next page of paginated results should start. It’s 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.

    nextUrl
    string
    The URL path that returns the next page of data.
    results
    array: object
    List of preferred contacts.
    id
    string
    The unique ID of the preferred contact.

    Max length: 24

    officeId
    string
    The ID of the office for which the user is preferred.

    Max length: 24

    bidderCompany
    object
    The preferred company details.
    id
    string
    The unique ID of the preferred company.

    Max length: 24

    name
    string
    The name of the preferred company.
    avatarImageUrl
    string
    The URL of the preferred company’s avatar.
    bidderOffice
    object
    The bidder office details.
    id
    string
    The unique ID of the bidder office.

    Max length: 24

    name
    string
    The name of the bidder office.
    location
    object
    The structured address details for a location.
    country
    string
    The country code of the location.
    state
    string
    The state, territory, or province code of the location.
    streetName
    string
    The street name of the location. This can be combined with streetNumber to get the street address.
    streetNumber
    string
    The numeric value of the street address. This can be combined with streetName to get the street address.
    suite
    string
    The suite number or second address line of the location.
    city
    string
    The city of the location.
    zip
    string
    The ZIP or Postal code of the location.
    complete
    string
    The complete human-readable address of the location.
    coords
    object
    The latitude and longitude coordinates of the location.
    lat
    number
    The geographic latitude of the location.
    lng
    number
    The geographic longitude of the location.
    precisionLevel
    int
    The precision with which location identifies an actual place, on a scale of 0 to 10.
    • 0 is the least precise indication, such as mapping to a country.
    • 10 is the most precise indication, such as mapping to a street number or intersection.

    This value is initially null, and is populated only after a location change.

    fax
    string
    The fax number of the office.
    phoneNumber
    string
    The phone number of the bidder office.
    user
    object
    Information for a given user on BuildingConnected.
    id
    string
    The unique BuildingConnected ID of this user.

    Max length: 24

    firstName
    string
    The user’s first name.
    lastName
    string
    The user’s last name.
    email
    string
    The user’s email address.
    avatarImageUrl
    string
    The cached imgix url for the avatar image of the user.
    createdBy
    string
    The ID of the user who created the preference.

    Max length: 24

    createdAt
    datetime: ISO 8601
    The date and time that the preference was created, in ISO 8601 format.

    Example

    OK

    Request

    curl -v 'https://developer.api.autodesk.com/construction/buildingconnected/v2/preferred-contacts' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
    

    Response

    {
      "pagination": {
        "limit": 100,
        "cursorState": "eyJsaW1pdCI6MjUsIm9mZnNldCI6MjV9",
        "nextUrl": "https://developer.api.autodesk.com/construction/buildingconnected/v2/projects?cursorState=eyJsaW1pdCI6MjUsIm9mZnNldCI6MjV9"
      },
      "results": [
        {
          "id": "5c0dd127b319f408fa90b3bc",
          "officeId": "5c0dd127b319f408fa90b3bc",
          "bidderCompany": {
            "id": "5c0dd127b319f408fa90b3bd",
            "name": "ABC Construction",
            "avatarImageUrl": "https://example.com/avatar.jpg"
          },
          "bidderOffice": {
            "id": "5c0dd127b319f408fa90b3bc",
            "name": "New York Office",
            "location": {
              "country": "US",
              "state": "CA",
              "streetName": "California St.",
              "streetNumber": "600",
              "suite": "6th Floor",
              "city": "San Francisco",
              "zip": "94108",
              "complete": "600 California St., 6th Floor, San Francisco, CA 94108",
              "coords": {
                "lat": -122.4069826,
                "lng": 37.7929546
              },
              "precisionLevel": 10
            },
            "fax": "555-555-5556",
            "phoneNumber": "555-555-5555"
          },
          "user": {
            "id": "5d8104b87e392d56e1e4b4ca",
            "firstName": "First",
            "lastName": "Last",
            "email": "email@example.com",
            "avatarImageUrl": "https://www.example.com/"
          },
          "createdBy": "5c0dd127b319f408fa90b3bc",
          "createdAt": "2020-01-13T17:20:29.492Z"
        }
      ]
    }
    
    Show More