Get Accounting Overview
curl --request GET \
--url https://api.royalti.io/accounting/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.royalti.io/accounting/overview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.royalti.io/accounting/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/accounting/overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.royalti.io/accounting/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.royalti.io/accounting/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/accounting/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "success",
"data": {
"summary": {
"totalRevenues": 50000,
"totalExpenses": 12000,
"totalPayments": 30000,
"netAmount": 8000
},
"previousPeriod": {
"totalRevenues": 45000,
"totalExpenses": 10000,
"totalPayments": 28000,
"netAmount": 7000
},
"deltas": {
"totalRevenues": {
"amount": 5000,
"percentage": 11.1
},
"totalExpenses": {
"amount": 2000,
"percentage": 20
},
"totalPayments": {
"amount": 2000,
"percentage": 7.1
},
"netAmount": {
"amount": 1000,
"percentage": 14.3
}
},
"totalDue": {
"totalGross": 80000,
"totalPaid": 30000,
"totalDue": 50000,
"userCount": 15
},
"recentActivity": {
"revenues": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"amountUSD": 123,
"amount": 123,
"currency": "<string>",
"type": "<string>",
"transactionDate": "2023-12-25"
}
],
"expenses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"amountUSD": 123,
"amount": 123,
"currency": "<string>",
"type": "<string>",
"transactionDate": "2023-12-25"
}
],
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"amountUSD": 123,
"amount": 123,
"currency": "<string>",
"transactionDate": "2023-12-25",
"TenantUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com"
}
}
]
},
"topPayees": [
{
"TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"gross": 5000,
"paid": 2000,
"due": 3000
}
],
"trends": [
{
"month": "2026-01-01",
"revenue": 8000,
"expense": 2000,
"payment": 5000,
"net": 1000
}
]
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}Accounting
Get Accounting Overview
Get Accounting Overview
GET
/
accounting
/
overview
Get Accounting Overview
curl --request GET \
--url https://api.royalti.io/accounting/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.royalti.io/accounting/overview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.royalti.io/accounting/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.royalti.io/accounting/overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.royalti.io/accounting/overview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.royalti.io/accounting/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/accounting/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "success",
"data": {
"summary": {
"totalRevenues": 50000,
"totalExpenses": 12000,
"totalPayments": 30000,
"netAmount": 8000
},
"previousPeriod": {
"totalRevenues": 45000,
"totalExpenses": 10000,
"totalPayments": 28000,
"netAmount": 7000
},
"deltas": {
"totalRevenues": {
"amount": 5000,
"percentage": 11.1
},
"totalExpenses": {
"amount": 2000,
"percentage": 20
},
"totalPayments": {
"amount": 2000,
"percentage": 7.1
},
"netAmount": {
"amount": 1000,
"percentage": 14.3
}
},
"totalDue": {
"totalGross": 80000,
"totalPaid": 30000,
"totalDue": 50000,
"userCount": 15
},
"recentActivity": {
"revenues": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"amountUSD": 123,
"amount": 123,
"currency": "<string>",
"type": "<string>",
"transactionDate": "2023-12-25"
}
],
"expenses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"amountUSD": 123,
"amount": 123,
"currency": "<string>",
"type": "<string>",
"transactionDate": "2023-12-25"
}
],
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"amountUSD": 123,
"amount": 123,
"currency": "<string>",
"transactionDate": "2023-12-25",
"TenantUser": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com"
}
}
]
},
"topPayees": [
{
"TenantUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"gross": 5000,
"paid": 2000,
"due": 3000
}
],
"trends": [
{
"month": "2026-01-01",
"revenue": 8000,
"expense": 2000,
"payment": 5000,
"net": 1000
}
]
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
Get Accounting Overview Consolidated endpoint that returns all data needed for the accounting dashboard in a single call. Replaces the need to call 6+ separate endpoints on page load. Returns: current period summary, previous period comparison with deltas, total due across all users, recent activity (top 5 revenues, expenses, payments), top payees by amount due, and monthly trends. Method: GET Authorization:- Required role:
adminor higher
| Parameter | Type | Description |
|---|---|---|
| months (Optional) | integer | Number of months for trend data (default: 6) |
Code Examples
const response = await fetch('https://api.royalti.io/accounting/overview', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://api.royalti.io/accounting/overview',
headers={
'Authorization': f'Bearer {token}'
},
)
data = response.json()
print(data)
curl -X GET https://api.royalti.io/accounting/overview \
-H "Authorization: Bearer YOUR_TOKEN" \
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Query Parameters
Number of months of trend data to include
Required range:
1 <= x <= 24⌘I