Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.royaltyport.com/llms.txt

Use this file to discover all available pages before exploring further.

List Entities

Returns a paginated list of root entities for a project. Entities represent companies, labels, publishers, and other organizations referenced in contracts.

Request

GET /v1/entities

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdUUIDYesThe project to list entities for
pageintegerNo1Page number (1-indexed)
perPageintegerNo20Items per page (1–100)
includeMergedstringNofalseSet to true to include merged entities for each root entity
rolesstringNoComma-separated list of contract roles to filter by. Supported values: assignee, assignor. Returns only entities that appear in at least one contract under any of the given roles.
Royaltyport de-duplicates entities by merging variants into a single root record. Use includeMerged=true to see which entity records have been merged under each root.
When roles is omitted (or empty), all entities are returned. When multiple roles are passed (e.g. roles=assignee,assignor), entities matching any of the roles are returned.

Headers

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

Response

{
  "data": [
    {
      "id": "entity-1",
      "internal_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "name": "Sony Music Entertainment",
      "email": "legal@sonymusic.com",
      "phone": "+1-212-833-8000",
      "address": "25 Madison Ave, New York, NY 10010",
      "shorthand": "SME",
      "division_of": "entity-5",
      "project_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "merged": [
        { "id": "entity-2", "name": "Sony Music" },
        { "id": "entity-3", "name": "SME" }
      ]
    }
  ]
}
The merged array only appears when includeMerged=true. Without it, only the base entity fields are returned.

Response Fields

FieldTypeDescription
idstringUnique entity identifier
internal_uuidstringStable UUID for the entity. Useful for joining against external systems that key on UUIDs, and can also be used in place of id when calling GET /v1/entities/{entity_id}.
namestringEntity name
emailstringContact email address, if available
phonestringContact phone number, if available
addressstringMailing or registered address, if available
shorthandstringAbbreviated name or alias used for the entity, if available
division_ofstringID of the parent entity if this entity is a division or subsidiary, if applicable
project_idstringThe project this entity belongs to
created_atstringISO 8601 timestamp of when the entity was created
updated_atstringISO 8601 timestamp of when the entity was last updated
mergedarrayMerged entity records (only present when includeMerged=true)
Fields such as email, phone, address, shorthand, and division_of are only included in the response when they have a value — null fields are omitted.

Errors

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

Example

curl "https://api.royaltyport.com/v1/entities?projectId=a1b2c3d4-...&includeMerged=true" \
  -H "Authorization: Bearer rp_your_token_here"
Filter to entities that appear as an assignee or assignor on at least one contract:
curl "https://api.royaltyport.com/v1/entities?projectId=a1b2c3d4-...&roles=assignee,assignor" \
  -H "Authorization: Bearer rp_your_token_here"

Get Entity

Returns a single entity by its numeric id or its internal_uuid.

Request

GET /v1/entities/{entity_id}

Path Parameters

ParameterTypeRequiredDescription
entity_idstringYesThe entity’s numeric id or its internal_uuid

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdUUIDYesThe project the entity belongs to
includeMergedstringNofalseSet to true to include merged entities

Headers

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

Response

{
  "data": {
    "id": "entity-1",
    "internal_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "name": "Sony Music Entertainment",
    "email": "legal@sonymusic.com",
    "phone": "+1-212-833-8000",
    "address": "25 Madison Ave, New York, NY 10010",
    "shorthand": "SME",
    "division_of": "entity-5",
    "project_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "merged": [
      { "id": "entity-2", "name": "Sony Music" }
    ]
  }
}

Errors

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

Example

curl "https://api.royaltyport.com/v1/entities/entity-1?projectId=a1b2c3d4-...&includeMerged=true" \
  -H "Authorization: Bearer rp_your_token_here"
Fetch by internal_uuid instead of the numeric id:
curl "https://api.royaltyport.com/v1/entities/f47ac10b-58cc-4372-a567-0e02b2c3d479?projectId=a1b2c3d4-..." \
  -H "Authorization: Bearer rp_your_token_here"