Create

POST /api/driver

Headers

  • Specify effective organization_id for Admin and Group Organization Admins. This is a global header for all endpoints only taken into consideration when it makes sense (it won't be used in Auth, for example)

application/json

Body

Responses

POST /api/driver
curl \
 -X POST http://127.0.0.1:8080/api/driver \
 -H "Content-Type: application/json" \
 -d '{"carrier_id":42,"license":"string","license_expiration":"2024-05-04T09:42:00+00:00","license_picture_id":42,"name":"string","notification_email":"string","notification_phone":"string","notification_preference_channel":"EMAIL","photo_id":42,"safety_card_picture_id":42,"truck_carrier_id":42,"truck_fuel_type":"CNG","truck_id":42,"truck_number":"string","truck_type":"BOX"}'
Request examples
# Headers

# Payload
{
  "carrier_id": 42,
  "license": "string",
  "license_expiration": "2024-05-04T09:42:00+00:00",
  "license_picture_id": 42,
  "name": "string",
  "notification_email": "string",
  "notification_phone": "string",
  "notification_preference_channel": "EMAIL",
  "photo_id": 42,
  "safety_card_picture_id": 42,
  "truck_carrier_id": 42,
  "truck_fuel_type": "CNG",
  "truck_id": 42,
  "truck_number": "string",
  "truck_type": "BOX"
}
Response examples (201)
{"account"=>{"active"=>true, "can_view_carrier_ids"=>[42], "can_view_other_carriers"=>true, "carrier_id"=>42, "deleted_at"=>"2024-05-04T09:42:00+00:00", "driver"=>{"license"=>"string", "license_expiration"=>"2024-05-04T09:42:00+00:00", "license_picture_id"=>"string", "photo_id"=>"string", "safety_card_picture_id"=>"string", "truck_number"=>"string"}, "driver_license"=>"string", "driver_license_expiration"=>"2024-05-04T09:42:00+00:00", "driver_license_picture_id"=>42, "driver_photo_id"=>42, "driver_safety_card_picture_id"=>42, "driver_truck_number"=>"string", "email"=>"string", "email_confirmed"=>false, "hmac"=>"string", "hmac_android"=>"string", "hmac_ios"=>"string", "id"=>42, "language_code"=>"string", "last_login"=>"2024-05-04T09:42:00+00:00", "last_login_app_version"=>"string", "last_login_referer"=>"string", "managed_organization_group"=>{"id"=>42, "managed_organizations"=>[{"id"=>42, "name"=>"string"}], "name"=>"string"}, "name"=>"string", "organization"=>{"id"=>42, "name"=>"string"}, "phone_number"=>"string", "previous_last_login"=>"2024-05-04T09:42:00+00:00", "role"=>"ADMIN", "username"=>"string", "yard_id"=>42}, "active"=>true, "carrier"=>{"address"=>"string", "address_additional_info"=>"string", "authorized"=>true, "created_at"=>"2024-05-04T09:42:00+00:00", "created_by"=>"string", "email"=>"string", "fleet_id"=>"string", "id"=>42, "last_modified_at"=>"2024-05-04T09:42:00+00:00", "last_modified_by"=>"string", "name"=>"string", "rfc"=>"string", "scac"=>"string", "usdot"=>"string", "yards"=>[{"authorized"=>true, "carrier_capacity"=>42, "yard_id"=>42}]}, "created_at"=>"2024-05-04T09:42:00+00:00", "id"=>42, "last_modified_at"=>"2024-05-04T09:42:00+00:00", "license"=>"string", "license_expiration"=>"2024-05-04T09:42:00+00:00", "license_picture"=>{"id"=>42, "name"=>"string", "type"=>"BILL_OF_LADING_PHOTO", "url"=>"string"}, "license_picture_id"=>42, "name"=>"string", "organization_id"=>42, "photo_id"=>42, "safety_card_picture_id"=>42, "truck_carrier"=>{"address"=>"string", "address_additional_info"=>"string", "authorized"=>true, "created_at"=>"2024-05-04T09:42:00+00:00", "created_by"=>"string", "email"=>"string", "fleet_id"=>"string", "id"=>42, "last_modified_at"=>"2024-05-04T09:42:00+00:00", "last_modified_by"=>"string", "name"=>"string", "rfc"=>"string", "scac"=>"string", "usdot"=>"string"}, "truck_id"=>42, "truck_number"=>"string"}