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

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

`GET /api/people/affiliations/{affiliationId}`

## 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/affiliations/{affiliationId}`
- Auth: none declared

## Path parameters

- `affiliationId` integer, required

## Response `200`

OK

- GanjoorPersonAffiliation: an approved non-family tie between two people (GanjoorRelatedPerson rows) - e.g. a minister serving a king. Kept separate from GanjoorPersonRelation (kinship) rather than folded into it: this is what lets two unrelated family trees show up as adjacent to each other (e.g. browsing the Barmakid tree surfaces a link out to the Abbasid tree via a shared minister) without treating "family tree" as its own entity to be linked - the tie is between the two people, and the tree-to-tree adjacency is just what falls out of rendering it that way.
  - `id` integer: record id
  - `person1Id` integer: first person in the tie - for a directional type (Minister, Advisor, Courtier, Patron) this is the one in the subordinate/serving role; for a symmetric one (Ally, Rival) 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 tie - for a directional type this is the one being served
  - `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
  - `affiliationType` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 99: the kind of non-family tie a GanjoorPersonAffiliation represents between two people - e.g. a minister serving a king, an advisor, a patron. Unlike PersonRelationType this has nothing to do with kinship; it's what lets two otherwise unrelated family trees show up as adjacent (e.g. "some Barmakids served the Abbasid court") without merging them into one tree. New values can be appended safely later (stored as int) as more cases come up.
  - `note` string, nullable: free-text note (e.g. sourcing/reasoning, or what the tie actually is when AffiliationType is Other)
  - `evidence` GanjoorPersonRelationEvidenceInfo[], nullable: optional couplets attesting this tie, filled when read through the service (not a mapped column; the stored rows are GanjoorPersonAffiliationEvidence)
    - `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-13** `afb4560919ee`: 1 warning
  - added the new `15.00` enum value to the `affiliationType` response property for the response status `200`
- **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-09** `285a0385568d`: 1 info
  - added the optional property `evidence` to the response with the `200` status
- **2026-10-04** `847344ecaa90`: 4 warning
  - added the new `11.00` enum value to the `affiliationType` response property for the response status `200`
  - added the new `12.00` enum value to the `affiliationType` response property for the response status `200`
  - added the new `13.00` enum value to the `affiliationType` response property for the response status `200`
  - added the new `14.00` enum value to the `affiliationType` response property for the response status `200`
- **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

[Operation history](https://skmtc.dev/ganjoor/apis/rmuseum-api/changes/api/people/affiliations/:affiliationId/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)
