curl --request GET \
--url https://api.royalti.io/product/summary \
--header 'Authorization: Bearer <token>'{
"message": "success",
"summary": {
"total": 150,
"byStatus": {
"Live": 120,
"Taken Down": 15,
"Scheduled": 10,
"Pending": 3,
"Error": 2
},
"byFormat": {
"Single": 80,
"EP": 45,
"Album": 20,
"LP": 5
},
"byType": {
"Audio": 140,
"Video": 8,
"Ringtone": 2
},
"revenue": {
"totalCount": 5000000,
"totalRoyalty": 45000.5
}
}
}/product/summary
curl --request GET \
--url https://api.royalti.io/product/summary \
--header 'Authorization: Bearer <token>'{
"message": "success",
"summary": {
"total": 150,
"byStatus": {
"Live": 120,
"Taken Down": 15,
"Scheduled": 10,
"Pending": 3,
"Error": 2
},
"byFormat": {
"Single": 80,
"EP": 45,
"Album": 20,
"LP": 5
},
"byType": {
"Audio": 140,
"Video": 8,
"Ringtone": 2
},
"revenue": {
"totalCount": 5000000,
"totalRoyalty": 45000.5
}
}
}/product/summary endpoint retrieves aggregated statistics for all products in a tenant, including counts by status, format, and type, plus revenue data from ProductStats.
Role-Based Access:
GET
Response Data:
| Field | Type | Description |
|---|---|---|
| total | integer | Total number of products |
| byStatus | object | Count of products by status (Live, Taken Down, Scheduled, Pending, Error) |
| byFormat | object | Count of products by format (Single, EP, Album, LP) |
| byType | object | Count of products by type (Audio, Video, Ringtone) |
| revenue.totalCount | integer | Total count/streams from ProductStats |
| revenue.totalRoyalty | number | Total royalty amount from ProductStats |
const response = await fetch('https://api.royalti.io/product/summary', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);