Skip to main content
GET
/
accounting
/
refresh
Refresh Accounting Data (Synchronous)
curl --request GET \
  --url https://api.royalti.io/accounting/refresh \
  --header 'Authorization: Bearer <token>'
{
  "message": "success",
  "processedCount": 125,
  "totalUsers": 125
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Refresh Accounting Data Trigger an immediate, synchronous refresh of accounting data for all users in the tenant. This operation processes all users in batches, recalculates earnings from BigQuery, and updates the UserAccounting table. Method: GET Note: This operation runs synchronously and may take some time depending on the number of users. For asynchronous processing, use POST /accounting/tenant/recalculate instead.

Code Examples

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

Accounting data refresh completed successfully

message
string
Example:

"success"

processedCount
integer

Number of users successfully processed

Example:

125

totalUsers
integer

Total number of users in the tenant

Example:

125