Inferred Connections

Get Coworker Inferred Connections

Changed on
⚠️ This endpoint is currently in BETA

Returns inferred connections based on shared work history, grouped by the target person, strongest first.

A connection is the belief that a source (a person in your Affinity data, with an id, whom you know) might know a target (a person not in your Affinity data, described only, whom you want to know), because the two had overlapping employment at a shared company.

The same target can be reachable through several people you know. Connections are grouped by target: each item in data is one target together with the connections to them. Within a target, connections are ordered by confidence descending; targets are ordered by their strongest connection, strongest first.

Each target carries the company they work at today in target.currentCompany: the company at which they are a potential contact now, which is not necessarily the shared employer behind the connection.

The filter parameter is required and must contain at least one filter. The only currently supported filter is target.currentCompany.id, which narrows the targets to a single such company.

Filters

Property NameTypeDescriptionAllowed OperatorsExamples
target.currentCompany.idintegerThe id of the company the target person currently works at. Must reference a single company; filtering on more than one (e.g. target.currentCompany.id = 1 | target.currentCompany.id = 2) returns a 400.=target.currentCompany.id = 123
get/v2/inferred-connections/coworkers

Request

  • Base URL
    https://api.affinity.co
  • URL
    https://api.affinity.co/v2/inferred-connections/coworkers
  • Auth
    HTTP bearer

Query parameters

filterstring required

Filter options. At least one filter is required; the only currently supported filter is target.currentCompany.id, which narrows the targets to the one company the target person currently works at. Filtering on more than one company returns a 400.

cursorstring

Cursor for the next or previous page

limitinteger

Number of targets to include in the page

totalCountboolean

Include total count of the collection in the pagination response

Response

OK

Example response

{
  "data": [
    {
      "target": {
        "firstName": "Bob",
        "lastName": "Lee",
        "title": "CEO",
        "linkedinUrl": "https://www.linkedin.com/in/boblee",
        "currentCompany": {
          "id": 123,
          "name": "Acme",
          "domain": "acme.com"
        }
      },
      "connections": [
        {
          "confidence": 0.82,
          "source": {
            "id": 42,
            "firstName": "Alice",
            "lastName": "Roe",
            "primaryEmailAddress": "alice@northpointvc.com"
          },
          "inference": {
            "sharedEmployer": {
              "id": 555,
              "name": "Globex",
              "domain": "globex.com"
            },
            "overlapStartDate": "2018-03-01",
            "overlapEndDate": "2020-11-30"
          }
        }
      ]
    }
  ],
  "pagination": {
    "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
    "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
  }
}

Changes

    • breaking

      removed the required property /// from the response with the status

    • info

      added authentication authorization bad-request conflict method-not-allowed not-acceptable not-found not-implemented rate-limit server timeout unprocessable-entity unsupported-media-type validation discriminator mapping keys to the / response property for the response status

    • info

      added bad-request validation discriminator mapping keys to the / response property for the response status

    • info

      added the required property //// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status