Skip to content

Users

Manage account users/drivers.

Get current User Profile.

Returns the profile for the current autthenticated user.

GET

http
https://api.zubiecar.com/api/v2/zinc/user
Sample response 200
json
{
  "account_key": "ExampleKey",
  "account_role": "admin",
  "created": "2018-02-20T12:00:00",
  "developer": false,
  "device_events": true,
  "email": "bob@example.com",
  "email_notification": true,
  "first_name": "Bob",
  "groups": [
    {
      "key": "SampleKey",
      "name": "Midwest Region"
    }
  ],
  "hard_braking_events": true,
  "crash_events": true,
  "key": "SampleKey",
  "last_name": "Roberts",
  "low_fuel_events": "all",
  "low_fuel_threshold": 15,
  "over_speed_events": true,
  "partner_name": "Zubie Fleet Connect",
  "preferred_locale": "en_US",
  "profile_image": "http://image.server.com/image_path/image_file.png",
  "push_notification": true,
  "sms_phone_number": "15551234567",
  "speed_threshold": 80,
  "speed_threshold_um": "mph",
  "tags": [
    {
      "color": "#CCCCCC",
      "key": "SampleKey",
      "value": "Blue Stuff"
    }
  ],
  "trip_events": "mine",
  "updated": "2018-02-20 12:00:00",
  "vehicle_health_events": "mine",
  "vehicle_location_events": "mine",
  "vehicle_maintenance_events": "mine",
  "vehicle_schedule_events": "none"
}

Get List of Users/Drivers

Lists users and drivers in account. Restricted based on API user's group permissions.

GET

http
https://api.zubiecar.com/api/v2/zinc/users

Query Parameters

PropertyTypeDescription
cursorstringThe cursor string used for pagination, signifying the object ID where to start the results.
sizestringThe number of results to return per call. Defaults to 100 if not provided.
expandstringDefault: [tags, groups, apps, vehicle_location]
Items Enum: tags groups apps vehicle_location
Optional list of expanded properties to include in results.
Sample response 200
json
{
  "users": [
    {
      "account_key": "ExampleKey",
      "account_role": "admin",
      "created": "2018-02-20T12:00:00",
      "developer": false,
      "device_events": true,
      "email": "bob@example.com",
      "email_notification": true,
      "first_name": "Bob",
      "groups": [
        {
          "key": "SampleKey",
          "name": "Midwest Region"
        }
      ],
      "hard_braking_events": true,
      "crash_events": true,
      "key": "SampleKey",
      "last_name": "Roberts",
      "low_fuel_events": "all",
      "low_fuel_threshold": 15,
      "over_speed_events": true,
      "partner_name": "Zubie Fleet Connect",
      "preferred_locale": "en_US",
      "profile_image": "http://image.server.com/image_path/image_file.png",
      "push_notification": true,
      "sms_phone_number": "15551234567",
      "speed_threshold": 80,
      "speed_threshold_um": "mph",
      "tags": [
        {
          "color": "#CCCCCC",
          "key": "SampleKey",
          "value": "Blue Stuff"
        }
      ],
      "trip_events": "mine",
      "updated": "2018-02-20 12:00:00",
      "vehicle_health_events": "mine",
      "vehicle_location_events": "mine",
      "vehicle_maintenance_events": "mine",
      "vehicle_schedule_events": "none"
    }
  ]
}

Create User

Create a new user or driver.

POST

http
https://api.zubiecar.com/api/v2/zinc/users

Request Body Schema

PropertyTypeDescription
account_rolestringThe user’s role within the parent account. Possible values are admin, viewer (account read-only access), individual (single user read-only), and driver.
device_eventsbooleanUser subscribed for device notifications.
emailstringUser email address.
email_notificationbooleanUser subscribed to receive notifications via email.
first_namestringFirst name.
last_namestringLast name.
hard_braking_eventsbooleanUser subscribed for hard brake notifications.
low_fuel_eventsstringUser subscribed for low fuel notifications. Possible values are none, mine, others or all.
low_fuel_thresholdintegerDefault: 15
A number indicating the percentage under which the user receives low fuel notifications. Range of 1 - 50 inclusive.
marketing_opt_outbooleanDefault: false
User subscribed for Zubie marketing emails.
over_speed_eventsbooleanUser subscribed for speeding notifications.
preferred_localestringThe user’s locale preference.
profile_imagestringThe URL of the profile image for this user.
push_notificationbooleanUser subscribed to receive notifications via app push notification.
sms_phone_numberstringUser sms phone number.
speed_thresholdintegerThreshold to trigger speeding notifications, if enabled.
speed_threshold_umstringUnit of measure for speed threshold. Default mph.
trip_eventsstringUser subscribed for trip-end notifications. Possible values are none, mine, others or all.
vehicle_health_eventsbooleanA boolean indicating whether the user receives vehicle health notifications.
vehicle_location_eventsstringUser subscribed for arrival/departure notifications for places where arrival or departure events are enabled. Possible values are none, mine, others or all.
vehicle_maintenance_eventsstringUser subscribed for scheduled maintenance notifications. Possible values are none, mine, others or all.
vehicle_schedule_eventsstringUser subscribed for schedule-based notifications (off hour trips). Possible values are none, mine, others or all.
tag_keysArray of stringsTags assigned to the user. Multiple values can be provided. Can be cleared by posting empty value.
group_keysArray of stringGroups assigned to the user. Can be cleared by posting empty value.
Sample request body
json
{
  "account_role": "admin",
  "device_events": true,
  "email": "bob@example.com",
  "email_notification": true,
  "first_name": "Bob",
  "last_name": "Roberts",
  "hard_braking_events": true,
  "low_fuel_events": "all",
  "low_fuel_threshold": 15,
  "marketing_opt_out": false,
  "over_speed_events": true,
  "preferred_locale": "en_US",
  "profile_image": "http://image.server.com/image_path/image_file.png",
  "push_notification": true,
  "sms_phone_number": "15551234567",
  "speed_threshold": 80,
  "speed_threshold_um": "mph",
  "trip_events": "mine",
  "vehicle_health_events": true,
  "vehicle_location_events": "mine",
  "vehicle_maintenance_events": "mine",
  "vehicle_schedule_events": "none",
  "tag_keys": [
    "SampleKey1",
    "SampleKey2"
  ],
  "group_keys": [
    "SampleKey1",
    "SampleKey2"
  ]
}

Get a User

Gets a User Profile by Key.

GET

http
https://api.zubiecar.com/api/v2/zinc/user/{user_key}

Path Parameters

PropertyTypeDescription
user_keyrequiredUnique user key.
Sample response 200
json
{
  "account_key": "ExampleKey",
  "account_role": "admin",
  "created": "2018-02-20T12:00:00",
  "developer": false,
  "device_events": true,
  "email": "bob@example.com",
  "email_notification": true,
  "first_name": "Bob",
  "groups": [
    {
      "key": "SampleKey",
      "name": "Midwest Region"
    }
  ],
  "hard_braking_events": true,
  "crash_events": true,
  "key": "SampleKey",
  "last_name": "Roberts",
  "low_fuel_events": "all",
  "low_fuel_threshold": 15,
  "over_speed_events": true,
  "partner_name": "Zubie Fleet Connect",
  "preferred_locale": "en_US",
  "profile_image": "http://image.server.com/image_path/image_file.png",
  "push_notification": true,
  "sms_phone_number": "15551234567",
  "speed_threshold": 80,
  "speed_threshold_um": "mph",
  "tags": [
    {
      "color": "#CCCCCC",
      "key": "SampleKey",
      "value": "Blue Stuff"
    }
  ],
  "trip_events": "mine",
  "updated": "2018-02-20 12:00:00",
  "vehicle_health_events": "mine",
  "vehicle_location_events": "mine",
  "vehicle_maintenance_events": "mine",
  "vehicle_schedule_events": "none"
}

Update User

Update a User.

POST

http
https://api.zubiecar.com/api/v2/zinc/user/{user_key}

Path Parameters

PropertyTypeDescription
user_keyrequiredUnique user key.

Request Body Schema

PropertyTypeDescription
account_rolestringThe user’s role within the parent account. Possible values are admin, viewer (account read-only access), individual (single user read-only), and driver.
device_eventsbooleanUser subscribed for device notifications.
emailstringUser email address.
email_notificationbooleanUser subscribed to receive notifications via email.
first_namestringFirst name.
last_namestringLast name.
hard_braking_eventsbooleanUser subscribed for hard brake notifications.
low_fuel_eventsstringUser subscribed for low fuel notifications. Possible values are none, mine, others or all.
low_fuel_thresholdintegerDefault: 15
A number indicating the percentage under which the user receives low fuel notifications. Range of 1 - 50 inclusive.
marketing_opt_outbooleanDefault: false
User subscribed for Zubie marketing emails.
over_speed_eventsbooleanUser subscribed for speeding notifications.
preferred_localestringThe user’s locale preference.
profile_imagestringThe URL of the profile image for this user.
push_notificationbooleanUser subscribed to receive notifications via app push notification.
sms_phone_numberstringUser sms phone number.
speed_thresholdintegerThreshold to trigger speeding notifications, if enabled.
speed_threshold_umstringUnit of measure for speed threshold. Default mph.
trip_eventsstringUser subscribed for trip-end notifications. Possible values are none, mine, others or all.
vehicle_health_eventsbooleanA boolean indicating whether the user receives vehicle health notifications.
vehicle_location_eventsstringUser subscribed for arrival/departure notifications for places where arrival or departure events are enabled. Possible values are none, mine, others or all.
vehicle_maintenance_eventsstringUser subscribed for scheduled maintenance notifications. Possible values are none, mine, others or all.
vehicle_schedule_eventsstringUser subscribed for schedule-based notifications (off hour trips). Possible values are none, mine, others or all.
tag_keysArray of stringsTags assigned to the user. Multiple values can be provided. Can be cleared by posting empty value.
group_keysArray of stringGroups assigned to the user. Can be cleared by posting empty value.
Sample request body
json
{
  "account_role": "admin",
  "device_events": true,
  "email": "bob@example.com",
  "email_notification": true,
  "first_name": "Bob",
  "hard_braking_events": true,
  "last_name": "Roberts",
  "low_fuel_events": "all",
  "low_fuel_threshold": 15,
  "marketing_opt_out": false,
  "over_speed_events": true,
  "preferred_locale": "en_US",
  "profile_image": "http://image.server.com/image_path/image_file.png",
  "push_notification": true,
  "sms_phone_number": "15551234567",
  "speed_threshold": 80,
  "speed_threshold_um": "mph",
  "trip_events": "mine",
  "vehicle_health_events": true,
  "vehicle_location_events": "mine",
  "vehicle_maintenance_events": "mine",
  "vehicle_schedule_events": "none",
  "tag_keys": [
    "SampleKey1",
    "SampleKey2"
  ],
  "group_keys": [
    "SampleKey1",
    "SampleKey2"
  ]
}

Delete User

Deactivates user account.

DELETE

http
https://api.zubiecar.com/api/v2/zinc/user/{user_key}

Path Parameters

PropertyTypeDescription
user_keyrequiredUnique user key.