Zubie API (v2.1)

Download OpenAPI specification:Download

This is the reference documentation for the V2 Zubie API. Zubie customers on a Premium plan can access the full API for their account using an encrypted API Key. Third-party developers with apps registered in the ZinC Developer platform will have access a restricted set of API's using Oauth authentication. If you are a developer, visit the ZinC Developer Portal for information on setting up apps and using Oath authentication.

For support, contact us at support@zubie.com.


Base URL

  • The base URL is https://api.zubiecar.com/api/v2/zinc.
    • All API requests must use HTTPS. Calls made over HTTP will fail.
    • Successful requests return a JSON dictionary.

Authentication

Zubie Customers The Zubie API uses an encrypted API Key to provide account-level API accesss, added to the header of every request.

Zubie-Api-Key: {api key}

To generate an API Key, contact us.

Third Party Developers You must first register an app via the ZinC developer platform. Once registered, you are granted a client id and key that can be used through an Oauth authentication exchange to generate a token on behalf of a Zubie user. The client token is added in the Authorization header. Note that third party apps default to read-only scope for a limited set of endpoints.

Authorization: Bearer {oauth token}

AccountApiKey

API Key generated by Zubie for account-level access.

Security scheme type: API Key
header parameter name: Zubie-Api-Key

OAuth

Oauth Token.

Security scheme type: OAuth2
authorizationCode OAuth Flow
Authorization URL: https://login.zubiecar.com/authorize
Token URL: https://login.zubiecar.com/oauth/token
Scopes:

    Responses and Errors

    Note that Zubie adds new properties from time to time as new features are released without an API version change. We do not recommend using the API docs to perform schema validation.

    Zubie uses standard HTTP response codes to indicate success or failure of an API request.

    Responses Description
    200 - OK A GET request succeeded. JSON dictionary response.
    201 - Created A POST response succeeded. JSON dictionary response.
    400 - Bad Request The request was unacceptable, often due to missing a required parameter. JSON dictionary response { "errors": "This was a bad request because..." }
    401 - Unauthorized No valid API key provided. Empty body.
    403 - Forbidden The requested action is restricted based on your account profile. Empty body.
    404 - Not Found The requested resource doesn't exist. Empty body.
    500, 502, 503 Something is wrong on the Zubie side.

    Pagination

    Many endpoints that return large lists of results are paginated. In instances where the number of results exceeds the size parameter (per-endpoint default, or optionally specified with the request), a cursor value is included in the response. Callers may repeat the request, including the original query parameters, with the addition of the cursor parameter, to retrieve the next set of results. Once all results have been returned, the cursor will be omitted from the last response.

    Query Parameters

    • size - The number of results to return per call. The default varies per service.
    • cursor - The cursor string signifying where to start the results

    Response Data

    • cursor - If more results are available, this root level response value will be the next cursor string to be passed back. If no more results are available, this field will be absent.

    Account

    Manage account settings and subscriptions.

    Get Account settings

    The response will be a dictionary containing the account’s data.

    Authorizations:

    Responses

    200

    Successful.

    get /account
    https://api.zubiecar.com/api/v2/zinc/account

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "billing_info":
      {
      },
    • "city": "Bloomington",
    • "created": "2018-02-20 12:00:00",
    • "external_id": "3828919",
    • "key": "SampleKey",
    • "nickname": "Trucking Fleet",
    • "owner_key": "SampleKey",
    • "partner_key": "SampleKey",
    • "partner_name": "Zubie Fleet Connect",
    • "partner_tier":
      {
      },
    • "setup_complete": "2018-02-20 12:00:00",
    • "state": "MN",
    • "street": "8000 Penn Ave",
    • "updated": "2018-02-20T12:00:00+00:00",
    • "user_count": 24,
    • "zipcode": "55435"
    }

    Update Account settings

    Update account-wide settings.

    Authorizations:
    Request Body schema: application/json
    nickname
    string

    The account name, i.e. the business name.

    external_id
    string

    An optional, external id string associated with the account.

    street
    string

    The street address for the account.

    city
    string

    The city for the account.

    state
    string

    The street address for the account.

    zipcode
    string

    The zipcode for the account.

    Responses

    200

    Successful update.

    post /account
    https://api.zubiecar.com/api/v2/zinc/account

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "nickname": "Trucking Fleet",
    • "external_id": "3828919",
    • "street": "1234 Oak Street",
    • "city": "Minneapolis",
    • "state": "MN",
    • "zipcode": "55555"
    }

    Get Subscriptions List

    Lists the subscriptions associated with the account. All devices with the same plan will be grouped under the same subscription.

    Authorizations:
    query Parameters
    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Defaults to 100 if not provided.

    Responses

    200

    Successful.

    get /subscriptions
    https://api.zubiecar.com/api/v2/zinc/subscriptions

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "subscriptions":
      [
      ]
    }

    Devices

    Manage vehicle-connected hardware.

    Get List of Devices

    Lists all active and pending devices (vehicle connected hardware) in account.

    Authorizations:
    query Parameters
    q
    string

    Search devices by serial.

    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Defaults to 50 if not provided.

    Responses

    200

    Successful.

    get /devices
    https://api.zubiecar.com/api/v2/zinc/devices

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "devices":
      [
      ]
    }

    Get a Device

    Authorizations:
    path Parameters
    key
    required
    string

    Unique device key.

    Responses

    200

    Successful.

    get /device/{key}
    https://api.zubiecar.com/api/v2/zinc/device/{key}

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "key": "SampleKey",
    • "serial": "ZU9999999",
    • "status": "installed",
    • "vehicle_key": "SampleKey",
    • "is_connected": true,
    • "disconnected_timestamp": "2018-03-01T01:02:03+00:00",
    • "last_transmission": "2018-03-01T01:02:03+00:00"
    }

    Update Device

    Update a Device subscription status.

    Authorizations:
    path Parameters
    key
    required
    string

    Unique device key.

    Request Body schema: application/json
    subscription_status
    string

    Specify value canceled to mark a device as "Do Not Renew" or active to "un-cancel" a canceled device.

    Responses

    200

    Successful update.

    post /device/{key}
    https://api.zubiecar.com/api/v2/zinc/device/{key}

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "subscription_status": "canceled"
    }

    Groups

    Manage account hierarchy using groups.

    Get List of Groups

    Lists groups available in the account, based on the group permissions of the user. Groups are a way to provide hierarchical structure to account vehicles and restrict user permissions.

    Authorizations:
    query Parameters
    group_keys
    Array of string

    Optional list of group_keys (as repeated parameters) to further filter results, only includes those groups and below. Multiple tag values may be provided. (e.g. “?group_keys=foo&group_keys=bar”).

    show_inactive
    boolean

    Optional boolean, defaults False. Whether to include deactivated groups in hierarchy response.

    Responses

    200

    Successful.

    get /groups
    https://api.zubiecar.com/api/v2/zinc/groups

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "groups":
      [
      ]
    }

    Create Group

    Create a new group.

    Authorizations:
    Request Body schema: application/json
    name
    string
    parent_group_key
    string

    The key of the parent group. If omitted, will use the account as parent, for a level 2 node. Parent group must be active.

    Responses

    201

    Successfully created.

    post /groups
    https://api.zubiecar.com/api/v2/zinc/groups

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "Midwest Region",
    • "parent_group_key": "SampleKey"
    }

    Get a group by key

    Authorizations:
    path Parameters
    group_key
    required
    string

    Unique group key

    Responses

    200

    Successful.

    get /group/{group_key}
    https://api.zubiecar.com/api/v2/zinc/group/{group_key}

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "active": true,
    • "children":
      [
      ],
    • "created": "2018-02-20 12:00:00",
    • "key": "SampleKey",
    • "member_counts":
      {
      },
    • "name": "Midwest Region",
    • "tree_depth": 1,
    • "updated": "2018-02-20 12:00:00"
    }

    Update Group

    Update a Group name or status.

    Authorizations:
    path Parameters
    group_key
    required
    string

    Unique group key

    Request Body schema: application/json
    name
    string

    Group name.

    Responses

    200

    Successful update.

    post /group/{group_key}
    https://api.zubiecar.com/api/v2/zinc/group/{group_key}

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "name": "Midwest Region"
    }

    Deactivate Group

    Deactivate a Group. Must have no members, or child groups.

    Authorizations:
    path Parameters
    group_key
    required
    string

    Unique group key

    Responses

    200

    Successful update.

    400

    Error if the group or its children still have active members.

    delete /group/{group_key}
    https://api.zubiecar.com/api/v2/zinc/group/{group_key}

    Apply Group

    Modify group memberships. Adds or removes group set from a list of member entities. Note that users are not allowed to edit their own group memberships. It is an error if group removal would escalate a member higher in the hierarchy than the caller (e.g. an user with groups assigned tries to remove all groups from a car).

    Authorizations:
    query Parameters
    action
    required
    string
    Default: "add"
    Enum:"add" "remove" "replace"

    The action to apply. One of add, remove or replace.

    Request Body schema: application/json
    member_keys
    Array of string

    A list of entity keys to act on. Must be of a groupable resource (Car and User). Up to 20 member keys may be provided per call.

    group_keys
    Array of string

    A list of group keys to act with. Groups must be all be accessible the user, unique, and no groups may be a descendant of another group.

    Responses

    200

    Successful update.

    400

    Error due to invalid group operation.

    post /groups/apply
    https://api.zubiecar.com/api/v2/zinc/groups/apply

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "member_keys":
      [
      ],
    • "group_keys":
      [
      ]
    }

    Places

    Manage saved places

    Get List of Places

    Lists places for the entire account.

    Authorizations:
    query Parameters
    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Defaults to 50 if not provided.

    Responses

    200

    Successful.

    get /places
    https://api.zubiecar.com/api/v2/zinc/places

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "places":
      [
      ]
    }

    Create Place

    Create a new place.

    Authorizations:
    Request Body schema: application/json
    category
    string

    One of the following home, work, school, business or other.

    point
    object (LocationPoint)
    name
    string

    Place name

    address
    string

    Address of location.

    from_time
    string

    Required. A string timestamp in the form hh:mm indicating the starting time window for detecting arrival/departure events, on active weekdays. Set to 00:00 for no time windows.

    to_time
    string

    Required. A string timestamp in the form hh:mm indicating the ending time window for detecting arrival/departure events, on active weekdays. Set to 00:00 for no time windows.

    active_weekdays
    Array of any

    Required. An array of integers indicating days of the week to detect geofence events, where Monday is 0 and Sunday is 6. Define as a comma separated list of numbers.

    notifying_arrival
    boolean

    Flag determines whether arrival notifications will be generated. The default behavior (if null), is to generate notifications. If disabled, place visits will still be tracked based on the weekday/time windows.

    notifying_departure
    boolean

    Flag determines whether departure notifications will be generated. The default behavior (if null), is to generate notifications. If disabled, place visits will still be tracked based on the weekday/time windows.

    radius
    number <double>

    Radius for triggering arrival/departure.

    radius_um
    string

    Unit of measure for radius, mi or km.

    Responses

    201

    Successfully created.

    post /places
    https://api.zubiecar.com/api/v2/zinc/places

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "category": "other",
    • "point":
      {
      },
    • "name": "Headquarters",
    • "address": "8120 Penn Ave S Bloomington, MN 55431",
    • "from_time": "00:00",
    • "to_time": "00:00",
    • "active_weekdays":
      [
      ],
    • "notifying_arrival": true,
    • "notifying_departure": true,
    • "radius": 0.01893939394,
    • "radius_um": "mi"
    }

    Get a place by key

    Authorizations:
    path Parameters
    place_key
    required
    string

    Unique place key

    Responses

    200

    Successful.

    get /place/{place_key}
    https://api.zubiecar.com/api/v2/zinc/place/{place_key}

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "category": "other",
    • "point":
      {
      },
    • "name": "Headquarters",
    • "address": "8120 Penn Ave S Bloomington, MN 55431",
    • "created": "2018-02-20T12:00:00",
    • "key": "SampleKey",
    • "from_time": "12:00:00",
    • "to_time": "12:00:00",
    • "active_weekdays":
      [
      ],
    • "notifying_arrival": true,
    • "notifying_departure": true,
    • "radius": 0.01893939394,
    • "radius_um": "mi",
    • "updated": "2018-02-20T12:00:00"
    }

    Update Place

    Update a Place name or status.

    Authorizations:
    path Parameters
    place_key
    required
    string

    Unique place key

    Request Body schema: application/json
    category
    string

    One of the following home, work, school, business or other.

    point
    object (LocationPoint)
    name
    string

    Place name

    address
    string

    Address of location.

    from_time
    string

    Required. A string timestamp in the form hh:mm indicating the starting time window for detecting arrival/departure events, on active weekdays. Set to 00:00 for no time windows.

    to_time
    string

    Required. A string timestamp in the form hh:mm indicating the ending time window for detecting arrival/departure events, on active weekdays. Set to 00:00 for no time windows.

    active_weekdays
    Array of any

    Required. An array of integers indicating days of the week to detect geofence events, where Monday is 0 and Sunday is 6. Define as a comma separated list of numbers.

    notifying_arrival
    boolean

    Flag determines whether arrival notifications will be generated. The default behavior (if null), is to generate notifications. If disabled, place visits will still be tracked based on the weekday/time windows.

    notifying_departure
    boolean

    Flag determines whether departure notifications will be generated. The default behavior (if null), is to generate notifications. If disabled, place visits will still be tracked based on the weekday/time windows.

    radius
    number <double>

    Radius for triggering arrival/departure.

    radius_um
    string

    Unit of measure for radius, mi or km.

    Responses

    200

    Successful update.

    post /place/{place_key}
    https://api.zubiecar.com/api/v2/zinc/place/{place_key}

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "category": "other",
    • "point":
      {
      },
    • "name": "Headquarters",
    • "address": "8120 Penn Ave S Bloomington, MN 55431",
    • "from_time": "00:00",
    • "to_time": "00:00",
    • "active_weekdays":
      [
      ],
    • "notifying_arrival": true,
    • "notifying_departure": true,
    • "radius": 0.01893939394,
    • "radius_um": "mi"
    }

    Delete Place

    Delete a Place.

    Authorizations:
    path Parameters
    place_key
    required
    string

    Unique place key

    Responses

    204

    Successful delete.

    delete /place/{place_key}
    https://api.zubiecar.com/api/v2/zinc/place/{place_key}

    Schedules

    Manage driving schedules for vehicles.

    Get List of Schedules

    List of vehicle schedules available in account. Schedules are attached to vehicles and trigger permitted driving notifications, if enabled. A schedule can be any set of start/end times across a week. The recommended schedule is a weekday/weekend schedule.

    Authorizations:
    query Parameters
    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Defaults to 50 if not provided.

    Responses

    200

    Successful.

    get /schedules
    https://api.zubiecar.com/api/v2/zinc/schedules

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "schedules":
      [
      ]
    }

    Create Schedule

    Create a new schedule.

    Authorizations:
    Request Body schema: application/json
    category
    string

    Type of schedule. Currently working_hours is supported.

    name
    string

    Optional name for this schedule. If not provided, will default to New Schedule.

    periods
    Array of object

    A list of objects that define a set of days/times for the schedule. Required to have 1 or more periods.

    Responses

    201

    Successfully created.

    post /schedules
    https://api.zubiecar.com/api/v2/zinc/schedules

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "category": "working_hours",
    • "name": "Afternoons",
    • "periods":
      [
      ]
    }

    Get a Schedule

    Authorizations:
    path Parameters
    schedule_key
    required
    string

    Unique schedule key

    Responses

    200

    Successful.

    get /schedule/{schedule_key}
    https://api.zubiecar.com/api/v2/zinc/schedule/{schedule_key}

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "key": "SampleKey",
    • "created": "2018-02-20 12:00:00",
    • "updated": "2018-02-20 12:00:00",
    • "category": "working_hours",
    • "name": "Afternoons",
    • "periods":
      [
      ]
    }

    Update Schedule

    Update a Schedule.

    Authorizations:
    path Parameters
    schedule_key
    required
    string

    Unique schedule key

    Request Body schema: application/json
    category
    string

    Type of schedule. Currently working_hours is supported.

    name
    string

    Optional name for this schedule. If not provided, will default to New Schedule.

    periods
    Array of object

    A list of objects that define a set of days/times for the schedule. Required to have 1 or more periods.

    Responses

    200

    Successful update.

    post /schedule/{schedule_key}
    https://api.zubiecar.com/api/v2/zinc/schedule/{schedule_key}

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "category": "working_hours",
    • "name": "Afternoons",
    • "periods":
      [
      ]
    }

    Delete Schedule

    Deactivates a schedule. Schedule should be removed from vehicles first.

    Authorizations:
    path Parameters
    schedule_key
    required
    string

    Unique schedule key

    Responses

    204

    Successfully removed schedule. The response will be empty.

    delete /schedule/{schedule_key}
    https://api.zubiecar.com/api/v2/zinc/schedule/{schedule_key}

    Tags

    Manage vehicles and user categorization through unstructured tags.

    Get List of Tags

    Lists tags available in the account, including tags for Trips, Cars and Users. Tags are a free-form way to categorize things across an account.

    Authorizations:

    Responses

    200

    Successful.

    get /tags
    https://api.zubiecar.com/api/v2/zinc/tags

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "tags":
      [
      ]
    }

    Create Tag

    Create a new tag available for the whole account.

    Authorizations:
    Request Body schema: application/json

    Tag properties.

    color
    string

    Hex color value used for tag display in app.

    type
    string

    Type of tag. Must be Car, Trip or User.

    value
    string

    Tag name.

    Responses

    201

    Successfully created.

    post /tags
    https://api.zubiecar.com/api/v2/zinc/tags

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "color": "#CCCCCC",
    • "type": "Car",
    • "value": "At Risk Drivers"
    }

    Get a tag by key

    Authorizations:
    path Parameters
    tag_key
    required
    string

    Unique tag key

    Responses

    200

    Successful.

    get /tag/{tag_key}
    https://api.zubiecar.com/api/v2/zinc/tag/{tag_key}

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "color": "#CCCCCC",
    • "key": "SampleKey",
    • "type": "Car",
    • "value": "Blue Cars"
    }

    Update Tag

    Update a Tag name or color.

    Authorizations:
    path Parameters
    tag_key
    required
    string

    Unique tag key

    Request Body schema: application/json
    color
    string
    value
    string

    Responses

    200

    Successful update.

    post /tag/{tag_key}
    https://api.zubiecar.com/api/v2/zinc/tag/{tag_key}

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "color": "#CCCCCC",
    • "value": "At Risk Drivers"
    }

    Apply Tag

    Apply Tags to Trips, Cars or Users.

    Authorizations:
    path Parameters
    tag_key
    required
    string

    Unique tag key

    Request Body schema: application/json
    action
    string
    Default: "add"

    Whether to add or remove the tag from entities.

    entity_keys
    Array of string

    Must be valid keys associated with tag type - Cars, Trips or Users.

    Responses

    200

    Successful update.

    post /tag/{tag_key}/apply
    https://api.zubiecar.com/api/v2/zinc/tag/{tag_key}/apply

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "action": "add",
    • "entity_keys":
      [
      ]
    }

    Users

    Manage account users/drivers.

    Get current User Profile.

    Returns the profile for the current autthenticated user.

    Authorizations:

    Responses

    200

    Successful.

    get /user
    https://api.zubiecar.com/api/v2/zinc/user

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "account_key": "ExampleKey",
    • "account_role": "admin",
    • "created": "2018-02-20T12:00:00",
    • "developer": false,
    • "device_events": true,
    • "driving_profile":
      {
      },
    • "email": "bob@example.com",
    • "email_notification": true,
    • "first_name": "Bob",
    • "groups":
      [
      ],
    • "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",
    • "push_notification": true,
    • "sms_phone_number": "15551234567",
    • "speed_threshold": 80,
    • "speed_threshold_um": "mph",
    • "tags":
      [
      ],
    • "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.

    Authorizations:
    query Parameters
    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Defaults to 100 if not provided.

    expand
    Array of string
    Default: ["tags","groups","apps","vehicle_location"]
    Items Enum:"tags" "groups" "apps" "vehicle_location"

    Optional list of expanded properties to include in results

    Responses

    200

    Successful.

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

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "users":
      [
      ]
    }

    Create User

    Create a new user or driver.

    Authorizations:
    Request Body schema: application/json
    account_role
    string

    The user’s role within the parent account. Possible values are admin, viewer (account read-only access), individual (single user read-only), and driver.

    device_events
    boolean

    User subscribed for device notifications.

    email
    string

    User email address.

    email_notification
    boolean

    User subscribed to receive notifications via email.

    first_name
    string

    First name

    hard_braking_events
    boolean

    User subscribed for hard brake notifications.

    last_name
    string

    Last name.

    low_fuel_events
    string

    User subscribed for low fuel notifications. Possible values are none, mine, others or all.

    low_fuel_threshold
    integer
    Default: 15

    A number indicating the percentage under which the user receives low fuel notifications. Range of 1 - 50 inclusive. Defaults to 15.

    marketing_opt_out
    boolean
    Default: false

    User subscribed for Zubie marketing emails.

    over_speed_events
    boolean

    User subscribed for speeding notifications.

    preferred_locale
    string

    The user’s locale preference, optional.

    profile_image
    string

    The URL of the profile image for this user

    push_notification
    boolean

    User subscribed to receive notifications via app push notification.

    sms_phone_number
    string

    User sms phone number.

    speed_threshold
    integer

    Threshold to trigger speeding notifications, if enabled.

    speed_threshold_um
    string

    Unit of measure for speed threshold. Defaul mph.

    trip_events
    any

    User subscribed for trip-end notifications. Possible values are none, mine, others or all.

    vehicle_health_events
    boolean

    A boolean indicating whether the user receives vehicle health notifications.

    vehicle_location_events
    string

    User subscribed for arrival/departure notifications for places where arrival or departure events are enabled. Possible values are none, mine, others or all.

    vehicle_maintenance_events
    string

    User subscribed for scheduled maintenance notifications. Possible values are none, mine, others or all.

    vehicle_schedule_events
    string

    User subscribed for schedule-based notifications (off hour trips). Possible values are none, mine, others or all.

    tag_keys
    Array of string

    Tags assigned to the user. Multiple values can be provided. Can be cleared by posting empty value.

    group_keys
    Array of string

    Groups assigned to the user. Can be cleared by posting empty value.

    Responses

    201

    Successfully created.

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

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "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",
    • "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":
      [
      ],
    • "group_keys":
      [
      ]
    }

    Get a User

    Gets a User Profile by Key.

    Authorizations:
    path Parameters
    user_key
    required
    string

    Unique user key

    Responses

    200

    Successful.

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

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "account_key": "ExampleKey",
    • "account_role": "admin",
    • "created": "2018-02-20T12:00:00",
    • "developer": false,
    • "device_events": true,
    • "driving_profile":
      {
      },
    • "email": "bob@example.com",
    • "email_notification": true,
    • "first_name": "Bob",
    • "groups":
      [
      ],
    • "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",
    • "push_notification": true,
    • "sms_phone_number": "15551234567",
    • "speed_threshold": 80,
    • "speed_threshold_um": "mph",
    • "tags":
      [
      ],
    • "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.

    Authorizations:
    path Parameters
    user_key
    required
    string

    Unique user key

    Request Body schema: application/json
    account_role
    string

    The user’s role within the parent account. Possible values are admin, viewer (account read-only access), individual (single user read-only), and driver.

    device_events
    boolean

    User subscribed for device notifications.

    email
    string

    User email address.

    email_notification
    boolean

    User subscribed to receive notifications via email.

    first_name
    string

    First name

    hard_braking_events
    boolean

    User subscribed for hard brake notifications.

    last_name
    string

    Last name.

    low_fuel_events
    string

    User subscribed for low fuel notifications. Possible values are none, mine, others or all.

    low_fuel_threshold
    integer
    Default: 15

    A number indicating the percentage under which the user receives low fuel notifications. Range of 1 - 50 inclusive. Defaults to 15.

    marketing_opt_out
    boolean
    Default: false

    User subscribed for Zubie marketing emails.

    over_speed_events
    boolean

    User subscribed for speeding notifications.

    preferred_locale
    string

    The user’s locale preference, optional.

    profile_image
    string

    The URL of the profile image for this user

    push_notification
    boolean

    User subscribed to receive notifications via app push notification.

    sms_phone_number
    string

    User sms phone number.

    speed_threshold
    integer

    Threshold to trigger speeding notifications, if enabled.

    speed_threshold_um
    string

    Unit of measure for speed threshold. Defaul mph.

    trip_events
    any

    User subscribed for trip-end notifications. Possible values are none, mine, others or all.

    vehicle_health_events
    boolean

    A boolean indicating whether the user receives vehicle health notifications.

    vehicle_location_events
    string

    User subscribed for arrival/departure notifications for places where arrival or departure events are enabled. Possible values are none, mine, others or all.

    vehicle_maintenance_events
    string

    User subscribed for scheduled maintenance notifications. Possible values are none, mine, others or all.

    vehicle_schedule_events
    string

    User subscribed for schedule-based notifications (off hour trips). Possible values are none, mine, others or all.

    tag_keys
    Array of string

    Tags assigned to the user. Multiple values can be provided. Can be cleared by posting empty value.

    group_keys
    Array of string

    Groups assigned to the user. Can be cleared by posting empty value.

    Responses

    200

    Successful update.

    403

    The user lacks permission to edit another user.

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

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "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",
    • "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":
      [
      ],
    • "group_keys":
      [
      ]
    }

    Delete User

    Deactivates user account.

    Authorizations:
    path Parameters
    user_key
    required
    string

    Unique user key

    Responses

    204

    Successfully removed user. The response will be empty.

    403

    The user lacks permission to remove another user.

    404

    Invalid Key

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

    Vehicles

    Manage vehicles and get current vehicle status.

    Get List of vehicles

    Lists Vehicles in account. Restricted based on API user's group permissions.

    Authorizations:
    query Parameters
    q
    string

    Search vehicles by nickname or full VIN.

    tag_keys
    Array of string

    Restrict results to include only vehicles with these tag keys. Multiple tag values may be provided, treated as an OR in filter.

    group_keys
    Array of string

    Restrict results to include only vehicles that are members of these groups (or their descendants).

    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Defaults to 50 if not provided.

    expand
    Array of string
    Default: []
    Items Enum:"tags" "groups" "devices" "last_trip"

    Optional list of expanded properties to include in results

    Responses

    200

    Successful.

    get /vehicles
    https://api.zubiecar.com/api/v2/zinc/vehicles

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "vehicles":
      [
      ]
    }

    Create Vehicle

    Creates a Vehicle.

    Authorizations:
    Request Body schema: application/json
    fuel_economy
    string

    User defined vehicle fuel economy.

    fuel_type
    string

    User defined vehicle fuel type, overrides style info.

    image_url
    string

    URL of vehicle image. If not defined, falls back to style-based image.

    nickname
    string

    Vehicle nickname

    odometer
    integer

    The current odometer reading.

    odometer_um
    string

    Unit of measure for odometer, mi or km.

    primary_driver_key
    string

    The user key to set as the primary driver of the vehicle attached to the device. Optional.

    schedule_key
    string

    The (optional) schedule associated with this vehicle. See Vehicle Schedules. Can be cleared by posting empty value.

    tag_keys
    Array of string

    Tags assigned to the vehicle. Multiple values can be provided in the array. Can be cleared by posting empty value.

    group_keys
    string

    Group assigned to the vehicle. If groups aren't used, or vehicle belongs to the account (not a sub-group), leave empty. Only ONE group should be assigned to a vehicle. Can be cleared by posting empty value.

    vin
    string

    Vehicle Identification Number, either detected by system or entered by user.

    Responses

    201

    Successfully created.

    403

    The user lacks permission to create a vehicle.

    post /vehicles
    https://api.zubiecar.com/api/v2/zinc/vehicles

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "fuel_economy": 23.4,
    • "fuel_type": "unleaded",
    • "nickname": "VAN 123",
    • "odometer": 28212,
    • "odometer_um": "mi",
    • "primary_driver_key": "SampleKey",
    • "schedule_key": "SampleKey",
    • "tag_keys":
      [
      ],
    • "group_keys": "SampleKey",
    • "vin": "JTEBU17R848028574"
    }

    Get a Vehicle

    Authorizations:
    path Parameters
    vehicle_key
    required
    string

    Unique vehicle key

    Responses

    200

    Successful.

    get /vehicle/{vehicle_key}
    https://api.zubiecar.com/api/v2/zinc/vehicle/{vehicle_key}

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "active_trouble_code_count": 3,
    • "active_trouble_codes":
      [
      ],
    • "battery_volts": 12.4,
    • "created": "2018-02-20 12:00:00",
    • "devices":
      {
      },
    • "driver":
      {
      },
    • "fuel_economy": 23.4,
    • "fuel_level": 25,
    • "fuel_type": "unleaded",
    • "groups":
      [
      ],
    • "key": "SampleKey",
    • "last_trip":
      {
      },
    • "make_name": "Honda",
    • "mil_status": "red",
    • "model_name": "Odyssey",
    • "model_year": 2009,
    • "nickname": "VAN 123",
    • "odometer": 28212,
    • "odometer_um": "mi",
    • "odometer_is_actual": true,
    • "primary_driver_key": "SampleKey",
    • "reported_vin": "JTEBU17R848028574",
    • "schedule_key": "SampleKey",
    • "style_fuel_capacity_gal": 23,
    • "style_fuel_economy": 17,
    • "style_fuel_economy_um": "mpg",
    • "style_fuel_type": "premium unleaded",
    • "style_fuel_id": "100336294",
    • "style_provider": "dataone",
    • "tags":
      [
      ],
    • "trim_name": "EXL",
    • "updated": "2018-02-20 12:00:00",
    • "vehicle_location":
      {},
    • "vin": "JTEBU17R848028574"
    }

    Update Vehicle

    Update a Vehicle.

    Authorizations:
    path Parameters
    vehicle_key
    required
    string

    Unique vehicle key

    Request Body schema: application/json
    fuel_economy
    string

    User defined vehicle fuel economy.

    fuel_type
    string

    User defined vehicle fuel type, overrides style info.

    image_url
    string

    URL of vehicle image. If not defined, falls back to style-based image.

    nickname
    string

    Vehicle nickname

    odometer
    integer

    The current odometer reading.

    odometer_um
    string

    Unit of measure for odometer, mi or km.

    primary_driver_key
    string

    The user key to set as the primary driver of the vehicle attached to the device. Optional.

    schedule_key
    string

    The (optional) schedule associated with this vehicle. See Vehicle Schedules. Can be cleared by posting empty value.

    tag_keys
    Array of string

    Tags assigned to the vehicle. Multiple values can be provided in the array. Can be cleared by posting empty value.

    group_keys
    string

    Group assigned to the vehicle. If groups aren't used, or vehicle belongs to the account (not a sub-group), leave empty. Only ONE group should be assigned to a vehicle. Can be cleared by posting empty value.

    vin
    string

    Vehicle Identification Number, either detected by system or entered by user.

    Responses

    200

    Successful update.

    403

    The user lacks permission to update the vehicle.

    post /vehicle/{vehicle_key}
    https://api.zubiecar.com/api/v2/zinc/vehicle/{vehicle_key}

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "fuel_economy": 23.4,
    • "fuel_type": "unleaded",
    • "nickname": "VAN 123",
    • "odometer": 28212,
    • "odometer_um": "mi",
    • "primary_driver_key": "SampleKey",
    • "schedule_key": "SampleKey",
    • "tag_keys":
      [
      ],
    • "group_keys": "SampleKey",
    • "vin": "JTEBU17R848028574"
    }

    Delete Vehicle

    Deactivates vehicle in account.

    Authorizations:
    path Parameters
    vehicle_key
    required
    string

    Unique vehicle key

    Responses

    204

    Successfully removed vehicle. The response will be empty.

    403

    The vehicle lacks permission to remove the vehicle.

    404

    Invalid Key

    delete /vehicle/{vehicle_key}
    https://api.zubiecar.com/api/v2/zinc/vehicle/{vehicle_key}

    Get Nearby Vehicle List

    Get list of nearby vehicles, using a given GPS point. Restricted based on API user's group permissions.

    Authorizations:
    query Parameters
    lat
    required
    string

    Latitude of the point.

    lon
    required
    string

    Longitude of the point.

    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Default 5 if not provided.

    Responses

    200

    Successful.

    get /vehicles/nearby
    https://api.zubiecar.com/api/v2/zinc/vehicles/nearby

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "vehicles":
      [
      ]
    }

    List Vehicle Battery History

    Get list of battery levels as reported through vehicle heartbeats. Heartbeat events are sent at the beginning of a trip, and periodically when the vehicle is not in a trip.

    Authorizations:
    path Parameters
    vehicle_key
    required
    string

    Unique vehicle key

    query Parameters
    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Default 50 if not provided.

    since
    string

    Look for battery levels reported on Heartbeats starting on or after this time. ISO8601 formatted datetime, e.g. 2014-10-01T00:00:00-06:00. (optional) Default is now UTC - 7 days.

    until
    string

    Look for battery levels reported on Heartbeats starting on or before this time. ISO8601 formatted datetime. (optional) Default uses now UTC.

    order_by
    string

    Determines timestamp order to return heartbeats, asc or desc (optional). Defaults to desc.

    Responses

    200

    Successful.

    get /vehicle/{vehicle_key}/battery-history
    https://api.zubiecar.com/api/v2/zinc/vehicle/{vehicle_key}/battery-history

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "results":
      [
      ]
    }

    Events

    Access events or user-subscribed notifications generated from driving activity and other system events.

    Get list of Events by type

    This endpoint is useful to retrieve events of a specific type for exception-based workflows.

    Authorizations:
    query Parameters
    event
    required
    string

    Filter results by event type.

    • device_claim_success
    • device_unplug
    • device_reconnect
    • device_vehicle_change
    • trip_end
    • trip_hard_brake
    • trip_over_speeding
    • trip_rapid_accel
    • trip_severe_hard_brake
    • trip_start
    • trip_tagged
    • vehicle_fuel_low
    • vehicle_geofence_arrival
    • vehicle_geofence_departure
    • vehicle_low_battery
    • vehicle_maintenance
    • vehicle_schedule_exception
    • vehicle_trouble_code
    • vehicle_trouble_code_cleared
    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Default 10 if not provided.

    after
    string

    Datetime to query events after (inclusive).
    e.g. '2018-01-01T00:00:00-05:00'

    before
    string

    Datetime to query events before (exclusive).
    e.g. '2018-01-01T15:30:00-05:00'

    Responses

    200

    Successful.

    get /events
    https://api.zubiecar.com/api/v2/zinc/events

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "events":
      [
      ]
    }

    Trips

    Access vehicle trip history details.

    Get List of Trips

    Get a list of trips for the account. A trip is the logical grouping of all points that are recorded from the time the vehicle’s engine is started to the time the engine is turned off.

    Authorizations:
    query Parameters
    user_key
    string
    Default: "SampleUserKey"

    Filter results to visits to a single driver. Optional.

    vehicle_key
    string
    Default: "SampleVehicleKey"

    Filter results to a single vehicle. Optional.

    started_after
    string

    Filter results to only include trips that started on or after this timestamp. ISO8601 format (if no offset provided, assumed UTC). Optional.

    started_before
    string

    Filter results to only include trips that started on or before this timestamp. ISO8601 format (if no offset provided, assumed UTC). Optional.

    tag_keys
    Array of string

    Restrict results to include only vehicles with these tag keys. Multiple tag values may be provided. Takes precedence over tags query param if both provided.

    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Default 10 if not provided.

    expand
    Array of string
    Default: ["user","vehicle","tags"]
    Items Enum:"user" "vehicle" "tags"

    Optional list of expanded properties to include in results

    Responses

    200

    Successful.

    get /trips
    https://api.zubiecar.com/api/v2/zinc/trips

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "trips":
      [
      ]
    }

    Get one Trip

    Get the details for a single trip.

    Authorizations:
    path Parameters
    trip_key
    required
    string
    Default: "SampleTripKey"

    Key for individual trip.

    Responses

    200

    Successful.

    get /trip/{trip_key}
    https://api.zubiecar.com/api/v2/zinc/trip/{trip_key}

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "key": "SampleKey",
    • "device_key": "SampleKey",
    • "account_key": "SampleKey",
    • "user":
      {
      },
    • "user_key": "SampleKey",
    • "vehicle":
      {
      },
    • "vehicle_key": "SampleKey",
    • "start_point":
      {
      },
    • "end_point":
      {
      },
    • "duration_seconds": 2818,
    • "idle_seconds": 241,
    • "obd_distance": 2.4,
    • "gps_distance": 2.5,
    • "distance_um": "mi",
    • "top_speed": 80,
    • "speed_um": "mph",
    • "hard_brake_count": 0,
    • "hard_accel_count": 0,
    • "points_city_count": 80,
    • "points_hwy_count": 32,
    • "speeding_city_minor_count": 8,
    • "speeding_city_major_count": 0,
    • "speeding_hwy_minor_count": 12,
    • "speeding_hwy_major_count": 6,
    • "tags":
      [
      ],
    • "fuel_cost": "0.39",
    • "fuel_cost_currency_code": "USD",
    • "fuel_cost_currency_symbol": "$",
    • "fuel_ppg": "2.06",
    • "fuel_type": "regular",
    • "fuel_consumed": 0.25,
    • "fuel_consumed_um": "gal",
    • "trip_segments": 1,
    • "encoded_polyline": "SamplePolyline"
    }

    Update Trip

    Modify the tags or driver associated with a trip.

    Authorizations:
    path Parameters
    trip_key
    required
    string
    Default: "SampleTripKey"

    Key for individual trip.

    Request Body schema: application/json
    user_key
    string

    Change the driver associated with this trip. New user must be in an account with access to trip.

    tag_keys
    Array of string

    List of tags keys to tag the trip with.

    Responses

    200

    Successful.

    post /trip/{trip_key}
    https://api.zubiecar.com/api/v2/zinc/trip/{trip_key}

    Request samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "user_key": "SampleKey",
    • "tag_keys":
      [
      ]
    }

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "key": "SampleKey",
    • "device_key": "SampleKey",
    • "account_key": "SampleKey",
    • "user":
      {
      },
    • "user_key": "SampleKey",
    • "vehicle":
      {
      },
    • "vehicle_key": "SampleKey",
    • "start_point":
      {
      },
    • "end_point":
      {
      },
    • "duration_seconds": 2818,
    • "idle_seconds": 241,
    • "obd_distance": 2.4,
    • "gps_distance": 2.5,
    • "distance_um": "mi",
    • "top_speed": 80,
    • "speed_um": "mph",
    • "hard_brake_count": 0,
    • "hard_accel_count": 0,
    • "points_city_count": 80,
    • "points_hwy_count": 32,
    • "speeding_city_minor_count": 8,
    • "speeding_city_major_count": 0,
    • "speeding_hwy_minor_count": 12,
    • "speeding_hwy_major_count": 6,
    • "tags":
      [
      ],
    • "fuel_cost": "0.39",
    • "fuel_cost_currency_code": "USD",
    • "fuel_cost_currency_symbol": "$",
    • "fuel_ppg": "2.06",
    • "fuel_type": "regular",
    • "fuel_consumed": 0.25,
    • "fuel_consumed_um": "gal",
    • "trip_segments": 1,
    • "encoded_polyline": "SamplePolyline"
    }

    Get Trip Points

    Get the detailed GPS points and event details for a given trip.

    Authorizations:
    path Parameters
    trip_key
    required
    string
    Default: "SampleTripKey"

    Key for individual trip.

    query Parameters
    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Default 200 if not provided.

    Responses

    200

    Successful.

    get /trip/{trip_key}/points
    https://api.zubiecar.com/api/v2/zinc/trip/{trip_key}/points

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "trip_points":
      [
      ]
    }

    Visits

    Access visit history to saved places.

    Get List of Visits

    Get a a list of visits to all places for a given driver, vehicle or place. A visit begins at the trip point a car enters a geofence, and ends at the point they exit.

    Authorizations:
    query Parameters
    driver_key
    string
    Default: "SampleDriverKey"

    Filter results to visits to a single driver. Optional.

    vehicle_key
    string
    Default: "SampleVehicleKey"

    Filter results to a single vehicle. Optional.

    place_key
    string
    Default: "SamplePlaceKey"

    Filter results to a single place. Optional.

    entry_after
    string

    Filter results to only include visits that started after this timestamp. Optional.

    entry_before
    string

    Filter results to only include visits that started before this timestamp. Optional.

    cursor
    string

    The cursor string used for pagination, signifying the object ID where to start the results.

    size
    string

    The number of results to return per call. Default 10 if not provided.

    Responses

    200

    Successful.

    get /places/visits
    https://api.zubiecar.com/api/v2/zinc/places/visits

    Response samples

    application/json
    Copy
    Expand all Collapse all
    {
    • "visits":
      [
      ]
    }