# Get a truck

> GET /api/public/v1/trucks/{id}, scope directory.read. Techvia TMS public API v1 reference.

Source: https://techvia.software/docs/tms/reference/trucks/get-a-truck/

`GET /api/public/v1/trucks/{id}`

**Scope:** `directory.read`. **MCP tool:** `get_truck`. Rules and edge cases: [Trucks guide](/docs/tms/guides/directory/).

## Parameters

| Name | In | Type | Required | Notes |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| `200` | OK | `PublicTruck` |
| `404` | Not Found | `ProblemDetails` |

### `200` body

| Field | Type | Notes |
|---|---|---|
| `id` | string (uuid) |  |
| `unitNumber` | string |  |
| `type` | string |  |
| `status` | enum AssetStatus | One of `Active`, `Inactive`, `InMaintenance`, `OutOfService` |
| `currentDriverName` | string |  |

Errors are RFC 7807 problem details; see [Errors](/docs/tms/concepts/errors/).

**Example request**

**curl**

```bash
curl "https://tms-api.techvia.software/api/public/v1/trucks/$ID" \
  -H "Authorization: Bearer $TMS_KEY"
```

**JavaScript**

```js
const id = '...'; // from a list or read call
const res = await fetch(`https://tms-api.techvia.software/api/public/v1/trucks/${id}`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.TMS_KEY}`,
  },
});
if (!res.ok) throw new Error(await res.text());
console.log(await res.json());
```

**Python**

```python

id = "..."  # from a list or read call
res = requests.request(
    "GET",
    f"https://tms-api.techvia.software/api/public/v1/trucks/{id}",
    headers={"Authorization": f"Bearer {os.environ['TMS_KEY']}"},
)
res.raise_for_status()
print(res.json())
```

**Example response** `200`

```json
{
  "id": "01a20943-7a10-7c11-8a2e-000000000020",
  "unitNumber": "T-101",
  "type": "SleeperCab",
  "status": "Active",
  "currentDriverName": "Sam Lee"
}
```

<p class="ep-caption">Illustrative values.</p>
