Timesheets

Approve timesheets

PUT approve

Endpoint

PUT /api/v1/timesheets/approve

Parameters

Name Description
job_driver[timesheet_ids] required Array of timesheet ids

Request

Route

PUT /api/v1/timesheets/approve

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNTk3Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTg3LCJleHAiOjE3NDAxNDM1ODcsImp0aSI6IjgzYjM0ZWJhLWExOTYtNDVkNC1hN2Y4LTc5MzQ5YzJkM2MxZiJ9._656eqp7nHsJ26h4weSj0BIN-mh9kMb4zQqtxhn5er4
Host: example.org
Cookie: 

Body

{
  "timesheet": {
    "timesheet_ids": [
      183,
      184,
      185
    ]
  }
}

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
per-page: 20
total: 3
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"93789b02167969eaf4d163fb8b17198d"
cache-control: max-age=0, private, must-revalidate
x-request-id: 60b1e697-798f-4876-8111-c3c14d245f0b
x-runtime: 0.100669
content-length: 838

Body

{
  "timesheets": [
    {
      "id": 183,
      "date": "2025-01-22",
      "job_title": "Corporate Retail Developer",
      "payment_state": "pending",
      "status": "approved",
      "timelog": {
        "id": 208,
        "amend_status": "approved",
        "breaks": [

        ],
        "duration": {
          "hours": 2
        },
        "end_at": "2025-01-22T15:13:07.681Z",
        "start_at": "2025-01-22T13:13:07.678Z"
      }
    },
    {
      "id": 184,
      "date": "2025-01-22",
      "job_title": "Corporate Retail Developer",
      "payment_state": "pending",
      "status": "approved",
      "timelog": {
        "id": 209,
        "amend_status": "approved",
        "breaks": [

        ],
        "duration": {
          "hours": 2
        },
        "end_at": "2025-01-22T15:13:07.686Z",
        "start_at": "2025-01-22T13:13:07.683Z"
      }
    },
    {
      "id": 185,
      "date": "2025-01-22",
      "job_title": "Corporate Retail Developer",
      "payment_state": "pending",
      "status": "approved",
      "timelog": {
        "id": 210,
        "amend_status": "approved",
        "breaks": [

        ],
        "duration": {
          "hours": 2
        },
        "end_at": "2025-01-22T15:13:07.694Z",
        "start_at": "2025-01-22T13:13:07.691Z"
      }
    }
  ]
}