> ## Documentation Index
> Fetch the complete documentation index at: https://docs.telemax.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Get device positions

> Last positions for vehicles in the company tree, optionally filtered by vehicle ids.

### Overview

Returns last positions for vehicles in the caller’s **company tree**, optionally filtered to specific **internal** vehicle ids (`Vehicle.Id`, not legacy id).

<Note>
  A V2 version of this endpoint is available: [List vehicles](/v2/api-reference/post-vehicles-list). New integrations should prefer V2.
</Note>

### Endpoint

`POST /api/devices`

### Request body

| Field      | Type       | Required | Description                                                  |
| ---------- | ---------- | -------- | ------------------------------------------------------------ |
| vehicleIds | integer\[] | No       | Filter to internal vehicle ids; empty = all allowed vehicles |

### Example request body

```json theme={null}
{
  "vehicleIds": [15042, 15043]
}
```

### Response

**200 OK** — array of `PositionDto` (same shape as other position endpoints).

> ⚠️ **Note:** The controller declares `DeviceDto[]` but the service returns `PositionDto` instances—**trust the runtime JSON** (position fields).

### Error responses

| Status | Meaning                                              |
| ------ | ---------------------------------------------------- |
| 401    | Token missing, expired, or invalid                   |
| 403    | Token does not grant access to the requested company |
