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

# WK Radar as a data source

> Bring invoices, orders, purchasing, financial, accounting, stock and registry data from the WK Radar ERP to Nekt.

WK Radar is the ERP of WK Sistemas, covering commercial, purchasing, financial, accounting, payroll, production and inventory processes. This connector reads your company's WK Radar through the **Radar.API** module and brings invoices, sales and purchase orders, incoming invoices, bills payable and receivable with their settlements, journal entries, stock movements and the main registries (products, customers, suppliers, charts of accounts and branches).

<Note>
  The connector only reads data. It never creates, changes or deletes anything in WK Radar.
</Note>

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

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

### 1. Add account access

The connector signs in to the **Radar.API**, the WK Radar module for integrations. Before you start, make sure that:

1. Your company has the **Radar.API** module enabled. Its availability depends on your WK Radar license; talk to WK Sistemas if you don't have it.
2. The Radar.API is published on an **HTTPS address reachable from the internet** (for example `https://radar.yourcompany.com.br/radar.api`). Each company publishes its own; your WK Radar administrator or WK support can tell you the address. If a firewall protects it, allow Nekt's public IP, shown in the **Helpful resources** section when you connect the source.
3. You have a WK Radar **system user** (Usuario de Sistema) for Nekt, with permission to the read routes of the data you want to extract (see the table of routes below).

The following configurations are available:

* **Radar.API URL**: The HTTPS address of your company's Radar.API. Paste the base address only; if you paste the Swagger or token address, the connector removes the extra path.

* **Company**: The company (empresa) you type on the WK Radar sign-in screen.

* **Username**: The system user created for Nekt.

* **Password**: The password of that user.

* **Start Date**: The earliest document date to extract on the first sync: invoices, orders, purchase documents, bills, settlements, journal entries and stock movements dated from this day on. Bills are also read when they are **due** from this day on, and every bill still **open** is read whatever its dates, so open and overdue installments of older sales and purchases are included. Registries (products, customers, suppliers, charts of accounts and branches) are always read in full.

Advanced settings (optional):

* **API time zone**: (Default: `America/Sao_Paulo`) Time zone of the dates and times WK Radar sends without a time zone. Nekt converts them to UTC. Change it only if your WK Radar server runs in another time zone.

* **Settlements Lookback (days)**: (Default: 35) How many days of settlement dates every sync reads again, so settlements registered late (for example at month-end reconciliation) are picked up.

* **Journal Entries Lookback (days)**: (Default: 60) How many days of entry dates every sync reads again, so closing entries posted weeks after the month they belong to are picked up.

<Warning>
  The system user needs permission to each route below for the streams you select. If one is missing, the sync stops at the start and lists the routes that need permission. After you add a permission in WK Radar, wait about 10 minutes before running the source again.

  | Streams | Radar.API route |
  | :- | :- |
  | Invoices, Invoice Items | `GET /api/comercial/v1/nota-fiscal` |
  | Sales Orders, Sales Order Items | `GET /api/comercial/v1/pedido` |
  | Purchase Orders, Purchase Order Items | `GET /api/compras/v1/ordem-compra` |
  | Incoming Invoices, Incoming Invoice Items | `GET /api/compras/v1/registro-entrada` |
  | Accounts Payable | `GET /api/financeiro/v1/titulo-contas-pagar` |
  | Accounts Receivable | `GET /api/financeiro/v2/titulo-contas-receber` |
  | Accounts Payable Settlements | `GET /api/financeiro/v1/baixa-contas-pagar` |
  | Accounts Receivable Settlements | `GET /api/financeiro/v1/baixa-contas-receber` |
  | Journal Entries | `GET /api/contabil/v1/lancamento-contabil` |
  | Stock Movements | `GET /api/estoque/v1/movimento-estoque` |
  | Products | `GET /api/empresarial/v1/produto` |
  | Customers | `GET /api/empresarial/v1/cliente` |
  | Suppliers | `GET /api/empresarial/v1/fornecedor` |
  | Chart of Accounts | `GET /api/empresarial/v1/plano-contabil` |
  | Management Accounts | `GET /api/empresarial/v1/plano-gerencial` |
  | Branches | `GET /api/empresarial/v1/filial` |
</Warning>

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.

<Note>
  Keep the item streams (Invoice Items, Sales Order Items, Purchase Order Items and Incoming Invoice Items) as INCREMENTAL. If one of them is set to FULL\_TABLE, its document stream reads every document since the Start Date on every sync, which is slower.
</Note>

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), 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)**. We recommend a weekly or monthly full sync for this source: incremental syncs do not remove records deleted in WK Radar, and invoices, settlements and journal entries changed long after their date (beyond the windows described below) are only refreshed by a full sync. A full sync reads everything again since the Start Date.

<Warning>
  If your accounting team reprocesses periods in WK Radar in a way that deletes journal entries and creates them again (with new ids), the old and the new entries both stay in the Journal Entries table until the next full sync, doubling the amounts of those periods. Schedule a full sync after reprocessing.
</Warning>

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

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

| Stream | Slug | Sync | Description |
| - | - | - | - |
| Invoices | `invoices` | Incremental | Invoices (notas fiscais) issued in the Commercial module, outgoing and incoming, with totals, taxes, NF-e/NFS-e status and billing. |
| Invoice Items | `invoice_items` | Incremental | One row per item of each invoice. |
| Sales Orders | `sales_orders` | Incremental | Sales orders (pedidos). |
| Sales Order Items | `sales_order_items` | Incremental | One row per item of each sales order, read together with its order. |
| Purchase Orders | `purchase_orders` | Incremental | Purchase orders (ordens de compra). |
| Purchase Order Items | `purchase_order_items` | Incremental | One row per item of each purchase order, read together with its order. |
| Incoming Invoices | `incoming_invoices` | Incremental | Incoming invoices registered in Purchasing (registros de entrada): supplier invoices, utility bills and freight bills. |
| Incoming Invoice Items | `incoming_invoice_items` | Incremental | One row per item of each incoming invoice, read together with it. |
| Accounts Payable | `accounts_payable` | Incremental | Bills payable (títulos a pagar). |
| Accounts Receivable | `accounts_receivable` | Incremental | Bills receivable (títulos a receber), read like Accounts Payable. |
| Accounts Payable Settlements | `accounts_payable_settlements` | Incremental | Settlements (baixas) of bills payable, by settlement date. |
| Accounts Receivable Settlements | `accounts_receivable_settlements` | Incremental | Settlements (baixas) of bills receivable, by settlement date. |
| Journal Entries | `journal_entries` | Incremental | Accounting journal entries (lançamentos contábeis) with debit and credit accounts and their cost center apportionment, by entry date. |
| Chart of Accounts | `chart_of_accounts` | Full table | Ledger accounts (plano de contas contábil), group and posting accounts, active and inactive. |
| Management Accounts | `management_accounts` | Full table | Managerial accounts (plano de contas gerencial), which WK Radar uses as cost centers. |
| Stock Movements | `stock_movements` | Incremental | Stock movements (entries, exits, transfers, adjustments) per product, location and batch. |
| Products | `products` | Full table | Every product, active and inactive. |
| Customers | `customers` | Full table | Every customer, active and inactive, individuals and companies. |
| Suppliers | `suppliers` | Full table | Every supplier, active and inactive. |
| Branches | `branches` | Full table | Companies and branches (empresas/filiais) registered in WK Radar. |

## Fields by stream

### Sales

<AccordionGroup>
  <Accordion title="Invoices">
    Invoices (notas fiscais) issued in the Commercial module, outgoing and incoming, with totals, taxes, NF-e/NFS-e status and billing. Incremental by issue date: each sync re-reads the last 7 days of issue dates, and invoices still waiting for SEFAZ or the city hall are re-read until their status is final.

    Table: `invoices` · Primary key: `id` · Sync: Incremental (`data_emissao`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `extracted_at` | Datetime | Date and time (UTC) this connector read the invoice; copied to its items. |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `chave` | String | Internal key of the record in WK Radar. |
    | `origem_nf` | String | Origin of the invoice in WK Radar. |
    | `pedidos` | String (JSON) | Sales orders billed by this invoice: id and number (JSON array). |
    | `id_filial` | String | Identifier of the branch (company/establishment); join to branches.id. |
    | `tipo` | String | Invoice direction: Entrada (incoming) or Saida (outgoing). |
    | `finalidade` | String | Purpose of the document (normal, complementary, adjustment, return...). Values: Normal, Complementar, Ajuste, Devolucao, Credito, Debito, Outros. |
    | `finalidade_nf_normal_complemento` | String | Complement type when the invoice purpose is normal/complementary. Values: Nenhum, NormalOutras. |
    | `finalidade_nf_ajuste_complemento` | String | Complement type when the invoice purpose is adjustment. Values: Nenhum, AjusteTransferenciaCredito, AjusteAtivoImobilizado. |
    | `tipo_nf_debito` | String | Debit note type. Values: Nenhum, TransferenciaCreditoCooperativa, AnulacaoCredito, NFNaoProcessadaApuracao, MultaJuros, TransferenciaCreditoSucessao, PagamentoAntecipado, PerdaEstoque, DesenquadramentoSN. |
    | `tipo_nf_credito` | String | Credit note type. Values: Nenhum, MultaJuros, ApropriacaoCreditoPresumidoZFM, RetornoRecusaTotal, ReducaoValores, TransferenciaCreditoSucessao, RetornoRecusaParcial. |
    | `serie` | String | Invoice series. |
    | `numero` | Integer | Invoice number. |
    | `id_documento` | String | Document type of the invoice. |
    | `leiaute` | String | Invoice layout used to print/issue the document. |
    | `data_emissao` | Datetime | Issue date and time of the invoice (UTC), used as the incremental replication key. |
    | `data_entrada_saida` | Datetime | Date the goods entered or left (shipping/receiving date). |
    | `indicador_presenca_comprador` | String | Buyer presence indicator of the NF-e (in person, internet, phone...). Values: NaoSeAplica, OperacaoPresencial, OperacaoNaoPresencialInternet, OperacaoNaoPresencialTeleatendimento, NfceEmOperacaoEntregaDomicilio, OperacaoPresencialForaEstabelecimento, OperacaoNaoPresencialOutros. |
    | `id_cliente_fornecedor` | String | Identifier of the customer or supplier (the invoice counterparty); join to customers.id or suppliers.id. |
    | `consumidor_final` | String | Whether the buyer is a final consumer. Values: Normal, ConsumidorFinal. |
    | `local_entrega` | String (JSON) | Delivery address (JSON object). |
    | `local_embarque` | String (JSON) | Shipping (boarding) place (JSON object). |
    | `vendedores` | String (JSON) | Salespeople of the document and their commission shares (JSON array). |
    | `representantes` | String (JSON) | Sales representatives of the document and their commission shares (JSON array). |
    | `id_operacao_comercial` | String | Identifier of the commercial operation. |
    | `id_natureza_operacao_produto` | String | Identifier of the operation nature (CFOP group) used for products. |
    | `id_natureza_operacao_servico` | String | Identifier of the operation nature used for services. |
    | `id_classificacao` | String | Financial/managerial classification of the invoice. |
    | `historico_id` | String | Identifier of the standard history (description template) of the record. |
    | `historico_complementos` | Array of strings | Free-text complements added to the history (JSON array of strings). |
    | `intermediador` | String (JSON) | Intermediary (marketplace) of the transaction (JSON object). |
    | `faturamento_valor_total_a_pagar` | Number | Billing: total amount to be paid. |
    | `faturamento_valor_desconto` | Number | Billing: billing discount. |
    | `faturamento_valor_acrescimo` | Number | Billing: billing surcharge. |
    | `faturamento_id_cobranca` | String | Billing: collection (charge) used. |
    | `faturamento_id_condicao_pagamento` | String | Billing: payment terms used. |
    | `faturamento_parcelas` | String (JSON) | Billing: installments (JSON array). |
    | `total_valor_total_produtos` | Number | Totals: total amount of products. |
    | `total_valor_desconto_produtos` | Number | Totals: discount on products. |
    | `total_percentual_desconto_produtos` | Number | Totals: discount percentage on products. |
    | `total_desconto_produtos_em_percentual` | Boolean | Totals: whether the products discount was entered as a percentage. |
    | `total_despesas_por_conta` | String | Totals: who bears the expenses (issuer or recipient). Values: Emitente, Destinatario. |
    | `total_valor_frete` | Number | Totals: freight amount. |
    | `total_valor_seguro` | Number | Totals: insurance amount. |
    | `total_valor_despesas_acessorias` | Number | Totals: other accessory expenses. |
    | `total_valor_total_nota_fiscal` | Number | Totals: invoice total amount. |
    | `total_valor_liquido_nota_fiscal` | Number | Totals: invoice net amount. |
    | `total_base_calculo_icms` | Number | Totals: ICMS tax base. |
    | `total_valor_isentas_icms` | Number | Totals: amount exempt from ICMS. |
    | `total_valor_outras_icms` | Number | Totals: other amounts (ICMS). |
    | `total_valor_icms` | Number | Totals: ICMS amount. |
    | `total_valor_fcp` | Number | Totals: FCP (poverty fund) amount. |
    | `total_valor_icms_dispensado` | Number | Totals: waived ICMS amount. |
    | `total_valor_icms_suframa` | Number | Totals: SUFRAMA ICMS discount. |
    | `total_valor_icms_uf_destino` | Number | Totals: ICMS due to the destination state (DIFAL). |
    | `total_valor_icms_uf_remetente` | Number | Totals: ICMS due to the origin state (DIFAL). |
    | `total_valor_fcp_uf_destino` | Number | Totals: FCP due to the destination state. |
    | `total_base_calculo_credito_icms_simples_nacional` | Number | Totals: Simples Nacional ICMS credit tax base. |
    | `total_valor_credito_icms_simples_nacional` | Number | Totals: Simples Nacional ICMS credit. |
    | `total_base_calculo_icms_st` | Number | Totals: ICMS-ST tax base. |
    | `total_valor_icms_st` | Number | Totals: ICMS-ST amount. |
    | `total_valor_fcp_st` | Number | Totals: FCP-ST amount. |
    | `total_base_calculo_ipi` | Number | Totals: IPI tax base. |
    | `total_valor_isentas_ipi` | Number | Totals: amount exempt from IPI. |
    | `total_valor_outras_ipi` | Number | Totals: other amounts (IPI). |
    | `total_valor_ipi` | Number | Totals: IPI amount. |
    | `total_valor_ipi_devolvido` | Number | Totals: returned IPI amount. |
    | `total_base_calculo_pis_produtos` | Number | Totals: PIS tax base on products. |
    | `total_valor_pis_produtos` | Number | Totals: PIS on products. |
    | `total_valor_pis_st_produtos` | Number | Totals: PIS-ST on products. |
    | `total_base_calculo_cofins_produtos` | Number | Totals: COFINS tax base on products. |
    | `total_valor_cofins_produtos` | Number | Totals: COFINS on products. |
    | `total_valor_cofins_st_produtos` | Number | Totals: COFINS-ST on products. |
    | `total_valor_total_aproximado_tributos` | Number | Totals: approximate total taxes (transparency law). |
    | `total_tributacao_consumo_totais` | String (JSON) | Totals: consumption taxes (IBS/CBS) totals (JSON object). |
    | `transporte` | String (JSON) | Transport data: carrier, freight mode and vehicle (JSON object). |
    | `frete_transportador_autonomo` | String (JSON) | Freight by self-employed carrier (JSON object). |
    | `volume` | String (JSON) | Packages/volumes data (JSON object). |
    | `complemento` | String (JSON) | Complementary information (JSON). |
    | `nfe_chave_acesso` | String | NF-e: access key. |
    | `nfe_tipo_emissao` | String | NF-e: issue type (normal, contingency...). Values: Normal, ContingenciaFsIa, ContingenciaScan, ContingenciaEpec, ContingenciaFsDa, ContingenciaSvcAn, ContingenciaSvcRs. |
    | `nfe_status` | String | NF-e: status at SEFAZ (ErroValidacao, AguardandoAutorizacao, Autorizada, Denegada, Rejeitada, Cancelada, Inutilizada). |
    | `nfe_protocolo_autorizacao` | String | NF-e: authorization protocol. |
    | `nfe_protocolo_autorizacao_epec` | String | NF-e: EPEC authorization protocol. |
    | `nfe_protocolo_cancelamento_inutilizacao` | String | NF-e: cancellation or voiding protocol. |
    | `nfe_data_autorizacao_epec` | Datetime | NF-e: EPEC authorization date. |
    | `nfe_data_entrada_contingencia` | Datetime | NF-e: date contingency mode started. |
    | `nfe_justificativa_contingencia` | String | NF-e: reason for contingency. |
    | `nfse_chave_acesso` | String | NFS-e: access key. |
    | `nfse_numero_nfse` | Integer | NFS-e: NFS-e number. |
    | `nfse_protocolo_nfse` | String | NFS-e: NFS-e protocol. |
    | `nfse_protocolo_cancelamento_nfse` | String | NFS-e: NFS-e cancellation protocol. |
    | `nfse_numero_lote` | Integer | NFS-e: NFS-e batch number. |
    | `nfse_data_hora_emissao_nfse` | Datetime | NFS-e: NFS-e issue date and time (UTC). |
    | `nfse_codigo_verificacao` | String | NFS-e: NFS-e verification code. |
    | `nfse_serie_nfse` | String | NFS-e: NFS-e series. |
    | `nfse_url` | String | NFS-e: NFS-e URL at the city hall. |
    | `nfse_nfse_gerada` | Boolean | NFS-e: whether the NFS-e was generated. |
    | `nfse_nfse_rejeitada` | Boolean | NFS-e: whether the NFS-e was rejected. |
    | `nfse_nfse_cancelada` | Boolean | NFS-e: whether the NFS-e was cancelled. |
    | `nfse_geracao_nfse_solicitada` | Boolean | NFS-e: whether the NFS-e generation was requested. |
    | `nfse_cancelamento_nfse_solicitado` | Boolean | NFS-e: whether the NFS-e cancellation was requested. |
    | `nfse_cancelamento_nfse_rejeitado` | Boolean | NFS-e: whether the NFS-e cancellation was rejected. |
    | `nfse_cancelamento_nfse_por_substituicao_solicitado` | Boolean | NFS-e: whether cancellation by replacement was requested. |
    | `nfse_cancelamento_nfse_adn_solicitado` | Boolean | NFS-e: whether cancellation at the national NFS-e (ADN) was requested. |
    | `nfse_nfse_distribuida` | Boolean | NFS-e: whether the NFS-e was distributed. |
    | `item_nf_referida` | Integer | Item number of the referenced invoice. |
    | `nfs_referidas` | String (JSON) | Invoices referenced by this invoice (JSON array). |
    | `tipo_rateio` | String | How the amounts are apportioned among classifications. Values: RateioPeloLiquidoDaNf, RateioPorItem, RateioPeloTotalDaNf. |
    | `rateios` | String (JSON) | Apportionment of the amount among managerial/financial classifications (JSON array). |
    | `informacoes_extras` | String (JSON) | Extra information fields (JSON object). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Invoice Items">
    One row per item of each invoice. Read together with its invoice, with no extra request. Invoice items have no number in the API, so `item_key` is the position of the item (`pos1`, `pos2`, ...); keep only rows whose `extracted_at` equals the invoice's.

    Table: `invoice_items` · Primary key: `nota_fiscal_id`, `item_key` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `nota_fiscal_id` | String | Invoice the item belongs to; join to invoices.id. |
    | `item_key` | String | Position of the item in the invoice, as 'pos\<N>' (the API gives invoice items no number); unique per invoice. If an item is removed from an invoice still being edited, the next items move up one position. |
    | `data_emissao` | Datetime | Issue date and time of the invoice (UTC), copied from invoices. |
    | `extracted_at` | Datetime | Date and time (UTC) the document this item belongs to was read, copied from the document's extracted\_at; used as the incremental replication key. Every run that reads a document rewrites all of its items with this value, so an item whose extracted\_at differs from its document's extracted\_at was removed from the document in WK Radar. |
    | `produto_servico_tipo` | String | Item type: product or service. Values: Produto, Servico. |
    | `produto_servico_id` | String | Product or service of the item. |
    | `produto_servico_id_item_grade1` | String | Product/service: grid item 1 (variation). |
    | `produto_servico_id_item_grade2` | String | Product/service: grid item 2 (variation). |
    | `produto_servico_id_item_grade3` | String | Product/service: grid item 3 (variation). |
    | `id_tabela_preco` | String | Identifier of the price table. |
    | `id_natureza_operacao` | String | Identifier of the operation nature (CFOP group) of the item. |
    | `id_unidade_venda` | String | Identifier of the sales unit of measure. |
    | `id_unidade_estoque` | String | Identifier of the stock unit of measure. |
    | `id_conta_sped` | String | Identifier of the SPED ledger account; join to chart\_of\_accounts.id. |
    | `complemento` | String | Complementary description of the item. |
    | `classificacao_fiscal` | String | Fiscal classification (NCM) of the item. |
    | `quantidade_venda` | Number | Quantity in the sales unit. |
    | `quantidade_estoque` | Number | Quantity in the stock unit. |
    | `valor_unitario` | Number | Unit price of the item. |
    | `percentual_desconto` | Number | Discount percentage (calculated by WK Radar when the discount was entered as an amount). |
    | `valor_desconto_unitario` | Number | Discount per unit (calculated by WK Radar when the discount was entered as a total or percentage). |
    | `valor_desconto_total` | Number | Total discount of the item (calculated by WK Radar when the discount was entered per unit or as a percentage). |
    | `desconto_em_percentual` | Boolean | Whether the discount was entered as a percentage. |
    | `desconto_por_total` | Boolean | Whether the discount was entered on the item total. |
    | `valor_total` | Number | Total amount of the item. |
    | `livre_de_cobranca` | Boolean | Whether the item is free of charge. |
    | `peso_liquido_unitario` | Number | Net weight per unit. |
    | `quantidade_volumes` | Number | Number of packages. |
    | `item_nf_referida` | Integer | Item number of the referenced invoice. |
    | `totais_proporcionais_valor_desconto_proporcional` | Number | Proportional share of the document totals: discount. |
    | `totais_proporcionais_valor_acrescimo_proporcional` | Number | Proportional share of the document totals: surcharge. |
    | `totais_proporcionais_valor_frete_proporcional` | Number | Proportional share of the document totals: freight. |
    | `totais_proporcionais_valor_frete_previsto_proporcional` | Number | Proportional share of the document totals: expected freight. |
    | `totais_proporcionais_valor_seguro_proporcional` | Number | Proportional share of the document totals: insurance. |
    | `totais_proporcionais_valor_despesas_acessorias_proporcional` | Number | Proportional share of the document totals: accessory expenses. |
    | `fci` | String (JSON) | Import content (FCI) data (JSON object). |
    | `pedido_compra_x_ped` | String | Customer purchase order: customer purchase order number (xPed). |
    | `pedido_compra_n_item_ped` | String | Customer purchase order: customer purchase order item (nItemPed). |
    | `tributos` | String (JSON) | Taxes of the item (JSON). |
    | `liberacoes_estoque` | String (JSON) | Stock releases of the item (JSON array). |
    | `rateios` | String (JSON) | Apportionment of the item among managerial classifications (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Sales Orders">
    Sales orders (pedidos). After the first sync, each sync reads the orders changed since the previous one.

    Table: `sales_orders` · Primary key: `id` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `extracted_at` | Datetime | Date and time (UTC) this connector read the record. For changed-since streams it is the incremental replication key: WK Radar does not return the change date of these records, so each incremental run asks WK Radar for the records changed since the previous run (with a one-day safety margin). |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `numero` | String | Order number. |
    | `codigo` | String | Order code. |
    | `id_filial` | String | Identifier of the branch (company/establishment); join to branches.id. |
    | `data_emissao` | Date | Order date. |
    | `data_entrega` | Date | Delivery date. |
    | `data_competencia` | Date | Accrual (competence) date. |
    | `data_hora_gravacao` | Datetime | Date and time the record was saved (UTC). |
    | `data_hora_ultima_alteracao` | Datetime | Date and time of the last change of the order (UTC). |
    | `data_hora_cancelamento` | Datetime | Date and time of cancellation (UTC), empty when not cancelled. |
    | `indicador_presenca_comprador` | String | Buyer presence indicator of the NF-e (in person, internet, phone...). Values: NaoSeAplica, OperacaoPresencial, OperacaoNaoPresencialInternet, OperacaoNaoPresencialTeleatendimento, NfceEmOperacaoEntregaDomicilio, OperacaoPresencialForaEstabelecimento, OperacaoNaoPresencialOutros. |
    | `situacao` | String | Order status (EmAnalise, Bloqueado, Pendente, Cancelado, ParcialmenteFaturado, Faturado, ParcialmenteAtendido, Atendido). |
    | `situacao_producao` | String | Production status of the order. Values: EmProducao, ParcialmenteEmProducao, SemStatusDaProducao. |
    | `id_cliente` | String | Identifier of the customer; join to customers.id. |
    | `id_contato` | String | Identifier of the customer contact. |
    | `consumidor_final` | String | Whether the buyer is a final consumer. Values: Normal, ConsumidorFinal. |
    | `local_entrega` | String (JSON) | Delivery address (JSON object). |
    | `vendedores` | String (JSON) | Salespeople of the document and their commission shares (JSON array). |
    | `representantes` | String (JSON) | Sales representatives of the document and their commission shares (JSON array). |
    | `id_operacao_comercial` | String | Identifier of the commercial operation. |
    | `id_natureza_operacao_produto` | String | Identifier of the operation nature (CFOP group) used for products. |
    | `id_natureza_operacao_servico` | String | Identifier of the operation nature used for services. |
    | `id_classificacao` | String | Financial/managerial classification of the order. |
    | `numero_ordem_compra` | String | Customer purchase order number (Nr. OC), sent in the xPed tag of the NF-e. |
    | `id_fluxo_pedido` | String | Identifier of the order follow-up flow. |
    | `id_fluxo_pedido_item` | String | Identifier of the order item follow-up flow. |
    | `historico_id` | String | Identifier of the standard history (description template) of the record. |
    | `historico_complementos` | Array of strings | Free-text complements added to the history (JSON array of strings). |
    | `beneficiario` | String (JSON) | Beneficiary of the order (JSON object). |
    | `intermediador` | String (JSON) | Intermediary (marketplace) of the transaction (JSON object). |
    | `kits` | String (JSON) | Kits sold in the order (JSON array). |
    | `total_valor_total` | Number | Totals: total amount. |
    | `total_valor_total_produtos` | Number | Totals: total amount of products. |
    | `total_valor_total_servicos` | Number | Totals: total amount of services. |
    | `total_valor_desconto_produtos` | Number | Totals: discount on products. |
    | `total_valor_desconto_servicos` | Number | Totals: discount on services. |
    | `total_percentual_desconto_produtos` | Number | Totals: discount percentage on products. |
    | `total_percentual_desconto_servicos` | Number | Totals: discount percentage on services. |
    | `total_desconto_produtos_em_percentual` | Boolean | Totals: whether the products discount was entered as a percentage. |
    | `total_desconto_servicos_em_percentual` | Boolean | Totals: whether the services discount was entered as a percentage. |
    | `total_despesas_por_conta` | String | Totals: who bears the expenses (issuer or recipient). Values: Emitente, Destinatario. |
    | `total_valor_frete` | Number | Totals: freight amount. |
    | `total_valor_seguro` | Number | Totals: insurance amount. |
    | `total_valor_despesas_acessorias` | Number | Totals: other accessory expenses. |
    | `total_tributacao_consumo_totais` | String (JSON) | Totals: consumption taxes (IBS/CBS) totals (JSON object). |
    | `tributos` | String (JSON) | Taxes of the record: ICMS, IPI, PIS, COFINS and others (JSON). |
    | `transporte` | String (JSON) | Transport data: carrier, freight mode and vehicle (JSON object). |
    | `volume` | String (JSON) | Packages/volumes data (JSON object). |
    | `observacao` | String | Notes. |
    | `faturamento_valor_total_a_pagar` | Number | Billing: total amount to be paid. |
    | `faturamento_valor_desconto` | Number | Billing: billing discount. |
    | `faturamento_valor_acrescimo` | Number | Billing: billing surcharge. |
    | `faturamento_id_cobranca` | String | Billing: collection (charge) used. |
    | `faturamento_id_condicao_pagamento` | String | Billing: payment terms used. |
    | `faturamento_fixar_datas_vencimento_do_pedido_na_nf` | Boolean | Billing: whether the order due dates are kept on the invoice. |
    | `faturamento_parcelas` | String (JSON) | Billing: installments (JSON array). |
    | `tipo_rateio` | String | How the amounts are apportioned among classifications. Values: RateioPeloTotalDoPedido, RateioPorItem. |
    | `rateios` | String (JSON) | Apportionment of the amount among managerial/financial classifications (JSON array). |
    | `informacoes_extras` | String (JSON) | Extra information fields (JSON object). |
    | `acompanhamento_processos` | String (JSON) | Follow-up processes of the order (JSON array). |
    | `acompanhamentos_itens` | String (JSON) | Follow-up of each order item (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Sales Order Items">
    One row per item of each sales order, read together with its order. `item_key` is the item number.

    Table: `sales_order_items` · Primary key: `pedido_id`, `item_key` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `pedido_id` | String | Sales order the item belongs to; join to sales\_orders.id. |
    | `item_key` | String | Item number inside the order (numero), as text; unique per order. |
    | `extracted_at` | Datetime | Date and time (UTC) the document this item belongs to was read, copied from the document's extracted\_at; used as the incremental replication key. Every run that reads a document rewrites all of its items with this value, so an item whose extracted\_at differs from its document's extracted\_at was removed from the document in WK Radar. |
    | `numero` | Integer | Item number within the document. |
    | `produto_servico_tipo` | String | Item type: product or service. Values: Produto, Servico. |
    | `produto_servico_id` | String | Product or service of the item. |
    | `produto_servico_id_item_grade1` | String | Product/service: grid item 1 (variation). |
    | `produto_servico_id_item_grade2` | String | Product/service: grid item 2 (variation). |
    | `produto_servico_id_item_grade3` | String | Product/service: grid item 3 (variation). |
    | `id_tabela_preco` | String | Identifier of the price table. |
    | `id_natureza_operacao` | String | Identifier of the operation nature (CFOP group) of the item. |
    | `id_unidade_venda` | String | Identifier of the sales unit of measure. |
    | `id_unidade_estoque` | String | Identifier of the stock unit of measure. |
    | `complemento` | String | Complementary description of the item. |
    | `quantidade_venda` | Number | Quantity in the sales unit. |
    | `quantidade_estoque` | Number | Quantity in the stock unit. |
    | `quantidade_faturada` | Number | Quantity already invoiced. |
    | `quantidade_pendente` | Number | Quantity still pending. |
    | `valor_unitario` | Number | Unit price of the item. |
    | `percentual_desconto` | Number | Discount percentage (calculated by WK Radar when the discount was entered as an amount). |
    | `valor_desconto_unitario` | Number | Discount per unit (calculated by WK Radar when the discount was entered as a total or percentage). |
    | `valor_desconto_total` | Number | Total discount of the item (calculated by WK Radar when the discount was entered per unit or as a percentage). |
    | `desconto_em_percentual` | Boolean | Whether the discount was entered as a percentage. |
    | `valor_total` | Number | Total amount of the item. |
    | `livre_de_cobranca` | Boolean | Whether the item is free of charge. |
    | `quantidade_volumes` | Number | Number of packages. |
    | `kit` | String (JSON) | Kit product this item comes from: type, id and grid items (JSON object). |
    | `id_kit` | String (JSON) | Kit identification of the item: type, id and grid items (JSON object). |
    | `codigo_kit` | Integer | Kit code. |
    | `id_indice` | String | Identifier of the price index/currency index. |
    | `numero_item_pedido` | String | Item number in the customer purchase order (Item Ped), sent in the nItemPed tag of the NF-e. |
    | `numero_ordem_compra` | String | Customer purchase order number (Nr. OC), sent in the xPed tag of the NF-e. |
    | `data_pedido_compra` | Date | Customer purchase order date. |
    | `numero_pedido_compra` | String | Customer purchase order number. |
    | `cancelado` | Boolean | Whether the item was cancelled. |
    | `reservar` | Boolean | Whether stock is reserved for the item. |
    | `data_entrega` | Date | Delivery date. |
    | `valor_indice` | Number | Index (currency) value applied to the item. |
    | `valor_moeda` | Number | Value in the foreign currency. |
    | `valor_total_liquido_sem_impostos` | Number | Net total of the item without taxes. |
    | `situacao` | String | Status of the item. Values: Nenhum, Cancelado, Faturado, ParcialmenteFaturado, Atendido, ParcialmenteAtendido, Pendente. |
    | `tributos` | String (JSON) | Taxes of the item (JSON). |
    | `liberacoes_estoque` | String (JSON) | Stock releases of the item (JSON array). |
    | `rateios` | String (JSON) | Apportionment of the item among managerial classifications (JSON array). |
    | `totais_proporcionais_valor_desconto_proporcional` | Number | Proportional share of the document totals: discount. |
    | `totais_proporcionais_valor_acrescimo_proporcional` | Number | Proportional share of the document totals: surcharge. |
    | `totais_proporcionais_valor_frete_proporcional` | Number | Proportional share of the document totals: freight. |
    | `totais_proporcionais_valor_frete_previsto_proporcional` | Number | Proportional share of the document totals: expected freight. |
    | `totais_proporcionais_valor_seguro_proporcional` | Number | Proportional share of the document totals: insurance. |
    | `totais_proporcionais_valor_despesas_acessorias_proporcional` | Number | Proportional share of the document totals: accessory expenses. |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>
</AccordionGroup>

### Purchasing

<AccordionGroup>
  <Accordion title="Purchase Orders">
    Purchase orders (ordens de compra). After the first sync, each sync reads the orders changed since the previous one.

    Table: `purchase_orders` · Primary key: `id` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `extracted_at` | Datetime | Date and time (UTC) this connector read the record. For changed-since streams it is the incremental replication key: WK Radar does not return the change date of these records, so each incremental run asks WK Radar for the records changed since the previous run (with a one-day safety margin). |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `chave` | String | Internal key of the record in WK Radar. |
    | `codigo` | String | Purchase order code. |
    | `data_emissao` | Date | Purchase order issue date. |
    | `data_competencia` | Date | Accrual (competence) date. |
    | `data_necessidade` | Date | Date the goods are needed. |
    | `id_filial_emitente` | String | Identifier of the issuing branch; join to branches.id. |
    | `id_filial_faturamento` | String | Identifier of the billing branch; join to branches.id. |
    | `id_natureza_operacao_produto` | String | Identifier of the operation nature (CFOP group) used for products. |
    | `id_natureza_operacao_servico` | String | Identifier of the operation nature used for services. |
    | `id_fornecedor_transportador` | String | Identifier of the supplier (or carrier) of the purchase order; join to suppliers.id. |
    | `id_classificacao` | String | Financial/managerial classification of the purchase order. |
    | `id_gerencial` | String | Identifier of the managerial account (cost center); join to management\_accounts.id. |
    | `id_requisitante` | String | Identifier of the requester. |
    | `id_departamento` | String | Identifier of the department. |
    | `id_comprador` | String | Identifier of the buyer. |
    | `id_moeda` | String | Identifier of the currency. |
    | `observacoes` | String | Notes. |
    | `bloqueio_orcamento_excedente` | Boolean | Whether the order is blocked for exceeding the budget. |
    | `impressa` | Boolean | Whether the purchase order was printed. |
    | `frete` | Boolean | Whether the order has freight. |
    | `incompleta` | Boolean | Whether the purchase order is incomplete. |
    | `situacao_autorizacao` | String | Approval status of the purchase order. Values: Pendente, Autorizada, AutorizadaNaDataInformada, Vetada. |
    | `situacao_atendimento` | String | Fulfilment status of the purchase order (pending, partially or fully received, cancelled). Values: Pendente, ParcialmenteAtendida, Atendida, Cancelada. |
    | `situacao_integracao` | String | Integration status of the purchase order. Values: Integrada, Pendente. |
    | `situacao_envio_email_fornecedor_ordem_compra` | String | Status of the e-mail sending the purchase order to the supplier. Values: Vazio, Pendente, Enviado. |
    | `entrega_data_entrega` | Date | Delivery: delivery date. |
    | `entrega_numero_dias_entrega` | Integer | Delivery: delivery lead time in days. |
    | `entrega_local_entrega` | String | Delivery: delivery place. |
    | `transporte` | String (JSON) | Transport data: carrier, freight mode and vehicle (JSON object). |
    | `historico_id` | String | Identifier of the standard history (description template) of the record. |
    | `historico_complementos` | Array of strings | Free-text complements added to the history (JSON array of strings). |
    | `totais_frete` | Number | Totals: freight amount. |
    | `totais_seguro` | Number | Totals: insurance amount. |
    | `totais_despesas_acessorias` | Number | Totals: accessory expenses. |
    | `totais_valor_total` | Number | Totals: total amount. |
    | `condicao_pagamento_id_condicao_pagamento` | String | Payment terms: payment terms used. |
    | `condicao_pagamento_fixar_datas_vencimento_no_registro_entrada` | Boolean | Payment terms: whether the due dates are kept on the incoming invoice. |
    | `condicao_pagamento_com_pagamento_antecipado` | Boolean | Payment terms: whether there is an advance payment. |
    | `condicao_pagamento_id_tipo_periodo` | String | Payment terms: period type. |
    | `condicao_pagamento_data_primeiro_vencimento` | Date | Payment terms: first due date. |
    | `condicao_pagamento_parcelas` | String (JSON) | Payment terms: installments (JSON array). |
    | `autorizacoes` | String (JSON) | Approvals of the purchase order (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Purchase Order Items">
    One row per item of each purchase order, read together with its order.

    Table: `purchase_order_items` · Primary key: `ordem_compra_id`, `item_key` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `ordem_compra_id` | String | Purchase order the item belongs to; join to purchase\_orders.id. |
    | `item_key` | String | Item number inside the purchase order (numero), as text; unique per order. |
    | `extracted_at` | Datetime | Date and time (UTC) the document this item belongs to was read, copied from the document's extracted\_at; used as the incremental replication key. Every run that reads a document rewrites all of its items with this value, so an item whose extracted\_at differs from its document's extracted\_at was removed from the document in WK Radar. |
    | `numero` | Integer | Item number within the document. |
    | `produto_servico_tipo` | String | Item type: product or service. Values: Produto, Servico. |
    | `produto_servico_id` | String | Product or service of the item. |
    | `produto_servico_id_item_grade1` | String | Product/service: grid item 1 (variation). |
    | `produto_servico_id_item_grade2` | String | Product/service: grid item 2 (variation). |
    | `produto_servico_id_item_grade3` | String | Product/service: grid item 3 (variation). |
    | `complemento` | String | Complementary description of the item. |
    | `id_natureza` | String | Identifier of the operation nature (CFOP group) of the item. |
    | `id_unidade_compra` | String | Identifier of the purchase unit of measure. |
    | `quantidade_solicitada` | Number | Quantity ordered. |
    | `quantidade_atendida` | Number | Quantity received. |
    | `quantidade_pendente` | Number | Quantity still pending. |
    | `quantidade_cancelada` | Number | Quantity cancelled. |
    | `valor_unitario` | Number | Unit price of the item. |
    | `valor_desconto_unitario` | Number | Discount per unit (calculated by WK Radar when the discount was entered as a total or percentage). |
    | `valor_desconto_total` | Number | Total discount of the item (calculated by WK Radar when the discount was entered per unit or as a percentage). |
    | `valor_total` | Number | Total amount of the item. |
    | `livre_de_cobranca` | Boolean | Whether the item is free of charge. |
    | `data_necesssidade` | Date | Date the item is needed (the API spells this field with three s). |
    | `gerar_acompanhamento` | Boolean | Whether a follow-up is generated for the item. |
    | `data_hora_entrega` | Datetime | Expected delivery date and time (UTC). |
    | `despesa` | Boolean | Whether the item is an expense. |
    | `imobilizado` | Boolean | Whether the item is a fixed asset. |
    | `rateios` | String (JSON) | Apportionment of the item among managerial classifications (JSON array). |
    | `tributos` | String (JSON) | Taxes of the item (JSON). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Incoming Invoices">
    Incoming invoices registered in Purchasing (registros de entrada): supplier invoices, utility bills and freight bills. The first sync reads them by entry date; later syncs read the ones changed since the previous sync.

    Table: `incoming_invoices` · Primary key: `id` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `extracted_at` | Datetime | Date and time (UTC) this connector read the record. For changed-since streams it is the incremental replication key: WK Radar does not return the change date of these records, so each incremental run asks WK Radar for the records changed since the previous run (with a one-day safety margin). |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `chave` | String | Internal key of the record in WK Radar. |
    | `id_filial` | String | Identifier of the branch (company/establishment); join to branches.id. |
    | `propria` | Boolean | Whether the invoice was issued by the company itself (own issue). |
    | `situacao` | String | Status of the incoming invoice (Invalido, Normal, Cancelada, Extemporanea). |
    | `indicador_nf` | String | Invoice indicator (electronic, paper...). Values: Invalido, Normal, Complementar, DevolucaoRetorno, CupomFiscal, RegimeEspecialNormaEspecifica. |
    | `finalidade` | String | Purpose of the document (normal, complementary, adjustment, return...). Values: Invalido, Normal, Substituicao, Ajuste. |
    | `chave_acesso` | String | Access key of the electronic invoice (44 digits). |
    | `numero_documento` | String | Number of the incoming invoice (supplier invoice number). |
    | `id_documento` | String | Document type of the incoming invoice. |
    | `id_natureza_operacao_produto` | String | Identifier of the operation nature (CFOP group) used for products. |
    | `id_natureza_operacao_servico` | String | Identifier of the operation nature used for services. |
    | `data_entrada` | Date | Entry date (date the document was registered as received). |
    | `data_emissao` | Date | Issue date. |
    | `data_escrituracao_extemporanea` | Date | Late bookkeeping date, when the document was booked out of period. |
    | `id_fornecedor_cliente` | String | Identifier of the supplier or customer that issued the incoming invoice; join to suppliers.id or customers.id. |
    | `id_pre_registro` | String | Identifier of the invoice pre-registration. |
    | `codigo_nfse` | String | Service invoice (NFS-e) code. |
    | `id_contrato` | String | Identifier of the contract. |
    | `id_recebimento_produtos` | String | Identifier of the goods receipt. |
    | `id_classificacao` | String | Financial/managerial classification of the incoming invoice. |
    | `id_gerencial` | String | Identifier of the managerial account (cost center); join to management\_accounts.id. |
    | `historico_id` | String | Identifier of the standard history (description template) of the record. |
    | `historico_complementos` | Array of strings | Free-text complements added to the history (JSON array of strings). |
    | `numero_documento_contabil` | Integer | Accounting document number generated for the entry. |
    | `id_local_estocagem` | String | Identifier of the storage location. |
    | `id_possuidor_proprietario` | String | Identifier of the third party holding or owning the goods. |
    | `id_requisitante` | String | Identifier of the requester. |
    | `id_departamento` | String | Identifier of the department. |
    | `id_comprador` | String | Identifier of the buyer. |
    | `consumo_faturado` | Number | Billed consumption (utilities invoices). |
    | `documentos_referenciados` | String (JSON) | Documents referenced by the incoming invoice (JSON array). |
    | `energia` | String (JSON) | Electric energy invoice data (JSON object). |
    | `comunicacao` | String (JSON) | Communication/telecom invoice data (JSON object). |
    | `total_frete` | Number | Totals: freight amount. |
    | `total_seguro` | Number | Totals: insurance amount. |
    | `total_despesas_acessoriais` | Number | Totals: accessory expenses. |
    | `total_custo_conhecimento_transporte` | Number | Totals: freight bill (CT-e) cost. |
    | `total_valor_total` | Number | Totals: total amount. |
    | `total_valor_liquido` | Number | Totals: net amount. |
    | `transporte` | String (JSON) | Transport data: carrier, freight mode and vehicle (JSON object). |
    | `complemento` | String (JSON) | Complementary information (JSON). |
    | `condicao_pagamento_id` | String | Payment terms: identifier. |
    | `condicao_pagamento_id_cedente` | String | Payment terms: payee. |
    | `condicao_pagamento_id_moeda` | String | Payment terms: currency. |
    | `condicao_pagamento_id_tipo_periodo` | String | Payment terms: period type. |
    | `condicao_pagamento_data_cambio` | Date | Payment terms: exchange rate date. |
    | `condicao_pagamento_parcelas` | String (JSON) | Payment terms: installments (JSON array). |
    | `origem` | String (JSON) | Origin city of the transport (JSON object). |
    | `destino` | String (JSON) | Destination city of the transport (JSON object). |
    | `integrado` | String | Integration status of the incoming invoice with the other modules. Values: Invalido, Integrado, Pendente. |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Incoming Invoice Items">
    One row per item of each incoming invoice, read together with it.

    Table: `incoming_invoice_items` · Primary key: `registro_entrada_id`, `item_key` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `registro_entrada_id` | String | Incoming invoice the item belongs to; join to incoming\_invoices.id. |
    | `item_key` | String | Item number inside the incoming invoice (numero), as text; unique per document. |
    | `extracted_at` | Datetime | Date and time (UTC) the document this item belongs to was read, copied from the document's extracted\_at; used as the incremental replication key. Every run that reads a document rewrites all of its items with this value, so an item whose extracted\_at differs from its document's extracted\_at was removed from the document in WK Radar. |
    | `numero` | Integer | Item number within the document. |
    | `produto_servico_tipo` | String | Item type: product or service. Values: Produto, Servico. |
    | `produto_servico_id` | String | Product or service of the item. |
    | `produto_servico_id_item_grade1` | String | Product/service: grid item 1 (variation). |
    | `produto_servico_id_item_grade2` | String | Product/service: grid item 2 (variation). |
    | `produto_servico_id_item_grade3` | String | Product/service: grid item 3 (variation). |
    | `complemento` | String | Complementary description of the item. |
    | `id_natureza` | String | Identifier of the operation nature (CFOP group) of the item. |
    | `id_unidade` | String | Identifier of the unit of measure. |
    | `quantidade` | Number | Quantity of the item. |
    | `valor_unitario` | Number | Unit price of the item. |
    | `valor_desconto_unitario` | Number | Discount per unit (calculated by WK Radar when the discount was entered as a total or percentage). |
    | `valor_desconto_total` | Number | Total discount of the item (calculated by WK Radar when the discount was entered per unit or as a percentage). |
    | `valor_total` | Number | Total amount of the item. |
    | `livre_de_cobranca` | Boolean | Whether the item is free of charge. |
    | `peso_liquido` | Number | Net weight. |
    | `imobilizado` | Boolean | Whether the item is a fixed asset. |
    | `despesa` | String (JSON) | Expense data of the item (JSON object). |
    | `ordens_compra` | String (JSON) | Purchase orders received by the item (JSON array). |
    | `tributos` | String (JSON) | Taxes of the item (JSON). |
    | `declaracao_importacao` | String (JSON) | Import declaration (DI) of the item (JSON object). |
    | `servico_efd_reinf` | String (JSON) | EFD-Reinf service data of the item (JSON object). |
    | `rateios` | String (JSON) | Apportionment of the item among managerial classifications (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>
</AccordionGroup>

### Financial

<AccordionGroup>
  <Accordion title="Accounts Payable">
    Bills payable (títulos a pagar). The first sync reads the bills issued or due since the Start Date and every bill still open; later syncs read every bill changed since the previous sync, so payments, extensions and cancellations of old bills are picked up.

    Table: `accounts_payable` · Primary key: `id` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `extracted_at` | Datetime | Date and time (UTC) this connector read the record. For changed-since streams it is the incremental replication key: WK Radar does not return the change date of these records, so each incremental run asks WK Radar for the records changed since the previous run (with a one-day safety margin). |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `codigo` | String | Code of the bill. |
    | `id_filial` | String | Identifier of the branch (company/establishment); join to branches.id. |
    | `id_cedente` | String | Identifier of the supplier (payee) of the bill; join to suppliers.id. |
    | `id_documento` | String | Document type of the bill. |
    | `id_grade_contabil` | String | Identifier of the accounting grid used to post the entry. |
    | `id_natureza_efd_reinf` | String | Identifier of the EFD-Reinf nature of income. |
    | `id_portador` | String | Identifier of the bearer (bank or wallet holding the bill). |
    | `id_tipo_cobranca` | String | Identifier of the collection type. |
    | `id_conta_banco` | String | Identifier of the bank/cash account. |
    | `id_forma_pagamento` | String | Identifier of the payment method. |
    | `id_informacao_bancaria_conta` | String | Identifier of the supplier bank account used for payment. |
    | `data_vencimento` | Date | Due date. |
    | `data_pagar` | Date | Scheduled payment date. |
    | `data_emissao` | Date | Issue date of the bill. |
    | `data_entrada` | Date | Entry date of the bill. |
    | `data_fato_gerador_efd_reinf` | Date | Taxable event date for EFD-Reinf. |
    | `data_vencimento_original` | Date | Original due date, before any extension. |
    | `data_periodo_apuracao_efd_reinf` | String | EFD-Reinf assessment period. |
    | `previsao` | Boolean | Whether the bill is a forecast (provisional) bill. |
    | `numero_documento` | String | Document number. |
    | `valor` | Number | Amount of the bill. |
    | `valor_juros` | Number | Interest amount. |
    | `valor_multa` | Number | Fine (late fee) amount. |
    | `valor_desconto` | Number | Discount amount. |
    | `valor_baixado` | Number | Amount already settled (paid/received). |
    | `historico_id` | String | Identifier of the standard history (description template) of the record. |
    | `historico_complementos` | Array of strings | Free-text complements added to the history (JSON array of strings). |
    | `pix` | String (JSON) | Pix payment data (JSON object). |
    | `substituicao_numero` | Integer | Replacement of the bill: number. |
    | `substituicao_data` | Date | Replacement of the bill: date. |
    | `substituicao_tipo` | String | Replacement of the bill: type. Values: Substituido, Substituto. |
    | `rateios_conta_contabil` | String (JSON) | Apportionment of the amount among ledger accounts and managerial accounts (JSON array). |
    | `notas_fiscais` | String (JSON) | Invoices linked to the bill, with withholdings (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Accounts Receivable">
    Bills receivable (títulos a receber), read like Accounts Payable.

    Table: `accounts_receivable` · Primary key: `id` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `extracted_at` | Datetime | Date and time (UTC) this connector read the record. For changed-since streams it is the incremental replication key: WK Radar does not return the change date of these records, so each incremental run asks WK Radar for the records changed since the previous run (with a one-day safety margin). |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `codigo` | String | Code of the bill. |
    | `id_filial` | String | Identifier of the branch (company/establishment); join to branches.id. |
    | `id_sacado` | String | Identifier of the customer (payer) of the bill; join to customers.id. |
    | `id_documento` | String | Document type of the bill. |
    | `id_grade_contabil` | String | Identifier of the accounting grid used to post the entry. |
    | `id_natureza_efd_reinf` | String | Identifier of the EFD-Reinf nature of income. |
    | `id_portador` | String | Identifier of the bearer (bank or wallet holding the bill). |
    | `id_tipo_cobranca` | String | Identifier of the collection type. |
    | `id_conta_banco` | String | Identifier of the bank/cash account. |
    | `id_forma_pagamento` | String | Identifier of the payment method. |
    | `id_quem_gerou` | String | Identifier of the record (in the module given by modulo\_quem\_gerou) that generated the bill. |
    | `modulo_quem_gerou` | String | WK Radar module that generated the bill (e.g. MovimentoComercialNotasFiscais). |
    | `data_vencimento` | Date | Due date. |
    | `data_receber` | Date | Expected receipt date. |
    | `data_emissao` | Date | Issue date of the bill. |
    | `data_saida` | Date | Departure date of the bill's source document. |
    | `data_vencimento_original` | Date | Original due date, before any extension. |
    | `previsao` | Boolean | Whether the bill is a forecast (provisional) bill. |
    | `documento_cobranca_emitido` | Boolean | Whether the collection document (bank slip) was issued. |
    | `nosso_numero` | String | Bank slip number assigned by the bank (nosso numero). |
    | `numero_documento` | String | Document number. |
    | `valor` | Number | Amount of the bill. |
    | `valor_juros` | Number | Interest amount. |
    | `valor_multa` | Number | Fine (late fee) amount. |
    | `valor_desconto` | Number | Discount amount. |
    | `valor_baixado` | Number | Amount already settled (paid/received). |
    | `historico_id` | String | Identifier of the standard history (description template) of the record. |
    | `historico_complementos` | Array of strings | Free-text complements added to the history (JSON array of strings). |
    | `substituicao_numero` | Integer | Replacement of the bill: number. |
    | `substituicao_data` | Date | Replacement of the bill: date. |
    | `substituicao_tipo` | String | Replacement of the bill: type. Values: Substituido, Substituto. |
    | `rateios_conta_contabil` | String (JSON) | Apportionment of the amount among ledger accounts and managerial accounts (JSON array). |
    | `notas_fiscais` | String (JSON) | Invoices linked to the bill, with withholdings (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Accounts Payable Settlements">
    Settlements (baixas) of bills payable, by settlement date. Each sync re-reads the last 35 days of settlement dates (configurable).

    Table: `accounts_payable_settlements` · Primary key: `id` · Sync: Incremental (`data_baixa`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `codigo_baixa` | String | Code of the settlement. |
    | `codigo_titulo` | String | Code of the settled bill. |
    | `id_titulo` | String | Identifier of the bill (account payable/receivable) that was settled; join to accounts\_payable.id or accounts\_receivable.id. |
    | `id_filial_pagadora` | String | Identifier of the branch that paid the bill; join to branches.id. |
    | `id_conta_saida` | String | Identifier of the cash/bank account the money left from. |
    | `id_cedente` | String | Identifier of the supplier (payee) of the bill; join to suppliers.id. |
    | `id_forma_pagamento` | String | Identifier of the payment method. |
    | `id_grade_contabil` | String | Identifier of the accounting grid used to post the entry. |
    | `numero` | String | Number of the settled bill. |
    | `data_vencimento_pagamento` | Date | Due date of the settled bill. |
    | `data_disponibilidade` | Date | Date the money became available in the account. |
    | `data_baixa` | Date | Settlement date (date the payment/receipt was recorded), used as the incremental replication key. |
    | `valor_adiantamento` | Number | Advance amount used in the settlement. |
    | `valor_baixa_liquida` | Number | Net settled amount. |
    | `valor_multa` | Number | Fine (late fee) amount. |
    | `valor_juros` | Number | Interest amount. |
    | `valor_desconto` | Number | Discount amount. |
    | `valor_outros5` | Number | Other amount 5 of the settlement (as configured in WK Radar). |
    | `valor_outros6` | Number | Other amount 6 of the settlement (as configured in WK Radar). |
    | `rateios_conta_contabil_titulo` | String (JSON) | Ledger account apportionment of the bill amount (JSON array). |
    | `rateios_conta_contabil_encargo` | String (JSON) | Ledger account apportionment of charges (interest, fines, discounts) (JSON array). |
    | `adiantamentos_baixa` | String (JSON) | Advances used in the settlement (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Accounts Receivable Settlements">
    Settlements (baixas) of bills receivable, by settlement date. Each sync re-reads the last 35 days of settlement dates (configurable).

    Table: `accounts_receivable_settlements` · Primary key: `id` · Sync: Incremental (`data_baixa`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `codigo_baixa` | String | Code of the settlement. |
    | `codigo_titulo` | String | Code of the settled bill. |
    | `id_titulo` | String | Identifier of the bill (account payable/receivable) that was settled; join to accounts\_payable.id or accounts\_receivable.id. |
    | `id_filial_recebedora` | String | Identifier of the branch that received the payment; join to branches.id. |
    | `id_conta_entrada` | String | Identifier of the cash/bank account that received the money. |
    | `id_cliente_sacado` | String | Identifier of the customer (payer) of the settled bill; join to customers.id. |
    | `id_forma_pagamento` | String | Identifier of the payment method. |
    | `id_grade_contabil` | String | Identifier of the accounting grid used to post the entry. |
    | `numero` | String | Number of the settled bill. |
    | `data_vencimento_pagamento` | Date | Due date of the settled bill. |
    | `data_disponibilidade` | Date | Date the money became available in the account. |
    | `data_baixa` | Date | Settlement date (date the payment/receipt was recorded), used as the incremental replication key. |
    | `valor_adiantamento` | Number | Advance amount used in the settlement. |
    | `valor_baixa_liquida` | Number | Net settled amount. |
    | `valor_multa` | Number | Fine (late fee) amount. |
    | `valor_juros` | Number | Interest amount. |
    | `valor_desconto` | Number | Discount amount. |
    | `valor_taxa_adm` | Number | Administrative fee amount (e.g. card fee). |
    | `valor_despesa_cobranca` | Number | Collection expense amount. |
    | `valor_outros3` | Number | Other amount 3 of the settlement (as configured in WK Radar). |
    | `valor_outros4` | Number | Other amount 4 of the settlement (as configured in WK Radar). |
    | `rateios_conta_contabil_titulo` | String (JSON) | Ledger account apportionment of the bill amount (JSON array). |
    | `rateios_conta_contabil_encargo` | String (JSON) | Ledger account apportionment of charges (interest, fines, discounts) (JSON array). |
    | `adiantamentos_baixa` | String (JSON) | Advances used in the settlement (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>
</AccordionGroup>

### Accounting

<AccordionGroup>
  <Accordion title="Journal Entries">
    Accounting journal entries (lançamentos contábeis) with debit and credit accounts and their cost center apportionment, by entry date. Each sync re-reads the last 60 days of entry dates (configurable).

    Table: `journal_entries` · Primary key: `id` · Sync: Incremental (`data`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `chave` | String | Internal key of the record in WK Radar. |
    | `id_filial` | String | Identifier of the branch (company/establishment); join to branches.id. |
    | `credito_id` | String | Credit side: identifier. |
    | `credito_codigo_integrador` | String | Credit side: integrator code. |
    | `credito_id_conta_contabil` | String | Credit side: ledger account (join to chart\_of\_accounts.id). |
    | `credito_rateios` | String (JSON) | Credit side: apportionment among managerial accounts (JSON array). |
    | `data` | Date | Entry date of the journal entry, used as the incremental replication key. |
    | `debito_id` | String | Debit side: identifier. |
    | `debito_codigo_integrador` | String | Debit side: integrator code. |
    | `debito_id_conta_contabil` | String | Debit side: ledger account (join to chart\_of\_accounts.id). |
    | `debito_rateios` | String (JSON) | Debit side: apportionment among managerial accounts (JSON array). |
    | `documento` | Integer | Accounting document number of the entry. |
    | `valor` | Number | Amount of the entry. |
    | `historico_id` | String | Identifier of the standard history (description template) of the record. |
    | `historico_complementos` | Array of strings | Free-text complements added to the history (JSON array of strings). |
    | `nota_explicativa` | String | Explanatory note of the entry. |
    | `id_participante` | String | Participant (counterparty) of the entry. |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Chart of Accounts">
    Ledger accounts (plano de contas contábil), group and posting accounts, active and inactive. Read in full on every sync.

    Table: `chart_of_accounts` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `codigo` | String | Account code. |
    | `tipo` | String | Account type: Titulo (synthetic/group) or Analitica (posting account). |
    | `classificacao` | String | Account classification (hierarchical structure, e.g. 1.01.001). |
    | `nome` | String | Account name. |
    | `caracteristicas` | Array of strings | Characteristics of the account (list). |
    | `inativo` | Boolean | Whether the record is inactive. |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Management Accounts">
    Managerial accounts (plano de contas gerencial), which WK Radar uses as cost centers. Read in full on every sync.

    Table: `management_accounts` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `codigo` | String | Managerial account (cost center) code. |
    | `tipo` | String | Account type: Titulo (synthetic/group) or Analitica (posting account). |
    | `classificacao` | String | Managerial account classification (hierarchical structure). |
    | `nome` | String | Managerial account (cost center) name. |
    | `inativo` | Boolean | Whether the record is inactive. |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>
</AccordionGroup>

### Inventory and registries

<AccordionGroup>
  <Accordion title="Stock Movements">
    Stock movements (entries, exits, transfers, adjustments) per product, location and batch. After the first sync, each sync reads the movements changed since the previous one.

    Table: `stock_movements` · Primary key: `id` · Sync: Incremental (`extracted_at`)

    | Field | Type | Description |
    | :- | :- | :- |
    | `extracted_at` | Datetime | Date and time (UTC) this connector read the record. For changed-since streams it is the incremental replication key: WK Radar does not return the change date of these records, so each incremental run asks WK Radar for the records changed since the previous run (with a one-day safety margin). |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `id_filial` | String | Identifier of the branch (company/establishment); join to branches.id. |
    | `chave` | String | Internal key of the record in WK Radar. |
    | `origem` | String | Module/routine that generated the stock movement. Values: Compras, Estoque, Comercial, Producao, Custos, NFCe, ECF, RequisicaoInterna, AtendimentoDeRequisicoes, GeradorLancamento, Importacao. |
    | `chave_origem` | String | Key of the record that originated the stock movement. |
    | `data_movimento` | Datetime | Date and time of the stock movement (UTC). |
    | `operacao` | String | Stock operation (entry, exit, transfer, adjustment...). |
    | `item_tipo` | String | Item type: product or service. Values: Produto, Servico. |
    | `item_id` | String | Product (or service) moved. |
    | `item_id_item_grade1` | String | Moved item: grid item 1 (variation). |
    | `item_id_item_grade2` | String | Moved item: grid item 2 (variation). |
    | `item_id_item_grade3` | String | Moved item: grid item 3 (variation). |
    | `quantidade` | Number | Quantity. |
    | `valor_unitario` | Number | Unit price. |
    | `valor_total` | Number | Total amount. |
    | `tipo_estoque` | String | Stock type: own, held by third parties, or third-party stock held by the company. Values: Proprio, EmPoderDeTerceiros, DeTerceirosEmPoderDaEmpresa. |
    | `id_local` | String | Identifier of the storage location. |
    | `id_embalagem` | String | Identifier of the packaging. |
    | `numero_documento` | String | Number of the document of the movement. |
    | `id_tipo_documento` | String | Document type of the movement. |
    | `observacao` | String | Notes of the movement. |
    | `volume` | String | Volume identification. |
    | `numero_documento_origem` | String | Number of the document that originated the movement. |
    | `id_terceiro_possuidor` | String | Identifier of the third party holding the goods. |
    | `id_terceiro_proprietario` | String | Identifier of the third party owning the goods. |
    | `numero_ficha_conteudo_importacao` | String | Import content sheet (FCI) number. |
    | `conteudo_importado` | Boolean | Whether the item has imported content. |
    | `parcela_importada_unitaria` | Number | Imported share of the unit value. |
    | `lote_tipo_producao` | String | Batch production type. Values: Externa, Interna. |
    | `lote_numero` | String | Batch (lot) number. |
    | `lote_data_fabricacao` | Date | Batch manufacturing date. |
    | `lote_numero_dias` | Integer | Batch shelf life in days. |
    | `lote_data_validade` | Date | Batch expiry date. |
    | `lote_id_fornecedor` | String | Supplier of the batch. |
    | `rateios_gerenciais` | String (JSON) | Apportionment among managerial classifications (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Products">
    Every product, active and inactive. Read in full on every sync.

    Table: `products` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `codigo` | String | Product code. |
    | `nome` | String | Product name. |
    | `descricao` | String | Product description. |
    | `id_unidade_medida` | String | Identifier of the unit of measure. |
    | `id_grade1` | String | Identifier of the grid (size/color variation) 1. |
    | `id_grade2` | String | Identifier of the grid (size/color variation) 2. |
    | `id_grade3` | String | Identifier of the grid (size/color variation) 3. |
    | `classificacao` | String | Product classification (hierarchical code). |
    | `referencia` | String | Product reference. |
    | `tipo` | String | Product type (own, third-party, kit, packaging). Values: Invalido, Classe, Proprio, Terceiros, Kit. |
    | `tipo_embalagem` | Boolean | Whether the product is a packaging. |
    | `preco_venda` | Number | Sale price. |
    | `casas_decimais_preco_venda` | String | Number of decimal places used for the sale price. Values: Duas, Quatro, Oito. |
    | `desconto_sugerido` | Number | Suggested discount. |
    | `prazo_validade` | Integer | Shelf life. |
    | `id_embalagem` | String | Identifier of the packaging. |
    | `numero_produtos_por_embalagem` | Number | Number of products per package. |
    | `quantidade_embalagens_por_palete` | Integer | Number of packages per pallet. |
    | `id_unidade_logistica` | String | Identifier of the logistic unit. |
    | `tara` | Number | Tare weight. |
    | `unidade_medida_tara` | String | Unit of the tare weight. Values: Invalido, Nenhum, kg, dg, cg, mg, g, lb, t. |
    | `capacidade_volumetrica` | Integer | Volumetric capacity. |
    | `peso_bruto` | Number | Gross weight. |
    | `unidade_medida_peso_bruto` | String | Unit of the gross weight. Values: Invalido, Nenhum, kg, dg, cg, mg, g, lb, t. |
    | `peso_liquido` | Number | Net weight. |
    | `unidade_medida_peso_liquido` | String | Unit of the net weight. Values: Invalido, Nenhum, kg, dg, cg, mg, g, lb, t. |
    | `prazo_garantia` | Number | Warranty period. |
    | `unidade_medida_prazo_garantia` | String | Unit of the warranty period. Values: Nenhum, Anos, Meses, Semanas, Dias, Horas. |
    | `inativo` | Boolean | Whether the record is inactive. |
    | `grades_informacoes_extras` | String (JSON) | Grids and extra information of the product (JSON object). |
    | `referencias_grade` | String (JSON) | References per grid item (JSON array). |
    | `complemento` | String (JSON) | Complementary information (JSON). |
    | `ipi` | String (JSON) | IPI tax settings of the product (JSON object). |
    | `embalagem` | String (JSON) | Packaging settings (JSON object). |
    | `kit` | String (JSON) | Kit composition (JSON array). |
    | `informacoes_fiscais` | String (JSON) | Tax settings of the product: NCM, origin, CEST... (JSON object). |
    | `dimensoes_largura` | Number | Dimensions: width. |
    | `dimensoes_unidade_medida_largura` | String | Dimensions: unit of the width. Values: Invalido, Nenhum, cm, dm, m, mm, pol. |
    | `dimensoes_altura` | Number | Dimensions: height. |
    | `dimensoes_unidade_medida_altura` | String | Dimensions: unit of the height. Values: Invalido, Nenhum, cm, dm, m, mm, pol. |
    | `dimensoes_comprimento` | Number | Dimensions: length. |
    | `dimensoes_unidade_medida_comprimento` | String | Dimensions: unit of the length. Values: Invalido, Nenhum, cm, dm, m, mm, pol. |
    | `informacoes_extras_por_filiais` | String (JSON) | Extra information per branch (JSON array). |
    | `fornecedores` | String (JSON) | Suppliers of the product (JSON array). |
    | `composicao_local` | String (JSON) | Local composition of the product (JSON array). |
    | `aliquotas_icms` | String (JSON) | ICMS rates per state (JSON array). |
    | `produto_piscofins` | String (JSON) | PIS/COFINS settings (JSON array). |
    | `taxa_conversao` | String (JSON) | Unit conversion rates (JSON array). |
    | `fotos` | String (JSON) | Product photos (JSON array). |
    | `classificacoes_empresariais` | String (JSON) | Business classifications of the product (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Customers">
    Every customer, active and inactive, individuals and companies. Read in full on every sync.

    Table: `customers` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `codigo` | String | Customer code. |
    | `cpf_cnpj` | String | CPF or CNPJ (Brazilian tax id). |
    | `tipo_pessoa` | String | Person type: individual (Fisica) or company (Juridica). |
    | `classificacao_paralela` | String | Parallel classification. |
    | `classificacao` | String | Customer classification (hierarchical code). |
    | `razao_social` | String | Legal name. |
    | `nome_fantasia` | String | Trade name. |
    | `id_empresa_grupo` | String | Identifier of the group company. |
    | `contato` | String | Contact name. |
    | `email` | String | E-mail address. |
    | `homepage` | String | Website. |
    | `inativo` | Boolean | Whether the record is inactive. |
    | `ativo_inativo_desde` | Date | Date since the record is active/inactive. |
    | `venda_bloqueada` | Boolean | Whether sales to the customer are blocked. |
    | `caracteristicas` | Array of strings | Characteristics of the record (list). |
    | `id_categoria1` | String | Identifier of the category 1. |
    | `id_categoria2` | String | Identifier of the category 2. |
    | `id_categoria3` | String | Identifier of the category 3. |
    | `enderecos` | String (JSON) | Addresses (JSON array). |
    | `inscricoes_legais_tipo_icms` | String | Legal registrations: ICMS taxpayer type. Values: Contribuinte, Isento, NaoContribuinte. |
    | `inscricoes_legais_inscricao_estadual` | String | Legal registrations: state tax registration (IE). |
    | `inscricoes_legais_categoria_fiscal` | String | Legal registrations: tax category. Values: CategoriaNula, Armazenador, ConsumidorFinal, CentralPetroquimica, Distribuidor, Formulador, Importador, PostoVarejista, Refinaria, TransportadorRevendedorRetalhista, Usina, VarejistaGLP. |
    | `inscricoes_legais_cnae_principal` | String | Legal registrations: main CNAE (economic activity). |
    | `inscricoes_legais_inscricao_municipal` | String | Legal registrations: municipal tax registration (IM). |
    | `inscricoes_legais_codigo_atividade_municipal` | String | Legal registrations: municipal activity code. |
    | `inscricoes_legais_registro_suframa` | String | Legal registrations: SUFRAMA registration. |
    | `informacoes_cadastrais` | String (JSON) | Registration information (JSON object). |
    | `detalhes` | String (JSON) | Details (JSON object). |
    | `informacoes_financeiras` | String (JSON) | Financial information: credit limit, payment terms... (JSON object). |
    | `informacoes_extras` | String (JSON) | Extra information fields (JSON object). |
    | `informacoes_extras2` | String (JSON) | More extra information fields (JSON object). |
    | `contatos` | String (JSON) | Contacts (JSON array). |
    | `labutas` | String (JSON) | Activities (labutas) of the record (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Suppliers">
    Every supplier, active and inactive. Read in full on every sync.

    Table: `suppliers` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `lista_info_plus` | String (JSON) | InfoPlus custom fields of the record: position, name, value and type (JSON array). |
    | `codigo` | String | Supplier code. |
    | `cpf_cnpj` | String | CPF or CNPJ (Brazilian tax id). |
    | `tipo_pessoa` | String | Person type: individual (Fisica) or company (Juridica). |
    | `classificacao_paralela` | String | Parallel classification. |
    | `classificacao` | String | Supplier classification (hierarchical code). |
    | `razao_social` | String | Legal name. |
    | `nome_fantasia` | String | Trade name. |
    | `id_empresa_grupo` | String | Identifier of the group company. |
    | `contato` | String | Contact name. |
    | `email` | String | E-mail address. |
    | `homepage` | String | Website. |
    | `inativo` | Boolean | Whether the record is inactive. |
    | `ativo_inativo_desde` | Date | Date since the record is active/inactive. |
    | `caracteristicas` | Array of strings | Characteristics of the record (list). |
    | `id_categoria1` | String | Identifier of the category 1. |
    | `id_categoria2` | String | Identifier of the category 2. |
    | `id_categoria3` | String | Identifier of the category 3. |
    | `enderecos` | String (JSON) | Addresses (JSON array). |
    | `inscricoes_legais_tipo_icms` | String | Legal registrations: ICMS taxpayer type. Values: Contribuinte, Isento, NaoContribuinte. |
    | `inscricoes_legais_inscricao_estadual` | String | Legal registrations: state tax registration (IE). |
    | `inscricoes_legais_categoria_fiscal` | String | Legal registrations: tax category. Values: CategoriaNula, Armazenador, ConsumidorFinal, CentralPetroquimica, Distribuidor, Formulador, Importador, PostoVarejista, Refinaria, TransportadorRevendedorRetalhista, Usina, VarejistaGLP. |
    | `inscricoes_legais_cnae_principal` | String | Legal registrations: main CNAE (economic activity). |
    | `inscricoes_legais_inscricao_municipal` | String | Legal registrations: municipal tax registration (IM). |
    | `inscricoes_legais_codigo_atividade_municipal` | String | Legal registrations: municipal activity code. |
    | `inscricoes_legais_registro_suframa` | String | Legal registrations: SUFRAMA registration. |
    | `informacoes_cadastrais` | String (JSON) | Registration information (JSON object). |
    | `informacoes_financeiras` | String (JSON) | Financial information: credit limit, payment terms... (JSON object). |
    | `informacoes_extras` | String (JSON) | Extra information fields (JSON object). |
    | `informacoes_extras2` | String (JSON) | More extra information fields (JSON object). |
    | `contatos` | String (JSON) | Contacts (JSON array). |
    | `labutas` | String (JSON) | Activities (labutas) of the record (JSON array). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>

  <Accordion title="Branches">
    Companies and branches (empresas/filiais) registered in WK Radar. Read in full on every sync.

    Table: `branches` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | String | Unique identifier of the record in WK Radar. |
    | `codigo_integrador` | String | Integrator code linked to the record by an integration (CodigoIntegrador), when one was set. |
    | `codigo` | Integer | Branch code. |
    | `identificacao` | String | Short identification of the branch. |
    | `razao_social` | String | Legal name of the branch. |
    | `nome_fantasia` | String | Trade name of the branch. |
    | `cpf_cnpj` | String | CNPJ (or CPF) of the branch. |
    | `situacao` | String | Branch status. Values: Invalido, Ativa, Inativa, SemMovimento, Abandonada, Baixada. |
    | `estabelecimento` | String | Establishment type (head office or branch). Values: Invalido, Matriz, Filial. |
    | `id_matriz` | String | Identifier of the head office branch of this branch; join to branches.id. |
    | `uf` | String | State (UF). |
    | `endereco_endereco` | String | Address: street. |
    | `endereco_numero` | String | Address: number. |
    | `endereco_complemento` | String | Address: complement. |
    | `endereco_bairro` | String | Address: district. |
    | `endereco_id_municipio` | String | Address: city. |
    | `inscricao_estadual` | String | State tax registration (IE). |
    | `inscricao_municipal` | String | Municipal tax registration (IM). |
    | `additional_fields` | String (JSON) | Fields WK Radar returned that this connector has no column for (for example fields added in a newer Radar.API version, or a value that did not fit its column), kept as a JSON object so nothing is lost. |
  </Accordion>
</AccordionGroup>

## Implementation Notes

### Data Quality Considerations

* **Dates and times are in UTC.** WK Radar sends them without a time zone, in the server's time (Brasília time unless you set another **API time zone**); Nekt converts them to UTC. Columns that hold only a date (due date, settlement date, entry date) keep the date as shown in WK Radar.
* **How each stream is kept up to date**:
  * Sales orders, purchase orders, incoming invoices, stock movements, accounts payable and accounts receivable: each sync reads the records changed in WK Radar since the previous sync (with a one-day safety margin), whatever their date, plus the documents dated in the last days. The column `extracted_at` records when the connector read the record.
  * Invoices: each sync re-reads the last 7 days of issue dates. Invoices whose NF-e or NFS-e is still waiting for authorization, was rejected or has a cancellation request are re-read on every sync until their status is final (for up to 90 days).
  * Settlements: each sync re-reads the last 35 days of settlement dates (**Settlements Lookback**).
  * Journal entries: each sync re-reads the last 60 days of entry dates (**Journal Entries Lookback**), which covers closing entries posted weeks after the month they belong to.
  * Products, customers, suppliers, charts of accounts and branches: read in full on every sync. If WK Radar returns no products, customers, branches or ledger accounts at all, the sync stops instead of emptying the table.
* **Deleted records stay in your tables** after incremental syncs (for example, a settlement reversed in WK Radar). A full sync removes them.
* **Items** have their own tables and are read together with their document. Join them by `nota_fiscal_id`, `pedido_id`, `ordem_compra_id` or `registro_entrada_id` to the document's `id`. Every item carries the `extracted_at` of its document: an item removed from a document in WK Radar keeps an older value, so filter items with `item.extracted_at = document.extracted_at` to see the current items only. Invoice items have no item number in WK Radar, so `item_key` is their position in the invoice; if an item is removed from the middle of an invoice still being edited, the following items move up one position.
* **Nested information** (taxes, installments, apportionments, addresses, InfoPlus custom fields) is stored as JSON text. Totals, NF-e and NFS-e data are split into their own columns (for example `total_valor_total_nota_fiscal`, `nfe_status`).
* `additional_fields` keeps, as JSON, any field WK Radar returns that has no column of its own (for example fields added in a newer Radar.API version).
* There is no stock balance in the Radar.API: stock levels can be computed from **Stock Movements**. A movement deleted in WK Radar stays in the table until the next full sync, so balances computed this way can be off until then.
* On the first syncs, compare the purchase orders (all statuses) and products (all types, including kits and packaging) with the WK Radar screens: the connector asks for every status and type, as WK Radar does when no filter is given.

### API Limits & Performance

* The Radar.API accepts at most 4 requests per second. The connector stays below that limit and waits when WK Radar asks it to slow down.
* The Radar.API returns each list in a single answer, so the connector first lists the ids of the records and then reads them in small batches. The first sync of a company with many years of documents can take hours; later syncs only read what changed.

## Troubleshooting

| Error or symptom | What it means | What to do |
| :- | :- | :- |
| "The Radar.API address could not be found" | The URL host name does not exist. | Check the **Radar.API URL** with your WK Radar administrator. |
| "Could not connect to the Radar.API server" | The server did not answer, usually because of a firewall. | Make sure the Radar.API is published on the internet and allow Nekt's public IP on the firewall. |
| "did not present a valid HTTPS certificate" | The Radar.API is published with an invalid or self-signed certificate. | Publish the Radar.API with a valid HTTPS certificate. |
| "WK Radar rejected the sign-in of the Radar.API user" | Company, username or password are wrong, or the user cannot use the Radar.API. | Check the credentials on the WK Radar sign-in screen and update the source. |
| "The Radar.API user is not allowed to read: ..." | The system user has no permission for the routes listed. | Add the routes to the user's permissions in WK Radar, wait about 10 minutes and run again, or deselect those streams. |
| "WK Radar answered 'not found' for: ..." | The Radar.API installed is an older version without that route. | Update the Radar.API or deselect those streams. |
| "WK Radar answered 'not found' to every listing of ..." | During a full read, WK Radar answered "not found" for every period of that stream, so the sync stopped instead of loading an empty table. | Check the Radar.API with your WK Radar administrator and run again; if it repeats, contact Nekt support. |
| Warning: "WK Radar refused a filter used to read ...: open bills issued and due before the Start Date are not in the table" | Your Radar.API version does not accept the filter that lists open bills regardless of their dates. | Use an earlier Start Date to include those bills. |
| Warning: "WK Radar answered 'not found' to every listing of ... in this run" | An incremental sync got "not found" for every request of that stream. Nothing was loaded and the next sync reads the same period again. | No action needed if it happens once. If it repeats, check the Radar.API with your WK Radar administrator. |
| "WK Radar kept failing while reading ..." | The Radar.API returned errors several times in a row, so the run stopped without loading partial data. | Run the source again. If it repeats, check the Radar.API server with your WK Radar administrator. |
| "WK Radar returned no ... at all" | The Radar.API user sees no products, customers, branches or ledger accounts, so the sync stopped instead of emptying the table. | Check the user's company and branch access in WK Radar and run again. |
| "WK Radar did not return some ... records it had just listed" | WK Radar listed records and then did not return them, nor said they were deleted. | Run the source again; if it repeats, contact Nekt support. |
| "The API time zone ... is not a valid time zone name" | The **API time zone** setting is not an IANA name. | Use a name such as `America/Sao_Paulo`. |

## Skills for agents

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

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


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