API

Prerequisites

  • Login credentials for some user from the Client team;
  • OTP should be disabled for the team / role;
  • If you want to receive notifications via web socket, these notifications should be configured at https://app.linxio.com/client/configuration/notifications-details and the user, used for integration, should be specified in Recipients;

API

Authorize

POST – api.linxio.com/api/login
BODY – JSON
{
“email”: “email”,
“password”: “pass”
}


On success, token for API requests should be returned. Token should be used in a header for all further requests:


Authorization: Bearer

Sample Request
				
					
POST 'https://api.linxio.com/api/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "user1@linxio.com",
    "password": "LinxioPassword"
}'
				
			
Sample Response
				
					
{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1OTgyNjYzMjgsImVtYWlsIjoidXNlcjFAbGlueGlvLmNvbSIsImV4cCI6MTU5ODM1MjcyOH0.cPDiuCx2sHBmzbEd6kHWunPD8xlSTSdlc4WYjfU3Mpnaf_TFyeVnXGyLn6CaOCrKoK6Ul_isxGoM-3nVL1QR8yEN6f_EdTtlaJuNmtqotRRq7cCSafVj3UyioWaYudfXbtlF5f1I3q67TPD3HZ3iAt0fdx4Y9g3SpYY5YG3sZI-eg0Vl906KavbQijCso55C0yv58FcJEJ2Lq7jEk0XaMo_m0Ps63L4eq6aF4YjUeUrNG8FbNsFcZrXTS5ofPPM3PZfDOSovIAWCoP8bitS11EaDwba4_qc8AsCA6hx5_QTvlYUZ1iO9AaDk4j3b7NeGBoYybT3zAH80hJPXxx1X1UZyvipWKxUvjw1rceDyRmmk4PvqGCsCv_hamuqi2760dlZl72s1d5K3gJpZFtKsn7PQDScClR9r8BmejxuY2cw_DI8QxDWQlOtqkQyL5vp3rayzvchIiXZoQrbmT2siQ1unazLZaOPchP38huK-CVUESEAaB9ZYjdYTx7CvQX8clUNyesuCuhQvG0ixtjsw9dnanHoCv1Pjqm9NChvB9GwuXpU13NDvn_ejUcnfnefFwT3fGPnEannP3c7cIrc2PatngMGuGM7ecu75Qsl0mRuZMccVXD8obVRZThM0djS1n21fqWIlLQYhQttGQgpmtEd5l1v3wA6oiundzM-4UDs",
    "loginWithId": true,
    "refreshToken": "5ef5a469cc54a0650d71eafe72b6c989",
    "expireAt": "2020-08-25T10:52:09+00:00",
    "otp_required": false,
    "teamType": "client",
    "roleId": 7
}

				
			

Get a list of vehicles

GET – api.linxio.com/api/vehicles/fields/json
Parameters:

  • limit – results per page,
  • page – number of page with results,
  • fields – optional, – array of vehicle fields

For example, fields[]=id will return a JSON where each element will contain only internal ID of the vehicle.

Sample Request
				
					
GET 'https://api.linxio.com/api/vehicles/fields/json?fields[]=id' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1OTgyNjYzMjgsImVtYWlsIjoidXNlcjFAbGlueGlvLmNvbSIsImV4cCI6MTU5ODM1MjcyOH0.cPDiuCx2sHBmzbEd6kHWunPD8xlSTSdlc4WYjfU3Mpnaf_TFyeVnXGyLn6CaOCrKoK6Ul_isxGoM-3nVL1QR8yEN6f_EdTtlaJuNmtqotRRq7cCSafVj3UyioWaYudfXbtlF5f1I3q67TPD3HZ3iAt0fdx4Y9g3SpYY5YG3sZI-eg0Vl906KavbQijCso55C0yv58FcJEJ2Lq7jEk0XaMo_m0Ps63L4eq6aF4YjUeUrNG8FbNsFcZrXTS5ofPPM3PZfDOSovIAWCoP8bitS11EaDwba4_qc8AsCA6hx5_QTvlYUZ1iO9AaDk4j3b7NeGBoYybT3zAH80hJPXxx1X1UZyvipWKxUvjw1rceDyRmmk4PvqGCsCv_hamuqi2760dlZl72s1d5K3gJpZFtKsn7PQDScClR9r8BmejxuY2cw_DI8QxDWQlOtqkQyL5vp3rayzvchIiXZoQrbmT2siQ1unazLZaOPchP38huK-CVUESEAaB9ZYjdYTx7CvQX8clUNyesuCuhQvG0ixtjsw9dnanHoCv1Pjqm9NChvB9GwuXpU13NDvn_ejUcnfnefFwT3fGPnEannP3c7cIrc2PatngMGuGM7ecu75Qsl0mRuZMccVXD8obVRZThM0djS1n21fqWIlLQYhQttGQgpmtEd5l1v3wA6oiundzM-4UDs'
				
			
Sample Response
				
					
{
    "page": 1,
    "limit": 10,
    "total": 7,
    "data": [
        {
        	"id": 304
        },
        {
        	"id": 305
        },
        {
        	"id": 306
        },
        {
        	"id": 307
        },
        {
        	"id": 308
        },
        {
        	"id": 309
        },
        {
        	"id": 716
        }
    ],
    "aggregations": null
}

				
			

Get vehicle routes

GET – api.linxio.com/api/vehicles/<vehicle id>/routes

Parameters:

  • limit – results per page,
  • page – number of page with results,
  • DateFrom / dateTo – date range in ISO format with a time zone offset;
  • fields – optional, array of additional fields in the response

For example, fields[]=coordinates will include into the response all data points received from the tracking device.

NOTE: the number of data points recorded while the vehicle is driving can be huge, so please specify fields[]=coordinates only if you really need this data.

Sample Request
				
					
GET 'https://api.linxio.com/api/vehicles/304/routes?dateFrom=2020-07-22+12:00&dateTo=2020-07-27+12:00&fields[]=coordinates' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1OTgyNjYzMjgsImVtYWlsIjoidXNlcjFAbGlueGlvLmNvbSIsImV4cCI6MTU5ODM1MjcyOH0.cPDiuCx2sHBmzbEd6kHWunPD8xlSTSdlc4WYjfU3Mpnaf_TFyeVnXGyLn6CaOCrKoK6Ul_isxGoM-3nVL1QR8yEN6f_EdTtlaJuNmtqotRRq7cCSafVj3UyioWaYudfXbtlF5f1I3q67TPD3HZ3iAt0fdx4Y9g3SpYY5YG3sZI-eg0Vl906KavbQijCso55C0yv58FcJEJ2Lq7jEk0XaMo_m0Ps63L4eq6aF4YjUeUrNG8FbNsFcZrXTS5ofPPM3PZfDOSovIAWCoP8bitS11EaDwba4_qc8AsCA6hx5_QTvlYUZ1iO9AaDk4j3b7NeGBoYybT3zAH80hJPXxx1X1UZyvipWKxUvjw1rceDyRmmk4PvqGCsCv_hamuqi2760dlZl72s1d5K3gJpZFtKsn7PQDScClR9r8BmejxuY2cw_DI8QxDWQlOtqkQyL5vp3rayzvchIiXZoQrbmT2siQ1unazLZaOPchP38huK-CVUESEAaB9ZYjdYTx7CvQX8clUNyesuCuhQvG0ixtjsw9dnanHoCv1Pjqm9NChvB9GwuXpU13NDvn_ejUcnfnefFwT3fGPnEannP3c7cIrc2PatngMGuGM7ecu75Qsl0mRuZMccVXD8obVRZThM0djS1n21fqWIlLQYhQttGQgpmtEd5l1v3wA6oiundzM-4UDs'

				
			
Sample Response
				
					
[
    {
        "driverId": null,
        "vehicleId": 304,
        "routes": [
        	{
            	"id": 879040,
            	"deviceId": 545,
            	"vehicleId": 304,
            	"driverId": null,
            	"type": "stopped",
            	"pointStart": {
                	"lastCoordinates": {
                    	"ts": "2020-07-27T11:10:44+00:00",
                    	"lat": -37.70737839,
                    	"lng": 144.89506531
                	},
                	"address": "58 Gowanbrae Drive, Gowanbrae Victoria 3043, Australia"
            	},
            	"pointFinish": {
                	"lastCoordinates": {
                    	"ts": "2020-07-27T21:30:53+00:00",
                    	"lat": -37.70737839,
                    	"lng": 144.89500427
                	},
                	"address": "58 Gowanbrae Drive, Gowanbrae Victoria 3043, Australia"
            	},
            	"coordinates": [
                	{
                    	"id": 3973181,
                    	"lat": "-37.70737839",
                    	"lng": "144.89506531",
                    	"ts": "2020-07-27T11:10:44+00:00",
                    	"nullable": false
                	},
                	{
                    	"id": 3974663,
                    	"lat": "-37.70737839",
                    	"lng": "144.89506531",
                    	"ts": "2020-07-27T12:10:34+00:00",
                    	"nullable": false
                	},
                	{
                    	"id": 3975636,
                    	"lat": "-37.70737839",
                    	"lng": "144.89506531",
                    	"ts": "2020-07-27T13:10:23+00:00",
                    	"nullable": false
                	},
                	{
                    	"id": 3976456,
                    	"lat": "-37.70737839",
                    	"lng": "144.89506531",
                    	"ts": "2020-07-27T14:10:13+00:00",
                    	"nullable": false
                	},
                	{
                    	"id": 3977086,
                    	"lat": "-37.70737839",
                    	"lng": "144.89506531",
                    	"ts": "2020-07-27T15:10:03+00:00",
                    	"nullable": false
                	},
                	{
                    	"id": 3985718,
                    	"lat": "-37.70737839",
                    	"lng": "144.89506531",
                    	"ts": "2020-07-27T21:09:04+00:00",
                    	"nullable": false
                	},
                	{
                    	"id": 3987645,
                    	"lat": "-37.70737839",
                    	"lng": "144.89506531",
                    	"ts": "2020-07-27T21:29:12+00:00",
                    	"nullable": false
                	},
                	{
                    	"id": 3987825,
                    	"lat": "-37.70737839",
                    	"lng": "144.89500427",
                    	"ts": "2020-07-27T21:30:53+00:00",
                    	"nullable": false
                	}
            	],
            	"duration": 37209,
            	"distance": "5",
            	"comment": null,
            	"scope": null,
            	"avgSpeed": 1,
            	"maxSpeed": 7,
            	"address": "58 Gowanbrae Drive, Gowanbrae Victoria 3043, Australia"
        	}
        ]
    }
] 

				
			

Get a list of geofence objects

GET – api.linxio.com/api/areas

Parameters:

  • limit – results per page,
  • page – number of page with results
Sample Request
				
					
GET 'https://api.linxio.com/api/areas' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MDU2MjEwNzcsImVtYWlsIjoiYWNtZS1hZG1pbkBsaW54aW8ubG9jYWwiLCJleHAiOjE2MDU3MDc0Nzd9.JOr9ULc_pTNu4bz4SZ7Ssc1u38TVi7PCX35GSBtIHaZuqMPLkeTbmGd08-A2ipO6qFvudQ6gGlWBrWXroPsZMj5JpEE9pv3P8CXJRkPJ5uxJjMaXP4Y0JE3_5HLvdykgG7QDEeno08t9-6KvBMmylPUGq4xM8YUJ4QDS3nFAVewbd4YloYYC1I19kcdysnXVqjRgVFXfWJSV1B4CN4w2tO1_R_rn88lqlLSMZ3DzeiYwiO4r-OktxfyiEe6xVEdwjQrJlda1GkhPU_jV-h7oovr0CHBib4pzexiMc8wHGC_5IuLOzVOJVevzSL9cF9fG6C-K8yrulLon-TCj5vxtdeVSXKW49ipYqAyfNQcAtYG_D7u_tCI-Z-Ge_9F5Eqq5o2-bL_eVH2ZeYk-T3_we1un-wPbI-bKKYCpMYG2r_jJQ81RXMwN9BId2Zm4lfEnDA1W4DgEdx2LJvuoCFeQhdf219T-noT9z6r-G24ZhVtyw_5kPJjnKP3k4qCTNnb-tJgYslEORqFlypU3ZRcnoZUSh50txuPZooTPH1hA6JpjG9MXAgbwJwyiGKzHa5nThocstgqCbs5T5fDQ4puVe0ViftFs18WJ9ZOB9XBtA2aDtlLq3VLw7hdJlRHJf115D_XDTVrRL8p54WMChEVingshzTcMvFxJT6HtsEkLnmqI'

				
			
Sample Response
				
					
{
   "page": 1,
   "limit": 10,
   "total": 1,
   "data": [
       {
           "id": 21,
           "name": "test group",
           "polygon": "POLYGON((144.75145541193 -36.45926747142,144.18016634943 -37.625524937565,146.40232130766 -36.666637104749,145.87646484375 -35.433819920142,144.75145541193 -36.45926747142,144.75145541193 -36.45926747142))",
           "coordinates": [
               {
                   "lat": -36.45926747141997,
                   "lng": 144.75145541193297
               },
               {
                   "lat": -37.62552493756499,
                   "lng": 144.18016634943297
               },
               {
                   "lat": -36.66663710474879,
                   "lng": 146.40232130766276
               },
               {
                   "lat": -35.43381992014202,
                   "lng": 145.87646484375003
               },
               {
                   "lat": -36.45926747141997,
                   "lng": 144.75145541193297
               },
               {
                   "lat": -36.45926747141997,
                   "lng": 144.75145541193297
               }
           ],
           "status": "active",
           "createdAt": "2019-09-19T07:14:24+00:00",
           "updatedAt": "2020-05-07T09:21:44+00:00",
           "groups": [],
           "team": {
               "id": 103,
               "type": "client",
               "clientId": 120,
               "clientName": "ACME1"
           }
       }
   ],
   "aggregations": null
}

				
			

Create geofence object

POST – api.linxio.com/api/areas/

Sample Request
				
					
POST 'https://api.linxio.com/api/areas' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MDU1MjU4OTAsImVtYWlsIjoiYWNtZS1hZG1pbkBsaW54aW8ubG9jYWwiLCJleHAiOjE2MDU2MTIyOTB9.PZsEZPgHNRDCwGbjVilZ92FlyBcH8ICsQETG21Ub9fDfsp_xjvHevdwCF7TO0BAKnL-8V_Mh_q7SBVyvt1cVuqFieZ_qNXU6z1mfe9RquBGf068qlulfViJnoYnbR15XgpEu_LF-2q2cqS7umXaYFm6HrXKRfkoWS94JKQMNkCXpNPFZw0dynu8F18Visha8jpbKYYqXyCuSqDpbKO9YfryHbwFQ1wy9vmVa2oNMO2slxqUULRfhopUT_egGw-Ru0y6Xs8UzhXGPPJjM_svmaHsnxph7QqufPPu9IhVXse2c1wBKIhHk16fbLyLP8yXnWvuU7qnbX_GBZUWGBRHrLrm4T5kIIhigCAJFdg6KgBIh-o-jVWENhVg5twJ0gEPkRpbRhTVc80lHP1CztmVKAc_fB4Zimc92cBhDFqTcHj1AgIWhl5Vr3AmIgcvUZk7sOZLXh5_dIN5LgNLpyn0qEfW3jaSnOnRrfX7Z5oZrmrYSaihJz5X4tBtFZ9PO6H0g_wgqrzJnf1tV5G8aY574SRpJW-PXdCidrertfzbOXQqfBLsA8YVndn73ipOh2W-WMx7Nnwv8sLLk_upOMljKzfKGNiL6Nm-O5xn3Dx00nSlXAx4po6cdZrn9mcoIfEtBN2ZFTUp-RbzbDBEK-ozQwOHZ3VzYbVUzGlC73LcL_Uw' \
--data-raw '{
   "name": "test",
   "coordinates": [
       {
           "lat": 54.033901,
           "lng": 27.155388
       },
       {
           "lat": 54.060509,
           "lng": 27.793689
       },
       {
           "lat": 53.786366,
           "lng": 27.808801
       },
       {
           "lat": 53.800157,
           "lng": 27.155388
       },
       {
           "lat": 54.033901,
           "lng": 27.155388
       }
   ]
}'

				
			
Sample Response
				
					
{
   "id": 138,
   "name": "test",
   "polygon": "POLYGON((27.155388 54.033901,27.793689 54.060509,27.808801 53.786366,27.155388 53.800157,27.155388 54.033901))",
   "coordinates": [
       {
           "lat": 54.033901,
           "lng": 27.155388
       },
       {
           "lat": 54.060509,
           "lng": 27.793689
       },
       {
           "lat": 53.786366,
           "lng": 27.808801
       },
       {
           "lat": 53.800157,
           "lng": 27.155388
       },
       {
           "lat": 54.033901,
           "lng": 27.155388
       }
   ],
   "status": "active",
   "createdAt": "2020-11-16T12:00:25+00:00",
   "updatedAt": null,
   "groups": [],
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   }
}

				
			

Delete geofence object

Delete – api.linxio.com/api/areas/<area id>

Sample Request
				
					
DELETE 'https://api.linxio.com/api/areas/1' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1OTgyNjYzMjgsImVtYWlsIjoidXNlcjFAbGlueGlvLmNvbSIsImV4cCI6MTU5ODM1MjcyOH0.cPDiuCx2sHBmzbEd6kHWunPD8xlSTSdlc4WYjfU3Mpnaf_TFyeVnXGyLn6CaOCrKoK6Ul_isxGoM-3nVL1QR8yEN6f_EdTtlaJuNmtqotRRq7cCSafVj3UyioWaYudfXbtlF5f1I3q67TPD3HZ3iAt0fdx4Y9g3SpYY5YG3sZI-eg0Vl906KavbQijCso55C0yv58FcJEJ2Lq7jEk0XaMo_m0Ps63L4eq6aF4YjUeUrNG8FbNsFcZrXTS5ofPPM3PZfDOSovIAWCoP8bitS11EaDwba4_qc8AsCA6hx5_QTvlYUZ1iO9AaDk4j3b7NeGBoYybT3zAH80hJPXxx1X1UZyvipWKxUvjw1rceDyRmmk4PvqGCsCv_hamuqi2760dlZl72s1d5K3gJpZFtKsn7PQDScClR9r8BmejxuY2cw_DI8QxDWQlOtqkQyL5vp3rayzvchIiXZoQrbmT2siQ1unazLZaOPchP38huK-CVUESEAaB9ZYjdYTx7CvQX8clUNyesuCuhQvG0ixtjsw9dnanHoCv1Pjqm9NChvB9GwuXpU13NDvn_ejUcnfnefFwT3fGPnEannP3c7cIrc2PatngMGuGM7ecu75Qsl0mRuZMccVXD8obVRZThM0djS1n21fqWIlLQYhQttGQgpmtEd5l1v3wA6oiundzM-4UDs'

				
			
Sample Response
				
					
Response code - 204 No content
				
			

Get odometer value

GET – api.linxio.com/api/vehicles/<vehicle id>/odometer

Params:

  • occurredAt: date [optional, if not provided then current]
Sample Request
				
					
GET 'https://api.linxio.com/api/vehicles/1/odometer' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1OTgyNjYzMjgsImVtYWlsIjoidXNlcjFAbGlueGlvLmNvbSIsImV4cCI6MTU5ODM1MjcyOH0.cPDiuCx2sHBmzbEd6kHWunPD8xlSTSdlc4WYjfU3Mpnaf_TFyeVnXGyLn6CaOCrKoK6Ul_isxGoM-3nVL1QR8yEN6f_EdTtlaJuNmtqotRRq7cCSafVj3UyioWaYudfXbtlF5f1I3q67TPD3HZ3iAt0fdx4Y9g3SpYY5YG3sZI-eg0Vl906KavbQijCso55C0yv58FcJEJ2Lq7jEk0XaMo_m0Ps63L4eq6aF4YjUeUrNG8FbNsFcZrXTS5ofPPM3PZfDOSovIAWCoP8bitS11EaDwba4_qc8AsCA6hx5_QTvlYUZ1iO9AaDk4j3b7NeGBoYybT3zAH80hJPXxx1X1UZyvipWKxUvjw1rceDyRmmk4PvqGCsCv_hamuqi2760dlZl72s1d5K3gJpZFtKsn7PQDScClR9r8BmejxuY2cw_DI8QxDWQlOtqkQyL5vp3rayzvchIiXZoQrbmT2siQ1unazLZaOPchP38huK-CVUESEAaB9ZYjdYTx7CvQX8clUNyesuCuhQvG0ixtjsw9dnanHoCv1Pjqm9NChvB9GwuXpU13NDvn_ejUcnfnefFwT3fGPnEannP3c7cIrc2PatngMGuGM7ecu75Qsl0mRuZMccVXD8obVRZThM0djS1n21fqWIlLQYhQttGQgpmtEd5l1v3wA6oiundzM-4UDs'

				
			
Sample Response
				
					
{
   "id": null,
   "vehicleId": 1,
   "deviceId": 54,
   "driverId": 396,
   "createdAt": null,
   "odometer": 100500,
   "accuracy": 0,
   "isSyncedWithDevice": false,
   "createdBy": null,
   "updatedAt": null,
   "occurredAt": null,
   "updatedBy": null,
   "lastTrackerRecordOccurredAt": "2019-12-16T10:18:25+00:00",
   "lastTrackerRecordOdometer": 100500
}

				
			

Recalibrate odometer

POST – api.linxio.com/api/vehicles/<vehicle id>/odometer

Params:

  • odometer: int value (meters),
  • occurredAt: date
Sample Request
				
					
POST 'https://api.linxio.com/api/vehicles/1/odometer' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MDU1MjU4OTAsImVtYWlsIjoiYWNtZS1hZG1pbkBsaW54aW8ubG9jYWwiLCJleHAiOjE2MDU2MTIyOTB9.PZsEZPgHNRDCwGbjVilZ92FlyBcH8ICsQETG21Ub9fDfsp_xjvHevdwCF7TO0BAKnL-8V_Mh_q7SBVyvt1cVuqFieZ_qNXU6z1mfe9RquBGf068qlulfViJnoYnbR15XgpEu_LF-2q2cqS7umXaYFm6HrXKRfkoWS94JKQMNkCXpNPFZw0dynu8F18Visha8jpbKYYqXyCuSqDpbKO9YfryHbwFQ1wy9vmVa2oNMO2slxqUULRfhopUT_egGw-Ru0y6Xs8UzhXGPPJjM_svmaHsnxph7QqufPPu9IhVXse2c1wBKIhHk16fbLyLP8yXnWvuU7qnbX_GBZUWGBRHrLrm4T5kIIhigCAJFdg6KgBIh-o-jVWENhVg5twJ0gEPkRpbRhTVc80lHP1CztmVKAc_fB4Zimc92cBhDFqTcHj1AgIWhl5Vr3AmIgcvUZk7sOZLXh5_dIN5LgNLpyn0qEfW3jaSnOnRrfX7Z5oZrmrYSaihJz5X4tBtFZ9PO6H0g_wgqrzJnf1tV5G8aY574SRpJW-PXdCidrertfzbOXQqfBLsA8YVndn73ipOh2W-WMx7Nnwv8sLLk_upOMljKzfKGNiL6Nm-O5xn3Dx00nSlXAx4po6cdZrn9mcoIfEtBN2ZFTUp-RbzbDBEK-ozQwOHZ3VzYbVUzGlC73LcL_Uw' \
--form 'odometer=6903000' \
--form 'occurredAt=2020-10-08T14:00:00+00:00'

				
			
Sample Response
				
					
{
   "id": 15,
   "vehicleId": 1,
   "deviceId": 54,
   "driverId": 396,
   "createdAt": "2020-11-16T12:37:57+00:00",
   "odometer": 6903000,
   "accuracy": null,
   "isSyncedWithDevice": false,
   "createdBy": {
       "id": "376",
       "fullName": "Acme Admin"
   },
   "updatedAt": null,
   "occurredAt": "2020-10-08T14:00:00+00:00",
   "updatedBy": null,
   "lastTrackerRecordOccurredAt": "2019-12-16T10:18:25+00:00",
   "lastTrackerRecordOdometer": null
}

				
			

Create Device

POST – api.linxio.com/api/devices

Sample Request
				
					
POST 'https://api.linxio.com/api/devices' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--header 'Content-Type: application/json' \
--data-raw '{
   "vendor": 15,
   "modelId": 28,
   "sn": "80447130716",
   "port": "3434",
   "hw": "434",
   "sw": "121",
   "imei": "123456789",
   "phone": "+32423423423",
   "imsi": "3434",
   "password": "pass",
   "userName": "username",
   "clientNote": "note1",
   "adminNote": "note2",
   "blockingMessage": "",
   "status": "inStock",
   "teamId": 93
}'

				
			
Sample Response
				
					
{
   "id": 354,
   "vendor": {
       "id": 15,
       "name": "Linxio"
   },
   "model": {
       "id": 28,
       "name": "TR500",
       "protocol": null
   },
   "sn": "80447130716",
   "status": "inStock",
   "team": {
       "id": 93,
       "type": "admin",
       "clientId": null,
       "clientName": null
   },
   "port": 3434,
   "hw": "434",
   "sw": "121",
   "imei": "434343434",
   "phone": "+32423423423",
   "imsi": "3434",
   "userName": "usernameeee",
   "password": "pass",
   "installDate": null,
   "deviceInstallation": null,
   "createdAt": "2021-03-01T17:24:43+00:00",
   "createdBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "superadmin@example.com",
       "teamType": "admin"
   },
   "updatedAt": null,
   "updatedBy": null,
   "trackerData": null,
   "blockingMessage": null,
   "lastActiveTime": null
}

				
			

Edit Device

PATCH – api.linxio.com/api/devices/{deviceId}

Sample Request
				
					
PATCH 'https://api.linxio.com/api/devices/354' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--data-raw '{
   "vendor": 15,
   "modelId": 28,
   "sn": "1232",
   "port": null,
   "hw": null,
   "sw": null,
   "imei": "8670600380281511",
   "phone": "+375445154982",
   "imsi": null,
   "password": null,
   "userName": null,
   "clientNote": "",
   "adminNote": "",
   "blockingMessage": null,
   "status": "stopped",
   "teamId": 103
}'

				
			
Sample Response
				
					
{
   "id": 354,
   "vendor": {
       "id": 15,
       "name": "Linxio"
   },
   "model": {
       "id": 28,
       "name": "TR500",
       "protocol": null
   },
   "sn": "1232",
   "status": "stopped",
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   },
   "port": 0,
   "hw": null,
   "sw": null,
   "imei": "8670600380281511",
   "phone": "+375445154982",
   "imsi": null,
   "userName": "usernameeee",
   "password": null,
   "installDate": null,
   "deviceInstallation": null,
   "createdAt": "2021-03-01T17:24:43+00:00",
   "createdBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "updatedAt": "2021-03-02T12:21:20+00:00",
   "updatedBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "trackerData": null,
   "blockingMessage": null,
   "lastActiveTime": null
}

				
			

Get Device List

GET – api.linxio.com/api/devices

Params:

  • limit – optional
  • page – optional
Sample Request
				
					
GET 'https://api.linxio.com/api/devices/json?limit=10&page=1' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0'

				
			
Sample Response
				
					{
   "page": 1,
   "limit": 10,
   "total": 177,
   "data": [
       {
           "id": 36,
           "vendor": {
               "id": 19,
               "name": "Linxio"
           },
           "model": {
               "id": 35,
               "name": "TR500",
               "protocol": null
           },
           "sn": null,
           "status": "driving",
           "team": {},
           "port": 0,
           "hw": null,
           "sw": null,
           "imei": "865284042823603",
           "phone": "+375445154982",
           "imsi": null,
           "installDate": "2020-01-17T08:35:38+00:00",
           "deviceInstallation": {
               "id": 295,
               "deviceId": 36,
               "vehicleId": 1157,
               "device": {...},
               "vehicle": {...},
               "installDate": "2020-01-17T08:35:38+00:00",
               "uninstallDate": null,
               "files": [],
               "odometer": null
           },
           "createdAt": "2019-08-13T11:43:40+00:00",
           "createdBy": null,
           "updatedAt": "2020-09-11T11:40:55+00:00",
           "updatedBy": {...},
           "trackerData": null,
           "blockingMessage": null,
           "lastActiveTime": null
       }
   ],
   "aggregations": null
}

				
			

Get Device By ID

GET – api.linxio.com/api/devices/{deviceId}

Sample Request
				
					
GET 'https://api.linxio.com/api/devices/354' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0'

				
			
Sample Response
				
					
{
   "id": 354,
   "vendor": {...},
   "model": {...},
   "sn": "1232",
   "status": "stopped",
   "team": {...},
   "port": 0,
   "hw": null,
   "sw": null,
   "imei": "8670600380281511",
   "phone": "+375445154982",
   "imsi": null,
   "userName": "usernameeee",
   "password": null,
   "installDate": null,
   "deviceInstallation": null,
   "createdAt": "2021-03-01T17:24:43+00:00",
   "createdBy": {...},
   "updatedAt": "2021-03-02T12:21:20+00:00",
   "updatedBy": {...},
   "trackerData": null,
   "blockingMessage": null,
   "lastActiveTime": null
}

				
			

Create Vehicle

POST – api.linxio.com/api/vehicles

Sample Request
				
					
POST 'https://api.linxio.com/api/vehicles' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--header 'Content-Type: application/json' \
--data-raw '{
   "type": "Car",
   "make": "make",
   "makeModel": "model",
   "defaultLabel": "title",
   "regNo": "regno123567",
   "depotId": 25,
   "vin": "vin4444",
   "regDate": "2021-03-02T00:00:00+11:00",
   "enginePower": 200,
   "engineCapacity": 200,
   "fuelType": 1,
   "fuelTankCapacity": 300,
   "averageFuel": 200,
   "emissionClass": "1",
   "co2Emissions": 33,
   "grossWeight": 1000,
   "ecoSpeed": 90,
   "excessiveIdling": 120,
   "teamId": 103
}'

				
			
Sample Response
				
					
{
   "id": 1553,
   "teamId": 103,
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   },
   "depot": {
       "id": 25,
       "name": "Queensland",
       "status": 1,
       "createdAt": "2019-08-13T11:43:36+00:00",
       "color": "#e4e414"
   },
   "type": "Car",
   "model": "make model",
   "makeModel": "model",
   "make": "make",
   "unavailableMessage": null,
   "regNo": "regno123567",
   "defaultLabel": "title",
   "vin": "vin4444",
   "regDate": "2021-03-01T13:00:00+00:00",
   "regCertNo": null,
   "enginePower": 200,
   "engineCapacity": 200,
   "fuelType": 1,
   "emissionClass": "1",
   "co2Emissions": 33,
   "grossWeight": 1000,
   "groups": [],
   "status": "offline",
   "year": null,
   "fuelTankCapacity": 300,
   "driver": null,
   "createdAt": "2021-03-02T08:08:23+00:00",
   "createdBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "updatedAt": null,
   "updatedBy": null,
   "deviceId": null,
   "picture": null,
   "areas": [],
   "todayData": {
       "distance": 0,
       "duration": 0
   },
   "ecoSpeed": 90,
   "excessiveIdling": 120,
   "averageFuel": 200,
   "engineOnTime": null,
   "averageDailyMileage": null,
   "mileage": null

				
			

Edit Vehicle

POST – api.linxio.com/api/vehicles/{vehicleId}

Sample Request
				
					
POST 'https://api.linxio.com/api/vehicles/1089' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--header 'Content-Type: application/json' \
--data-raw '{
   "defaultLabel": "push 121",
   "regNo": "push121",
   "type": "Truck",
   "make": "make",
   "makeModel": "model",
   "regDate": "2021-03-03T00:00:00+11:00",
   "driverStartDate": null,
   "isUnavailable": false,
   "unavailableMessage": "",
   "clientNote": "",
   "teamId": 103,
   "groupIds": [
       32
   ],
   "depotId": 25
}'

				
			
Sample Response
				
					
{
   "id": 1089,
   "teamId": 103,
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   },
   "depot": {
       "id": 25,
       "name": "Queensland",
       "status": 1,
       "createdAt": "2019-08-13T11:43:36+00:00",
       "color": "#e4e414"
   },
   "type": "Truck",
   "model": "make model",
   "makeModel": "model",
   "make": "make",
   "unavailableMessage": null,
   "regNo": "push121",
   "defaultLabel": "push 121",
   "vin": null,
   "regDate": "2021-03-02T13:00:00+00:00",
   "regCertNo": null,
   "enginePower": 0,
   "engineCapacity": 0,
   "fuelType": null,
   "emissionClass": null,
   "co2Emissions": 0,
   "grossWeight": 0,
   "groups": [
       {
           "id": 32,
           "name": "Service Vans",
           "color": "#ffff00"
       }
   ],
   "status": "offline",
   "year": null,
   "fuelTankCapacity": null,
   "driver": null,
   "createdAt": "2019-08-13T11:43:38+00:00",
   "createdBy": null,
   "updatedAt": "2021-03-02T14:41:31+00:00",
   "updatedBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "deviceId": null,
   "picture": null,
   "areas": [],
   "todayData": {
       "distance": 0,
       "duration": 0
   },
   "ecoSpeed": 0,
   "excessiveIdling": 0,
   "averageFuel": 0,
   "engineOnTime": null,
   "averageDailyMileage": null,
   "mileage": null
}

				
			

Get Vehicle By Id

GET – api.linxio.com/api/vehicles/{vehicleId}

Sample Request
				
					
GET 'https://api.linxio.com/api/vehicles/1089' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0'

				
			
Sample Response
				
					
{
   "id": 1089,
   "teamId": 102,
   "team": {...},
   "depot": null,
   "type": "Car",
   "model": null,
   "makeModel": null,
   "make": null,
   "unavailableMessage": null,
   "regNo": "015RSJ",
   "defaultLabel": "Jeff",
   "vin": null,
   "regDate": null,
   "regCertNo": null,
   "enginePower": 0,
   "engineCapacity": 0,
   "fuelType": null,
   "emissionClass": null,
   "co2Emissions": 0,
   "grossWeight": 0,
   "groups": [...],
   "status": "offline",
   "year": null,
   "fuelTankCapacity": null,
   "driver": null,
   "createdAt": "2019-08-13T11:43:38+00:00",
   "createdBy": null,
   "updatedAt": "2020-05-27T08:55:10+00:00",
   "updatedBy": {...},
   "deviceId": null,
   "picture": null,
   "areas": [],
   "todayData": {
       "distance": 0,
       "duration": 0
   },
   "ecoSpeed": 0,
   "excessiveIdling": 0,
   "averageFuel": 0,
   "engineOnTime": null,
   "averageDailyMileage": null,
   "mileage": null
}

				
			

Create Client User

POST – api.linxio.com/api/clients/{clientId}/users

Sample Request
				
					
POST 'https://api.linxio.com/api/clients/20/users' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--data-raw '{
   "name": "test user name",
   "surname": "test user surname",
   "email": "testuser@linxio.local",
   "roleId": 6,
   "position": "",
   "phone": "+123456789876"
}'

				
			
Sample Response
				
					
{
   "id": "585",
   "email": "testuser@linxio.local",
   "name": "test user name",
   "surname": "test user surname",
   "role": {
       "id": 6,
       "name": "admin",
       "team": "client",
       "displayName": "Admin"
   },
   "roleId": 6,
   "position": "",
   "phone": "+123456789876",
   "status": "new",
   "picture": null,
   "createdAt": "2021-03-02T08:31:30+00:00",
   "createdById": "361",
   "updatedAt": null,
   "createdByName": "Super Admin",
   "lastLoggedAt": null,
   "is2faEnabled": false,
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   },
   "blockingMessage": null,
   "driverId": null,
   "managedTeams": null,
   "isPhoneVerified": false,
   "teamType": "client",
   "timezone": {
       "id": 386,
       "displayName": "(UTC+11:00) Australia/Sydney",
       "name": "Australia/Sydney"
   },
   "userGroups": [],
   "driverSensorId": null
}

				
			

Edit Client User

POST – api.linxio.com/api/clients/{clientId}/users/{userId}

Sample Request
				
					
POST 'https://api.linxio.com/api/clients/120/users/389' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--form 'name="client-user-name-9"' \
--form 'surname="client-user-name-9"' \
--form 'roleId="6"' \
--form 'phone="+0112345679"' \
--form 'isBlocked="false"' \
--form 'blockingMessage="null"' \
--form 'groups[]="1"'

				
			
Sample Response
				
					
{
   "id": "389",
   "email": "ian.dickson@acme.local",
   "name": "client-user-name-9",
   "surname": "client-user-name-9",
   "role": {
       "id": 6,
       "name": "admin",
       "team": "client",
       "displayName": "Admin"
   },
   "roleId": 6,
   "position": null,
   "phone": "+0112345679",
   "status": "active",
   "picture": null,
   "createdAt": "2019-08-13T11:43:34+00:00",
   "createdById": null,
   "updatedAt": "2020-09-21T09:44:10+00:00",
   "createdByName": null,
   "lastLoggedAt": "2020-05-29T14:18:16+00:00",
   "is2faEnabled": false,
   "isBlocked": false,
   "team": {...},
   "blockingMessage": "null",
   "driverId": null,
   "managedTeams": null,
   "isPhoneVerified": false,
   "teamType": "client",
   "timezone": {
       "id": 386,
       "displayName": "(UTC+11:00) Australia/Sydney",
       "name": "Australia/Sydney"
   },
   "userGroups": [
       {
           "id": 3,
           "name": "newGroup"
       }
   ],
   "driverSensorId": null
}

				
			

Get Client Users List

GET – api.linxio.com/api/clients/{clientId}/users

Params:

  • limit – optional
  • page – optional
Sample Request
				
					
GET 'https://api.linxio.com/api/clients/120/users?limit=10&page=1' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0'

				
			
Sample Response
				
					
{
   "page": 1,
   "limit": 1,
   "total": 34,
   "data": [
       {
           "id": "376",
           "email": "acme-admin@linxio.local",
           "name": "Acme",
           "surname": "Admin",
           "role": {
               "id": 6,
               "name": "admin",
               "displayName": "Admin"
           },
           "phone": "+55501234",
           "status": "active",
           "lastLoggedAt": "2021-03-01T07:50:12+00:00",
           "driverSensorId": null
       }
   ],
   "aggregations": null
}

				
			

Get Client User By ID

GET – api.linxio.com/api/clients/{clientId}/users/{userId}

Sample Request
				
					
GET 'https://api.linxio.com/api/clients/120/users/376' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0'

				
			
Sample Response
				
					
{
   "id": "376",
   "email": "acme-admin@linxio.local",
   "name": "Acme",
   "surname": "Admin",
   "role": {...},
   "roleId": 6,
   "position": "111",
   "phone": "+55501234",
   "status": "active",
   "picture": "uploads/avatars/6f98d0bf4c5fa0c7866cafc7384d895c.png",
   "createdAt": "2019-08-13T11:43:34+00:00",
   "createdById": null,
   "updatedAt": "2020-05-22T08:54:33+00:00",
   "updatedBy": {...},
   "createdByName": null,
   "lastLoggedAt": "2021-03-01T07:50:12+00:00",
   "is2faEnabled": false,
   "team": {...},
   "blockingMessage": null,
   "driverId": "11111",
   "managedTeams": null,
   "isPhoneVerified": true,
   "teamType": "client",
   "timezone": {
       "id": 386,
       "displayName": "(UTC+11:00) Australia/Sydney",
       "name": "Australia/Sydney"
   },
   "userGroups": [],
   "driverSensorId": null
}

				
			

Install Device

POST – api.linxio.com/api/devices/{deviceId}/install

Sample Request
				
					
POST '0.0.0.0:8099/api/devices/354/install' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--header 'Content-Type: application/json' \
--data-raw '{
   "vehicleId": 1553
}'

				
			
Sample Response
				
					
{
   "id": 354,
   "vendor": {
       "id": 15,
       "name": "Linxio"
   },
   "model": {
       "id": 28,
       "name": "TR500",
       "protocol": null
   },
   "sn": "80447130716",
   "status": "offline",
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   },
   "port": 3434,
   "hw": "434",
   "sw": "121",
   "imei": "434343434",
   "phone": "+32423423423",
   "imsi": "3434",
   "installDate": "2021-03-02T09:09:03+00:00",
   "deviceInstallation": {
       "id": 666,
       "deviceId": 354,
       "vehicleId": 1553,
       "device": {
           "id": 354,
           "vendor": {
               "id": 15,
               "name": "Linxio"
           },
           "model": {
               "id": 28,
               "name": "TR500",
               "protocol": null
           },
           "sn": "80447130716",
           "status": "offline",
           "team": {
               "id": 103,
               "type": "client",
               "clientId": 120,
               "clientName": "ACME1"
           },
           "port": 3434,
           "hw": "434",
           "sw": "121",
           "imei": "434343434",
           "phone": "+32423423423",
           "imsi": "3434",
           "createdAt": "2021-03-01T17:24:43+00:00",
           "updatedAt": "2021-03-02T09:09:03+00:00",
           "blockingMessage": null
       },
       "vehicle": {
           "id": 1553,
           "team": {
               "id": 103,
               "type": "client",
               "clientId": 120,
               "clientName": "ACME1"
           },
           "type": "Car",
           "model": "make model",
           "makeModel": "model",
           "make": "make",
           "unavailableMessage": null,
           "regNo": "regno123567",
           "defaultLabel": "title",
           "vin": "vin4444",
           "regDate": "2021-03-01T13:00:00+00:00",
           "regCertNo": null,
           "enginePower": 200,
           "engineCapacity": 200,
           "fuelType": 1,
           "emissionClass": "1",
           "co2Emissions": 33,
           "grossWeight": 1000,
           "status": "online",
           "year": null,
           "fuelTankCapacity": 300,
           "createdAt": "2021-03-02T08:08:23+00:00",
           "updatedAt": null,
           "picture": null,
           "areas": [],
           "todayData": {
               "distance": 0,
               "duration": 0
           },
           "ecoSpeed": 90,
           "excessiveIdling": 120,
           "averageFuel": 200,
           "engineOnTime": null,
           "averageDailyMileage": null
       },
       "installDate": "2021-03-02T09:09:03+00:00",
       "uninstallDate": null,
       "files": [],
       "odometer": null
   },
   "createdAt": "2021-03-01T17:24:43+00:00",
   "createdBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "updatedAt": "2021-03-02T09:09:03+00:00",
   "updatedBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "trackerData": null,
   "blockingMessage": null,
   "lastActiveTime": null
}

				
			

Uninstall Device

POST – api.linxio.com/api/devices/{deviceId}/uninstall

Sample Request
				
					
POST '0.0.0.0:8099/api/devices/354/uninstall' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--header 'Content-Type: application/json' \
--data-raw '{
   "vehicleId": 1553
}'

				
			
Sample Response
				
					
{
   "id": 354,
   "vendor": {
       "id": 15,
       "name": "Linxio"
   },
   "model": {
       "id": 28,
       "name": "TR500",
       "protocol": null
   },
   "sn": "80447130716",
   "status": "inStock",
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   },
   "port": 3434,
   "hw": "434",
   "sw": "121",
   "imei": "434343434",
   "phone": "+32423423423",
   "imsi": "3434",
   "installDate": null,
   "deviceInstallation": null,
   "createdAt": "2021-03-01T17:24:43+00:00",
   "createdBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "updatedAt": "2021-03-02T09:18:13+00:00",
   "updatedBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "trackerData": null,
   "blockingMessage": null,
   "lastActiveTime": null
}

				
			

Assign driver

POST – api.linxio.com/api/vehicle/{vehicleId}/set-driver/{driverId}

Params: startDate – optional

Sample Request
				
					
POST '0.0.0.0:8099/api/vehicles/1553/set-driver/563' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0' \
--data-raw '{
   "startDate": "2020-02-19T11:00:04+03:00"
}'

				
			
Sample Response
				
					
{
   "id": 1553,
   "teamId": 103,
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   },
   "depot": {
       "id": 25,
       "name": "Queensland",
       "status": 1,
       "createdAt": "2019-08-13T11:43:36+00:00",
       "color": "#e4e414"
   },
   "type": "Car",
   "model": "make model",
   "makeModel": "model",
   "make": "make",
   "unavailableMessage": null,
   "regNo": "regno123567",
   "defaultLabel": "title",
   "vin": "vin4444",
   "regDate": "2021-03-01T13:00:00+00:00",
   "regCertNo": null,
   "enginePower": 200,
   "engineCapacity": 200,
   "fuelType": 1,
   "emissionClass": "1",
   "co2Emissions": 33,
   "grossWeight": 1000,
   "groups": [],
   "status": "offline",
   "year": null,
   "fuelTankCapacity": 300,
   "driver": {
       "id": "563",
       "email": "mike.de-vault@acme.local",
       "name": "Mike",
       "surname": "De-Vault",
       "role": {
           "id": 8,
           "name": "driver",
           "displayName": "Driver"
       },
       "phone": "+0123456789",
       "status": "active",
       "lastLoggedAt": null,
       "lastRoute": null,
       "todayData": {
           "distance": 0,
           "duration": 0
       },
       "driverSensorId": null
   },
   "createdAt": "2021-03-02T08:08:23+00:00",
   "createdBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "updatedAt": null,
   "updatedBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "deviceId": null,
   "picture": null,
   "areas": [],
   "ecoSpeed": 90,
   "excessiveIdling": 120,
   "averageFuel": 200,
   "engineOnTime": null,
   "averageDailyMileage": null,
   "mileage": null
}

				
			

Unassign Driver

POST – api.linxio.com/api/vehicle/{vehicleId}/unset-driver/{driverId}

Sample Request
				
					
POST '0.0.0.0:8099/api/vehicles/1553/unset-driver/563' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0'

				
			
Sample Response
				
					
{
   "id": 1553,
   "teamId": 103,
   "team": {
       "id": 103,
       "type": "client",
       "clientId": 120,
       "clientName": "ACME1"
   },
   "depot": {
       "id": 25,
       "name": "Queensland",
       "status": 1,
       "createdAt": "2019-08-13T11:43:36+00:00",
       "color": "#e4e414"
   },
   "type": "Car",
   "model": "make model",
   "makeModel": "model",
   "make": "make",
   "unavailableMessage": null,
   "regNo": "regno123567",
   "defaultLabel": "title",
   "vin": "vin4444",
   "regDate": "2021-03-01T13:00:00+00:00",
   "regCertNo": null,
   "enginePower": 200,
   "engineCapacity": 200,
   "fuelType": 1,
   "emissionClass": "1",
   "co2Emissions": 33,
   "grossWeight": 1000,
   "groups": [],
   "status": "offline",
   "year": null,
   "fuelTankCapacity": 300,
   "driver": null,
   "createdAt": "2021-03-02T08:08:23+00:00",
   "createdBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "updatedAt": null,
   "updatedBy": {
       "id": "361",
       "fullName": "Super Admin",
       "email": "linxio-dev@linxio.com",
       "teamType": "admin"
   },
   "deviceId": null,
   "picture": null,
   "areas": [],
   "todayData": {
       "distance": 0,
       "duration": 0
   },
   "ecoSpeed": 90,
   "excessiveIdling": 120,
   "averageFuel": 200,
   "engineOnTime": null,
   "averageDailyMileage": null,
   "mileage": null
}

				
			

Get temperature and humidity sensor list

GET /api/devices/sensors/report/temp-and-humidity

Parameters:

  • limit [int] – results per page,
  • page [int] – number of page with results,
  • fields [array] – optional,
  • startDate [string] – start date range,
  • endDate [string] – end date range,
  • label [string] – optional, sensor label,
  • sensorId [int] – optional, sensor id,
  • deviceId [int] – optional, device id,
  • sensorBLEId [string] – optional, BLE sensor id
Sample Request
				
					
GET 'https://api.linxio.com/api/devices/sensors/report/temp-and-humidity?limit=10&page=1&startDate=2021-08-01T00%3A00%3A00%2B10%3A00&endDate=2021-08-31T23%3A59%3A59%2B10%3A00' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1OTgyNjYzMjgsImVtYWlsIjoidXNlcjFAbGlueGlvLmNvbSIsImV4cCI6MTU5ODM1MjcyOH0.cPDiuCx2sHBmzbEd6kHWunPD8xlSTSdlc4WYjfU3Mpnaf_TFyeVnXGyLn6CaOCrKoK6Ul_isxGoM-3nVL1QR8yEN6f_EdTtlaJuNmtqotRRq7cCSafVj3UyioWaYudfXbtlF5f1I3q67TPD3HZ3iAt0fdx4Y9g3SpYY5YG3sZI-eg0Vl906KavbQijCso55C0yv58FcJEJ2Lq7jEk0XaMo_m0Ps63L4eq6aF4YjUeUrNG8FbNsFcZrXTS5ofPPM3PZfDOSovIAWCoP8bitS11EaDwba4_qc8AsCA6hx5_QTvlYUZ1iO9AaDk4j3b7NeGBoYybT3zAH80hJPXxx1X1UZyvipWKxUvjw1rceDyRmmk4PvqGCsCv_hamuqi2760dlZl72s1d5K3gJpZFtKsn7PQDScClR9r8BmejxuY2cw_DI8QxDWQlOtqkQyL5vp3rayzvchIiXZoQrbmT2siQ1unazLZaOPchP38huK-CVUESEAaB9ZYjdYTx7CvQX8clUNyesuCuhQvG0ixtjsw9dnanHoCv1Pjqm9NChvB9GwuXpU13NDvn_ejUcnfnefFwT3fGPnEannP3c7cIrc2PatngMGuGM7ecu75Qsl0mRuZMccVXD8obVRZThM0djS1n21fqWIlLQYhQttGQgpmtEd5l1v3wA6oiundzM-4UDs'

				
			
Sample Response
				
					
{
   "page":1,
   "limit":10,
   "total":2,
   "data":[
      {
         "id":5,
         "type":{
            "id":3,
            "vendor":{
               "id":19
            },
            "name":"LINXIO_TRACKING_BEACON_TYPE",
            "label":"Tracking Beacon"
         },
         "sensorId":"e3fa78d738b6",
         "createdAt":"2020-12-21T13:42:16+00:00",
         "createdBy":null,
         "updatedAt":"2021-08-11T15:23:50+00:00",
         "updatedBy":{
            "id":"376",
            "fullName":"Acme Admin",
            "email":"acme1-admin@linxio.local",
            "teamType":"client"
         },
         "isAutoCreated":true,
         "label":"Front6321321118",
         "team":{
            "id":103,
            "type":"client",
            "clientId":120,
            "resellerId":null,
            "clientName":"ACME1"
         }
      },
      {
         "id":9,
         "type":{
            "id":2,
            "vendor":{
               "id":19
            },
            "name":"LINXIO_TEMP_AND_HUMIDITY_TYPE",
            "label":"Temp \u0026 humidity"
         },
         "sensorId":"d497ae41f7dd",
         "createdAt":"2020-12-21T13:42:16+00:00",
         "createdBy":null,
         "updatedAt":"2021-02-11T22:21:22+00:00",
         "updatedBy":{
            "id":"376",
            "fullName":"Acme Admin",
            "email":"acme1-admin@linxio.local",
            "teamType":"client"
         },
         "isAutoCreated":true,
         "label":"Rear",
         "team":{
            "id":103,
            "type":"client",
            "clientId":120,
            "resellerId":null,
            "clientName":"ACME1"
         }
      }
   ],
   "aggregations":null
}

				
			

Get temperature and humidity sensor

POST /api/devices/sensors/report/temp-and-humidity/json


Parameters:

  • limit [int] – results per page,
  • page [int] – number of page with results,
  • sort [string] – field for order,
  • fields [array] – optional,
  • startDatel [string] – start date range,
  • endDatel [string] – end date range,
  • label [string] – optional, sensor label,
  • sensorIds [array] – array of sensor’s ids,
  • deviceId [int] – optional, device id,
  • sensorBLEId [string] – optional, BLE sensor id
Sample Request
				
					
POST 'http://localhost:8098/api/devices/sensors/report/temp-and-humidity/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MjczMDY0ODEsImV4cCI6MTYzNTk0NjQ4MSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.3oXmW46pY4UjSfhwrpFHHN_WcG3KWAd0uMSf-FAwofM2jLr_NPSZnJh0BudeYUO1aj_JcZ3ZCZU0bW28WobvY4zaE6MIzxn5SDRVbIdwl-ifO4J2PVES1DiWu35Fv75HX0RzfeITX81HnC43lG5nb6kceN5eVOAB_f6zn1zQbN1WVYrhATt5fWAEZYmsB_Iwe4GbisMGS_nNWIJm4AdWBWYLNk6wefZQI9axRQJJT_A_lWgediFT9l1j9juMoECMKjVCAXMtYrPC6mioRYIh53JD6Rf3vN30z1rTvTFZvXXS8Z0jMJ6U9l0VFVJ4frh-OtUphjQjZlaRyFPb9uvWMz_cnwnCBk_Lazs4fjKPoUe9iiX8jKiMgtSAIJ2R6dqxcj8kC9dyQV8iW7ASwMzxGbdU0VTwa4ZZVpI3KOt7divCkkwh6ot6DkO5vgFzyjmqPrE-IDW94Yat7rIk4MzuI0Jl9Kg902kar37IDfjSTfDKQ10D_5oQUmvEbuv-yDs7AASUQhiAiXPImyfW9fkJ1BDgpLEwo6Wgj8I2ForfzAEKgK42yN6Fxh1LRwivKSlSsn2mOTveJFY__G4MldrQpBw3Hk5Ic55_rFlO30Y8n72LamnBN6Er4GAd5XdaiH5EoW-uUGt_inwEheHLrJYNzJMBaFiWmQKhCaS8lsO32Xo' \
--data-raw '{
    "sort": "-occurredAt",
    "startDate": "2019-11-02T00:00:00+11:00",
    "sensorBLEId": "fe1d1f345fac",
    "endDate": "2021-11-03T23:59:59+11:00",
    "sensorIds": [5],
}'

				
			
Sample Response
				
					
{
   "page":1,
   "limit":3,
   "total":7064,
   "data":[
      {
         "deviceSensorBleId":"e3fa78d738b6",
         "deviceSensorLabel":"Front6321321118",
         "occurredAt":"2021-07-31T14:01:01+00:00",
         "regno":"001",
         "id":1811043,
         "deviceSensorId":89,
         "vehicleId":1675,
         "deviceId":528,
         "temperature":"17.17",
         "humidity":58,
         "batteryPercentage":98,
         "ambientLightStatus":0,
         "value":"17.17\u00b0C, 58%, 0",
         "deviceSensorType":3,
         "deviceSensorTypeLabel":"Tracking Beacon",
         "defaultlabel":"001",
         "position":"17 Gipps Avenue, Ryde New South Wales 2112, Australia",
         "coordinates":null
      },
      {
         "deviceSensorBleId":"e3fa78d738b6",
         "deviceSensorLabel":"Front6321321118",
         "occurredAt":"2021-07-31T14:02:01+00:00",
         "regno":"001",
         "id":1811053,
         "deviceSensorId":89,
         "vehicleId":1675,
         "deviceId":528,
         "temperature":"17.17",
         "humidity":58,
         "batteryPercentage":99,
         "ambientLightStatus":0,
         "value":"17.17\u00b0C, 58%, 0",
         "deviceSensorType":3,
         "deviceSensorTypeLabel":"Tracking Beacon",
         "defaultlabel":"001",
         "position":"17 Gipps Avenue, Ryde New South Wales 2112, Australia",
         "coordinates":null
      },
      {
         "deviceSensorBleId":"e3fa78d738b6",
         "deviceSensorLabel":"Front6321321118",
         "occurredAt":"2021-07-31T14:03:01+00:00",
         "regno":"001",
         "id":1811068,
         "deviceSensorId":89,
         "vehicleId":1675,
         "deviceId":528,
         "temperature":"17.11",
         "humidity":58,
         "batteryPercentage":98,
         "ambientLightStatus":0,
         "value":"17.11\u00b0C, 58%, 0",
         "deviceSensorType":3,
         "deviceSensorTypeLabel":"Tracking Beacon",
         "defaultlabel":"001",
         "position":"17 Gipps Avenue, Ryde New South Wales 2112, Australia",
         "coordinates":null
      }
   ]
}

				
			

Get temperature and humidity sensor list by vehicle

GET /api/vehicles/report/sensors/temp-and-humidity

Parameters:

  • limit [int] – results per page,
  • page [int] – number of page with results,
  • fields [array] – optional,
  • startDate [string] – start date range,
  • endDate [string] – end date range,
  • defaultlabel [string] – optional, vehicle label,
  • regno [string] – optional, vehicle regno,
  • groups [array|null] – optional, array of vehicle group ids or `null` if without groups
  • depot [array|null] – optional, array of depot ids or `null` if without depots
Sample Request
				
					
GET 'https://api.linxio.com/api/vehicles/report/sensors/temp-and-humidity?startDate=2019-08-20T11:00:04%2B00:00&endDate=2021-12-20T11:00:04%2B00:00&depot%5B%5D=66' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1OTgyNjYzMjgsImVtYWlsIjoidXNlcjFAbGlueGlvLmNvbSIsImV4cCI6MTU5ODM1MjcyOH0.cPDiuCx2sHBmzbEd6kHWunPD8xlSTSdlc4WYjfU3Mpnaf_TFyeVnXGyLn6CaOCrKoK6Ul_isxGoM-3nVL1QR8yEN6f_EdTtlaJuNmtqotRRq7cCSafVj3UyioWaYudfXbtlF5f1I3q67TPD3HZ3iAt0fdx4Y9g3SpYY5YG3sZI-eg0Vl906KavbQijCso55C0yv58FcJEJ2Lq7jEk0XaMo_m0Ps63L4eq6aF4YjUeUrNG8FbNsFcZrXTS5ofPPM3PZfDOSovIAWCoP8bitS11EaDwba4_qc8AsCA6hx5_QTvlYUZ1iO9AaDk4j3b7NeGBoYybT3zAH80hJPXxx1X1UZyvipWKxUvjw1rceDyRmmk4PvqGCsCv_hamuqi2760dlZl72s1d5K3gJpZFtKsn7PQDScClR9r8BmejxuY2cw_DI8QxDWQlOtqkQyL5vp3rayzvchIiXZoQrbmT2siQ1unazLZaOPchP38huK-CVUESEAaB9ZYjdYTx7CvQX8clUNyesuCuhQvG0ixtjsw9dnanHoCv1Pjqm9NChvB9GwuXpU13NDvn_ejUcnfnefFwT3fGPnEannP3c7cIrc2PatngMGuGM7ecu75Qsl0mRuZMccVXD8obVRZThM0djS1n21fqWIlLQYhQttGQgpmtEd5l1v3wA6oiundzM-4UDs'

				
			
Sample Response
				
					
{
   "page":1,
   "limit":10,
   "total":1,
   "data":[
      {
         "id":1675,
         "team":{
            "id":103,
            "type":"client",
            "clientId":120,
            "resellerId":null,
            "clientName":"ACME1"
         },
         "depot":{
            "id":66,
            "name":"Fairfield",
            "status":1,
            "createdAt":"2021-03-10T23:40:08+00:00",
            "color":"#000000"
         },
         "type":"Bus",
         "typeId":2,
         "typeName":"Bus",
         "model":"Mercedes Sprinter",
         "makeModel":"Sprinter",
         "make":"Mercedes",
         "unavailableMessage":null,
         "regNo":"001",
         "defaultLabel":"001",
         "vin":"",
         "regDate":null,
         "regCertNo":null,
         "enginePower":0,
         "engineCapacity":0,
         "fuelType":null,
         "emissionClass":"",
         "co2Emissions":0,
         "grossWeight":0,
         "groups":[
            {
               "id":80,
               "name":"NSW Plumbing",
               "color":"#ff0000"
            }
         ],
         "status":"online",
         "year":null,
         "fuelTankCapacity":null,
         "createdAt":"2021-03-10T23:29:03+00:00",
         "updatedAt":"2021-03-10T23:39:38+00:00"
      }
   ],
   "aggregations":null
}

				
			

Get temperature and humidity sensor by vehicle

POST /api/devices/sensors/report/temp-and-humidity/vehicles/json


Parameters:

  • limit [int] – results per page,
  • page [int] – number of page with results,
  • sort [string] – field for order,
  • fields [array] – optional,
  • startDatel [string] – start date range,
  • endDatel [string] – end date range,
  • vehicleIds [array] – optional, array of vehicle’s ids,
  • vehicleDefaultLabel [string] – optional, vehicle label,
  • vehicleRegNo [string] – optional, vehicle regno,
  • deviceSensorBleId [string] – optional, BLE sensor id
Sample Request
				
					
POST 'http://localhost:8098/api/devices/sensors/report/temp-and-humidity/vehicles/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MjczMDY0ODEsImV4cCI6MTYzNTk0NjQ4MSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.3oXmW46pY4UjSfhwrpFHHN_WcG3KWAd0uMSf-FAwofM2jLr_NPSZnJh0BudeYUO1aj_JcZ3ZCZU0bW28WobvY4zaE6MIzxn5SDRVbIdwl-ifO4J2PVES1DiWu35Fv75HX0RzfeITX81HnC43lG5nb6kceN5eVOAB_f6zn1zQbN1WVYrhATt5fWAEZYmsB_Iwe4GbisMGS_nNWIJm4AdWBWYLNk6wefZQI9axRQJJT_A_lWgediFT9l1j9juMoECMKjVCAXMtYrPC6mioRYIh53JD6Rf3vN30z1rTvTFZvXXS8Z0jMJ6U9l0VFVJ4frh-OtUphjQjZlaRyFPb9uvWMz_cnwnCBk_Lazs4fjKPoUe9iiX8jKiMgtSAIJ2R6dqxcj8kC9dyQV8iW7ASwMzxGbdU0VTwa4ZZVpI3KOt7divCkkwh6ot6DkO5vgFzyjmqPrE-IDW94Yat7rIk4MzuI0Jl9Kg902kar37IDfjSTfDKQ10D_5oQUmvEbuv-yDs7AASUQhiAiXPImyfW9fkJ1BDgpLEwo6Wgj8I2ForfzAEKgK42yN6Fxh1LRwivKSlSsn2mOTveJFY__G4MldrQpBw3Hk5Ic55_rFlO30Y8n72LamnBN6Er4GAd5XdaiH5EoW-uUGt_inwEheHLrJYNzJMBaFiWmQKhCaS8lsO32Xo' \
--data-raw '{
    "sort": "deviceSensorLabel",
    "startDate": "2019-01-02T00:00:00+11:00",
    "endDate": "2021-11-03T23:59:59+11:00",
    "fields": [
        "occurredAt",
        "deviceSensorId",
        "deviceSensorLabel",
        "value",
        "position",
        "deviceSensorTypeLabel"
    ],
   "vehicleIds": [1675]
}'

				
			
Sample Response
				
					
{
   "page":1,
   "limit":2,
   "total":72327,
   "data":[
      {
         "regno":"001",
         "occurredAt":"2021-07-31T14:00:01+00:00",
         "deviceSensorBleId":"DEADFECA5344",
         "deviceSensorLabel":"tb_DEADFECA5344",
         "id":1811030,
         "vehicleId":1675,
         "deviceId":528,
         "deviceSensorId":113,
         "temperature":"15.95",
         "humidity":60,
         "batteryPercentage":99,
         "ambientLightStatus":0,
         "deviceSensorType":3,
         "value":"15.95\u00b0C, 60%, 0",
         "deviceSensorTypeLabel":"Tracking Beacon",
         "defaultlabel":"001",
         "model":"Mercedes Sprinter",
         "position":"17 Gipps Avenue, Ryde New South Wales 2112, Australia",
         "coordinates":null
      },
      {
         "regno":"001",
         "occurredAt":"2021-07-31T14:00:01+00:00",
         "deviceSensorBleId":"d497ae41f7dd",
         "deviceSensorLabel":"Rear",
         "id":1811034,
         "vehicleId":1675,
         "deviceId":528,
         "deviceSensorId":90,
         "temperature":"16.43",
         "humidity":60,
         "batteryPercentage":98,
         "ambientLightStatus":0,
         "deviceSensorType":2,
         "value":"16.43\u00b0C, 60%, 0",
         "deviceSensorTypeLabel":"Temp \u0026 humidity",
         "defaultlabel":"001",
         "model":"Mercedes Sprinter",
         "position":"17 Gipps Avenue, Ryde New South Wales 2112, Australia",
         "coordinates":null
      }
   ],
   "additionalFields":{
      "total":{
         "regno":"001",
         "occurred_at":"2021-07-31T14:00:01+00:00",
         "device_sensor_ble_id":"DEADFECA5344",
         "device_sensor_label":"tb_DEADFECA5344",
         "id":1811030,
         "vehicle_id":1675,
         "device_id":528,
         "device_sensor_id":113,
         "temperature":"15.95",
         "humidity":60,
         "battery_percentage":99,
         "ambient_light_status":0,
         "device_sensor_type":3,
         "value":"15.95\u00b0C, 60%, 0",
         "device_sensor_type_label":"Tracking Beacon",
         "defaultlabel":"001",
         "model":"Mercedes Sprinter",
         "position":"17 Gipps Avenue, Ryde New South Wales 2112, Australia",
         "coordinates":null
      }
   }
}

				
			

Get Drivers List

GET – api.linxio.com/api/clients/{clientId}/users?role=driver

Sample Request
				
					
GET 'https://api.linxio.com/api/clients/20/users?role=driver' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2MTQ2MTkyMTUsImV4cCI6MTYxNDcwNTYxNSwiZW1haWwiOiJsaW54aW8tZGV2QG9jc2ljby5jb20ifQ.Zlmnh1zRtrcirjWoVIHpUEMaQFy705x9rcSV_3FzoPEqSaagdBSbGgtLYhvQa7m0oD10UZRCbb8FBG95I7lDu3BKWA5UjmRZQHk9-9YgZCnN3UWkX8SOwRYAUotvttgQv7c64Tg28gq1BdqYvWpN7sWrQflA1ZktzzNkEMLmKhniuAgGVVduPrwZT4ShAJGk5FIBFDT5ACYHBrx5cLxnDNYxBheJFNcIyqfItJTPSG234HHEQE8UOeEGGTffFt8V_c8pGmWGAjyj65ZIQO2-6Y0tQaNmKstqCJPLena6jGQzXfQ-ZXT0MlrB7Ct-2oU5qotBArAOkRetS7pk830HG88mmaGHboTFMGAu0gt4A7ozGvUPcn2ftmbmYVb2N26O3om4Mt5R1wp5DZu8pJNoXbFiXa0byoS3-WikyB-GwLnnHAehIeNlKub0iNuXLSaH3ChjK8QYtgoTcOHAassccn1xhdFkGebXZoZTi7BDZYMQd5lE8eTnTbsGENFTs1zTcD5UpWT7WE-5rZn_LIOv7hu5wK6utW7m7V4XTIIoGI-oBLiHxvKq6h_JuhTpkCoyJjApbk_qDNYF00Ayv87Y6-HkkrWextTFNKd5Hvq2pAStXbPbHGiHRWhjKEEKyuZTUlKLONgAk84OvqMmc6TW85OsJjoO4wSh3BNnWQg_tR0'

				
			
Sample Response
				
					{
   "page": 1,
   "limit": 10,
   "total": 34,
   "data": [
       {
           "id": "386",
           "email": "client-user-9@ocsico.com",
           "name": "client-user-name-9",
           "surname": "client-user-name-9",
           "role": {
               "id": 8,
               "name": "driver",
               "displayName": "Driver"
           },
           "phone": "+0112345679",
           "status": "blocked",
           "lastLoggedAt": "2020-07-22T10:57:44+00:00",
           "lastRoute": null,
           "todayData": {
               "distance": 0,
               "duration": 0,
               "avgSpeed": 0
           },
           "driverSensorId": null
       },
	………
]

				
			

Web Sockets

This section is showing samples using JavaScript; any other programming language can be used

Connecting to the socket

First you should perform authorization using the API as described in Authorize section and get a token which should be used while connecting to the web socket.

There are 2 web sockets available:

  1. To receive live tracking information, connect to
    track.linxio.com/coordinates
  2. To receive notifications, connect to
    track.linxio.com/notifications
Sample
				
					
const socket = io(
   'https://track.linxio.com/coordinates',
   {
       transports: ['websocket'],
       query: { token: '2fcab50712467eab4004583eb8fb7f89' },
   }
)
 
socket.on('error', (error) => {
   if (error === 'AUTH_FAILED') {
       ...
   }
})

				
			

Reconnection

In case socket connection was interrupted for some reason, reconnection procedure should be performed

Sample
				
					
subscribe(vehicleIds: number[]) {
   socket.emit('subscribe', {vehicleIds })
}
 
socket.on('reconnect', () => subscribe([1, 22, 34]))
				
			

Receiving live tracking data

To start receiving live tracking data, perform the following steps:

  1. Connect to the coordinates socket;
  2. Use API to get Get Vehicles List;
  3. Subscribe for selected vehicles:
				
					
socket.on('connect', () => {
  socket.emit('subscribe', { vehicleIds: [20, 26, 11] }, response => {
   console.log(response)
 })
})
				
			

4. Process incoming data:

				
					
socket.on('coordinates', coordinates => {
  console.log(coordinates)
})
				
			

Models

				
					
interface TrackerHistoryPayload {
 vehicleId: number
 coordinates: Coordinate[]
 status: DeviceStatus | null
}
 
interface Coordinate {
 id: number
 ts: string // representing date in ISO format
 lng: number
 lat: number
}
 
interface DeviceStatus {
 angle: number
 speed: number
 movement: boolean
 engineOnTime: number | null
 odometer: number | null
 externalVoltage: number | null
 ibutton: string | null
 ignition: boolean
 temperature: [number | null, number | null, number | null]
 inputsStatus: [number, number, number, number]
 deviceStatus: 'inStock' | 'driving' | 'idle' | 'stopped' | 'offline' | 'unavailable' | 'deleted'
}

				
			

Receiving notifications

To start receiving live tracking data, perform the following steps:

  1. Connect to the notification socket;
  2. Process incoming data:
				
					
socket.on('notification', notification => {
 console.log(notification)
})
				
			

Models

				
					
export interface Notification {
 id: number
 recipient: string
 subject: string
 message: string
 isRead: boolean
 sendingTime: string
 occurrenceTime: string
 event: {
   vehicleId?: number
   reminderId?: number
   documentId?: number
   userId?: number
   clientId?: number
   deviceId?: number
   areahistoryId?: number
   trackerhistoryId?: number
   speedingId?: number
   eventSourceType: EventSourceType
   entityTeam: Team
   eventLogId: number
   eventId: number
    }
}
 
export enum EventSourceType {
 Vehicle = 'vehicle',
 Reminder = 'reminder',
 Document = 'document',
 User = 'user',
 Client = 'client',
 Device = 'device',
 Area = 'area',
 TrackerHistory = 'trackerhistory',
 Speeding = 'speeding',
}

				
			
Arrow-up
Logo PNG

To buy a GPS tracker for your personal car,
please visit our online store at linxio.store