---
title: "Find the shortest reporting path between two contacts"
method: POST
path: "/api/v1/ackdb/contacts/{contactId}/graph/path"
tags: ["ackDB"]
---

# Find the shortest reporting path between two contacts

`POST /api/v1/ackdb/contacts/{contactId}/graph/path`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/ackdb/contacts/{contactId}/graph/path`
- Auth: HTTP bearer

## Path parameters

- `contactId` string, required

## Request body

- object
  - `targetContactId` string, required
  - `relationshipTypes` string[]
  - `maxDepth` integer
  - `asOf` string, date-time

## Response `200`

Shortest path, or found=false

- object
  - `data` AckdbContactPathResult, required
    - `found` boolean, required
    - `entityId` string, required
    - `contacts` AckdbContactGraphContact[], required
      - `contactId` string, required
      - `entityId` string, required
      - `personId` string, required
      - `name` string, nullable, required
      - `email` string, nullable, required
      - `title` string, nullable, required
      - `department` string, nullable, required
      - `avatarUrl` string, uri, nullable, required
      - `isExternal` boolean, required
      - `status` 'active' | 'former' | 'disabled', required
      - `startedAt` string, date-time, nullable, required
      - `endedAt` string, date-time, nullable, required
    - `contactRelationships` AckdbContactRelationship[], required
      - `relationshipId` string, required
      - `class` string, required
      - `entityId` string, required
      - `reportContact` AckdbContactGraphContact, required: A contact affiliation projection used as an org-chart node.
        - `contactId` string, required
        - `entityId` string, required
        - `personId` string, required
        - `name` string, nullable, required
        - `email` string, nullable, required
        - `title` string, nullable, required
        - `department` string, nullable, required
        - `avatarUrl` string, uri, nullable, required
        - `isExternal` boolean, required
        - `status` 'active' | 'former' | 'disabled', required
        - `startedAt` string, date-time, nullable, required
        - `endedAt` string, date-time, nullable, required
      - `managerContact` AckdbContactGraphContact, required: A contact affiliation projection used as an org-chart node.
        - `contactId` string, required
        - `entityId` string, required
        - `personId` string, required
        - `name` string, nullable, required
        - `email` string, nullable, required
        - `title` string, nullable, required
        - `department` string, nullable, required
        - `avatarUrl` string, uri, nullable, required
        - `isExternal` boolean, required
        - `status` 'active' | 'former' | 'disabled', required
        - `startedAt` string, date-time, nullable, required
        - `endedAt` string, date-time, nullable, required
      - `relationshipType` string, required
      - `reportToManagerLabel` string, required
      - `managerToReportLabel` string, required
      - `state` 'active' | 'ended' | 'retracted', required
      - `effectiveFrom` string, date-time, required
      - `effectiveTo` string, date-time, nullable, required
      - `retractedAt` string, date-time, nullable, required
      - `provenance` AckdbContactRelationshipProvenance, required
        - `source` string, required
        - `workflow` string
        - `externalRecordId` string
        - `evidenceUrl` string, uri
        - `observedAt` string, date-time
        - `metadata` object
      - `createdBy` string, nullable, required
      - `endedBy` string, nullable, required
      - `endedReason` string, nullable, required
      - `retractedBy` string, nullable, required
      - `retractedReason` string, nullable, required
      - `createdEventId` string, nullable, required
      - `endedEventId` string, nullable, required
      - `retractedEventId` string, nullable, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
    - `hopCount` integer, nullable, required

## Other responses

- `409`: Contacts belong to different companies

---

[API](https://skmtc.dev/floqer/apis/floqer-public-api.md) - [All operations](https://skmtc.dev/floqer/apis/floqer-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/floqer/apis/floqer-public-api/revisions/fce50dc07b20?raw)
