Your First API Request

Get started with the Lattis - Nexus API by making your first request. Follow this step-by-step guide to retrieve vehicle data from your fleet.

Prerequisites

  • A Lattis - Nexus developer account
  • Your API key (generated in the developer portal)
  • A development environment with your preferred programming language

Step-by-Step Guide

1

Install SDK

Install the Lattis - Nexus SDK for your preferred programming language

npm
npm install @lattis-nexus/sdk
pip
pip install lattis-nexus
maven
<dependency>
  <groupId>com.lattisnexus</groupId>
  <artifactId>sdk</artifactId>
  <version>2.0.0</version>
</dependency>
2

Initialize Client

Create a client instance with your API key

js
const client = new LattisNexusClient({
  apiKey: 'your_api_key'
});
python
client = Client(api_key='your_api_key')
3

Make Request

Send your first API request to get vehicle data

js
const vehicles = await client.fleet.getVehicles();
python
vehicles = client.fleet.get_vehicles()
4

Handle Response

Process the API response data

js
vehicles.forEach(vehicle => {
  console.log('Vehicle ID:', vehicle.id);
});
python
for vehicle in vehicles:
    print(f"Vehicle ID: {vehicle.id}")

Complete Examples

cURL
curl -X GET "https://api.lattis-nexus.com/v2/fleet/vehicles" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json"
Python
from lattis_nexus import Client

client = Client(api_key='your_api_key')

# Get list of vehicles
vehicles = client.fleet.get_vehicles()

# Print vehicle details
for vehicle in vehicles:
    print(f"Vehicle ID: {vehicle.id}")
    print(f"Status: {vehicle.status}")
    print(f"Location: {vehicle.location}")
JavaScript
import { LattisNexusClient } from '@lattis-nexus/sdk';

const client = new LattisNexusClient({
  apiKey: 'your_api_key'
});

// Get list of vehicles
const vehicles = await client.fleet.getVehicles();

// Print vehicle details
vehicles.forEach(vehicle => {
  console.log('Vehicle ID:', vehicle.id);
  console.log('Status:', vehicle.status);
  console.log('Location:', vehicle.location);
});

Try it Live

Test your first API request in our interactive playground. No setup required - just click and send!