Time tracking API reference

Updated

These tables cover the OnRamp API endpoints for time entries, allotted time and the allotted vs worked report, with their limits and error responses.

Time tracking must be turned on for your organization. If it isn't, every endpoint here answers 409. To have it turned on, contact your OnRamp team.

Paths are relative to your base URL, https://api.onramp.us or https://eu.api.onramp.us. For base URLs, API keys and the full endpoint documentation, see OnRamp API reference.

Endpoints

Method and path

What it does

The API key must be able to

GET /v1/time-entries

Lists time entries, newest first.

View time reports

GET /v1/time-entries/{entry_uuid}

Returns one time entry.

View the entry's project

POST /v1/time-entries

Logs a time entry for a user.

Update tasks in the project

PUT /v1/time-entries/{entry_uuid}

Changes the fields you send.

Update tasks in the entry's project

DELETE /v1/time-entries/{entry_uuid}

Removes a time entry.

Update tasks in the entry's project

GET /v1/tasks/{task_uuid}/time

Returns a task's allotted, worked and variance minutes.

View the task's project or playbook

PUT /v1/tasks/{task_uuid}/time-allotted

Sets or clears a task's allotted time.

Update tasks in the project, or edit the playbook

GET /v1/projects/{project_uuid}/time-summary

Returns a project's totals and a row for each task.

View the project

GET /v1/time-tracking/reports/allotted-vs-worked

Returns allotted against worked time for each project, by module and task.

View time reports

Set or clear a task's allotted time

PUT /v1/tasks/{task_uuid}/time-allotted works on project tasks and playbook tasks.

Body field

Type

Rules

minutes

Whole number or null

Required. From 1 to 59940. Send null to clear the allotted time.

The response returns task_uuid and allotted_minutes.

A project's allotted time is the sum of its tasks' allotted minutes. There's no separate project budget to set.

For a playbook task, the request answers 409 in these cases:

Case

Message

The playbook has an open draft that the task isn't part of

This playbook has an open draft. Set the allotted time on the draft instead — a change here would be reverted when that draft is published.

The task belongs to an older version of the playbook

This playbook version has been superseded. Set the allotted time on the current version instead.

Someone else is editing the playbook

This playbook is being edited by another user. Try again when they are done.

Time entry fields

Field

Type

Notes

uuid

String

The time entry's UUID.

user_uuid

String

The user the time belongs to.

user_name

String or null

The user's full name.

project_uuid

String

The project the time was logged against.

task_uuid

String or null

The task, or null for general project time.

entry_date

String

The day worked, as YYYY-MM-DD in your organization's time zone.

minutes

Whole number

Minutes worked, from 1 to 1440.

note

String or null

The note on the entry.

source

String

How the entry was created.

locked

Boolean

true when the entry's week has been submitted. A locked entry can't be changed.

created_at, modified_at

String

ISO 8601 timestamps in UTC.

Create and update a time entry

Body field

POST

PUT

Rules

user_uuid

Required

Not accepted

The user must have their time tracked. An entry can't be moved to another user.

task_uuid

Optional

Optional

Send it to log time on a task. On PUT, null moves the entry to general project time.

project_uuid

Required when task_uuid is omitted

Optional

Send it alone to log general project time.

entry_date

Required

Optional

YYYY-MM-DD. Can't be in the future.

minutes

Required

Optional

A whole number from 1 to 1440. One person's entries for a day can total at most 1440 minutes.

note

Optional

Optional

Up to 5,000 characters. Required when your organization requires notes. On PUT, an empty string clears it.

POST answers 201 when it creates the entry. If the same API key sends an identical create again within 10 minutes, it answers 200 with the existing entry and writes nothing new. Updates and deletes aren't matched this way.

Query parameters

Endpoint

Parameters

GET /v1/time-entries

start, end, page, limit (1 to 200, default 50), project_uuid, task_uuid, user_uuid, playbook_uuid

GET /v1/time-tracking/reports/allotted-vs-worked

start, end, page, limit (1 to 100, default 25), project_uuid, account_uuid, playbook_uuid. Repeat a UUID parameter to pass several.

GET /v1/projects/{project_uuid}/time-summary

start, end

GET /v1/tasks/{task_uuid}/time

None. Any query parameter is rejected.

start and end are YYYY-MM-DD and inclusive. end can't be before start, and the two can span at most 366 days. With neither set, the time entry list and the report cover the 90 days ending today in your organization's time zone, and the project time summary covers all time.

Limits and errors

Status

When

400

A time tracking rule rejected the request. For example: a future date, a date before the user's tracking start, more than 1440 minutes on one person's day, a missing required note, a user whose time isn't tracked, or a task outside the project.

403

The API key doesn't have the permission the endpoint needs.

404

The entry, user, project or task wasn't found in your organization.

409

Time tracking is off for your organization, the entry's week has been submitted and is locked, or a playbook task can't take a new allotted time right now.

429

Too many writes. Creating, updating and deleting entries, and setting allotted time, are limited to 600 requests a minute and 6,000 an hour.

A submitted week stays locked until it's unlocked in OnRamp. To learn how, see Submit, lock and reopen a week.

More in Webhooks & API