curl --request POST \
--url https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"color": "<string>",
"display_name": "<string>",
"has_invoice": true,
"self_declaration": true,
"serial_number": "<string>",
"serial_number_photo_url": "<string>",
"vehicle_photo_url": "<string>",
"brand_id": "<string>",
"brand_other": "<string>",
"invoice_photo_file_name": "<string>",
"invoice_photo_file_size": 123,
"invoice_photo_url": "<string>",
"model_id": "<string>",
"model_other": "<string>",
"serial_number_photo_file_name": "<string>",
"serial_number_photo_file_size": 123,
"vehicle_photo_file_name": "<string>",
"vehicle_photo_file_size": 123
}
'import requests
url = "https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles"
payload = {
"color": "<string>",
"display_name": "<string>",
"has_invoice": True,
"self_declaration": True,
"serial_number": "<string>",
"serial_number_photo_url": "<string>",
"vehicle_photo_url": "<string>",
"brand_id": "<string>",
"brand_other": "<string>",
"invoice_photo_file_name": "<string>",
"invoice_photo_file_size": 123,
"invoice_photo_url": "<string>",
"model_id": "<string>",
"model_other": "<string>",
"serial_number_photo_file_name": "<string>",
"serial_number_photo_file_size": 123,
"vehicle_photo_file_name": "<string>",
"vehicle_photo_file_size": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
color: '<string>',
display_name: '<string>',
has_invoice: true,
self_declaration: true,
serial_number: '<string>',
serial_number_photo_url: '<string>',
vehicle_photo_url: '<string>',
brand_id: '<string>',
brand_other: '<string>',
invoice_photo_file_name: '<string>',
invoice_photo_file_size: 123,
invoice_photo_url: '<string>',
model_id: '<string>',
model_other: '<string>',
serial_number_photo_file_name: '<string>',
serial_number_photo_file_size: 123,
vehicle_photo_file_name: '<string>',
vehicle_photo_file_size: 123
})
};
fetch('https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'color' => '<string>',
'display_name' => '<string>',
'has_invoice' => true,
'self_declaration' => true,
'serial_number' => '<string>',
'serial_number_photo_url' => '<string>',
'vehicle_photo_url' => '<string>',
'brand_id' => '<string>',
'brand_other' => '<string>',
'invoice_photo_file_name' => '<string>',
'invoice_photo_file_size' => 123,
'invoice_photo_url' => '<string>',
'model_id' => '<string>',
'model_other' => '<string>',
'serial_number_photo_file_name' => '<string>',
'serial_number_photo_file_size' => 123,
'vehicle_photo_file_name' => '<string>',
'vehicle_photo_file_size' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles"
payload := strings.NewReader("{\n \"color\": \"<string>\",\n \"display_name\": \"<string>\",\n \"has_invoice\": true,\n \"self_declaration\": true,\n \"serial_number\": \"<string>\",\n \"serial_number_photo_url\": \"<string>\",\n \"vehicle_photo_url\": \"<string>\",\n \"brand_id\": \"<string>\",\n \"brand_other\": \"<string>\",\n \"invoice_photo_file_name\": \"<string>\",\n \"invoice_photo_file_size\": 123,\n \"invoice_photo_url\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_other\": \"<string>\",\n \"serial_number_photo_file_name\": \"<string>\",\n \"serial_number_photo_file_size\": 123,\n \"vehicle_photo_file_name\": \"<string>\",\n \"vehicle_photo_file_size\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"color\": \"<string>\",\n \"display_name\": \"<string>\",\n \"has_invoice\": true,\n \"self_declaration\": true,\n \"serial_number\": \"<string>\",\n \"serial_number_photo_url\": \"<string>\",\n \"vehicle_photo_url\": \"<string>\",\n \"brand_id\": \"<string>\",\n \"brand_other\": \"<string>\",\n \"invoice_photo_file_name\": \"<string>\",\n \"invoice_photo_file_size\": 123,\n \"invoice_photo_url\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_other\": \"<string>\",\n \"serial_number_photo_file_name\": \"<string>\",\n \"serial_number_photo_file_size\": 123,\n \"vehicle_photo_file_name\": \"<string>\",\n \"vehicle_photo_file_size\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"color\": \"<string>\",\n \"display_name\": \"<string>\",\n \"has_invoice\": true,\n \"self_declaration\": true,\n \"serial_number\": \"<string>\",\n \"serial_number_photo_url\": \"<string>\",\n \"vehicle_photo_url\": \"<string>\",\n \"brand_id\": \"<string>\",\n \"brand_other\": \"<string>\",\n \"invoice_photo_file_name\": \"<string>\",\n \"invoice_photo_file_size\": 123,\n \"invoice_photo_url\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_other\": \"<string>\",\n \"serial_number_photo_file_name\": \"<string>\",\n \"serial_number_photo_file_size\": 123,\n \"vehicle_photo_file_name\": \"<string>\",\n \"vehicle_photo_file_size\": 123\n}"
response = http.request(request)
puts response.read_body{
"brand_id": "<string>",
"brand_name": "<string>",
"brand_other": "<string>",
"color": "<string>",
"conductor_id": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"display_name": "<string>",
"has_invoice": true,
"id": "<string>",
"invoice_photo_file_name": "<string>",
"invoice_photo_file_size": 123,
"invoice_photo_url": "<string>",
"model_id": "<string>",
"model_name": "<string>",
"model_other": "<string>",
"owner_cpf": "<string>",
"owner_email": "<string>",
"owner_name": "<string>",
"owner_phone": "<string>",
"registration_number": "RJ-E-000001",
"role": "owner",
"self_declaration": true,
"serial_number": "<string>",
"serial_number_photo_file_name": "<string>",
"serial_number_photo_file_size": 123,
"serial_number_photo_url": "<string>",
"updated_at": "<string>",
"vehicle_photo_file_name": "<string>",
"vehicle_photo_file_size": 123,
"vehicle_photo_url": "<string>",
"vehicle_type": "bicicleta_eletrica"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Cadastrar veículo
Cadastra um veículo para o CPF autenticado. Fluxo catálogo (brand_id+model_id), híbrido (brand_id + model_other sem model_id) ou Outro livre (brand_other/model_other+vehicle_type). URLs de foto devem ser HTTPS GCS. Se has_invoice=true, invoice_photo_url é obrigatória. Contato do dono (nome/telefone/e-mail) é enriquecido ao vivo via RMI a partir do owner_cpf — não enviar owner_* no body. registration_number é gerado pelo backend (formato RJ-E-XXXXXX).
curl --request POST \
--url https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"color": "<string>",
"display_name": "<string>",
"has_invoice": true,
"self_declaration": true,
"serial_number": "<string>",
"serial_number_photo_url": "<string>",
"vehicle_photo_url": "<string>",
"brand_id": "<string>",
"brand_other": "<string>",
"invoice_photo_file_name": "<string>",
"invoice_photo_file_size": 123,
"invoice_photo_url": "<string>",
"model_id": "<string>",
"model_other": "<string>",
"serial_number_photo_file_name": "<string>",
"serial_number_photo_file_size": 123,
"vehicle_photo_file_name": "<string>",
"vehicle_photo_file_size": 123
}
'import requests
url = "https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles"
payload = {
"color": "<string>",
"display_name": "<string>",
"has_invoice": True,
"self_declaration": True,
"serial_number": "<string>",
"serial_number_photo_url": "<string>",
"vehicle_photo_url": "<string>",
"brand_id": "<string>",
"brand_other": "<string>",
"invoice_photo_file_name": "<string>",
"invoice_photo_file_size": 123,
"invoice_photo_url": "<string>",
"model_id": "<string>",
"model_other": "<string>",
"serial_number_photo_file_name": "<string>",
"serial_number_photo_file_size": 123,
"vehicle_photo_file_name": "<string>",
"vehicle_photo_file_size": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
color: '<string>',
display_name: '<string>',
has_invoice: true,
self_declaration: true,
serial_number: '<string>',
serial_number_photo_url: '<string>',
vehicle_photo_url: '<string>',
brand_id: '<string>',
brand_other: '<string>',
invoice_photo_file_name: '<string>',
invoice_photo_file_size: 123,
invoice_photo_url: '<string>',
model_id: '<string>',
model_other: '<string>',
serial_number_photo_file_name: '<string>',
serial_number_photo_file_size: 123,
vehicle_photo_file_name: '<string>',
vehicle_photo_file_size: 123
})
};
fetch('https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'color' => '<string>',
'display_name' => '<string>',
'has_invoice' => true,
'self_declaration' => true,
'serial_number' => '<string>',
'serial_number_photo_url' => '<string>',
'vehicle_photo_url' => '<string>',
'brand_id' => '<string>',
'brand_other' => '<string>',
'invoice_photo_file_name' => '<string>',
'invoice_photo_file_size' => 123,
'invoice_photo_url' => '<string>',
'model_id' => '<string>',
'model_other' => '<string>',
'serial_number_photo_file_name' => '<string>',
'serial_number_photo_file_size' => 123,
'vehicle_photo_file_name' => '<string>',
'vehicle_photo_file_size' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles"
payload := strings.NewReader("{\n \"color\": \"<string>\",\n \"display_name\": \"<string>\",\n \"has_invoice\": true,\n \"self_declaration\": true,\n \"serial_number\": \"<string>\",\n \"serial_number_photo_url\": \"<string>\",\n \"vehicle_photo_url\": \"<string>\",\n \"brand_id\": \"<string>\",\n \"brand_other\": \"<string>\",\n \"invoice_photo_file_name\": \"<string>\",\n \"invoice_photo_file_size\": 123,\n \"invoice_photo_url\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_other\": \"<string>\",\n \"serial_number_photo_file_name\": \"<string>\",\n \"serial_number_photo_file_size\": 123,\n \"vehicle_photo_file_name\": \"<string>\",\n \"vehicle_photo_file_size\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"color\": \"<string>\",\n \"display_name\": \"<string>\",\n \"has_invoice\": true,\n \"self_declaration\": true,\n \"serial_number\": \"<string>\",\n \"serial_number_photo_url\": \"<string>\",\n \"vehicle_photo_url\": \"<string>\",\n \"brand_id\": \"<string>\",\n \"brand_other\": \"<string>\",\n \"invoice_photo_file_name\": \"<string>\",\n \"invoice_photo_file_size\": 123,\n \"invoice_photo_url\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_other\": \"<string>\",\n \"serial_number_photo_file_name\": \"<string>\",\n \"serial_number_photo_file_size\": 123,\n \"vehicle_photo_file_name\": \"<string>\",\n \"vehicle_photo_file_size\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/rmi/v1/citizen/{cpf}/vehicles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"color\": \"<string>\",\n \"display_name\": \"<string>\",\n \"has_invoice\": true,\n \"self_declaration\": true,\n \"serial_number\": \"<string>\",\n \"serial_number_photo_url\": \"<string>\",\n \"vehicle_photo_url\": \"<string>\",\n \"brand_id\": \"<string>\",\n \"brand_other\": \"<string>\",\n \"invoice_photo_file_name\": \"<string>\",\n \"invoice_photo_file_size\": 123,\n \"invoice_photo_url\": \"<string>\",\n \"model_id\": \"<string>\",\n \"model_other\": \"<string>\",\n \"serial_number_photo_file_name\": \"<string>\",\n \"serial_number_photo_file_size\": 123,\n \"vehicle_photo_file_name\": \"<string>\",\n \"vehicle_photo_file_size\": 123\n}"
response = http.request(request)
puts response.read_body{
"brand_id": "<string>",
"brand_name": "<string>",
"brand_other": "<string>",
"color": "<string>",
"conductor_id": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"display_name": "<string>",
"has_invoice": true,
"id": "<string>",
"invoice_photo_file_name": "<string>",
"invoice_photo_file_size": 123,
"invoice_photo_url": "<string>",
"model_id": "<string>",
"model_name": "<string>",
"model_other": "<string>",
"owner_cpf": "<string>",
"owner_email": "<string>",
"owner_name": "<string>",
"owner_phone": "<string>",
"registration_number": "RJ-E-000001",
"role": "owner",
"self_declaration": true,
"serial_number": "<string>",
"serial_number_photo_file_name": "<string>",
"serial_number_photo_file_size": 123,
"serial_number_photo_url": "<string>",
"updated_at": "<string>",
"vehicle_photo_file_name": "<string>",
"vehicle_photo_file_size": 123,
"vehicle_photo_url": "<string>",
"vehicle_type": "bicicleta_eletrica"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
CPF do cidadão (11 dígitos)
11Body
Dados do veículo
bicicleta_eletrica, autopropelido, ciclomotor Response
Veículo criado
BrandName is response-only: catalog brand name when brand_id is set and brand_other is empty.
ModelName is response-only: catalog model name when model_id is set and model_other is empty.
RegistrationNumber is a short wallet identifier generated on create (format RJ-E-XXXXXX). Not accepted in POST/PATCH.
"RJ-E-000001"
owner, conductor Optional file metadata for UI detail (Apêndice A.4).
bicicleta_eletrica, autopropelido, ciclomotor 