Skip to main content
GET
/
royalty
/
saletype
Get Royalties grouped by sale type
curl --request GET \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/royalty/saletype \
  --header 'Authorization: Bearer <token>'
[
  {
    "saleType": "Stream",
    "totalRoyalty": 4856.75,
    "totalCount": 485000,
    "percentage": "78.7%"
  },
  {
    "saleType": "Download",
    "totalRoyalty": 1156.5,
    "totalCount": 11565,
    "percentage": "18.7%"
  },
  {
    "saleType": "Physical",
    "totalRoyalty": 156.25,
    "totalCount": 312,
    "percentage": "2.5%"
  }
]
Get Royalties grouped by sale type This endpoint retrieves royalty data grouped by sale type (streams, downloads, etc.), showing revenue breakdown by transaction type.

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Query Parameters

ParameterTypeInRequiredDescription
artistsstringqueryFilters the data by artist. Comma-separated list of artist IDs
userstringqueryFilters the data by user. Specifies a user ID
countrystringqueryFilter the data by country. Comma-separated values
dspstringqueryFilters by DSP (Digital Service Provider). Comma-separated values
startstringqueryStart date of the period (YYYY-MM-DD format)
endstringqueryEnd date of the period (YYYY-MM-DD format)
aggregatorstringqueryFilters by aggregator. Comma-separated values
upcstringqueryFilters by UPC (Universal Product Code). Comma-separated values
isrcstringqueryFilters by ISRC (International Standard Recording Code). Comma-separated values
periodFilterTypestringqueryFilters by either ‘accounting’ or ‘sale’ period

Responses

✅ 200 - Successfully retrieved royalty data by sale type

⚠️ 401 - Unauthorized

❌ 500 - Internal Server Error

Tags

Royalties

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

country
string

Filter the data by country. Comma-separated values

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)

aggregator
string

Filters by aggregator. Comma-separated values

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 sale type

saleType
string

Type of sale (e.g., Stream, Download, Physical)

totalRoyalty
number

Total royalty for this sale type

totalCount
integer

Total count for this sale type

percentage
string

Percentage of total royalties

I