Skip to main content
GET
/
v1.0.0
/
vehicles
All vehicles
curl --request GET \
  --url https://api.energy-hub.io/v1.0.0/vehicles \
  --header 'X-API-KEY: <api-key>'
{
  "totalPages": 1,
  "content": [
    {
      "lastUpdated": "2023-11-07T05:31:56Z",
      "vendor": "TESLA",
      "name": "My Tesla",
      "vin": "1XKAD29X0KS502460",
      "isOnline": true,
      "model": "Model 3",
      "id": "6eb5497d-c6bb-4290-84ef-4409fe9501f1",
      "userId": "896f9d5a-b618-48a2-98ae-957059bf1bc9"
    }
  ],
  "totalElements": 1
}

Authorizations

X-API-KEY
string
header
required

API key used for authorization and authentication.

Query Parameters

sortField
enum<string>
required

Sorting field. Default value is USER_ID

Available options:
USER_ID,
VENDOR,
IS_ONLINE,
LAST_UPDATED
uuid
string<uuid>

Search by vehicle UUID

userId
string

Search by user ID (partial match, case-insensitive)

vin
string

Search by vehicle VIN (partial match, case-insensitive)

isOnline
boolean

Filter by online status

name
string

Search by vehicle display name (partial match, case-insensitive)

vendor
enum<string>

Filter by vendor

Available options:
TESLA,
MERCEDES,
BMW,
MINI,
VW,
AUDI,
SKODA,
VOLVO,
CUPRA
model
string

Search by vehicle model (partial match, case-insensitive)

lastUpdatedFrom
string<date-time>

Filter by UTC last updated date (from this date onwards).

lastUpdatedTo
string<date-time>

Filter by UTC last updated date (To this date).

sortOrder
enum<string>
required

Sorting order. Default value is DESC.

Available options:
ASC,
DESC
page
integer
required

Zero-based page index (0..N)

Required range: x >= 0
size
integer
required

The size of the page to be returned. Default value is 10. Maximum value is 100.

Required range: 1 <= x <= 100

Response

Successful operation

totalPages
integer
required

Total number of pages.

Example:

1

content
object[]
required

Elements in the page. If there is no elements the list will be empty.

totalElements
integer
required

Total number of elements.

Example:

1