Create Time Entries

Creates a list of time entries and optionally sends them for approval.

Function name

create-time-entries

Parameters

  • data (Required). It is an array of time entry fields. The details of the fields are as follows:

creator_id (Required). The user ID or Name on behalf of whom the time entry is being submitted.
for_date (Required). Date. The date for this time entry.
hours_worked (Required). Float. The number of hours.
task_id (Required). Integer. The task for which this time entry is being filled.
process_id (Required). Integer. The workflow for which this time entry is being filled.
time_code_id (Required). The time code ID or Name for this time entry.
user_comments (Optional). The comments entered by user for this time entry.
send-for-approval (Optional). Whether the entries submitted are to be sent for approval.

Return values

time_entries_id


When your data format is XML, you should post something like this :

<data>
    <item>
      <creator_id>Mary Jane</creator_id>
      <hours_worked>2.5</hours_worked>
      <user_comments>Fixed Bugs</user_comments>
      <for_date>2010-11-01</for_date>
      <task_id>12345</task_id>
      <time_code_id>Meetings</time_code_id>      
    </item>
    <item>
      <creator_id>100</creator_id>
      <hours_worked>2</hours_worked>
      <for_date>2010-11-02</for_date>
      <task_id>89019</task_id>
      <time_code_id>13</time_code_id>      
     </item>
</data>
send-for-approval=false

 

In case of JSON, you should submit an array of objects with the same properties. 

[
  {
    "creator_id" : "100",
    "hours_worked" : "2.5",
    "user_comments" : "Fixed Bugs",
    "for_date" : "2010-11-01",
    "task_id" : "12345",
    "time_code_id" : "Meetings"    
   }
  {
    "creator_id" : "100" 
    ...
    ...
  }
send-for-approval=false
]