Blocked Drivers

Create blocked driver(block)

POST create blocked driver(admin)

Endpoint

POST /api/v1/blocked_drivers

Parameters

Name Description
blocked_driver[driver_id] required Blocked driver driver
blocked_driver[reason] required Blocked driver reason
company_id required Company id

Request

Route

POST /api/v1/blocked_drivers

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyMCIsInNjcCI6InVzZXIiLCJhdWQiOm51bGwsImlhdCI6MTc0MjQ2NDkwMywiZXhwIjoxNzQ1MDU2OTAzLCJqdGkiOiJkNTA0Y2M4Ny00MGUwLTQxMzEtOTFkYi02ZTA4Yzc5NjNhY2EifQ.ysGj-FCmh9tDcxc87ZpCWI7oQnewQxG3nAIuQFGi8KA
Host: example.org
Cookie: 

Body

{
  "blocked_driver": {
    "reason": "Sit aliquid quas perferendis.",
    "driver_id": 18,
    "company_id": 2
  }
}

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/"03540bf9b46ae5fea9b97f5a3d2ef0f9"
cache-control: max-age=0, private, must-revalidate
x-request-id: e4da8f48-eeec-4a8f-b828-c5f548a296fd
x-runtime: 0.035621
content-length: 239

Body

{
  "blocked_driver": {
    "id": 2,
    "blocked_at": "2025-03-20T10:01:43.359Z",
    "driver": {
      "id": 18,
      "first_name": "Wilbur",
      "last_name": "Wuckert",
      "profile_id": null,
      "referral_code": "344614"
    },
    "globally_blocked": false,
    "reason": "Sit aliquid quas perferendis."
  }
}