mobilidade

Atualizar veículo

Changed on

Atualiza campos do veículo (somente proprietário). Em mudança de marca/modelo do catálogo, vehicle_type é rederivado do modelo. Para trocar para fluxo Outro (texto livre), envie brand_id/model_id como null (ou "") junto com brand_other/model_other e vehicle_type; campo omitido não altera o valor atual.

patch/citizen/{cpf}/vehicles/{vehicle_id}

Request

  • Base URL: http://localhost:8080/v1
  • URL: http://localhost:8080/v1/citizen/{cpf}/vehicles/{vehicle_id}
  • Auth: API key in header Authorization

Path parameters

cpfstring required

CPF do cidadão (11 dígitos)

vehicle_idstring required

ID do veículo

Request body

brand_idstring nullable
brand_otherstring nullable
colorstring
display_namestring
has_invoiceboolean
invoice_photo_file_namestring
invoice_photo_file_sizeinteger
invoice_photo_urlstring nullable
model_idstring nullable
model_otherstring nullable
serial_numberstring
serial_number_photo_file_namestring
serial_number_photo_file_sizeinteger
serial_number_photo_urlstring
vehicle_photo_file_namestring
vehicle_photo_file_sizeinteger
vehicle_photo_urlstring
vehicle_type'bicicleta_eletrica' | 'autopropelido' | 'ciclomotor'

Response

Veículo atualizado

brand_idstring nullable
brand_namestring nullable

BrandName is response-only: catalog brand name when brand_id is set and brand_other is empty.

brand_otherstring nullable
colorstring
conductor_idstring
created_atstring
deleted_atstring
display_namestring
has_invoiceboolean
idstring
invoice_photo_file_namestring
invoice_photo_file_sizeinteger
invoice_photo_urlstring nullable
model_idstring nullable
model_namestring nullable

ModelName is response-only: catalog model name when model_id is set and model_other is empty.

model_otherstring nullable
owner_cpfstring
owner_emailstring
owner_namestring
owner_phonestring
registration_numberstring

RegistrationNumber is a short wallet identifier generated on create (format RJ-E-XXXXXX). Not accepted in POST/PATCH.

role'owner' | 'conductor'
self_declarationboolean
serial_numberstring
serial_number_photo_file_namestring

Optional file metadata for UI detail (Apêndice A.4).

serial_number_photo_file_sizeinteger
serial_number_photo_urlstring
updated_atstring
vehicle_photo_file_namestring
vehicle_photo_file_sizeinteger
vehicle_photo_urlstring
vehicle_type'bicicleta_eletrica' | 'autopropelido' | 'ciclomotor'

Example response

{
  "registration_number": "RJ-E-000001"
}

Changes