Skip to main content
GET
/
sources
/
admin
/
{id}
Get Royalty Source by ID (Admin)
curl --request GET \
  --url https://api.royalti.io/sources/admin/{id} \
  --header 'Authorization: Bearer <token>'
{
  "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:admin:read

Code Examples

const response = await fetch('https://api.royalti.io/sources/admin/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

Royalty source ID

Example:

"src-1"

Response

Royalty source details

id
string
Example:

"src-1"

name
string

Source name (automatically normalized to lowercase)

Example:

"spotify"

label
string

Display label for the source

Example:

"Spotify"

type
string

Source type (e.g., DSP, Publisher, Label)

Example:

"DSP"

format
string

File format (csv, excel, json, etc.)

Example:

"csv"

public
boolean

Whether this source is publicly available to all tenants

Example:

true

isActive
boolean
default:true

Whether this source is currently active

Example:

true

startDate
string<date> | null

Start date for source availability

Example:

"2020-01-01"

endDate
string<date> | null

End date for source availability

Example:

"2025-01-01"

dataQuery
object

JSONB object containing query configurations

Example:
{
"type": "bigquery",
"dataset": "royalty_data"
}
fileNameFormat
string | null

Template for expected file name format with period placeholders. Placeholders: {SALPER-FORMAT} (sale period), {ACCPER-FORMAT} (accounting period) Formats: YYYYMM, YYYY-MM, YYYY-MM-DD, MMM-YYYY, etc.

Example:

"{ORG}_Snap_{SALPER-YYYYMM}_Monthly-Sales.csv"

schema
string | null

Text representation of the file schema/structure

Example:

"artist_name,track_name,streams,revenue"

delimiter
string | null

Field delimiter for CSV files

Example:

","

tableNameFormat
string | null

Template for BigQuery table name with period placeholders (SALPER, ACCPER)

Example:

"merlin_snap_SALPER_ACCPER"

columnFormat
string | null

DSL for column semantic mappings. Defines how columns map to period types and formats. Format: ColumnName:TYPE-FORMAT;ColumnName2:TYPE-FORMAT;... Types: SALPER (sale period), ACCPER (accounting period), ISRC, UPC, CATNO, etc. Formats: YYYY-MM-DD, YYYYMM, YYYY-MM, etc.

Example:

"Start_Date:SALPER-YYYY-MM-DD;ISRC:ISRC"

headerRows
integer | null

Number of header rows to skip

Example:

1

fileInfo
object

Additional file metadata and configuration