---
title: "get a single kinship edge by its own id, with both sides' names resolved - used by /SuggestPersonRelationEdit/{relationId} to show what it's about"
method: GET
path: "/api/people/relations/{relationId}"
tags: ["GanjoorRelatedPerson"]
---

# get a single kinship edge by its own id, with both sides' names resolved - used by /SuggestPersonRelationEdit/{relationId} to show what it's about

`GET /api/people/relations/{relationId}`

## Request

- Base URL: `https://api.ganjoor.net` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ganjoor.net/api/people/relations/{relationId}`
- Auth: none declared

## Path parameters

- `relationId` integer, required

## Response `200`

OK

- GanjoorPersonRelation: an approved kinship edge between two people (GanjoorRelatedPerson rows) - the live/materialized counterpart of a pending suggestion, which travels as JSON on GanjoorPoemGeoDateTagCorrection's SuggestedPersonGraphJson until it's approved and turned into rows here. The graph as a whole (all rows in this table) is a general kinship graph, not a strict tree - see PersonRelationType.
  - `id` integer: record id
  - `person1Id` integer: first person in the relation - for a directional relation type (Parent, Ancestor) this is the parent/ancestor side; for a symmetric one (Sibling, Spouse) order doesn't matter
  - `person1` GanjoorRelatedPerson: a person refered by a poem
    - `id` integer: id
    - `name` string, nullable: name
    - `description` string, nullable: description
    - `wikiUrl` string, nullable: wikipedia url
    - `birthYearInLHijri` integer: birth year in lunar hijri
    - `deathYearInLHijri` integer: death year in lunar hijri
    - `validBirthDate` boolean: BirthYearInLHijri, for some poets it is only indicator of their century of birth and should not be relied as their valid birth date
    - `validDeathDate` boolean: DeathYearInLHijri, for some poets it is only indicator of their century of death and should not be relied as their valid death date
    - `birthLocationId` integer, nullable: birth location id
    - `birthLocation` GanjoorGeoLocation: Geo Locations (Cities) referred by Ganjoor Metadata
      - `id` integer: id
      - `name` string, nullable: name
      - `latitude` number, double: Latitude
      - `longitude` number, double: Longitude
      - `machineGenerated` boolean: AI generated
    - `deathLocationId` integer, nullable: death location id
    - `deathLocation` GanjoorGeoLocation: Geo Locations (Cities) referred by Ganjoor Metadata
      - `id` integer: id
      - `name` string, nullable: name
      - `latitude` number, double: Latitude
      - `longitude` number, double: Longitude
      - `machineGenerated` boolean: AI generated
    - `machineGenerated` boolean: AI generated
    - `familyTreeCaption` string, nullable: optional caption for the family tree this person is treated as the root of (e.g. "ساسانیان", "آل برمک") - purely a display label for whoever a tree is being browsed from; nothing enforces that this person actually has no recorded ancestors themselves, and most people will leave this null (only whichever person a tree is "named after" needs one set).
    - `importance` 0 | 1 | 2: how editorially prominent a GanjoorRelatedPerson is treated as - purely a display/sizing hint (see GanjoorRelatedPerson.Importance, GanjoorPersonGraphNode.Importance and peoplegraph.js's nodeRadius()), never used to filter, rank or otherwise affect query results. New values can be appended safely later (stored as int).
    - `gender` 0 | 1 | 2: a GanjoorRelatedPerson's gender - used only by the family-tree chart (familytree.js's buildLayout()) to break ties when a child has two recorded parents and both happen to have their own recorded ancestors (so neither side can be preferred on "continues a documented lineage" grounds alone): the father is preferred as the tree's spine parent, matching conventional patrilineal genealogy-chart practice, with the mother then drawn attached beside him. Never used to filter, rank or otherwise affect query results. New values can be appended safely later (stored as int).
    - `aliases` string, nullable: other names this person is known by (epithets, titles, alternative spellings), separated by the Persian comma (،) - e.g. for رستم: «تهمتن، رستم دستان، پور زال». Used by the AI tagging jobs to match a name in a poem to this person, and filled automatically when two people are merged
  - `person2Id` integer: second person in the relation - for a directional relation type (Parent, Ancestor) this is the child/descendant side
  - `person2` GanjoorRelatedPerson: a person refered by a poem
    - `id` integer: id
    - `name` string, nullable: name
    - `description` string, nullable: description
    - `wikiUrl` string, nullable: wikipedia url
    - `birthYearInLHijri` integer: birth year in lunar hijri
    - `deathYearInLHijri` integer: death year in lunar hijri
    - `validBirthDate` boolean: BirthYearInLHijri, for some poets it is only indicator of their century of birth and should not be relied as their valid birth date
    - `validDeathDate` boolean: DeathYearInLHijri, for some poets it is only indicator of their century of death and should not be relied as their valid death date
    - `birthLocationId` integer, nullable: birth location id
    - `birthLocation` GanjoorGeoLocation: Geo Locations (Cities) referred by Ganjoor Metadata
      - `id` integer: id
      - `name` string, nullable: name
      - `latitude` number, double: Latitude
      - `longitude` number, double: Longitude
      - `machineGenerated` boolean: AI generated
    - `deathLocationId` integer, nullable: death location id
    - `deathLocation` GanjoorGeoLocation: Geo Locations (Cities) referred by Ganjoor Metadata
      - `id` integer: id
      - `name` string, nullable: name
      - `latitude` number, double: Latitude
      - `longitude` number, double: Longitude
      - `machineGenerated` boolean: AI generated
    - `machineGenerated` boolean: AI generated
    - `familyTreeCaption` string, nullable: optional caption for the family tree this person is treated as the root of (e.g. "ساسانیان", "آل برمک") - purely a display label for whoever a tree is being browsed from; nothing enforces that this person actually has no recorded ancestors themselves, and most people will leave this null (only whichever person a tree is "named after" needs one set).
    - `importance` 0 | 1 | 2: how editorially prominent a GanjoorRelatedPerson is treated as - purely a display/sizing hint (see GanjoorRelatedPerson.Importance, GanjoorPersonGraphNode.Importance and peoplegraph.js's nodeRadius()), never used to filter, rank or otherwise affect query results. New values can be appended safely later (stored as int).
    - `gender` 0 | 1 | 2: a GanjoorRelatedPerson's gender - used only by the family-tree chart (familytree.js's buildLayout()) to break ties when a child has two recorded parents and both happen to have their own recorded ancestors (so neither side can be preferred on "continues a documented lineage" grounds alone): the father is preferred as the tree's spine parent, matching conventional patrilineal genealogy-chart practice, with the mother then drawn attached beside him. Never used to filter, rank or otherwise affect query results. New values can be appended safely later (stored as int).
    - `aliases` string, nullable: other names this person is known by (epithets, titles, alternative spellings), separated by the Persian comma (،) - e.g. for رستم: «تهمتن، رستم دستان، پور زال». Used by the AI tagging jobs to match a name in a poem to this person, and filled automatically when two people are merged
  - `relationType` 0 | 1 | 2 | 3: the kind of kinship edge a GanjoorPersonRelation represents between two GanjoorRelatedPerson rows. The graph is not a strict tree - siblings can be known without their parents, an ancestor can be known without the exact number of generations in between, etc. - so this is a small, deliberately open set rather than a rigid parent/child-only model.
  - `degreeHint` integer, nullable: for RelationType == Ancestor, an optional known exact degree (e.g. 2 for "grandparent", 3 for "great-grandparent") - left null when only the relative order is known, not the exact number of generations in between. Not used for other relation types.
  - `note` string, nullable: free-text note (e.g. sourcing/reasoning for this relation)
  - `evidence` GanjoorPersonRelationEvidenceInfo[], nullable: evidence couplets for this relation - filled in only by GetRelationByIdAsync (not a column; the stored rows are GanjoorPersonRelationEvidence)
    - `id` integer: evidence row id (what a RemoveEvidence suggestion refers to)
    - `poemId` integer: poem id
    - `coupletIndex` integer: couplet index inside the poem
    - `coupletText` string, nullable: couplet text snapshot
    - `masterCatId` integer: master category id (book) the poem belongs to
    - `masterCatTitle` string, nullable: master category title (filled by the server for display)
    - `inferred` boolean: true if guessed by a backfill rather than attached by a person (does not count for per-book filtering)

## Other responses

- `400`: Bad Request

## Changes

- **2026-10-10** `330e7bb195c1`: 2 info
  - added the optional property `person1/aliases` to the response with the `200` status
  - added the optional property `person2/aliases` to the response with the `200` status
- **2026-10-07** `b488605a124f`: 1 info
  - added the optional property `evidence` to the response with the `200` status
- **2026-10-03** `3812f6309404`: 4 info
  - added the optional property `person1/gender` to the response with the `200` status
  - added the optional property `person1/importance` to the response with the `200` status
  - added the optional property `person2/gender` to the response with the `200` status
  - added the optional property `person2/importance` to the response with the `200` status
- **2026-09-30** `da34ddd93067`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ganjoor/apis/rmuseum-api/changes/api/people/relations/:relationId/get.md)

---

[API](https://skmtc.dev/ganjoor/apis/rmuseum-api.md) - [All operations](https://skmtc.dev/ganjoor/apis/rmuseum-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ganjoor/apis/rmuseum-api/revisions/143b912b1085?raw)
