Skip to main content
GET
/
sources
/
{id}
Get Tenant Source by RoyaltySource ID
curl --request GET \
  --url https://api.royalti.io/sources/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "ts-1",
  "settings": {},
  "replacements": {},
  "royaltySource": {
    "id": "src-1",
    "name": "Spotify",
    "label": "Spotify",
    "type": "DSP",
    "format": "csv",
    "public": true
  }
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Required Permissions

  • sources:read

Important: ID Parameter

The id parameter represents the RoyaltySource ID, not the TenantSource association ID. This endpoint finds the tenant’s source association WHERE RoyaltySourceId = id AND TenantId = authenticated_tenant. Since the composite key is (TenantId, RoyaltySourceId), this uniquely identifies the association.

Business Rules

  • Returns only the authenticated tenant’s association
  • Only shows active sources (isActive=true in RoyaltySource)

Code Examples

const response = await fetch('https://api.royalti.io/sources/example-id', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${token}`,
  },
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string
required

RoyaltySource ID (not TenantSource ID)

Example:

"src-1"

Response

Tenant source details

Association between a tenant and a royalty source. Note: The composite key is (TenantId, RoyaltySourceId).

TenantId
integer

Tenant ID (automatically set from authenticated user)

Example:

1

RoyaltySourceId
string

Royalty source ID

Example:

"src-1"

isActive
boolean
default:true

Whether this source association is active for the tenant

Example:

true

settings
object

Tenant-specific settings for this source

Example:
{}
replacements
object

Tenant-specific field replacements/mappings

Example:
{}
royaltySource
object