_updateDriver3

(API version 2.0)

int _updateDriver3 ( string kodf , string username , string pass , WDS_DriverItem2 DriverItem )

Description

The function updates basic driver information.

If the input value "disabled" = 1 then the driver will be deactivated. The date of deactivation is the current date and time. This value can be edited later by the input parameter dateOfDeletion.

Categories

Parameters

string kodf
Company code
string username
Username
string pass
Password
WDS_DriverItem2 DriverItem
  • int idskupina

    ID group

  • int iddriver

    ID driver

  • string jmeno

    Name

  • string prijmeni

    Last name

  • string mobil

    phone

  • string dallas

    dallas (hexadecimal format)

  • string groupname

    group name

  • string dallas1

    dallas 1 (hexadecimal format)

  • string dallas2

    dallas 2 (hexadecimal format)

  • string ucel

    purpose

  • string divize

    division

  • string stredisko

    center

  • string osobnicislo

    personal number

  • int disabled

    disabled

  • string vozidlo

    vehicle

  • string spz

    license plate

  • string pozn

    note

  • float amor

    amor

  • float pracdoba

    working hours

  • string adresa

    address

  • string telefon2

    secondary phone

  • string email

    email address

  • string prukaz

    driver license number

  • string pracz

    company position

  • string opravneni

    permissions

  • string employer

    Employer (optional field)

  • string use_mode

    use mode (optional field)

  • string dateOfDeletion

    date and time of deactivation in format dd.mm.yyyy hh:ii:ss (optional field)

  • WDS_DriverRatingStyleItem

    the rating always works with the current month

    • int type

      DrivingStyle = 0, PerfectDrive = 1

    • float result

      the same values returned by the api function in the rating attribute
      (for type = 0 returns the rating from the getDriverRatingAccel API function,
      for type = 1 returns the rating from the getPerfectDriveReport API function)

    • float stars

      number of stars 0-5 (rounded to the nearest half star)

    • WDS_DriverRatingVehicleItem[]

      list of vehicles driven during the period (included in the rating)

      • WDS_DriverRatingVehicleItem
        • int idcar

          vehicle id

        • string identifier

          vehicle identifier

Driver object
If the input value "iddriver" = 0 then a new item will be created otherwise the existing item will be updated.

Return value

int

-4 = dallas hw chip is linked to different driver
-5 = dallas1 hw chip is linked to different driver
-6 = dallas2 hw chip is linked to different driver
-7 = driver deactivation failed. Driver is set as default of another vehicle.
-8 = dateOfDeletion - invalid date format
-9 = dateOfDeletion - invalid date format - future value
-10 = Name is too long (Max. 50 chars are allowed)

Examples

API version 2.0

$client = new SoapClient('https://api.webdispecink.cz/code/WebDispecinkServiceNet.php?wsdl');
$return = $client->_updateDriver3($kodf, $username, $pass, $DriverItem);

Test

To test the function, enter parameters in form below and press Try it out button.

Company code
Username
Password
WDS_DriverItem2 DriverItem
ID group
ID driver
Name
Last name
phone
dallas (hexadecimal format)
group name
dallas 1 (hexadecimal format)
dallas 2 (hexadecimal format)
purpose
division
center
personal number
disabled
vehicle
license plate
note
amor
working hours
address
secondary phone
email address
driver license number
company position
permissions
Employer (optional field)
use mode (optional field)
date and time of deactivation in format dd.mm.yyyy hh:ii:ss (optional field)
WDS_DriverRatingStyleItem rating
DrivingStyle = 0, PerfectDrive = 1
the same values returned by the api function in the rating attribute
(for type = 0 returns the rating from the getDriverRatingAccel API function,
for type = 1 returns the rating from the getPerfectDriveReport API function)
number of stars 0-5 (rounded to the nearest half star)
WDS_DriverRatingVehicleItem[] vehicles
WDS_DriverRatingVehicleItem item
vehicle id
vehicle identifier
list of vehicles driven during the period (included in the rating)
the rating always works with the current month
Driver object
If the input value "iddriver" = 0 then a new item will be created otherwise the existing item will be updated.

* Required field