Add New Timesheet
POST/api/timesheets
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| project_id | Number | Mandatory Project ID |
| user_id | Number | Mandatory User ID |
| task_id | Number | optional Optional Task ID |
| start_time | String | optional Optional Start time (Y-m-d H:i:s) |
| end_time | String | optional Optional End time (Y-m-d H:i:s) |
| hours | Number | optional Optional Manually logged hours (default: 0) |
| note | String | optional Optional Note |
curl -X POST "https://yoursite.com/api/timesheets" \
-H "authtoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "project_id": "...", "user_id": "..." }' Success-Response:
HTTP/1.1 201 Created
{ "status": 200, "messages": {"success": "Record saved"}, "id": 1 }