EZO Logo

Asset Intelligence, Reimagined

AssetSonar Blogs Location Tracking Assets Api

[How-to] Simplify GPS Asset Tracking With API Integration

Share:

IT administrators configure and maintain thousands of IT assets every day. Knowing where the assets are, their state, and whether any action is required can be time-consuming, especially when communicating with third-party GPS services. 

Integrating AssetSonar with third-party GPS providers via API simplifies tracking asset locations. API integration enables IT admins to access location coordinates in AssetSonar. These coordinates are updated in real-time as soon as they are saved and asset identification numbers are matched with GPS asset IDs in middleware – a third-party-provided software. 

Leverage asset location tracking via API to eliminate the need to switch platforms and ensure complete asset visibility. 

Benefits of using GPS tracking via API integration

  1. Seamless asset tracking:   Find out the current location of assets in real time. IT admins can see how their assets are being used – remote or onsite, and act promptly to resolve downtime issues. 
  2. Improved security: Users can push coordinates to AssetSonar directly from their system. These coordinates are reflected on the map in AssetSonar with a timestamp of the last update that can help recognize and recover stolen or misplaced assets. 
  3. Informed decision-making: Knowing where your assets are at all times can quickly identify assets that are missing. Having a record of how and why these assets went missing helps better manage assets and make informed decisions. 

1. Enable API integration 

To enable GPS tracking, you are required to enable API integration first. Go to Settings → Integrations → API Integration → Click ‘Enabled’. 

1. Enable API integration 

1.1. Enable location tracking for assets

This setting allows you to reflect and update device coordinates on AssetSonar for real-time location tracking. Go to Settings → Integrations → Location Tracking for Assets via API → Click ‘Enabled’. 

1. Enable API integration 

2. Set up API integration

To set up API integration, go to ‘Update GPS coordinates’ under Fixed Assets on the AssetSonar API page. Use this code to push device coordinates from your system to the AssetSonar account. 

curl  -H "token:<COMPANY_TOKEN>" -X PATCH \
      -d "gps_asset_id=<GPS_ASSET_ID>" \
      -d "latitude=<LATITUDE_VALUE>" \
      -d "longitude=<LONGITUDE_VALUE>" \
      https://<SUBDOMAIN>.assetsonar.com/assets/<ASSET#>/gps_coordinates.api

Here are some steps to follow and swiftly add exact location coordinates:

  1. Copy and paste the above code into your system (Type Windows+R)
  2. Change the ‘COMPANY_TOKEN’ with your secret key.
  3. Mention the GPS Asset ID in your code to specify the code. You can add an ID or even leave the field empty.
  4. Enter the latitude and longitude of your asset’s location in ‘LATITUDE_VALUE’ AND ‘LONGITUDE_VALUE’. These are the location coordinates of the place your asset is at. You can change these values from the code if your asset’s location changes. The location coordinates can be up to 12 decimal places to account for precision in location tracking. 
  5. Put your subdomain before ‘.ezofficeinventory.com’ in the above code and your asset number in your account as ‘ASSET#’. 

Note: The ‘Asset#’ in your AssetSonar account can be the same or different from the asset ID in your third-party GPS tracking software.

An example of a laptop’s location coordinates is shown below. Latitude, longitude, and GPS asset ID have been assigned in the code. 

curl  -H "token:11111111111111111111111111111111" -X PATCH
-d "gps_asset_id=gid23"
-d "latitude=34.05"
-d "longitude=-118.25" https://https://d3moassetsonar.assetsonar.com/assets/3114/gps_coordinates.api

3. Push GPS coordinates in AssetSonar 

The assigned values in the code above are pushed to the front end of your account. Two new fields – GPS Asset ID and GPS location will be created on the Asset Details page.

 For our example below, the GPS Asset ID is gid23, and the GPS location shows a latitude value of 34.05 and a longitude value of -118.25, the same as in the code. 

3. Push GPS coordinates in AssetSonar

When you click on GPS location coordinates, an overlay will appear that shows your asset on the map. You can zoom in or out of the map to suit your requirements. 

3. Push GPS coordinates in AssetSonar1

Click on ‘Refresh location’ to get the most recent asset location. The coordinates and last updated date and time will change if you have updated the coordinates from the backend. 

4. Check asset location on the map 

Alternatively, you can check your asset location from Locations → Select ‘GPS Location(s)’ from the dropdown → Click on the map icon. 

Check asset location on the map

After selecting GPS locations, the map will show your asset on the map. The location of the laptop in Los Angeles is shown below. You can check the details of your asset’s coordinates and last updated date by clicking the location icon. 

Check asset location on the map1

By following these simple and easy steps you can integrate your GPS tracking system with AssetSonar for faster asset management and tracking. 

Was this helpful?

Thanks for your feedback!

Powerful IT Asset Management Tool - at your fingertips

Empower your teams, streamline IT operations, and consolidate all your IT asset management needs through one platform.
G2 leader summer 2024
Index

Personalized Demo For You

Please share your details below & let our Product Specialist get back to you