City registries (São Paulo CONDUAPP and CSVAPP)
Built: 2026-11-03. Written for operators in Brazil and whoever maintains the code.
Some cities register app drivers and their cars themselves, and it is the platform's job to file them. In São Paulo (Decreto 56.981/2016):
- each driver needs a CONDUAPP;
- each car needs a CSVAPP;
- the operator files both with the DTP before the driver works in the city.
Admin → People → City registries shows every city that keeps a registry, who is registered and what is missing, and downloads the filing to send.
Turning it on for a city
Admin → Zones → draw the city as a region and pick the city profile (São Paulo). The profile already asks for:
- the driver registry document (CONDUAPP);
- the vehicle registry (CSVAPP);
- the CNH with EAR, the criminal-record certificate, APP insurance and a road course;
- cars no older than 8 years.
Rio de Janeiro's profile asks for its driver registry too. Other cities can be set by hand: Onboarding → Required documents → Platform registry for drivers, and Vehicle registry for cars.
A driver counts for a city when they went online inside it in the last 90 days.
The states
| State | Meaning | What to do |
|---|---|---|
| Missing data | Something the filing needs is not on file (named) | Record it (see below) |
| Ready to file | Everything is on file | Press File N ready |
| Filed | Sent in the last 30 days | Wait for the city's number |
| Renew soon | The number expires within 30 days | File again |
| Registered | The city's number is on file and in date | Nothing |
What a filing needs, and where it comes from
| Column | Where it is recorded |
|---|---|
| Name, phone, e-mail | the driver's account |
| CPF | the CNH's check details (CPF (on the CNH)); kept encrypted and shown masked |
| CNH number, category, EAR | the CNH's check details |
| Criminal-record certificate | its reference, on the approved certificate |
| Plate, make, model, year, fuel | the vehicle |
| RENAVAM | the vehicle (Brazil only; checked by its check digit) |
File N ready downloads a CSV with columns separated by semicolons. It opens as is in Brazilian Excel, and cells that look like formulas are defused. The same action records every row as filed. The file carries full CPFs: it needs the driver.verify permission, it is audited, and it should be kept like driver documents.
When the city answers
- Driver: upload the CONDUAPP certificate as the driver's CONDUAPP (city driver registry) document, record its number in Edit details, set its expiry, and approve. It cannot be approved without the number. The driver becomes Registered, and going online in São Paulo needs that approved document.
- Car: enter the CSVAPP number and its expiry on the vehicle (Vehicles → Edit → City registry number). Going online in São Paulo needs it.
For the code
| What | Where |
|---|---|
| Rules (registries of a region, states, CSV) | backend/src/geo/city-registry.ts |
Lists and filing (GET /admin/city-registries, GET …/:zoneId/drivers|vehicles, POST …/file) |
backend/src/geo/city-registry.service.ts |
| Driver CPF off the CNH | drivers/driver-kyc.service.ts keepCpf (same users.cpf_* columns as riders) |
| RENAVAM | fleet/vehicle-rules.ts isValidRenavam; vehicles.renavam |
| Filings | migration 169: city_registry_filings |
| Admin | /city-registries; CNH and CONDUAPP fields in the check details; RENAVAM in Vehicles |
Check before launch. The columns are the data the decree and the DTP's registration ask for. Compare them with the DTP portal's current template and rename or reorder columns if needed (
DRIVER_COLUMNS,VEHICLE_COLUMNS). Confirm the registration rules in force with São Paulo counsel.