---
title: "Create Vehicle"
method: POST
path: "/api/vehicles/"
tags: ["Vehicles (Protected)"]
---

# Create Vehicle

`POST /api/vehicles/`

Create new vehicle.

Business rules:
- IDempresa set from user's company
- Ponto_de_venda set from user's PV if not provided
- Dataentr defaults to now
- Quadro must be unique within open vehicles

## Headers

- `x-api-token` string, nullable

## Request body

- VehicleCreate — Create new vehicle request.
  - `Matricula` string, nullable — Primary license plate
  - `MatriculaSecundaria` string, nullable — Secondary license plate (national)
  - `code_matricula` string, nullable — Primary license plate country code
  - `code_matricula_secundaria` string, nullable — Secondary license plate country code
  - `Quadro` string, nullable — VIN/Chassis number
  - `Marca` integer, nullable — Brand ID (FK to MarcasViatura)
  - `Modelo` integer, nullable — Model ID (FK to ModelosViatura)
  - `Versao` string, nullable — Version/Trim
  - `Km` integer, nullable — Mileage in kilometers
  - `Motor` string, nullable — Engine code
  - `Cilindrada` string, nullable — Engine displacement (cc)
  - `Potencia` string, nullable — Power (HP or kW)
  - `Combust` integer, nullable — Fuel type ID (FK to CombustivelViatura)
  - `Caixa` integer, nullable — Gearbox ID (FK to CaixaVelocidadesViatura)
  - `Cor` integer, nullable — Color ID (FK to CoresViatura)
  - `Lugares` integer, nullable — Number of seats (FK to LugaresViatura)
  - `Portas` integer, nullable — Number of doors (FK to PortasViatura)
  - `Peso` string, nullable — Weight in kg
  - `Segmento` integer, nullable — Segment/Type ID (FK to TipoViatura)
  - `Subsegmento` integer, nullable — Subsegment ID (FK to Subsegmentos)
  - `Estado` integer, nullable — State ID (1=new, 2=sold, 3=reserved, 4=to close)
  - `Preço` number, nullable — Sale price
  - `ValorSelo` number, nullable — Stamp tax value
  - `RegimeIva` integer, nullable — VAT regime ID (FK to RegimeIva)
  - `Dataentr` string, date-time, nullable — Entry date
  - `Datamat` string, date-time, nullable — First registration date
  - `Data_Imp` string, date-time, nullable — Import date
  - `data_mat_nacional` string, date-time, nullable — National registration date
  - `ValInsp` string, date-time, nullable — Inspection validity date
  - `Fornece` integer, nullable — Supplier ID (FK to Cliente)
  - `Ponto_de_venda` integer, nullable — Point of sale ID (FK to PontosDeVenda)
  - `IDempresa` integer, nullable — Company ID - auto-set from authenticated user
  - `current_park_location_id` integer, nullable — Current physical park location (FK to Z_ParkLocations). Required when the vehicle is created with localizacao=0 (em parque). Validated at route layer to belong to the same company.
  - `Consignado` boolean, nullable — Consigned vehicle
  - `Emprestado` boolean, nullable — Loaned vehicle
  - `Seguro` boolean, nullable — Insured
  - `Importado` boolean, nullable — Imported
  - `stockpartilhado` boolean, nullable — Shared stock
  - `hidden` boolean, nullable — Hidden from listings
  - `fechado` boolean, nullable — Closed
  - `datafecho` string, date-time, nullable — Close date
  - `Fotos` string, nullable — Photos JSON or CSV
  - `bucketurl` string, nullable — S3 bucket URL for main photo
  - `Observacoes` string, nullable — Observations/Notes
  - `IDeasydata` integer, nullable — EasyData ID
  - `Estadoeasydata` integer, nullable — EasyData state
  - `reference` integer, nullable — External reference
  - `version_id` integer, nullable — Integrazu version ID
  - `gearbox_type_id` integer, nullable — Integrazu gearbox type ID
  - `gearbox_shift_id` integer, nullable — Integrazu gearbox shift ID
  - `section_id` integer, nullable — Integrazu section ID
  - `second_key_status` 'sim' | 'não' | 'requisitado', nullable — Second-key status

## Response `201`

Successful Response

- VehicleResponse — Complete vehicle response - matches Viatura table columns. All fields return IDs (hydrated) - use combo endpoints to get labels.
  - `ID` integer, required
  - `Matricula` string, nullable
  - `MatriculaSecundaria` string, nullable
  - `code_matricula` string, nullable
  - `code_matricula_secundaria` string, nullable
  - `Quadro` string, nullable
  - `Marca` integer, nullable
  - `Modelo` integer, nullable
  - `Versao` string, nullable
  - `Tipo` union
    - integer
    - string
  - `Km` integer, nullable
  - `Motor` string, nullable
  - `Cilindrada` string, nullable
  - `Potencia` string, nullable
  - `Combust` integer, nullable
  - `Caixa` integer, nullable
  - `Cor` integer, nullable
  - `Lugares` integer, nullable
  - `Portas` integer, nullable
  - `Peso` string, nullable
  - `Segmento` integer, nullable
  - `Subsegmento` integer, nullable
  - `Estado` integer, nullable
  - `Preço` number, nullable
  - `ValorSelo` number, nullable
  - `PreçoPintura` number, nullable
  - `RegimeIva` integer, nullable
  - `Dataentr` string, date-time, nullable
  - `Datamat` string, date-time, nullable
  - `Data_Imp` string, date-time, nullable
  - `data_mat_nacional` string, date-time, nullable
  - `ValInsp` string, date-time, nullable
  - `datafecho` string, date-time, nullable
  - `Fornece` integer, nullable
  - `Ponto_de_Venda` integer, nullable
  - `IDempresa` integer, required
  - `current_park_location_id` integer, nullable
  - `fechado` boolean, nullable
  - `consignado` boolean, nullable
  - `Emprestado` boolean, nullable
  - `Seguro` boolean, nullable
  - `Importado` boolean, nullable
  - `stockpartilhado` boolean, nullable
  - `hidden` boolean, nullable
  - `Fotos` string, nullable
  - `bucketurl` string, nullable
  - `Observacoes` string, nullable
  - `IDeasydata` integer, nullable
  - `Estadoeasydata` integer, nullable
  - `reference` integer, nullable
  - `version_id` integer, nullable
  - `gearbox_type_id` integer, nullable
  - `gearbox_shift_id` integer, nullable
  - `section_id` integer, nullable
  - `second_key_status` 'sim' | 'não' | 'requisitado', nullable

## 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)
