Relating to the drivers (operators) of vehicles.
Action-Get
Return driver information for all drivers linked to the account
module=drivers&action=get
Returned Data
Name | Description | Example |
---|---|---|
If XML: data contained inside <data> | An array of driver data grouped by _<driver ID> | [ _14edea8dd6042b06: {...}, _62fna8df3bda93ja21" {...} ] |
Data included in returned data
For each driver, the following data is included
Name | Description | Example |
---|---|---|
unique_id | The TMR unique identifier for the driver | 8ab787d08ab787de |
first_name | The first name of the driver | Bishop |
last_name | The last name of the driver | Jackson |
phone_number | The contact number for the driver | 0422 123 118 |
internal_worker_id | A user's own unique ID to identify this driver, such as an internal company ID. | 10 |
hire_date | The date the employee was hired | 2021-01-01 |
fire_date | Deprecated | - |
department | The department the employee works in | Sales |
ibutton | iButton code, assigned to the driver. For further information on our driver ID system, see here | A50000010AB0CB01 |
vehicle | The unique ID of the vehicle the driver is currently assigned to | 1339636f8c52 |
Action-Save
Create or update a driver/operator
module=drivers&action=save
Required data
To update a driver, send the following variables in the request through query params or via form-data.
Variables are contained within variable "data". For example, to set the variable "department" to "Sales", add data[department]="Sales"
Updating
When updating a driver, if a variable is not supplied in the update request it will remain set to its current value.
Variables
Name | Description | Required | Example |
---|---|---|---|
unique_id | The driver's unique ID. Update: If not submitted, then a new driver will be created and assigned a random unique_id which will be returned. | yes create new: no | 3cd32f635d18e6d3 |
first_name | The first name of the driver | yes | George |
last_name | The last name of the driver | yes | Littleton |
phone_number | A contact phone number for the driver | yes | 0444 000 111 |
internal_worker_id | A user's own unique ID to identify this driver, such as an internal company ID | yes | S08 |
department | The employee's department | yes | Sales |
ibutton | iButton code, assigned to the driver. For further information on our driver ID system, see here | yes | A50000010AB0CB01 |
hire_date | The date the employee was hired in yyyy-mm-dd format | yes | 2021-01-08 |
Returned Data
For further info see here
Action-Delete
Delete an existing driver.
module=drivers&action=delete
Required data
To delete a driver, add the driver's unique ID into the data variable unique_id. For example, data[unique_id]=23hhfHD92hsjKA
Returned Data
For further info see here