Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Account

Get the report of the company for its accountant

The revenue, the refunds and the disputes of the company of the key's workspace in one fiscal year, for each month, workspace and currency. A dispute counts in the month that it opened, with its status now. Each amount is in the currency that the customer paid, and in the currency of the company at the ECB rate of its day. A weekend or a holiday takes the rate of the day before it. The report holds no costs, payroll, bank balances, tax or fees. A key reads only its own company. Needs an owner or admin.

get/api/v1/company/report

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy company report
MCP tooltroopy_get_company_report
Rate limit10 calls in 60 seconds, for each key

Query parameters

yearinteger

The calendar year in which the fiscal year starts. Without it, the fiscal year of today

At least 2000 · At most 2100

Response

200 · application/json
data*object
11 properties
company*object
3 properties
id*string

A 24-character id

name*string
legal*object
8 properties
legalName*string | null

The registered name of the company

entityType*string | null

The legal form, like BV, GmbH, Ltd or LLC

registrationNumber*string | null

The number in the register of companies

address*string | null

The registered address

country*string | null

The country of the company, ISO 3166-1 alpha-2, like NL

currency*string | null

The currency of the books of the company, ISO 4217, like EUR. Its totals are in it

taxIds*array<object>

The tax ids of the company, like VAT or EIN, 5 at most. Data of the business, not a secret

At most 5 items

2 properties
label*string

At least 1 characters · At most 40 characters

value*string

At least 1 characters · At most 60 characters

fiscalYearStart*integer

The month that the fiscal year starts in: 1 is January

At least 1 · At most 12

year*integer

The calendar year in which the fiscal year starts

name*string

The name of the fiscal year: "2026", or "2026/27" when it does not start in January

from*string

The start of the fiscal year, included

to*string

The end of the fiscal year, not included

currency*string | null

The currency of the company, or null before someone gives it

months*array<object>

Each month of the company

4 properties
revenue*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

refunds*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

disputes*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

month*string

YYYY-MM, UTC

total*object

The year of the company

3 properties
revenue*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

refunds*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

disputes*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

workspaces*array<object>
5 properties
id*string

A 24-character id

name*string
recorded*object

The revenue and the refunds of the year in the currency that Analytics keeps them in: the same sums as the overview

2 properties
revenue*array<object>
2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

refunds*array<object>
2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

months*array<object>
4 properties
revenue*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

refunds*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

disputes*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

month*string

YYYY-MM, UTC

total*object
3 properties
revenue*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

refunds*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

disputes*object
2 properties
paid*array<object>

By the currency that the customers paid

2 properties
currency*string

ISO 4217, upper case, like EUR

amount*integer

In minor units (cents)

converted*integer | null

In the currency of the company. Null when a rate is missing, or the company has no currency

lines*array<object>

One line for each month, workspace, kind, currency and status of a dispute

10 properties
month*string

YYYY-MM, UTC

workspaceId*string

A 24-character id

kind*enum<string>

A dispute counts in the month that it opened

revenuerefunddispute

status*string | null

The status of the disputes now, in the words of the provider, like won or lost. Null for revenue and refunds

currency*string

The currency that the customers paid

amount*integer

In minor units of currency

count*integer

The payments, refunds or disputes

converted*integer | null

In minor units of the currency of the company, at the ECB rate of the day of each amount

rate*number | null

One unit of currency in the currency of the company: the ECB rates of the days of the month, by amount

rateDays*object | null

The first and the last day of those ECB rates (YYYY-MM-DD). A weekend takes the rate of the day before it

2 properties
from*string
to*string
gaps*array<string>

Why some converted amounts are empty

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask a company owner or admin.
429 rate_limitedWait the number of seconds in Retry-After, then retry.