Skip to main content
GET
/
royalty
/
country
Get Royalties grouped by country
curl --request GET \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/royalty/country \
  --header 'Authorization: Bearer <token>'
[
  {
    "country": "United States",
    "countryCode": "US",
    "totalRoyalty": 3256.75,
    "totalCount": 325000,
    "percentage": "52.8%"
  },
  {
    "country": "United Kingdom",
    "countryCode": "GB",
    "totalRoyalty": 1456.5,
    "totalCount": 146000,
    "percentage": "23.6%"
  },
  {
    "country": "Canada",
    "countryCode": "CA",
    "totalRoyalty": 876.25,
    "totalCount": 87000,
    "percentage": "14.2%"
  }
]
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/royalty/country', {
  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}"

Query Parameters

artists
string

Filters the data by artist. Comma-separated list of artist IDs

user
string<uuid>

Filters the data by user. Specifies a user ID

dsp
string

Filters by DSP (Digital Service Provider). Comma-separated values

start
string<date>

Start date of the period (YYYY-MM-DD format)

end
string<date>

End date of the period (YYYY-MM-DD format)

type
string

Filters by sale type. Comma-separated values

aggregator
string

Filters by aggregator. Comma-separated values

table_name
string

Filters by data source table name. Comma-separated values for multiple tables

upc
string

Filters by UPC (Universal Product Code). Comma-separated values

isrc
string

Filters by ISRC (International Standard Recording Code). Comma-separated values

periodFilterType
enum<string>

Filters by either 'accounting' or 'sale' period

Available options:
accounting,
sale

Response

Successfully retrieved royalty data by country

country
string

Country name

countryCode
string

ISO country code

totalRoyalty
number

Total royalty from this country

totalCount
integer

Total plays/sales from this country

percentage
string

Percentage of total royalties