---
title: "Delete Vehicle by ID"
method: DELETE
path: "/vehicles/{id}"
tags: ["Vehicles"]
---

# Delete Vehicle by ID

`DELETE /vehicles/{id}`

## Request

- Base URL: `https://api.smartroutes.io/v2`
- URL: `https://api.smartroutes.io/v2/vehicles/{id}`
- Auth: none declared

Removes a vehicle from your depot's fleet. Afterwards, the vehicle is no longer returned by `GET /vehicles` and can't be fetched or updated. Its capacities and skills are removed. Any assignments of this vehicle to orders, customers or plan visits are also removed, so those orders and customers are no longer tied to it. The response is `{"deleted": {"vehicles_count": 1}}`.

## Path parameters

- `id` number, required

## Response `200`

Successful response

## Other responses

- `403`: Forbidden. Returned for rate-limit exhaustion (`name = FORBIDDEN`, with `details.retry_after_seconds` and `Retry-After` header) and permission gate failures (`name = PERMISSION`). Inspect `name` to disambiguate. Send `x-sr-api-features: rate-limit-429` to receive `429 RATE_LIMIT_EXCEEDED` for the rate-limit case instead, leaving `403` to mean permission failures only — see [API Features](#section/Getting-started/API-Features).
- `404`: The requested resource was not found.
- `429`: Rate limit exceeded (`name = RATE_LIMIT_EXCEEDED`). **Only returned to callers that opt in** with the `x-sr-api-features: rate-limit-429` request header; without it the same condition returns `403` with `name = FORBIDDEN` and an otherwise identical body. See [API Features](#section/Getting-started/API-Features).
- `500`: An unexpected server error occurred. The body carries only `name` and `description`: internal details are never returned.

---

[API](https://skmtc.dev/smartroutes/apis/smartroutes-api.md) · [All operations](https://skmtc.dev/smartroutes/apis/smartroutes-api/llms.txt) · [OpenAPI document](https://skmtc.dev/smartroutes/apis/smartroutes-api/revisions/a7ea507afac7?raw)
