Get every client's margin rollup
curl --request GET \ --url https://example.com/api/v1/reports/client-margin \ --header 'Authorization: Bearer <token>'Returns every client with its projects’ margin verdicts and its ‘Unassigned’ bucket of orders with no primary project, plus an internal list for projects with no client. clientIds (comma-separated) keeps only those clients’ rows and unassigned buckets; internal is never filtered. Defaults to each project’s whole lifetime; from/to narrow the window. Requires the reports.costs permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Per-client margin rows, the internal-projects list, and meta.
object
object
A project’s green/red/unbilled verdict: invoiced vs. real cost, hours, gifted, and per-member cost.
object
object
Hours given away for free, valued at real cost: non-billable, over-budget, and courtesy.
object
object
object
object
object
One member’s billable/non-billable minutes, cost, and share of a project’s total cost.
object
The date window, timezone, and data-completeness flags a margin verdict was measured against.
object
True when the entry fetch hit the 500,000-entry cap.
Minutes excluded from realCost because their member had no resolvable cost.
object
Flags for incomplete cost coverage and attribution approximations.
object
One client’s projects with their verdicts, its ‘Unassigned’ bucket of orders with no primary project, and totals.
object
object
A project’s green/red/unbilled verdict: invoiced vs. real cost, hours, gifted, and per-member cost.
object
object
Hours given away for free, valued at real cost: non-billable, over-budget, and courtesy.
object
object
object
object
object
One member’s billable/non-billable minutes, cost, and share of a project’s total cost.
object
The date window, timezone, and data-completeness flags a margin verdict was measured against.
object
True when the entry fetch hit the 500,000-entry cap.
Minutes excluded from realCost because their member had no resolvable cost.
object
Flags for incomplete cost coverage and attribution approximations.
object
Every margin figure but the project identity — reused for a client’s unassigned bucket and totals.
object
object
Hours given away for free, valued at real cost: non-billable, over-budget, and courtesy.
object
object
object
object
object
One member’s billable/non-billable minutes, cost, and share of a project’s total cost.
object
The date window, timezone, and data-completeness flags a margin verdict was measured against.
object
True when the entry fetch hit the 500,000-entry cap.
Minutes excluded from realCost because their member had no resolvable cost.
Flags for incomplete cost coverage and attribution approximations.
object
Every margin figure but the project identity — reused for a client’s unassigned bucket and totals.
object
object
Hours given away for free, valued at real cost: non-billable, over-budget, and courtesy.
object
object
object
object
object
One member’s billable/non-billable minutes, cost, and share of a project’s total cost.
object
The date window, timezone, and data-completeness flags a margin verdict was measured against.
object
True when the entry fetch hit the 500,000-entry cap.
Minutes excluded from realCost because their member had no resolvable cost.
Flags for incomplete cost coverage and attribution approximations.
object
The date window, timezone, and data-completeness flags a margin verdict was measured against.
object
True when the entry fetch hit the 500,000-entry cap.
Minutes excluded from realCost because their member had no resolvable cost.
Example
{ "data": { "internal": [ { "verdict": "green" } ], "rows": [ { "projects": [ { "verdict": "green" } ], "totals": { "verdict": "green" }, "unassigned": { "verdict": "green" } } ] }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Missing the reports.costs permission.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC