Basecamp API

Time Tracking API Calls

Create

/time/save_entry

With this method you can create a new time entry for a particular person and project. Responds with a 201 status code if successful.

XML Request

<request>
  <entry>
    <project-id>#{project_id}</project-id>
    <person-id>#{person-id}</person-id>
    <date>#{date}</date>
    <hours>#{hours}</hours>

    <!-- if not associated with a todo-item -->
    <description>#{description}</description>

    <!-- if associated with a todo-item -->
    <todo-item-id>#{todo-item-id}</todo-item-id>
  </entry>
</request>

YAML Request

---
entry:
  project-id: #{project-id}
  person-id: #{person-id}
  date: #{date}
  hours: #{hours}
  description: #{description}
  todo-item-id: #{todo-item-id}

Response

<time-entry>
  ...
</time-entry>

Delete

/projects/#{project_id}/time/delete_entry/#{id}

Deletes the identified time entry.

Response

<time-entry>
  ...
</time-entry>

Report

/time/report/#{person-id}/#{from}/#{to}/#{filter}

This method lets you query the time entries in a variety of ways. If you do not want to query by person-id, put a 0 in that position in the URL. Likewise for 'from' and 'to' (to use default from/to values). In no case can you query more than 90 days' worth of data. The 'filter' parameter can be blank, or an id number prefixed by a 'p' (to filter by a specific project) or 'c' (to filter by a specific company). In other words, '/time/report/5/20060101/20060207/c7' would return all time entries for the person with id 5, for all projects associated with the company with id 7, between the dates 2006-01-01 and 2006-02-07 (inclusive).

XML Request

<request>
</request>

YAML Request

---

Response

<time-entries>
  <time-entry>
    ...
  </time-entry>
  <time-entry>
    ...
  </time-entry>
  ...
</time-entries>

Update

/time/save_entry/#{id}

With this method you can modify a specific time entry.

XML Request

<request>
  <entry>
    <project-id>#{project_id}</project-id>
    <person-id>#{person-id}</person-id>
    <date>#{date}</date>
    <hours>#{hours}</hours>

    <!-- if not associated with a todo-item -->
    <description>#{description}</description>

    <!-- if associated with a todo-item -->
    <todo-item-id>#{todo-item-id}</todo-item-id>
  </entry>
</request>

YAML Request

---
entry:
  project-id: #{project-id}
  person-id: #{person-id}
  date: #{date}
  hours: #{hours}
  description: #{description}
  todo-item-id: #{todo-item-id}

Response

<time-entry>
  ...
</time-entry>