Skip to main content
GET
/
accounting
/
{id}
/
stats
Get User Accounting Statistics
curl --request GET \
  --url https://api.royalti.io/accounting/{id}/stats \
  --header 'Authorization: Bearer <token>'
{
"Royalty_Share": 1135.28,
"paid": 100,
"due": 1035.28
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Get User Accounting Statistics Retrieve detailed accounting statistics for a specific user, including royalty shares, amounts paid and due. Optionally includes detailed royalty summary data. Method: GET Path Parameters:
ParameterTypeDescription
idstringThe TenantUser ID
Query Parameters:
ParameterTypeDescription
includestringInclude additional data (e.g., ‘royalty’ for detailed royalty summary)
forceRefreshbooleanForce recalculation even if cached data exists

Code Examples

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

TenantUser ID

Query Parameters

include
enum<string>

Include additional data (use 'royalty' for detailed royalty breakdown)

Available options:
royalty
forceRefresh
boolean
default:false

Force recalculation even if cached data exists

Response

User accounting statistics retrieved successfully

Royalty_Share
number<float>

Total royalty share amount for this user

Example:

1135.28

paid
number<float>

Amount already paid to the user

Example:

100

due
number<float>

Amount currently due to the user

Example:

1035.28

royaltySummary
object

Detailed royalty breakdown (included when include=royalty)

metadata
object

Calculation metadata from enhanced accounting calculator