---
title: "Get Agreement Hierarchy"
method: GET
path: "/analyze/v1/agreements/{id}/hierarchy"
tags: ["Analyze Agreements"]
---

# Get Agreement Hierarchy

`GET /analyze/v1/agreements/{id}/hierarchy`

## Request

- Base URL: `https://api.linksquares.com/api`
- URL: `https://api.linksquares.com/api/analyze/v1/agreements/{id}/hierarchy`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/linksquares/apis/linksquares-api/docs/analyze/v1/agreements/:id/hierarchy/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a JSON-formatted hierarchy of an agreement, detailing parent and child agreements with IDs, names, effective dates, and upload dates.

## Path parameters

- `id` string, required

## Response `200`

successful

- object
  - `name` string, required: Agreement Name (Parent)
  - `effective_date` string, nullable, required: Effective Date of Agreement
  - `agreement_id` string, uuid, required: UUID of the Agreement
  - `upload_date` string, required: Upload Date of the Agreement
  - `children` object[], nullable, required
    - `name` string: Name of the Child Agreement
    - `effective_date` string, nullable: Effective Date of Child Agreement
    - `agreement_id` string, uuid: UUID of the Child Agreement
    - `upload_date` string: Upload Date of the Child Agreement
    - `children` object[], nullable
      - `name` string: Name of the Grandchild Agreement
      - `effective_date` string, nullable: Effective Date of Grandchild Agreement
      - `agreement_id` string, uuid: UUID of the Grandchild Agreement
      - `upload_date` string: Upload Date of the Grandchild Agreement

## Other responses

- `403`: inactive user
- `404`: No record found for id
- `422`: invalid id format

---

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