Vehicle Location API documentation

Authorization: Request the carrier company to grant you with the token. The given token should be included in the ‘Authorization’ header for each request. Full control over the token management is done by the carrier company

Description: Returns current information of the company vehicles.

Params

NameTypeMandatoryDefault value
pageInteger-0
sizeInteger-10

Request sample:

              
        
          curl -X 'GET' \

        'https://api.greenlighteld.com/logger/external/vehicles/current?page=0&size=10' \

        -H 'accept: */*' \

        -H 'Authorization: Bearer {token}’
        
      

Response:

The structure of response is:

      
        
          {

  "result": {

    "code": "ok",

    "description": "ok"

  },

  "content": […],

  "pageable": {

    "total": number of total elements,

    "prev": the previous page number | null,

    "next": the next page number | null,

    "current": current page number
  }
}
        
      

`pageable` is present only if response http status is 200

Sample http status: 200

      
        
          {

  "result": {

    "code": "ok",

    "description": "ok"

  },

  "content": [

    {

      "vehicle": {

        "id": 403,

        "make": "Freightliner",

        "model": "TR",

        "vin": "3AKJHHDR5JSHU5802",

        "unit_number": "424"

      },

      "driver": {

        "id": 849,

        "name": "AHADI MALAK"

      },

      "location": {

        "vehicle_coordinates": {

          "latitude": 40.353963,

          "longitude": -76.725971

        },

        "nearby_location_coordinates": {

          "latitude": 40.36351,

          "longitude": -76.74677

        },

        "distance": 1.69,

        "state": "PA",

        "location": "West Hanover Township",

        "time": "2024-04-06T08:53:52",

        "direction": "se"

      },

      "dot": "3666726"

    }

  ],

  "pageable": {

    "total": 140,

    "prev": null,

    "next": 1,

    "current": 0

  }

}
        
      

Sample http status: 403

      
        
          {

  "result": {

    "code": "forbidden",

    "description": "forbidden"

  },

  "content": null

}
        
      

Sample http status: 401

      
        
          {

  "result": {

    "code": "forbidden",

    "description": "forbidden"

  },

  "content": null

}
        
      

Description: Returns current information of the company vehicle by unit number.

Request sample:

      
        
          curl -X 'GET' \

  'https://api.greenlighteld.com/logger/external/vehicles/{unit_number}' \

  -H 'accept: */*' \

  -H 'Authorization: Bearer {token}’
        
      

Response:

The structure of response is:

      
        
          {

  "result": {

    "code": "ok",

    "description": "ok"

  },

  "content": {

    "vehicle": {

      "id": 736,

      "make": "Volvo",

      "model": "VNL",

      "vin": "4V4NC9EJ2PN615282",

      "unit_number": "826"

    },

    "driver": {

      "id": 1487,

      "name": "Mustafa Sahebzada"

    },

    "location": {

      "vehicle_coordinates": {

        "latitude": 42.8255,

        "longitude": -78.8582

      },

      "nearby_location_coordinates": {

        "latitude": 42.819444444,

        "longitude": -78.825555555

      },

      "distance": 1.24,

      "state": "NY",

      "location": "Lackawanna",

      "time": "2024-10-02T13:39:37",

      "direction": "nw"

    },

    "dot": "3666726"

  }

}