---
title: "Retrieve a client hierarchy"
method: GET
path: "/clients/hierarchies/{hierarchyId}"
tags: ["Client Hierarchies"]
---

# Retrieve a client hierarchy

`GET /clients/hierarchies/{hierarchyId}`

## Request

- The document declares no server URL.
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/spott/apis/spott-webhooks/docs/clients/hierarchies/:hierarchyId/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves the client hierarchy with the specified ID. Returns the full hierarchy tree rooted at the requested hierarchy ID, including each client in the tree and its relation to its parent.

## Path parameters

- `hierarchyId` string, required

## Response `200`

Successfully retrieved client hierarchy

- ClientHierarchyDto
  - `id` string, required
  - `client` IdDto, required
    - `id` string, required
  - `children` ClientHierarchyDtoSchema0[], required
    - `client` IdDto, required
      - `id` string, required
    - `relationToParent` 'SUBSIDIARY' | 'BUSINESS_UNIT' | 'DIVISION', nullable, required
    - `children` ClientHierarchyDtoSchema0[], required

## Other responses

- `400`: Bad Request
- `404`: Client hierarchy not found
- `500`: Error response

---

[API](https://skmtc.dev/spott/apis/spott-webhooks.md) - [All operations](https://skmtc.dev/spott/apis/spott-webhooks/llms.txt) - [OpenAPI document](https://skmtc.dev/spott/apis/spott-webhooks/revisions/ad1f8c51cf0a?raw)
