Skip to content

Read the order a timer on a task starts on

GET
/timer/task-order/{taskId}
Code sample: Shell / cURL
curl --request GET \
--url https://example.com/api/v1/timer/task-order/example \
--header 'Authorization: Bearer <token>'

Deduces the order a timer on the task starts on, as the app’s time dialog does. It is the project’s default order when that order is linked to the task’s project; otherwise the one order linked to the task’s project, when exactly one is; with none linked, the project’s default order itself, unless the workspace requires orders to be linked to the task’s project and the default is linked only to other projects. order is null when several orders are linked and the default is not one of them, or when there is no order to pick; linkedOrderCount says whether none or several are linked. Only an order the caller can log time to counts. Requires the time.track_own permission.

taskId
required

Task identifier (CUID2).

string
>= 1 characters

Task identifier (CUID2).

The order and how many orders are linked.

Media typeapplication/json
object
data
required

The order a timer started on a task would log to.

object
linkedOrderCount
required

How many orders linked to the task’s project (a subtask also counts the projects of its parent tasks) the caller can log time to. With a null order, 0 means none are linked and more than 1 means several are, none of them the default.

integer
<= 9007199254740991
order
required

The order a timer on the task starts on, with the activity types the caller may pick, their default first. It is the project’s default order when that order is linked to the task’s project; otherwise the one order linked to the task’s project, when exactly one is; with none linked, the project’s default order itself, unless the workspace requires orders to be linked to the task’s project and the default is linked only to other projects. Null when several orders are linked and the default is not one of them, or when there is no order to pick. Only an order the caller can log time to counts.

Any of:

A trackable order option for timer pickers.

object
activityTypes
required

Activity types on the order, the caller’s default first: linked to one of the caller’s roles, fewest linked roles first. Types restricted to other roles are left out unless the caller holds time.edit_team.

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

"No client" when the order has no client.

string
id
required
string
name
required

How the picker shows the order: <code> · <name>, or its name when it has no code.

string

Example generated

{
"data": {
"linkedOrderCount": 1,
"order": {
"activityTypes": [
{
"id": "example",
"name": "example"
}
],
"clientName": "example",
"id": "example",
"name": "example"
}
}
}

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

Forbidden.

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

The task is missing, in a Personal project or outside the caller’s reach. The answer is the same in every case.

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.