Timesheet API

Timesheet API helps you to deal with all request regarding time entries. In order to access all these request you must have to provide Authorization-ot in each request headers for authentication.

Listing Timesheet

To list timesheet details, use GET method.

Request:

GET  /api/v1/time_entries/list/REQUIRED_DATE
Example :   /api/v1/time_entries/list/2015-01-10

Response:

{ 
"items":
 { 
  "26111":
  { 
   "time_sheet_id":"26111",
   "project_id":"11",
   "task_type_id":"26",
   "project_task_id":"0",
   "entry_date":"2015-01-10",
   "hours":"0.00",
   "notes":"",
   "is_progress":"1",
   "approval_status":"",
   "is_billable":"1",
   "invoice_id":"0",
   "project_code":"OT - ",
   "project_name":"Output Time",
   "bg_color":"#00ABA9",
   "activity_name":"Phone gap app changes",
   "name":"Development",
   "user_role":"P",
   "estimated_hours":"2.00",
   "details":
   [{
     "time_sheet_id":"26111",
     "time_sheet_detail_id":"31119",
     "from_time":"10:21:31 AM",
     "to_time":"",
     "hours":null,
     "is_progress":"1"
   }]
}},
"cur_time":"01:58:13 PM" 
}
 
(else)
 
[]

Start a Timer

To start a timer, use GET method.

Request:

GET  /api/v1/time_entries/start/TIME_SHEET_ID
Example :   /api/v1/time_entries/start/26112

Response:

 [{
   "time_sheet_id":"26112",
   "project_id":"11",
   "task_type_id":"26",
   "project_task_id":"555",
   "entry_date":"2015-01-10",
   "hours":"0.02",
   "notes":"",
   "is_progress":"0",
   "approval_status":"",
   "is_billable":"1",
   "invoice_id":"0",
   "project_code":"OT - ",
   "project_name":"Output Time",
   "bg_color":"#00ABA9",
   "activity_name":"Output time - API integration ",
   "name":"Development",
   "user_role":"P",
   "estimated_hours":"2.00",
   "details":
   [{
     "time_sheet_id":"26112",
     "time_sheet_detail_id":"31165",
     "from_time":"04:25 PM",
     "to_time":"04:26 PM",
     "hours":"0.020",
     "is_progress":"0"
   }], 
   "cur_time":"04:26:32 PM"
}]

Stop a Timer

To stop timer, use this GET method.

Request:

GET   /api/v1/time_entries/stop/TIME_SHEET_ID
Example : /api/v1/time_entries/stop/26112

Response:

[{
  "time_sheet_id":"26112",
  "project_id":"11",
  "task_type_id":"26",
  "project_task_id":"555",
  "entry_date":"2015-01-10",
  "hours":"0.02",
  "notes":"",
  "is_progress":"0",
  "approval_status":"",
  "is_billable":"1",
  "invoice_id":"0",
  "project_code":"OT - ",
  "project_name":"Output Time",
  "bg_color":"#00ABA9",
  "activity_name":"Output time - API integration ",
  "name":"Development",
  "user_role":"P",
  "estimated_hours":"2.00",
  "details":
  [{
    "time_sheet_id":"26112", 
    "time_sheet_detail_id":"31165",
    "from_time":"04:25 PM",
    "to_time":"04:26 PM",
    "hours":"0.020",
    "is_progress":"0"
  }],
  "cur_time":"04:26:32 PM"
}]