Skip to main content
GET
/
user
/
{id}
/
stats
Get User Stats
curl --request GET \
  --url https://api.royalti.io/user/{id}/stats \
  --header 'Authorization: Bearer <token>'
{
  "artists": 5,
  "assets": 17,
  "products": 7,
  "splits": 10,
  "Royalty_Share": 1135.2762243941013,
  "paid": 100,
  "net": 1135.2762243941013,
  "gross": 1135.2762243941013,
  "due": 1035.2762243941013
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/user//stats Description:
The /user/{userId}/stats endpoint allows users to retrieve statistical information related to a specific user identified by their unique userId.
Method:
GET
Path Parameter:
ParameterTypeDescription
userIdstringThe unique identifier of the user.
See Sample Response below

Code Examples

const response = await fetch('https://api.royalti.io/user/example-id/stats', {
  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

User ID

Response

Success (NEW) - get user stats

artists
integer

Number of artists associated with the user

assets
integer

Number of assets associated with the user

products
integer

Number of products associated with the user

splits
integer

Number of splits/shares assigned to the user

Royalty_Share
number

Total royalty share amount

paid
number

Amount already paid to the user

net
number

Net earnings

gross
number

Gross earnings

due
number

Amount currently due to the user