Mark as paid/pending
Finance > Timesheets
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.eyJzdWIiOiI4OTMiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3Mzc1NTE1NzEsImV4cCI6MTc0MDE0MzU3MSwianRpIjoiNzllNjhjMTctMWU1MC00YTYxLTg4N2YtMGNjOWNlOTdjNmJjIn0.Pr0QU8OH-X_iGQEIlHIpUW_zR7wApqDrQvH4X4Xn8z4
Host: example.org
Cookie:
Body
{
"timesheet": {
"timesheet_ids": [
144,
145,
146,
147,
148
],
"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/"b11f458c9e892d67554a2739cca8e08f"
cache-control: max-age=0, private, must-revalidate
x-request-id: 8dcbddf3-4686-427e-9b47-8292cf2b095a
x-runtime: 0.065226
content-length: 2134
Body
{
"timesheets": [
{
"id": 144,
"company_name": "Borer-Kunze",
"date": "2025-01-22",
"driver": {
"id": 884,
"first_name": "Thu",
"last_name": "Feil",
"profile_id": 435,
"referral_code": "701380"
},
"job_title": "Future Advertising Director",
"payment_state": "paid",
"state": "paid",
"timelog": {
"id": 144,
"amend_status": "approved",
"breaks": [
],
"duration": {
"hours": 4
},
"end_at": "2025-01-22T17:12:51.005Z",
"start_at": "2025-01-22T13:12:51.002Z"
},
"total": "323.93"
},
{
"id": 145,
"company_name": "Stokes-Schmeler",
"date": "2025-01-22",
"driver": {
"id": 886,
"first_name": "Eda",
"last_name": "Streich",
"profile_id": 436,
"referral_code": "616271"
},
"job_title": "Banking Analyst",
"payment_state": "paid",
"state": "paid",
"timelog": {
"id": 145,
"amend_status": "approved",
"breaks": [
],
"duration": {
"hours": 4
},
"end_at": "2025-01-22T17:12:51.061Z",
"start_at": "2025-01-22T13:12:51.058Z"
},
"total": "75.17"
},
{
"id": 146,
"company_name": "Bradtke, Langworth and Stracke",
"date": "2025-01-22",
"driver": {
"id": 888,
"first_name": "Burt",
"last_name": "Hermiston",
"profile_id": 437,
"referral_code": "524018"
},
"job_title": "Chief Marketing Administrator",
"payment_state": "paid",
"state": "paid",
"timelog": {
"id": 146,
"amend_status": "approved",
"breaks": [
],
"duration": {
"hours": 4
},
"end_at": "2025-01-22T17:12:51.119Z",
"start_at": "2025-01-22T13:12:51.116Z"
},
"total": "256.21"
},
{
"id": 147,
"company_name": "Gislason, Gislason and Nicolas",
"date": "2025-01-22",
"driver": {
"id": 890,
"first_name": "Lyman",
"last_name": "Willms",
"profile_id": 438,
"referral_code": "241630"
},
"job_title": "Central Advertising Engineer",
"payment_state": "paid",
"state": "paid",
"timelog": {
"id": 147,
"amend_status": "approved",
"breaks": [
],
"duration": {
"hours": 4
},
"end_at": "2025-01-22T17:12:51.172Z",
"start_at": "2025-01-22T13:12:51.169Z"
},
"total": "259.85"
},
{
"id": 148,
"company_name": "Weber, Beatty and Runte",
"date": "2025-01-22",
"driver": {
"id": 892,
"first_name": "Ashly",
"last_name": "Little",
"profile_id": 439,
"referral_code": "078936"
},
"job_title": "Retail Orchestrator",
"payment_state": "paid",
"state": "paid",
"timelog": {
"id": 148,
"amend_status": "approved",
"breaks": [
],
"duration": {
"hours": 4
},
"end_at": "2025-01-22T17:12:51.228Z",
"start_at": "2025-01-22T13:12:51.225Z"
},
"total": "141.52"
}
]
}