Finance > Timesheets

Mark as paid/pending

PATCH update state

Endpoint

PATCH /api/v1/finance/timesheets/bulk_update

Parameters

Name Description In
timesheet[timesheet_ids] required Array of timesheet ids
timesheet[state] required State to update ["paid", "pending"]

Request

Route

PATCH /api/v1/finance/timesheets/bulk_update

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4OTciLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3NDI0NjQ5MjYsImV4cCI6MTc0NTA1NjkyNiwianRpIjoiMDExOGQ0MjgtZGQyZi00NTA5LWFkOWEtODNmYTQ5Zjk3YjMwIn0.M-DHGQOY45wqDw8cOsUFRxL13C_Qv4ILWKNRBAjVUYs
Host: example.org
Cookie: 

Body

{
  "timesheet": {
    "timesheet_ids": [
      154,
      155,
      156,
      157,
      158
    ],
    "state": "paid",
    "passcode": 1234
  }
}

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: 5
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"5766a2d77939a21da64dc33430dce18d"
cache-control: max-age=0, private, must-revalidate
x-request-id: f43a0ee8-8528-4c5f-8f27-c6cd94a2a445
x-runtime: 0.070644
content-length: 2075

Body

{
  "timesheets": [
    {
      "id": 154,
      "company_name": "Hackett LLC",
      "date": "2025-03-20",
      "driver": {
        "id": 888,
        "first_name": "Rebecka",
        "last_name": "Monahan",
        "profile_id": 434,
        "referral_code": "404303"
      },
      "job_title": "Legal Engineer",
      "payment_state": "paid",
      "state": "paid",
      "timelog": {
        "id": 154,
        "amend_status": "approved",
        "breaks": [

        ],
        "duration": {
          "hours": 4
        },
        "end_at": "2025-03-20T14:02:06.221Z",
        "start_at": "2025-03-20T10:02:06.219Z"
      },
      "total": "220.2"
    },
    {
      "id": 155,
      "company_name": "Nader-Marks",
      "date": "2025-03-20",
      "driver": {
        "id": 890,
        "first_name": "Abram",
        "last_name": "Bartoletti",
        "profile_id": 435,
        "referral_code": "285458"
      },
      "job_title": "Central Consulting Producer",
      "payment_state": "paid",
      "state": "paid",
      "timelog": {
        "id": 155,
        "amend_status": "approved",
        "breaks": [

        ],
        "duration": {
          "hours": 4
        },
        "end_at": "2025-03-20T14:02:06.278Z",
        "start_at": "2025-03-20T10:02:06.275Z"
      },
      "total": "344.24"
    },
    {
      "id": 156,
      "company_name": "Halvorson-Graham",
      "date": "2025-03-20",
      "driver": {
        "id": 892,
        "first_name": "Soila",
        "last_name": "Crist",
        "profile_id": 436,
        "referral_code": "853204"
      },
      "job_title": "District IT Technician",
      "payment_state": "paid",
      "state": "paid",
      "timelog": {
        "id": 156,
        "amend_status": "approved",
        "breaks": [

        ],
        "duration": {
          "hours": 4
        },
        "end_at": "2025-03-20T14:02:06.330Z",
        "start_at": "2025-03-20T10:02:06.327Z"
      },
      "total": "310.12"
    },
    {
      "id": 157,
      "company_name": "Stehr-Brekke",
      "date": "2025-03-20",
      "driver": {
        "id": 894,
        "first_name": "Joe",
        "last_name": "Kautzer",
        "profile_id": 437,
        "referral_code": "056550"
      },
      "job_title": "Technology Officer",
      "payment_state": "paid",
      "state": "paid",
      "timelog": {
        "id": 157,
        "amend_status": "approved",
        "breaks": [

        ],
        "duration": {
          "hours": 4
        },
        "end_at": "2025-03-20T14:02:06.385Z",
        "start_at": "2025-03-20T10:02:06.383Z"
      },
      "total": "173.84"
    },
    {
      "id": 158,
      "company_name": "Ziemann and Sons",
      "date": "2025-03-20",
      "driver": {
        "id": 896,
        "first_name": "Wai",
        "last_name": "Johnson",
        "profile_id": 438,
        "referral_code": "217362"
      },
      "job_title": "Future Analyst",
      "payment_state": "paid",
      "state": "paid",
      "timelog": {
        "id": 158,
        "amend_status": "approved",
        "breaks": [

        ],
        "duration": {
          "hours": 4
        },
        "end_at": "2025-03-20T14:02:06.446Z",
        "start_at": "2025-03-20T10:02:06.443Z"
      },
      "total": "302.24"
    }
  ]
}