1. Time Fields

  1. body (text) - Full description;
  2. user_id (integer) - ID of the user whose time is logged. A value for this field is required when a time record is added;
  3. value (float) - Number of hours logged. Two formats are allowed: 5:30 (Five hours and 30 minutes) and 5.5. (five and a half hours). Value of this field is required when a time record is added;
  4. record_date (date) - Date when the time was spent. A value for this field is required when the time record is added;
  5. billable_status (integer) - Represents a record's status. This field was added in activeCollab 1.1.5 to replace the is_billable / is_billed field combination. There are four possible values:
    • 0 - not billable,
    • 1 - billable,
    • 2 - billable and pending payment,
    • 3 - billed;
  6. parent_id (integer) - ID of the parent object (task or a ticket).
Legacy fields

In activeCollab 1.1.5 is_billable and is_billed fields were replaced with a billable_status field. These two fields are still available for compatibility reasons:

  1. is_billable (boolean) - defines if the record billable or not.
  2. is_billed (boolean) - defines if the time has already been billed or not (ignored if is_billable is set to FALSE)

2. /projects/:project_id/time

This command displays all the time records for a given project.

Method: GET

<time_records>
  <time_record>
    <id>20</id>
    <type>
      <![CDATA[TimeRecord]]>
    </type>
    <name>
      <![CDATA[3.75 hours]]>
    </name>
    <body>...</body>
    <state>...</state>
    <visibility>...</visibility>
    <created_on>...</created_on>
    <created_by_id>...</created_by_id>
    <updated_on>...</updated_on>
    <updated_by_id>...</updated_by_id>
    <version>...</version>
    <permalink>...</permalink>
    <project_id>...</project_id>
    <parent_id>...</parent_id>
    <milestone_id>...</milestone_id>
    <permissions>
      <can_edit>1</can_edit>
      <can_delete>1</can_delete>
      <can_change_visibility>1</can_change_visibility>
      <can_move>0</can_move>
      <can_copy>0</can_copy>
    </permissions>
    <billable_status>0</billable_status>
    <value>3.75</value>
    <record_date>2008-05-01</record_date>
    <is_billable>0</is_billable>
    <is_billed>0</is_billed>
    <user_id>1</user_id>
  </time_record>
</time_records>

3. /projects/:project_id/time/add

Adds a new time record to the time log in a defined project.

Method: POST

Request example:

submitted = submitted
time[user_id] = 1
time[value] = 3:30
time[record_date] = 2008-05-01

Response:

<time_record>
  <id>20</id>
  <type>
    <![CDATA[TimeRecord]]>
  </type>
  <name>
    <![CDATA[3.5 hours]]>
  </name>
  <body>...</body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>1</project_id>
  <parent_id>...</parent_id>
  <milestone_id>...</milestone_id>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
  <billable_status>0</billable_status>
  <value>3.5</value>
  <record_date>2008-05-01</record_date>
  <is_billable>...</is_billable>
  <is_billed>...</is_billed>
  <user_id>1</user_id>
</time_record>

4. /projects/:project_id/time/:record_id

Displays record details.

Method: GET

Example response:

<time_record>
  <id>20</id>
  <type>
    <![CDATA[TimeRecord]]>
  </type>
  <name>
    <![CDATA[3.5 hours]]>
  </name>
  <body>...</body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>...</project_id>
  <parent_id>...</parent_id>
  <milestone_id>...</milestone_id>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
  <billable_status>0</billable_status>
  <value>3.5</value>
  <record_date>2008-05-01</record_date>
  <is_billable>0</is_billable>
  <is_billed>0</is_billed>
  <user_id>1</user_id>
</time_record>

5. /projects/:project_id/time/:record_id/edit

Updates the time record properties.

Method: POST

Request example:

submitted = submitted
time[value] = 3:45

Response:

<time_record>
  <id>20</id>
  <type>
    <![CDATA[TimeRecord]]>
  </type>
  <name>
    <![CDATA[3.75 hours]]>
  </name>
  <body>...</body>
  <state>...</state>
  <visibility>...</visibility>
  <created_on>...</created_on>
  <created_by_id>...</created_by_id>
  <updated_on>...</updated_on>
  <updated_by_id>...</updated_by_id>
  <version>...</version>
  <permalink>...</permalink>
  <project_id>...</project_id>
  <parent_id>...</parent_id>
  <milestone_id>...</milestone_id>
  <permissions>
    <can_edit>1</can_edit>
    <can_delete>1</can_delete>
    <can_change_visibility>1</can_change_visibility>
    <can_move>0</can_move>
    <can_copy>0</can_copy>
  </permissions>
  <billable_status>...</billable_status>
  <value>3.75</value>
  <record_date>2008-05-01</record_date>
  <is_billable>0</is_billable>
  <is_billed>0</is_billed>
  <user_id>1</user_id>
</time_record>