Skip to main content
GET
/
product
/
summary
Get 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
    }
  }
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/product/summary Description: The /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:
  • Admin/Owner: See summary for all products in the tenant
  • Other Users: See summary only for products associated with their artists
Method: GET Response Data:
FieldTypeDescription
totalintegerTotal number of products
byStatusobjectCount of products by status (Live, Taken Down, Scheduled, Pending, Error)
byFormatobjectCount of products by format (Single, EP, Album, LP)
byTypeobjectCount of products by type (Audio, Video, Ringtone)
revenue.totalCountintegerTotal count/streams from ProductStats
revenue.totalRoyaltynumberTotal royalty amount from ProductStats

Code Examples

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

Response

Success

message
string
Example:

"success"

summary
object