Timesheets

Create timesheet manually

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.eyJzdWIiOiIxNjE5Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQyNDY0OTQ2LCJleHAiOjE3NDUwNTY5NDYsImp0aSI6ImViY2RiNTAwLTdlNGUtNGI1MC05ZDI2LTZjOTExN2EzMjY0YiJ9.bbQKWf8obUjdWA8vwleGbl_d2Hwicka0HAM8E5ekuk0
Host: example.org
Cookie: 

Body

{
  "timesheet": {
    "job_id": 587,
    "driver_id": 1619,
    "start_at": "2025-03-20T08:02:26Z",
    "end_at": "2025-03-20T10:02:26Z",
    "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/"d77fa15c287cde7195b7cfd79b78e7c9"
cache-control: max-age=0, private, must-revalidate
x-request-id: 84052be2-6627-4624-93de-e3fe80a1b2ba
x-runtime: 0.020236
content-length: 318

Body

{
  "timesheet": {
    "id": 193,
    "date": "2025-03-20",
    "job_title": "Accounting Coordinator",
    "payment_state": "pending",
    "status": "pending",
    "timelog": {
      "id": 215,
      "amend_status": "original",
      "breaks": [
        {
          "id": 13,
          "duration": 60
        }
      ],
      "duration": {
        "hours": 1,
        "minutes": 59
      },
      "end_at": "2025-03-20T10:02:26.000Z",
      "start_at": "2025-03-20T08:02:26.000Z"
    }
  }
}