> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Autocerto as a data source

> Bring your Autocerto vehicle stock, stores, classifieds ad status and plans, and reference tables to Nekt.

Autocerto is a Brazilian management system for vehicle dealerships: stock, publishing to classifieds sites (such as Webmotors, OLX and iCarros) and leads. This connector reads your account through the Autocerto integration API and brings the vehicles in stock (with photos and optional items), the stores your user can access, the status and custom info of each vehicle's ads on the classifieds sites, the classifieds plans of each store, the lead media list and Autocerto's reference tables.

> [!NOTE]
>
> The connector only reads data. It never creates, changes, publishes or deletes anything in Autocerto.

## Configuring Autocerto as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the Autocerto option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

The Autocerto API uses a user name and password: the API (integration) user of your store, the same one used at `integracao.autocerto.com`. It is not necessarily the login you use in the Autocerto system.

* **Username**: user name of the Autocerto API access.
* **Password**: its password.

> [!TIP]
>
> If your store does not have an API user yet, ask Autocerto support to create one. The connector reads every store that this user can access.

Once you're done, click **Next**.

### 2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.

* **Layer**: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
* **Folder**: a folder can be created inside the selected layer to group all tables being created from this new data source.
* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** to all tables at once and make this process faster!
* **Sync Type**: every Autocerto stream is Full table. The Autocerto API has no filter by date, so each sync reads the current state of your account and replaces the table with it.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers.md), consider how often you want data to be extracted from this source. Stock and ad status change during the day, so a sync every few hours (or daily, if you only need a daily picture) is usually a good fit.

Optionally, you can configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource [here](https://docs.nekt.com/get-started/core-concepts/resource-control). Since every stream is Full table, an Additional Full Sync is not needed.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

> [!WARNING]
>
> For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.

# Streams and Fields

## Available streams

The table below lists every stream, its **slug** (the exact identifier to pass when creating the source via API) and a short description. All streams are Full table.

| Stream | Slug | Description |
| - | - | - |
| Stores | `unidades` | Stores (units) the API user can access. |
| Stock | `estoque` | Vehicles currently in stock, in every store, with all their details. |
| Stock Photos | `estoque_fotos` | Photos of each vehicle in stock. |
| Stock Optional Items | `estoque_opcionais` | Optional items (features) of each vehicle in stock. |
| Ad Status | `anuncios_status` | Status of each stock vehicle's ad on each classifieds site. |
| Ad Custom Info | `anuncios_informacoes_personalizadas` | Custom price and text set for a stock vehicle on a specific classifieds site. |
| Classifieds Plans | `planos_classificados` | Classifieds sites integrated with each store and their ad plans (quotas). |
| Lead Media | `midias_lead` | Media (channels) leads can come from. |
| Brands | `marcas` | Reference table of vehicle brands, for cars and motorcycles. |
| Fuel Types | `combustiveis` | Reference table of fuel types. |
| Body Types | `carrocerias` | Reference table of body types, for cars, motorcycles and trucks. |
| Colors | `cores` | Reference table of colors. |
| Transmissions | `cambios` | Reference table of transmission types. |
| Optional Items | `opcionais` | Reference table of optional items. |

## Fields by stream

> [accordion] Stores
>
> Stores (units) the API user can access. The stock and the classifieds plans are read store by store.
>
> Table: `unidades` · Primary key: `codigo` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo` | Integer | Autocerto code of the store. |
> | `nome_fantasia` | String | Trade name of the store. |
> | `cnpj` | String | CNPJ of the store. |
> | `email` | String | Contact e-mail of the store. |

> [accordion] Stock
>
> Vehicles in stock right now, in every store. A vehicle that is sold or removed in Autocerto leaves this table on the next sync (see Data Quality Considerations).
>
> Table: `estoque` · Primary key: `codigo` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo` | Integer | Autocerto code of the vehicle. |
> | `codigo_unidade` | Integer | Code of the store whose stock the vehicle was read from (see Stores). |
> | `data_cadastro` | Datetime | When the vehicle was registered in Autocerto. |
> | `data_modificacao` | Datetime | When the vehicle was last changed in Autocerto. |
> | `tipo_veiculo` | String | Vehicle type. |
> | `categoria` | String | Vehicle category. |
> | `codigo_marca` | Integer | Code of the brand (see Brands). |
> | `marca` | String | Brand name. |
> | `codigo_modelo` | Integer | Code of the model. |
> | `modelo` | String | Model name. |
> | `versao` | String | Version (trim) name. |
> | `ano_fabricacao` | Integer | Manufacturing year. |
> | `ano_modelo` | Integer | Model year. |
> | `cambio` | String | Transmission. |
> | `combustivel` | String | Fuel. |
> | `cor` | String | Color. |
> | `km` | Number | Mileage in kilometers. |
> | `portas` | Integer | Number of doors. |
> | `zero_km` | Boolean | Whether the vehicle is new. |
> | `destaque` | Boolean | Whether the vehicle is marked as featured. |
> | `preco` | Number | Sale price (BRL). |
> | `preco_classificados` | Number | Price advertised on classifieds sites (BRL). |
> | `placa` | String | License plate. |
> | `renavam` | String | RENAVAM number. |
> | `chassi` | String | Chassis number (VIN). |
> | `url_video` | String | URL of the vehicle's video. |
> | `observacao` | String | Notes / description of the vehicle. |
> | `opcionais` | String (JSON) | Optional items of the vehicle, as a JSON array (also in Stock Optional Items). |
> | `fotos` | String (JSON) | Photos of the vehicle, as a JSON array (also in Stock Photos). |

> [accordion] Stock Photos
>
> One row per photo of each vehicle in stock. Comes with the stock: no extra request.
>
> Table: `estoque_fotos` · Primary key: `codigo_veiculo`, `codigo` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo_veiculo` | Integer | Code of the vehicle (see Stock). |
> | `codigo` | Integer | Autocerto code of the photo. |
> | `codigo_unidade` | Integer | Code of the store of the vehicle. |
> | `url` | String | Public URL of the photo. |
> | `posicao` | Integer | Position of the photo in the gallery (the first one is the cover). |

> [accordion] Stock Optional Items
>
> One row per optional item of each vehicle in stock. Comes with the stock: no extra request.
>
> Table: `estoque_opcionais` · Primary key: `codigo_veiculo`, `codigo` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo_veiculo` | Integer | Code of the vehicle (see Stock). |
> | `codigo` | Integer | Code of the optional item (see Optional Items). |
> | `codigo_unidade` | Integer | Code of the store of the vehicle. |
> | `descricao` | String | Name of the optional item. |

> [accordion] Ad Status
>
> Status of the ad of each vehicle in stock on each classifieds site. The connector asks Autocerto once per vehicle in stock.
>
> Table: `anuncios_status` · Primary key: `codigo_veiculo`, `codigo_classificado` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo_veiculo` | Integer | Code of the vehicle (see Stock). |
> | `codigo_classificado` | Integer | Code of the classifieds site in Autocerto. |
> | `codigo_unidade` | Integer | Code of the store of the vehicle. |
> | `classificado` | String | Name of the classifieds site. |
> | `publicado` | Boolean | Whether the ad is published on the site. |
> | `tipo_anuncio` | String | Ad type / plan used on the site. |
> | `prioridade` | Integer | Priority (plan tier) of the ad. |
> | `mensagem` | String | Message returned by the classifieds integration, such as a publishing error. |

> [accordion] Ad Custom Info
>
> Custom price and text set for a vehicle on a specific classifieds site. Vehicles without custom info have no rows. The connector asks Autocerto once per vehicle in stock.
>
> Table: `anuncios_informacoes_personalizadas` · Primary key: `codigo_veiculo`, `codigo_classificado` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo_veiculo` | Integer | Code of the vehicle (see Stock). |
> | `codigo_classificado` | Integer | Code of the classifieds site the info applies to. |
> | `codigo_unidade` | Integer | Code of the store the info belongs to. |
> | `classificado` | String | Name of the classifieds site. |
> | `preco` | Number | Custom price on this site (BRL). |
> | `observacao` | String | Custom ad text on this site. |
> | `data_cadastro` | Datetime | When the custom info was saved. |

> [accordion] Classifieds Plans
>
> Classifieds sites integrated with each store, with the ad plan of each one.
>
> Table: `planos_classificados` · Primary key: `codigo_unidade`, `codigo_midia` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo_unidade` | Integer | Code of the store (`0` when the API user has no store list and the account default was read). |
> | `codigo_midia` | Integer | Code of the classifieds site. |
> | `midia` | String | Name of the classifieds site. |
> | `plano` | String (JSON) | Packages of the plan, as a JSON array: `Prioridade`, `Descricao`, `QtdePlano` (ads in the plan), `QtdeDisponivel` (ads still available) and `Ordenacao`. |

> [accordion] Lead Media
>
> Media (channels) a lead can come from, such as a classifieds site or the store website. Use it to decode lead media codes in other systems.
>
> Table: `midias_lead` · Primary key: `codigo` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo` | Integer | Code of the lead media. |
> | `descricao` | String | Name of the lead media. |

> [accordion] Brands and Body Types
>
> Autocerto keeps one list per vehicle type. The connector reads every type: brands for cars and motorcycles, body types for cars, motorcycles and trucks. The same code can appear under more than one type.
>
> Tables: `marcas`, `carrocerias` · Primary key: `tipo`, `codigo` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `tipo` | Integer | Vehicle type: `1` = car, `2` = motorcycle, `3` = truck (body types only). |
> | `codigo` | Integer | Autocerto code of the brand or body type. |
> | `descricao` | String | Name of the brand or body type. |

> [accordion] Other reference tables
>
> Fuel types, colors, transmissions and optional items, as Autocerto lists them. All four tables have the same fields.
>
> Tables: `combustiveis`, `cores`, `cambios`, `opcionais` · Primary key: `codigo` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `codigo` | Integer | Autocerto code of the item. |
> | `descricao` | String | Name of the item. |

## Implementation Notes

### Data Quality Considerations

* **Every table is a snapshot.** Each sync replaces the tables with what Autocerto returns at that moment. A sold or removed vehicle disappears from Stock, Stock Photos, Stock Optional Items, Ad Status and Ad Custom Info on the next sync. To keep a history of the stock (for example, when each vehicle was sold), track the Stock table with a [History](https://docs.nekt.com/histories/overview.md) or save daily snapshots with a Query.
* **A table is never half updated.** The connector reads all the data of a table before writing any of it. If Autocerto fails or refuses part of a table (for example, the stock of one store), that table keeps its previous content and the sync shows it as failed.
* **A table that suddenly comes back empty is not emptied.** If Autocerto returns no rows for Stores, Classifieds Plans, Ad Status, Ad Custom Info, Lead Media or a reference table that had rows in the previous sync, the sync fails for that table instead of emptying it. If Autocerto returns no vehicles in stock at all after a sync that had vehicles, every table built from the stock (Stock, Stock Photos, Stock Optional Items, Ad Status and Ad Custom Info) fails and keeps its previous content, even when Stock itself is not selected. If the data really was removed, run a full sync of the source to accept the empty tables.
* **Vehicles without ad data.** Ad Status and Ad Custom Info are read vehicle by vehicle after the stock. When Autocerto finds no data for a vehicle (usually a vehicle that is not advertised), that vehicle has no rows, and the sync log says how many vehicles were in that situation. If Autocerto finds no data for any vehicle while the table had rows in the previous sync, the table keeps its previous content and the sync shows it as failed (see above).
* **A store whose stock empties.** If one store that had vehicles in the previous sync comes back with none while the other stores still have vehicles, the sync loads the stock without it and the sync log names the store, since a store can legitimately empty its stock.
* **Vehicles sold during the sync.** A few vehicles that leave the stock between the stock read and their own read are skipped, and the sync log says how many. If many vehicles fail this way, the table is not updated.
* **Dates** are loaded as Autocerto returns them, without a time zone (Brasília local time in practice).
* **Leads are not available.** The Autocerto API can create leads but has no way to read them, so there is no leads table.
* **Brands are not split into models and versions.** Autocerto's model and version catalog is not extracted (it would take thousands of requests); each vehicle in Stock already carries its brand, model and version.

### Permissions

The connector checks, before reading any data, which parts of the API the user can read. If the user cannot read one part, the tables that need it are skipped (the sync shows them as failed) and the other tables are loaded:

| Part of the API | Tables |
| :- | :- |
| Stores | Stores, Stock, Stock Photos, Stock Optional Items, Ad Status, Ad Custom Info, Classifieds Plans |
| Vehicles | Stock, Stock Photos, Stock Optional Items, Ad Status, Ad Custom Info, reference tables |
| Classifieds integration | Ad Status, Ad Custom Info, Classifieds Plans |
| Leads | Lead Media |

### API Limits & Performance

* Autocerto does not publish a request limit. When Autocerto asks the connector to slow down, it waits as long as Autocerto says.
* Besides one request per list and one stock request per store, Ad Status and Ad Custom Info make one request each per vehicle in stock, so their sync time grows with the size of the stock. Deselect those two tables if you do not need them.

## Troubleshooting

| Error or symptom | What it means | What to do |
| :- | :- | :- |
| "Autocerto rejected the user name or password" | The credentials are wrong or the API user was disabled. | Check the user name and password of the Autocerto API access and update the source. |
| "The Autocerto user of this source cannot read the ... data" | The API user has no access to that part of the API. Those tables were skipped; the others were loaded. | Ask Autocerto support to give the integration user that access, or deselect the skipped tables. |
| "Autocerto returned no ... records at all, although the previous sync read N" | Autocerto returned an empty list for a table that had rows. The table was kept. | If the data really was removed, run a full sync of the source. Otherwise run the sync again later. |
| "Autocerto returned no vehicles in stock at all, although the previous sync read N" | The stock came back empty after a sync that had vehicles. Every table built from the stock was kept. | If the stock really is empty, run a full sync of the source. Otherwise run the sync again later. |
| "... vehicle(s) left the Autocerto stock while this sync was reading them" | Those vehicles were sold or removed during the sync. | No action needed. |
| "Autocerto found no data for N of the M vehicles in stock" | Those vehicles have no ad status or custom ad info, usually because they are not advertised. | No action needed if that matches your ads in Autocerto. |
| "Autocerto found no data for any of the M vehicles in stock" | Autocerto returned no ad data for any vehicle. This is expected only when none of your vehicles is advertised. | If your vehicles are advertised on classifieds sites, contact Nekt support. |
| "Autocerto returned no vehicles in stock for N store(s) that had vehicles in the previous sync" | Those stores came back with an empty stock; the other stores were loaded. | If those stores still have vehicles in Autocerto, check the integration user's access to them and contact Nekt support. |
| "Could not reach Autocerto" or "Autocerto kept failing" | Autocerto did not answer, or answered with errors, after several attempts. | Usually temporary; the next sync tries again. |
| "Autocerto answered ... in a format this connector does not recognize" | The Autocerto API changed. | Contact Nekt support. |

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

> [card] [Download Autocerto skills file](https://docs.nekt.com/sources/autocerto.md)
>
> Autocerto connector documentation as plain markdown, for use in AI agent contexts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.