Jobs > Drivers

Assign job driver (admin)

POST assign job driver

Endpoint

POST /api/v1/jobs/:id/job_drivers

Parameters

Name Description
job_driver[driver_id] required Array of driver ids
job_driver[driver_id] required Job driver driver
job_driver[contracts_attributes] required Job driver contracts attributes

Request

Route

POST /api/v1/jobs/325/job_drivers

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMTY0Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTc3LCJleHAiOjE3NDAxNDM1NzcsImp0aSI6ImI5NzNmMTQ0LTE4M2ItNDQ1OC04YThmLWViMDEwY2FjNTU2NCJ9.WoPOcwL1H-rPAc0VGfDgPJh-ErRmPtSs7A2efzGziQ4
Host: example.org
Cookie: 

Body

{
  "job_driver": {
    "driver_id": 1163,
    "contracts_attributes": {
      "0": {
        "start_date": "2025-01-29T13:12:57.137Z",
        "end_date": "2026-01-22T13:12:57.137Z",
        "wages_attributes": {
          "0": {
            "kind": "bank_holiday",
            "rate": 43.98
          }
        }
      }
    }
  }
}

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/"46d26aec1e7f4ccdf7cf2752fd3aa98e"
cache-control: max-age=0, private, must-revalidate
x-request-id: 26ab2e4e-f35a-4234-9c0a-86e986da5a92
x-runtime: 0.090598
content-length: 191

Body

{
  "job_driver": {
    "id": 342,
    "driver": {
      "id": 1163,
      "first_name": "Rodrick",
      "last_name": "Muller",
      "profile_id": null,
      "referral_code": "658021"
    },
    "kind": "accepted",
    "updated_at": "2025-01-22T13:12:57.175Z"
  }
}