---
title: "Close Vehicle"
method: POST
path: "/api/vehicles/{vehicle_id}/close"
tags: ["Vehicles (Protected)"]
---

# Close Vehicle

`POST /api/vehicles/{vehicle_id}/close`

Close a vehicle.

Business rules:
- Checks for unpaid movements before closing
- If unpaid movements exist and force=False, returns warning with details
- If force=True, closes despite unpaid movements

Sets:
- fechado = True
- datafecho = now

Returns:
- If unpaid movements exist (and force=False): Warning response with unpaid details
- If successful: Vehicle data with success message

## Path parameters

- `vehicle_id` integer, required

## Query parameters

- `force` boolean — Force close despite unpaid movements

## Headers

- `x-api-token` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/4b44eb76b3ee/schema)
