Skip to main content

List Relations

Returns a paginated list of root relations for a project. Relations represent contacts (people and companies) from the CRM, extracted from contract documents and de-duplicated via merging.

Request

GET /v1/relations

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdUUIDYesThe project to list relations for
pageintegerNo1Page number (1-indexed)
perPageintegerNo20Items per page (1–100)
includeMergedstringNofalseSet to true to include merged relations for each root relation

Headers

HeaderRequiredDescription
AuthorizationYesBearer <token> — must be scoped to the requested project

Response

{
  "data": {
    "items": [
      {
        "id": "rel-1",
        "name": "Sony Music Publishing",
        "email": "royalties@sonymusic.com",
        "phone": "+1-212-833-8000",
        "department": "Royalties",
        "created_at": "2024-01-15T10:00:00Z",
        "updated_at": "2024-06-01T12:00:00Z",
        "merged": [
          { "id": "rel-2", "name": "Sony/ATV Music Publishing", "merged_at": "2024-03-01T09:00:00Z" }
        ]
      }
    ],
    "total_count": 15,
    "page": 1,
    "per_page": 20
  }
}
The merged array only appears when includeMerged=true. Only root relations (non-merged) are returned in the list.

Errors

StatusDescription
400Missing projectId or invalid query parameters
403Token is not scoped to the requested project

Example

curl "https://api.royaltyport.com/v1/relations?projectId=a1b2c3d4-...&page=1&perPage=50" \
  -H "Authorization: Bearer rp_your_token_here"

Get Relation

Returns a single relation by ID.

Request

GET /v1/relations/{relation_id}

Path Parameters

ParameterTypeRequiredDescription
relation_idstringYesThe relation ID

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdUUIDYesThe project the relation belongs to
includeMergedstringNofalseSet to true to include merged relations

Headers

HeaderRequiredDescription
AuthorizationYesBearer <token> — must be scoped to the requested project

Response

{
  "data": {
    "id": "rel-1",
    "name": "Sony Music Publishing",
    "email": "royalties@sonymusic.com",
    "phone": "+1-212-833-8000",
    "department": "Royalties",
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-06-01T12:00:00Z",
    "merged": [
      { "id": "rel-2", "name": "Sony/ATV Music Publishing", "merged_at": "2024-03-01T09:00:00Z" }
    ]
  }
}

Errors

StatusDescription
400Missing projectId
403Token is not scoped to the requested project
404Relation not found

Example

curl "https://api.royaltyport.com/v1/relations/rel-1?projectId=a1b2c3d4-..." \
  -H "Authorization: Bearer rp_your_token_here"