Skip to main content
GET
/
product
/
{id}
/
stats
Get Product Stats
curl --request GET \
  --url https://api.royalti.io/product/{id}/stats \
  --header 'Authorization: Bearer <token>'
{
  "totalRoyalties": 5000.75,
  "totalPaid": 3000,
  "totalDue": 2000.75,
  "totalStreams": 50000,
  "totalSales": 1500,
  "assetCount": 12
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/product//stats Description:
The /product/{id}/stats endpoint retrieves statistical information for a specific product.
Method:
GET
Path Parameter:
ParameterTypeDescription
idstringThe unique identifier of the product.

Code Examples

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

Product ID

Response

Success

totalRoyalties
number
totalPaid
number
totalDue
number
totalStreams
integer
totalSales
integer
assetCount
integer