> For the complete documentation index, see [llms.txt](https://flapjax.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flapjax.gitbook.io/docs/rest-api/reference/people-events/get-related-records-by-external-id.md).

# Get Related Records (by External ID)

## Get related records for a person (by external ID)

> Returns the records related to a person through a specific relationship attribute. The person is identified by their external ID.\
> \
> Behaves identically to the UUID variant but uses the external ID as the person identifier. See that endpoint for full details on relationship traversal.<br>

```json
{"openapi":"3.0.3","info":{"title":"Listener API","version":"1.0.0"},"tags":[{"name":"get-person-related-by-external-id"}],"servers":[{"url":"https://{domain}/v1","variables":{"domain":{"default":"your-domain","description":"Your deployment domain"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token with the required scope for the endpoint. Pass via the `Authorization: Bearer <token>` header.\n"}},"parameters":{"PersonExternalId":{"name":"external_id","in":"path","required":true,"description":"The external identifier assigned to the person.","schema":{"type":"string"}},"AttributeKey":{"name":"attribute_key","in":"path","required":true,"description":"The key of the relationship attribute to traverse.","schema":{"type":"string"}}},"schemas":{"PaginationRequest":{"type":"object","description":"Pagination parameters for list and related endpoints. If omitted entirely, defaults are used (size 50, descending order).\n","properties":{"cursor_configuration":{"$ref":"#/components/schemas/CursorConfiguration"},"sorting_type":{"type":"string","description":"Sort order for results.","enum":["asc","desc"],"default":"desc"}}},"CursorConfiguration":{"type":"object","description":"Cursor-based pagination configuration.","properties":{"size":{"type":"integer","description":"Number of results per page.","default":50},"after_id":{"type":"string","description":"ID from a previous response. When provided, results start after this ID.\n"}}},"PaginatedResponse":{"type":"object","description":"Response envelope containing a paginated list.","properties":{"status":{"type":"string","enum":["Success"]},"data":{"type":"object","properties":{"items":{"type":"array","description":"The page of results.","items":{"type":"object"}}}}}},"ErrorResponse":{"type":"object","description":"Standard error response envelope.","properties":{"error":{"type":"string","description":"Machine-readable error type. Use this for programmatic error handling.\n","enum":["operation_failed","failed_binding_json","invalid_json","invalid_parameter","not_found","duplicate_entry","rate_limit_exceeded"]},"errorstack":{"type":"object","nullable":true,"description":"Detailed error stack (only present for server errors)."}}}}},"paths":{"/people/{external_id}/attributes/{attribute_key}/related":{"post":{"summary":"Get related records for a person (by external ID)","operationId":"getPersonRelatedByExternalId","tags":["get-person-related-by-external-id"],"description":"Returns the records related to a person through a specific relationship attribute. The person is identified by their external ID.\n\nBehaves identically to the UUID variant but uses the external ID as the person identifier. See that endpoint for full details on relationship traversal.\n","parameters":[{"$ref":"#/components/parameters/PersonExternalId"},{"$ref":"#/components/parameters/AttributeKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationRequest"}}}},"responses":{"200":{"description":"Paginated list of related records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"500":{"description":"Person or attribute not found, or internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
