Extend contract for job drivers
Jobs > Drivers
POST extend contract
Endpoint
POST /api/v1/jobs/:id/job_drivers/extend_contract
Parameters
Name | Description |
---|---|
job_driver[job_driver_ids] required | Array of job driver ids |
job_driver[start_date] required | New contract start date |
job_driver[end_date] required | New contract end date |
Request
Route
POST /api/v1/jobs/328/job_drivers/extend_contract
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMTcxIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTc3LCJleHAiOjE3NDAxNDM1NzcsImp0aSI6IjM1NDg0ZmZkLTY3OGUtNDllYS1hOThlLTZhY2NjYmRjZGM1NSJ9.O8xU_rWnsr4IjM2eS5puOfJzR01YgCQL8631GCEMRY8
Host: example.org
Cookie:
Body
{
"job_driver": {
"job_driver_ids": [
345,
346,
347,
1000
],
"start_date": "2025-01-29",
"end_date": "2025-03-22"
}
}
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/"0363893886c3e83a5c0ca7b819a19322"
cache-control: max-age=0, private, must-revalidate
x-request-id: 54cd92c6-3ced-477d-bee4-d7a467d47dc8
x-runtime: 0.077904
content-length: 1283
Body
{
"job_drivers": [
{
"id": 347,
"chat_id": 604,
"contract": {
"id": 276,
"days_to_expire": 59,
"end_date": "2025-03-22",
"job_driver_id": 347,
"policy_schema": {
"markable_as_ended": false
},
"start_date": "2025-01-29",
"state": "pending"
},
"driver": {
"id": 1174,
"first_name": "Gracia",
"last_name": "Borer",
"profile_id": 550,
"referral_code": "200668"
},
"kind": "accepted",
"started_at": null,
"updated_at": "2025-01-22T13:12:57.440Z",
"wage": {
"amount": "55.65",
"type": "fixed"
}
},
{
"id": 345,
"chat_id": 602,
"contract": {
"id": 277,
"days_to_expire": 59,
"end_date": "2025-03-22",
"job_driver_id": 345,
"policy_schema": {
"markable_as_ended": false
},
"start_date": "2025-01-29",
"state": "pending"
},
"driver": {
"id": 1172,
"first_name": "Brigida",
"last_name": "Kling",
"profile_id": 548,
"referral_code": "947789"
},
"kind": "accepted",
"started_at": null,
"updated_at": "2025-01-22T13:12:57.407Z",
"wage": {
"amount": "48.67",
"type": "fixed"
}
},
{
"id": 346,
"chat_id": 603,
"contract": {
"id": 278,
"days_to_expire": 59,
"end_date": "2025-03-22",
"job_driver_id": 346,
"policy_schema": {
"markable_as_ended": false
},
"start_date": "2025-01-29",
"state": "pending"
},
"driver": {
"id": 1173,
"first_name": "Raelene",
"last_name": "Abbott",
"profile_id": 549,
"referral_code": "623707"
},
"kind": "accepted",
"started_at": null,
"updated_at": "2025-01-22T13:12:57.423Z",
"wage": {
"amount": "55.93",
"type": "fixed"
}
}
]
}