PreApi Logbookie (1.0.0)

Download OpenAPI specification:

Introduction

Basic information

  • API endpoint: https://preapi.logbookie.eu/api/v1
  • Staging endpoint: https://testapi.logbookie.eu/api/v1 used for testing new features.
  • On errors, the API returns an appropriate HTTP status code in the response header.
  • If an error occurs in the HTTP parameters, a JSON object with error details is returned.
  • The API uses UTF-8 encoding, and all incoming requests must use this encoding as well.
  • GPS data upload frequency depends on device configuration (between 10 seconds and 2 minutes).
  • Timestamps timezone is UTC. (The system does not depend on any specific time zone for its operations.)

Required headers

  • Every request must include at least one of the following headers, and any of them may be present together:
    • Content-Type: application/json
    • Accept: application/json

Authentication

  • Authentication takes place using a token issued for a specific user.
  • This token must be included in the Dho-Access-Token request http header.

Limits

  • Maximum frequency for pulling the data is 80 requests per minute.
  • Maximum frequency for pulling the data is 600 requests per hour.
  • We don’t have requirements for IP whitelisting at this moment.

Status codes

  • 200 OK - Successful request. In most cases. the JSON is returned.
  • 400 Bad Request - The request contains an error or the JSON object structure is not valid.
  • 401 Unauthorized - Missing authentication header, invalid login, or invalid token.
  • 403 Forbidden - There are not enough rights to execute the request.
  • 404 Not Found - Url does not exist.
  • 500 Internal Server Error - Unexpected server error, please contact technical support at support@logbookie.eu.

List requests

All requests under this tag share the same basic output structure.

Response Structure:

{
    "meta": {
        "totalRows": 2524
    },
    "rowData": [{}]
}
  • meta.totalRows: The total number of rows in the response.
  • rowData: An array of objects, with the structure depending on the specific request.

More information about JSON query objects can be found here: https://restdb.io/docs/querying-with-the-api#logicXoperators

lastPosition

Provide the latest vehicle locations and positions.

Authorizations:
Dho-Access-Token
query Parameters
q
string

Filter results by a search query.

limit
integer <= 1000
Default: 25

Number of items per page (default: 25, max: 1000).

page
integer
Default: 1

The page number to retrieve (default: 1).

object
Example: time=desc&name=asc

Sort results by a specific field.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "rowData": [
    ]
}

vehicle

Provide a list of the user's vehicles

Authorizations:
Dho-Access-Token
query Parameters
q
string

Filter results by a search query.

limit
integer <= 1000
Default: 25

Number of items per page (default: 25, max: 1000).

page
integer
Default: 1

The page number to retrieve (default: 1).

object
Example: time=desc&name=asc

Sort results by a specific field.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "rowData": [
    ]
}

ride

Provide the trip history for the vehicle.

Authorizations:
Dho-Access-Token
query Parameters
q
string

Filter results by a search query.

limit
integer <= 1000
Default: 25

Number of items per page (default: 25, max: 1000).

page
integer
Default: 1

The page number to retrieve (default: 1).

object
Example: time=desc&name=asc

Sort results by a specific field.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "rowData": [
    ]
}

division

Provide user's division list.

Authorizations:
Dho-Access-Token
query Parameters
q
string

Filter results by a search query.

limit
integer <= 1000
Default: 25

Number of items per page (default: 25, max: 1000).

page
integer
Default: 1

The page number to retrieve (default: 1).

object
Example: time=desc&name=asc

Sort results by a specific field.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "rowData": [
    ]
}

refuel

Provide refueling details, including fuel transactions and related information.

Authorizations:
Dho-Access-Token
query Parameters
q
string

Filter results by a search query.

limit
integer <= 1000
Default: 25

Number of items per page (default: 25, max: 1000).

page
integer
Default: 1

The page number to retrieve (default: 1).

object
Example: time=desc&name=asc

Sort results by a specific field.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "rowData": [
    ]
}

user

Provide user details and related information.

Authorizations:
Dho-Access-Token
query Parameters
q
string

Filter results by a search query.

limit
integer <= 1000
Default: 25

Number of items per page (default: 25, max: 1000).

page
integer
Default: 1

The page number to retrieve (default: 1).

object
Example: time=desc&name=asc

Sort results by a specific field.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "rowData": [
    ]
}

odometer

Provides user-defined odometer correction data.

Authorizations:
Dho-Access-Token
query Parameters
q
string

Filter results by a search query.

limit
integer <= 1000
Default: 25

Number of items per page (default: 25, max: 1000).

page
integer
Default: 1

The page number to retrieve (default: 1).

object
Example: time=desc&name=asc

Sort results by a specific field.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "rowData": [
    ]
}

Common requests

currentUser

Provide details of the currently logged-in user.

Authorizations:
Dho-Access-Token

Responses

Response samples

Content type
application/json
{
  • "userData": {
    }
}

vehicleDailyIncrement

Provide a daily summary of the distance traveled (in meters) or the increase in engine runtime (in seconds) for each vehicle.

Authorizations:
Dho-Access-Token
query Parameters
vehicleIds
required
string

Ids of vehicles

timeFrom
required
number <float>

Timestamp of interval first day start

timeTo
required
number <float>

Timestamp of interval last day

Responses

Response samples

Content type
application/json
{
  • "vehicle": "s~5b61023db5887e9gh986f16058f1249ce6a5bc11b8",
  • "dailyIncrements": [
    ]
}

vehicleMovement

Provide GPS coordinates, speed information, and the route taken by the vehicle.

Authorizations:
Dho-Access-Token
query Parameters
vehicleIds
required
string

Ids of vehicles

timeFrom
required
number <float>

Timestamp of interval first day start

timeTo
required
number <float>

Timestamp of interval last day

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    ]
}