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

# Olist as a data source

> Bring data from Olist Tiny ERP to Nekt.

Olist Tiny is one of Brazil's most widely used ERP systems for small and medium businesses, covering sales, finance, inventory, and invoicing. This connector uses the Olist Tiny **API v3** to extract your orders, products, contacts, invoices (NF-e), accounts payable and receivable, sellers, brands, payment methods, and warehouses.

## Configuring Olist 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 Olist option from the list of connectors.

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

### 1. Add account access

Olist Tiny API v3 uses **OAuth 2.0**. Unlike most connectors, Olist applications are **private to each account**, so you create your own application inside your Olist Tiny account and authorize Nekt with its keys.

<Steps>
  <Step title="Open the Applications screen">
    In the Olist ERP (`erp.olist.com`), go to **Configurações → Aplicativos API** (`erp.olist.com/aplicativos_api`) and click **+ novo aplicativo**. Each account can have up to 5 applications.
  </Step>

  <Step title="Name it and set the redirect URL">
    Enter a **Name** (for example, `Nekt`). In **URL de Redirecionamento**, paste Nekt's callback address:

    ```
    https://api.nekt.ai/api/v1/oauth/redirect/
    ```
  </Step>

  <Step title="Grant read permissions">
    Under **Permissões do aplicativo**, mark **Leitura** (read) for every module you plan to sync — for example Contatos, Produtos, Notas Fiscais, Pedidos, and Contas a pagar/receber. Leave **Incluir e editar** and **Excluir** unchecked: Nekt only reads your data.
  </Step>

  <Step title="Save and copy the keys">
    Click **salvar**. Olist generates a **Client ID** and **Client Secret** under **Chaves de acesso** — copy both.
  </Step>

  <Step title="Authorize in Nekt">
    Back in Nekt, enter the **Client ID** and **Client Secret**, then complete the authorization: log in to the same Olist Tiny account and confirm the requested read permissions.
  </Step>
</Steps>

<Warning>
  The application belongs to the Olist account that created it, which is why each account uses its own Client ID and Client Secret. If you change the marked permissions after authorizing, you must authorize again for the changes to take effect. Authorize with an account that can view the data you intend to sync — some modules depend on your Olist Tiny plan.
</Warning>

The following configurations are available:

* **Client ID** and **Client Secret**: (Required) From the application you created in your own Olist account.
* **Refresh token**: Captured automatically when you authorize. Olist rotates it on every run and it expires in about a day, so keep this source running at least daily — otherwise you'll need to authorize again.
* **Start Date**: (Optional) Lower bound for extraction. **Products** and **Contacts** sync incrementally from this date (`dataAlteracao` / `dataAtualizacao`); **Orders**, **Invoices**, and **Accounts payable/receivable** use it as an emission-date floor. If omitted, the full history available in the API is synced.

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**: you can choose between INCREMENTAL and FULL\_TABLE.
  * Incremental: every time the extraction happens, we'll get only the new data - which is good if, for example, you want to keep every record ever fetched.
  * Full table: every time the extraction happens, we'll get the current state of the data - which is good if, for example, you don't want to have deleted data in your catalog.

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/get-started/core-concepts/triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

Optionally, you can define some additional settings:

* 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).
* Determine when to execute an **Additional [Full Sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync)**. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.

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.</Warning>

# Streams and Fields

Below you'll find all available data streams from Olist Tiny and their fields, as returned by the API v3 list endpoints. Every record is keyed by `id`. Nested objects (such as `cliente`, `endereco`, and `vendedor`) are returned as **structured objects** — access their fields with dot notation (for example `cliente.nome`).

<AccordionGroup>
  <Accordion title="Pedidos (Orders)">
    Sales orders with customer, seller, shipping, and total.

    **Key Fields:**

    | Field           | Type    | Description                                                                                            |
    | :-------------- | :------ | :----------------------------------------------------------------------------------------------------- |
    | `id`            | Integer | Unique identifier for the order (primary key)                                                          |
    | `numeroPedido`  | Integer | Order number                                                                                           |
    | `situacao`      | Integer | Order status code                                                                                      |
    | `dataCriacao`   | String  | Creation date (`YYYY-MM-DD`)                                                                           |
    | `dataPrevista`  | String  | Expected/scheduled date                                                                                |
    | `valor`         | String  | Order total amount                                                                                     |
    | `origemPedido`  | Integer | Order origin code                                                                                      |
    | `cliente`       | Object  | Customer details (`nome`, `cpfCnpj`, `email`, `endereco`, ...)                                         |
    | `vendedor`      | Object  | Seller (`id`, `nome`)                                                                                  |
    | `transportador` | Object  | Carrier (`nome`, `formaEnvio`, `formaFrete`, `codigoRastreamento`, `urlRastreamento`, `fretePorConta`) |
    | `ecommerce`     | Object  | E-commerce origin (`nome`, `numeroPedidoEcommerce`, `numeroPedidoCanalVenda`, `canalVenda`)            |
  </Accordion>

  <Accordion title="Produtos (Products)">
    Product catalog with pricing and stock. Synced **incrementally** by `dataAlteracao`.

    **Key Fields:**

    | Field           | Type    | Description                                                           |
    | :-------------- | :------ | :-------------------------------------------------------------------- |
    | `id`            | Integer | Unique identifier for the product (primary key)                       |
    | `sku`           | String  | SKU / product code                                                    |
    | `descricao`     | String  | Product name / description                                            |
    | `tipo`          | String  | Product type                                                          |
    | `situacao`      | String  | Product status                                                        |
    | `unidade`       | String  | Unit of measure                                                       |
    | `gtin`          | String  | GTIN / barcode                                                        |
    | `tipoVariacao`  | String  | Variation type                                                        |
    | `dataCriacao`   | String  | When the product was created                                          |
    | `dataAlteracao` | String  | Last change — replication key (`YYYY-MM-DD HH:MM:SS`)                 |
    | `precos`        | Object  | Prices (`preco`, `precoPromocional`, `precoCusto`, `precoCustoMedio`) |
    | `estoque`       | Object  | Stock (`localizacao`)                                                 |
  </Accordion>

  <Accordion title="Contatos (Contacts)">
    Contacts / customers registry. Synced **incrementally** by `dataAtualizacao`.

    **Key Fields:**

    | Field                  | Type    | Description                                                                               |
    | :--------------------- | :------ | :---------------------------------------------------------------------------------------- |
    | `id`                   | Integer | Unique identifier for the contact (primary key)                                           |
    | `nome`                 | String  | Contact name                                                                              |
    | `codigo`               | String  | Contact code                                                                              |
    | `fantasia`             | String  | Trade name (nome fantasia)                                                                |
    | `tipoPessoa`           | String  | Person type (F = individual, J = company)                                                 |
    | `cpfCnpj`              | String  | CPF (individuals) or CNPJ (companies)                                                     |
    | `inscricaoEstadual`    | String  | State registration                                                                        |
    | `rg`                   | String  | RG (individuals)                                                                          |
    | `telefone` / `celular` | String  | Phone / mobile                                                                            |
    | `email`                | String  | Email address                                                                             |
    | `vendedor`             | String  | Associated seller                                                                         |
    | `situacao`             | String  | Contact status                                                                            |
    | `statusCrm`            | String  | CRM status                                                                                |
    | `dataCriacao`          | String  | When the contact was created                                                              |
    | `dataAtualizacao`      | String  | Last update — replication key (`YYYY-MM-DD HH:MM:SS`)                                     |
    | `endereco`             | Object  | Address (`endereco`, `numero`, `complemento`, `bairro`, `municipio`, `cep`, `uf`, `pais`) |
  </Accordion>

  <Accordion title="Notas (Invoices / NF-e)">
    Fiscal invoices (Nota Fiscal eletrônica) with customer, delivery, shipping, and totals.

    **Key Fields:**

    | Field                       | Type    | Description                                     |
    | :-------------------------- | :------ | :---------------------------------------------- |
    | `id`                        | Integer | Unique identifier for the invoice (primary key) |
    | `situacao`                  | String  | Invoice status                                  |
    | `tipo`                      | String  | Invoice type                                    |
    | `numero`                    | String  | Invoice number                                  |
    | `serie`                     | String  | Invoice series                                  |
    | `chaveAcesso`               | String  | NF-e access key                                 |
    | `dataEmissao`               | String  | Issue date                                      |
    | `dataPrevista`              | String  | Expected date                                   |
    | `valor`                     | Number  | Invoice total                                   |
    | `valorProdutos`             | Number  | Products total                                  |
    | `valorFrete`                | Number  | Freight amount                                  |
    | `idFormaEnvio`              | Integer | Shipping method identifier                      |
    | `idFormaFrete`              | Integer | Freight method identifier                       |
    | `codigoRastreamento`        | String  | Shipment tracking code                          |
    | `urlRastreamento`           | String  | Shipment tracking URL                           |
    | `fretePorConta`             | String  | Freight responsibility                          |
    | `qtdVolumes`                | Integer | Number of volumes                               |
    | `pesoBruto` / `pesoLiquido` | Number  | Gross / net weight                              |
    | `cliente`                   | Object  | Customer details                                |
    | `enderecoEntrega`           | Object  | Delivery address and recipient                  |
    | `vendedor`                  | Object  | Seller (`id`, `nome`)                           |
    | `ecommerce`                 | Object  | E-commerce origin                               |
    | `origem`                    | Object  | Invoice origin (`id`, `tipo`)                   |
  </Accordion>

  <Accordion title="Contas a pagar (Accounts payable)">
    Accounts payable entries. Accepts a **Start Date** lower bound on the emission date.

    **Key Fields:**

    | Field             | Type    | Description                                     |
    | :---------------- | :------ | :---------------------------------------------- |
    | `id`              | Integer | Unique identifier for the payable (primary key) |
    | `situacao`        | String  | Status (e.g., aberto, pago)                     |
    | `data`            | String  | Emission date                                   |
    | `dataVencimento`  | String  | Due date                                        |
    | `historico`       | String  | Description / memo                              |
    | `valor`           | Number  | Amount due                                      |
    | `saldo`           | Number  | Outstanding balance                             |
    | `numeroDocumento` | String  | Document number                                 |
    | `serieDocumento`  | String  | Document series                                 |
    | `marcadores`      | String  | Tags / markers                                  |
    | `cliente`         | Object  | Counterparty details                            |
  </Accordion>

  <Accordion title="Contas a receber (Accounts receivable)">
    Accounts receivable entries. Accepts a **Start Date** lower bound on the emission date.

    **Key Fields:**

    | Field                           | Type    | Description                                        |
    | :------------------------------ | :------ | :------------------------------------------------- |
    | `id`                            | Integer | Unique identifier for the receivable (primary key) |
    | `situacao`                      | String  | Status (e.g., aberto, pago)                        |
    | `data`                          | String  | Emission date                                      |
    | `dataVencimento`                | String  | Due date                                           |
    | `historico`                     | String  | Description / memo                                 |
    | `valor`                         | Number  | Amount                                             |
    | `saldo`                         | Number  | Outstanding balance                                |
    | `numeroDocumento`               | String  | Document number                                    |
    | `numeroBanco`                   | String  | Bank document number                               |
    | `serieDocumento`                | String  | Document series                                    |
    | `quantidadeParcelasAntecipadas` | Integer | Number of advanced installments                    |
    | `cliente`                       | Object  | Counterparty details                               |
  </Accordion>

  <Accordion title="Vendedores (Sellers)">
    Sellers / sales representatives registry.

    **Key Fields:**

    | Field      | Type    | Description                                                          |
    | :--------- | :------ | :------------------------------------------------------------------- |
    | `id`       | Integer | Unique identifier for the seller (primary key)                       |
    | `situacao` | String  | Seller status                                                        |
    | `contato`  | Object  | Seller contact details (`nome`, `cpfCnpj`, `email`, `endereco`, ...) |
  </Accordion>

  <Accordion title="Marcas (Brands)">
    Product brands registry.

    **Key Fields:**

    | Field       | Type    | Description                                   |
    | :---------- | :------ | :-------------------------------------------- |
    | `id`        | Integer | Unique identifier for the brand (primary key) |
    | `descricao` | String  | Brand name                                    |
  </Accordion>

  <Accordion title="Formas de pagamento (Payment methods)">
    Payment methods registry.

    **Key Fields:**

    | Field      | Type    | Description                                            |
    | :--------- | :------ | :----------------------------------------------------- |
    | `id`       | Integer | Unique identifier for the payment method (primary key) |
    | `nome`     | String  | Payment method name                                    |
    | `situacao` | String  | Status                                                 |
  </Accordion>

  <Accordion title="Depósitos (Warehouses)">
    Warehouses / stock deposits registry.

    **Key Fields:**

    | Field               | Type    | Description                                       |
    | :------------------ | :------ | :------------------------------------------------ |
    | `id`                | Integer | Unique identifier for the warehouse (primary key) |
    | `descricao`         | String  | Warehouse name                                    |
    | `tipo`              | String  | Warehouse type                                    |
    | `desconsideraSaldo` | Boolean | Whether the balance is ignored                    |
    | `padrao`            | Boolean | Whether it is the default warehouse               |
    | `possuiReserva`     | Boolean | Whether it supports reservations                  |
  </Accordion>
</AccordionGroup>

# Data Model

The following diagram illustrates the relationships between the core data streams in Olist Tiny. Orders and invoices embed the customer and seller as nested objects, and reference the seller by `vendedor.id`.

```mermaid theme={null}
graph TD;
    subgraph "Catalog"
        Produtos("Produtos");
        Marcas("Marcas");
        Depositos("Depósitos");
    end

    subgraph "Sales"
        Pedidos("Pedidos");
        Notas("Notas");
        Contatos("Contatos");
        Vendedores("Vendedores");
        FormasPagamento("Formas de pagamento");
    end

    subgraph "Finance"
        ContasPagar("Contas a pagar");
        ContasReceber("Contas a receber");
    end

    Pedidos -- "vendedor.id" --> Vendedores;
    Notas -- "vendedor.id" --> Vendedores;
    Contatos -- "vendedor" --> Vendedores;
    Produtos -- "estoque" --> Depositos;
```

## Implementation Notes

### Sync mode

* **Incremental**: **Products** (`dataAlteracao`) and **Contacts** (`dataAtualizacao`).
* **Full table with an emission-date floor** from the optional **Start Date**: **Orders** and **Invoices** (`dataInicial`), **Accounts payable** and **Accounts receivable** (`dataInicialEmissao`).
* **Full table**: **Sellers**, **Brands**, **Payment methods**, and **Warehouses**.

### Authentication and token lifetime

Authentication is OAuth 2.0 with a **per-account application** (your own Client ID and Client Secret). The refresh token **rotates on every run and expires in about a day**, so schedule this source to run at least once daily; if it stays idle longer, you'll need to authorize the application again.

### Nested objects and types

Nested entities (`cliente`, `endereco`, `vendedor`, `transportador`, `ecommerce`, `precos`, `estoque`, ...) are returned as **structured objects** — query them with dot notation, e.g. `cliente.nome`. Record `id` values are **integers**; most monetary and weight fields (`valor`, `saldo`, `pesoBruto`) are **numbers**, while a few (such as `pedidos.valor`) come back as strings — cast as needed. Dates use ISO format (`YYYY-MM-DD`; incremental keys use `YYYY-MM-DD HH:MM:SS`).

### Rate limits

The Olist Tiny v3 API enforces per-plan request limits shared across the whole account. On large accounts a full sync may take a while; the connector paginates results and retries on transient errors so runs still complete.

### Brazilian context

This connector is designed for the Brazilian market:

* **Currency**: Values are in BRL (Brazilian Real).
* **Documents**: Counterparties are identified by CPF (individuals) or CNPJ (companies) in the `cpfCnpj` field.
* **Addresses**: Brazilian address format with CEP (postal code) and state abbreviation (`uf`).

## Skills for agents

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

<Card title="Download Olist skills file" icon="wand-magic-sparkles" href="/sources/olist.md">
  Olist connector documentation as plain markdown, for use in AI agent contexts.
</Card>
