Kilometers traveled

Description

GET [API_URL]/rpt_kilometers

Obtain the entry and exit of the devices in geofences.

Call limit: 1 request every 15 seconds

Cache live time: 300 seconds

Headers

Name
Value

Content-Type

application/json

tenant

logicsat

Authorization

Bearer eyJhbGciOiJIUzI1NiIsInR...

Body

Name
Type
Description

pagination

IPagination

devices

string[]

devices name

perperson

bool

group by person

perday

bool

group by day

subtotals

bool

add subtotal per device and total per device

groupbygeo

string

group by geographical level (state, city, neighbourhood) see ENUM GEOGRAPHICAL_LEVEL

startdate*

datetime

from (YYYY-MM-DDTHH:mm:ss)

enddate*

datetime

to (YYYY-MM-DDTHH:mm:ss)

export interface IApiDev_RptGeofenceFilter {
    pagination?: IPagination;
    devices?: string[];
    perday?: boolean;
    perperson?: boolean;
    subtotals?: boolean;
    groupbygeo?: string;
    startdate: string;
    enddate: string;
}
export enum GEOGRAPHICAL_LEVEL {
    state = 'state',
    city = 'city',
    neighbourhood = 'neighbourhood'
}

Response

export interface IApiDev_RptKilometers {
    full_count?: number;
    device_name?: string;
    person_name?: string;
    device_group?: string;
    state?: string;
    city?: string;
    neighbourhood?: string;
    datetime?: string;
    kms?: number;
    temperature?: number;
    gas?: number;
    cost?: number;
    co2?: number;
}
 [
  {
    full_count: '5',
    device_name: 'Renault Clio IV',
    person_name: '',
    device_group: 'ML',
    state: 'Montevideo',
    city: 'Montevideo',
    neighbourhood: 'Bolivar',
    datetime: '2024-07-08',
    kms: 0.34,
    gas: 0.02,
    temperature: 0,
    cost: 1.41,
    co2: 140.71
  },
  {
    full_count: '5',
    device_name: 'Renault Clio IV',
    person_name: '',
    device_group: 'ML',
    state: 'Montevideo',
    city: 'Montevideo',
    neighbourhood: 'Castro Castellano',
    datetime: '2024-07-08',
    kms: 1.05,
    gas: 0.06,
    temperature: 0,
    cost: 4.37,
    co2: 136.69
  },
  {
    full_count: '5',
    device_name: 'Renault Clio IV',
    person_name: '',
    device_group: 'ML',
    state: 'Montevideo',
    city: 'Montevideo',
    neighbourhood: 'Cerrito',
    datetime: '2024-07-08',
    kms: 0.21,
    gas: 0.01,
    temperature: 0,
    cost: 0.87,
    co2: 113.9
  },
  {
    full_count: '5',
    device_name: 'Renault Clio IV',
    person_name: '',
    device_group: 'ML',
    state: 'Montevideo',
    city: 'Montevideo',
    neighbourhood: 'Ituzaingó',
    datetime: '2024-07-08',
    kms: 0.14,
    gas: 0.01,
    temperature: 0,
    cost: 0.58,
    co2: 170.86
  },
  {
    full_count: '5',
    device_name: 'Renault Clio IV',
    person_name: '',
    device_group: 'ML',
    state: 'Montevideo',
    city: 'Montevideo',
    neighbourhood: 'Jacinto Vera',
    datetime: '2024-07-08',
    kms: 1.86,
    gas: 0.1,
    temperature: 0,
    cost: 7.74,
    co2: 128.6
  },
  {
    full_count: null,
    device_name: 'Renault Clio IV (subtotal)',
    person_name: '',
    device_group: 'ML',
    state: '',
    city: '',
    neighbourhood: '',
    datetime: null,
    kms: 7.7,
    gas: 0.43,
    temperature: 0,
    cost: 32.03,
    co2: 119.75
  },
  {
    full_count: null,
    device_name: 'Total general',
    person_name: '',
    device_group: '',
    state: '',
    city: '',
    neighbourhood: '',
    datetime: null,
    kms: 7.7,
    gas: 0.43,
    temperature: 0,
    cost: 32.03,
    co2: 119.75
  }
]

curl --location --request GET '[API_URL]/rpt_kilometers' \
--header 'tenant: logicsat' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6.....' \
--header 'Content-Type: application/json' \
--data-raw '{
    "pagination": {
        "limit": 10,
        "offset": 0
    },
    "devices": [],
    "perday": true,
    "perperson": true,
    "subtotals": true,
    "groupbygeo": "neighbourhood",
    "startdate": "2024-07-08T00:00:00",
    "enddate": "2024-07-09T23:59:59"
}'

Last updated