Skip to content

Get the profitability report

GET
/reports/profitability
Code sample: Shell / cURL
curl --request GET \
--url 'https://example.com/api/v1/reports/profitability?startDate=example&endDate=example&billable=all&groupBy=client' \
--header 'Authorization: Bearer <token>'

Returns revenue, cost, profit, and margin grouped by client, order, member, or team — set with groupBy (defaults to client). Grouping by team attributes revenue to every team its member belongs to, bucketing members with no team under a ‘No team’ row; cost for a team row is not entries-driven like the other groupings — it is the cost of every staff member on the roster, day by day at the cost valid each day and only from their hire date (a deactivated member counts up to the day before their deactivation, so a past period keeps their cost), whether or not they logged any hours, so a lead who mostly directs the team still counts toward its cost. Only the date, client, order, member, and groupBy filters apply — the remaining query filters are accepted but ignored. meta.truncated reports whether the fetch saw every matching entry; meta.uncostedMinutes, when present, is minutes excluded from cost because their member had no resolvable cost. Requires the reports.costs permission.

startDate
required
string
>= 1 characters
endDate
required
string
>= 1 characters
clientIds
string
orderIds
string
memberIds
string
teamIds

Comma-separated team IDs. Limits entries to members of those teams; combine with groupBy=team to read one team’s margin.

string

Comma-separated team IDs. Limits entries to members of those teams; combine with groupBy=team to read one team’s margin.

responsibleIds

Comma-separated workspace member IDs. Limits orders to those whose client or any linked project assigns one of these operational responsibles. Filtering by responsible does not widen the caller’s own access.

string
<= 10000 characters

Comma-separated workspace member IDs. Limits orders to those whose client or any linked project assigns one of these operational responsibles. Filtering by responsible does not widen the caller’s own access.

activityTypeIds
string
tagIds
string
billable
string
default: all
Allowed values: all billable non-billable
groupBy

Grouping for GET /reports/profitability rows. Accepted but ignored by every other endpoint sharing this query shape.

string
default: client
Allowed values: client order member team

Grouping for GET /reports/profitability rows. Accepted but ignored by every other endpoint sharing this query shape.

Profitability rows grouped by the requested dimension, with the truncation flag.

Media typeapplication/json
object
data
required
Array<object>

Revenue, cost, profit, and margin for one group in the filtered period.

object
cost
required
number
costIncompleteMembers
required

Roster members with at least one day in the window, on or after their hire date, with no cost set; those days count as zero in cost. Populated for team rows only.

Array<object>
object
id
required
string
name
required
string
id
required

Identifier of the client, order, member, or team the row is grouped by.

string
marginPercent
required
number
name
required
string
profit
required
number
revenue
required
number
totalMinutes
required
number
meta
required

Whether the report saw every entry the filters select.

object
truncated
required

True when the fetch hit the 500,000-entry cap and the rows beside it are incomplete.

boolean
uncostedMinutes

Minutes excluded from cost because their member had no resolvable cost.

number

Example generated

{
"data": [
{
"cost": 1,
"costIncompleteMembers": [
{
"id": "example",
"name": "example"
}
],
"id": "example",
"marginPercent": 1,
"name": "example",
"profit": 1,
"revenue": 1,
"totalMinutes": 1
}
],
"meta": {
"truncated": true,
"uncostedMinutes": 1
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Missing the reports.costs permission.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.