Skip to content

Vehicles and service works usage

Vehicle object is used to describe information about the vehicle. Its parameters include the VIN, chassis number, license plate, type, dimensions, load capacity, size and number of wheels, year of manufacture, fuel type used and consumption, as well as the insurance number and its validity period. You can also link a vehicle to one of the trackers.

For example, if the vehicle has an average fuel consumption, then we can see the average fuel consumption per trip in the device's trip report. Also, information about the mileage or engine hours can be used for timely maintenance.

For this purpose, service works are used, which can be applied to cost and risk management. For example, if there is a fleet of several cars, it is necessary to service each of them on time: to replace spare parts according to the spent resource, replace wheels according to mileage, and so on. Know the cost of all the work and notify in advance about the upcoming service work, so that you can order the necessary parts.

After all, service work not performed on time can lead to an undesirable outcome - the car will break down, and the order will not be delivered to the customer at the right hour. Not to mention the danger of losing the cargo completely or greatly reducing the service life of the vehicle.

Vehicle creation

Let's create our first vehicle object. For example, we have a cargo van Ford Transit.

We should specify all information we have about this vehicle in the vehicle crete call. To link vehicle with the tracker - specify its ID in parameter tracker_id.

API request:

curl -X POST '' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "vehicle": {"additional_info": "January 2021", "avatar_file_name": null, "chassis_number": "", "color": "Blue", "frame_number": "", "free_insurance_policy_number": "", "free_insurance_valid_till": null, "fuel_cost": 4, "fuel_grade": "", "fuel_tank_volume": 80, "fuel_type": "diesel", "garage_id": null, "gross_weight": null, "icon_color": "1E96DC", "icon_id": null, "label": "Ford 53196", "liability_insurance_policy_number": "54687965555er2152", "liability_insurance_valid_till": "2022-01-12", "manufacture_year": 2019, "max_speed": 100, "model": "Transit", "norm_avg_fuel_consumption": 8.3, "passengers": 3, "payload_height": 2550, "payload_length": 5531, "payload_weight": 1529, "payload_width": 2059, "reg_number": "A53196BC", "subtype": "minivan", "tags": [], "tracker_id": 841400, "trailer": null, "type": "truck", "tyre_size": "R15", "tyres_number": 4, "vin": "XTA235KM35698512", "wheel_arrangement": "4x2"}}'

The platform will respond with:

    "success": true,
    "id": 96175
  • id - It is ID of the created vehicle object.

Service work creation

Now we have a vehicle object with an assigned device. The data from a device about mileage and engine hours can be used in our service works. For every part we should create a separate service work.

For example, we bought new brakes and spark plugs and replaced the oil in the engine. Brakes better to change after 65k km, spark plugs after 40k km, and engine oil after 150 engine hours.

We should create three service works then. Also, I want to be notified before I must perform service work, that's why I will use advance notifications. We should use service work create API call.

API request for oil:

curl -X POST '' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "task": {"vehicle_id": 96175, "comment": "Oil Ford Formula F 5W30", "conditions": {engine_hours: {limit: 328, notification_interval: 18}}, "cost": 28, "description": "Oil Change", "file_ids": [], "notifications": {sms_phones: ["79995699997"], emails: [""], push_enabled: true}, "repeat": false, "unplanned": false}'

API request for brakes:

curl -X POST '' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "a6aa75587e5c59c32d347da438505fc3", "task": {"vehicle_id": 96175, "comment": "ATE", "conditions": {mileage: {limit: 78000, notification_interval: 75000}}, "cost": 200, "description": "Brakes Change", "file_ids": [], "notifications": {sms_phones: ["79995699997"], emails: [""], push_enabled: true}, "repeat": false, "unplanned": false}'

The platform will respond with ID of created service work:


Last update: July 19, 2022