Create timesheet manually
Timesheets
POST create timesheet
Endpoint
POST /api/v1/timesheets/manual
Parameters
Name | Description |
---|---|
timesheet[start_at] required | Timesheet start at |
timesheet[end_at] required | Timesheet end at |
timesheet[breaks_attributes] | Timesheet breaks attributes |
timesheet[date] required | Timesheet date |
Request
Route
POST /api/v1/timesheets/manual
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNTg4Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTg3LCJleHAiOjE3NDAxNDM1ODcsImp0aSI6IjFkNGUyMTliLTYzNDAtNGExMC1iZGM1LTYwNDNiNjdjYjVhYiJ9.TX72NLCvvS5qjKhVYXzw4k5_CEjI1kd_jE2pBghDHwo
Host: example.org
Cookie:
Body
{
"timesheet": {
"job_id": 584,
"driver_id": 1588,
"date": "2025-01-22",
"start_at": "12:00",
"end_at": "14:00",
"breaks_attributes": [
{
"duration": 60
}
]
}
}
Response
Simulated Response
Status
200
Headers
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"227c7aea795f5f837ff291582aaf23c2"
cache-control: max-age=0, private, must-revalidate
x-request-id: d96a0a0c-722e-42e4-865e-adc3a6b6e638
x-runtime: 0.020181
content-length: 314
Body
{
"timesheet": {
"id": 180,
"date": "2025-01-22",
"job_title": "Banking Strategist",
"payment_state": "pending",
"status": "pending",
"timelog": {
"id": 202,
"amend_status": "original",
"breaks": [
{
"id": 13,
"duration": 60
}
],
"duration": {
"hours": 1,
"minutes": 59
},
"end_at": "2025-01-22T14:00:00.000Z",
"start_at": "2025-01-22T12:00:00.000Z"
}
}
}