Skip to main content
GET
/
user
/
{id}
/
monthly
Get User Monthly Stats
curl --request GET \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/user/{id}/monthly \
  --header 'Authorization: Bearer <token>'
{
"data": [
{
"Month": "2025-08-01",
"Count": 903,
"Royalty": 21.14823258699999,
"Royalty_Share": 6.344469776099996
},
{
"Month": "2025-07-01",
"Count": 4997,
"Royalty": 36.20617996492299,
"Royalty_Share": 10.861853989476888
}
],
"meta": {
"dateRange": {
"startDate": "2025-01-01",
"endDate": "2025-08-09"
},
"totalMonths": 8,
"period": "ytd",
"allTimeData": false,
"filtersUsed": {
"period": true,
"customDates": false,
"defaultApplied": false
}
}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/user/example-id/monthly', {
  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

Query Parameters

period
enum<string>

Period preset for filtering monthly data

Available options:
all,
last12months,
ytd,
custom
Example:

"ytd"

startDate
string<date>

Start date for filtering monthly data (YYYY-MM-DD format)

Example:

"2024-01-01"

endDate
string<date>

End date for filtering monthly data (YYYY-MM-DD format)

Example:

"2024-12-31"

Response

success

data
object[]
meta
object