> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Related Customer Profiles

> Retrieve customer profiles related to a given customer, based on shared tags, location, or other affinity signals.

# Get Related Customer Profiles

Returns a list of customer profiles that are related to the specified customer. Related profiles are surfaced at the bottom of a customer's directory profile card to encourage discovery and connections within the community.

## Authentication

Requires a valid customer bearer token.

## Path Parameters

<ParamField path="coworkerId" type="number" required>
  The numeric identifier of the customer whose related profiles you want to retrieve. Obtain this from `GET /api/public/coworkers/published`
  (`[].Id`).
</ParamField>

## Query Parameters

<ParamField query="_shape" type="string">
  Comma-separated list of field paths to include in the response. When provided, only the
  specified fields are returned — useful for reducing payload size. Supports nested paths
  using dot notation.
</ParamField>

## Response

Returns an object containing related customer profiles and community threads for the specified customer.

<ResponseField name="RelatedProfiles" type="Coworker[]">
  Array of customer profiles related to the specified customer. May be empty if no related profiles are found.
</ResponseField>

<ResponseField name="Threads" type="CommunityThread[]">
  Array of community threads associated with the specified customer.
</ResponseField>

### Coworker Fields (within `RelatedProfiles[]`)

<ResponseField name="RelatedProfiles[].Id" type="number">
  Unique identifier for the related customer profile.
</ResponseField>

<ResponseField name="RelatedProfiles[].FullName" type="string">
  Display name of the related customer.
</ResponseField>

<ResponseField name="RelatedProfiles[].AvatarUrl" type="string">
  URL to the related customer's avatar image.
</ResponseField>

<ResponseField name="RelatedProfiles[].Position" type="string | null">
  Job title of the related customer.
</ResponseField>

<ResponseField name="RelatedProfiles[].CompanyName" type="string">
  Company name of the related customer.
</ResponseField>

<ResponseField name="RelatedProfiles[].ProfileTagsList" type="array">
  Tags shared between the source customer and the related customer.
</ResponseField>

## Example Response

```json theme={null}
{
  "RelatedProfiles": [
    {
      "Id": 202,
      "FullName": "Carlos Ruiz",
      "AvatarUrl": "https://nexudushq.spaces.nexudus.com/media/coworker/202/avatar",
      "GuessedFirstName": "Carlos",
      "Position": "UX Researcher",
      "CompanyName": "Ruiz UX Studio",
      "ProfileTagsList": ["UX", "Research"]
    }
  ],
  "Threads": []
}
```

## TypeScript Integration

```typescript theme={null}
import endpoints from '@/api/endpoints'
import { Coworker } from '@/types/spaces/Coworker'
import { CommunityThread } from '@/types/spaces/CommunityThread'
import { useData } from '@/api/fetchData'

const url = endpoints.coworkers.directory.related(coworkerId)
// => '/api/public/coworkers/published/101/related'

const { resource: related } = useData<{ RelatedProfiles: Coworker[]; Threads: CommunityThread[] }>(httpClient, url)
```

## Usage in Portal

| Context                                             | Source file                                                                   |
| --------------------------------------------------- | ----------------------------------------------------------------------------- |
| Related profiles section in directory profile modal | `src/views/community/directory/components/CoworkersDirectoryProfileModal.tsx` |

## Error Responses

<ResponseField name="401 Unauthorized" type="error">
  The bearer token is missing, expired, or invalid.
</ResponseField>

<ResponseField name="404 Not Found" type="error">
  No published profile with the given `coworkerId` was found.
</ResponseField>

## Related Endpoints

| Method | Endpoint                                       | Description                                  |
| ------ | ---------------------------------------------- | -------------------------------------------- |
| `GET`  | `/api/public/coworkers/published/{coworkerId}` | Get the full profile for this customer       |
| `GET`  | `/api/public/coworkers/published`              | List all published profiles in the directory |
