Get User Monthly Stats
User
Get User Monthly Stats
/user//monthly
GET
Get User Monthly Stats
This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
/user//monthly Description: The/user/{userId}/monthly endpoint allows users to retrieve monthly statistics like count and RoyaltyShare related to a specific user identified by their unique userId.
By default, returns the last 12 months of data. Use optional query parameters to filter specific date ranges.
Authorization:
- Own resource: any authenticated user (self-access)
- Other resources:
adminor higher
GET
Path Parameter:
Query Parameters:
Parameter Priority:
- Custom dates (startDate/endDate) override period parameter
- Period presets are used if no custom dates provided
- Defaults to last 12 months if neither provided
/user/{id}/monthly- Returns last 12 months (default)/user/{id}/monthly?period=all- Returns all historical data/user/{id}/monthly?period=ytd- Returns year-to-date data/user/{id}/monthly?period=last12months- Same as default/user/{id}/monthly?startDate=2024-01-01&endDate=2024-12-31- Custom range (ignores period)/user/{id}/monthly?startDate=2024-06-01- From June 2024 to today
See Sample Response Below
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
User ID
Query Parameters
Period preset for filtering monthly data
Available options:
all, last12months, ytd, custom Example:
"ytd"
Start date for filtering monthly data (YYYY-MM-DD format)
Example:
"2024-01-01"
End date for filtering monthly data (YYYY-MM-DD format)
Example:
"2024-12-31"