Skip to content

Download a client hours workbook or PDF

POST
/reports/client-hours/export
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/reports/client-hours/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "balanceStyle": "simple", "clientId": "example", "endDate": "2026-04-15", "format": "xlsx", "layout": "date", "orderIds": [ "example" ], "projectId": "example", "scope": "full", "startDate": "2026-04-15" }'

Requires staff access to a client within the actor’s scope (clients.view_all or an assignment). Viewing needs reports.view or reports.export; exporting needs reports.export — the client’s Manager may always view and export regardless of report permissions. Running timers are excluded. format returns an XLSX workbook (default) or a PDF. layout lists work by date (default), or totals tasks per project or per time entry tag. scope returns the balance summary and the per-order detail (default), or only one of them. No internal review or private evidence is exported. A missing startDate or endDate follows the selected orders’ default report range: one order opens on its order type’s report range (by default, Hour block, Sprint, Tokens and Time & Materials from the order start to today, or to its end date once passed, and Subscription and Non billable on the current period); several orders that all run from their start open from the earliest start; no order or mixed types open on the current month. A date sent always wins, and the response’s startDate and endDate are the days covered.

Media typeapplication/json
object
balanceStyle
string
default: simple
Allowed values: simple detailed
clientId
required
string
>= 1 characters
endDate

Last day, YYYY-MM-DD in the workspace timezone.

string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
format
string
default: xlsx
Allowed values: xlsx pdf
layout
string
default: date
Allowed values: date task tag
orderIds
Array<string>
<= 200 items
projectId
string
>= 1 characters
scope
string
default: full
Allowed values: full summary detail
startDate

First day, YYYY-MM-DD in the workspace timezone.

string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/

XLSX workbook or PDF attachment, as format requests.

string format: binary

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"
}
}

Staff access is required, the client must be in scope, and viewing needs reports.view or reports.export (exporting needs reports.export) unless the caller manages the client.

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"
}
}

Client or filter not found.

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"
}
}

Invalid or oversized report scope.

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.