The connector only reads data. It never creates, changes or deletes anything in your store.
Before you start
- A paid Loja Integrada plan. The Loja Integrada API is only available on paid plans.
- The store owner. The connector authenticates with a Personal Token, and only the store’s owner user can create one. Users with the Administrator, Member or any other profile do not see the option.
Getting your Personal Token
These steps follow Loja Integrada’s help article Como gerar chaves de API e o personal token.1
Open the API keys screen
Signed in as the store owner, open Configurações > Chave para API in the Loja Integrada panel and click Personal token.
2
Generate the token
Click Gerar personal token, give it a name you will recognize (for example, “Nekt”) and click Gerar.
3
Copy the token
The token is shown only once. Copy it now and paste it in the Personal Token field in Nekt. If you lose it, Loja Integrada cannot recover it: generate a new one.
Configuring Loja Integrada as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Loja Integrada option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
The following configurations are available:- Personal Token: the Personal Token of your store, created as described in Getting your Personal Token.
- Start Date: orders changed since this date are read on the first sync and on Full syncs. Products, customers and the other tables are always read in full on those syncs.
- API Rate Share (%) (advanced, default 50): the share of the store’s API limit (100 requests per minute, shared by every integration of the store) this source may use, from 10 to 90. A higher value makes syncs faster but leaves less room for your ERP, hub or marketplace integrations.
- Status Check Window (days) (advanced, default 30): every sync lists the orders created in this many days and re-reads the ones whose status changed since the previous sync (for example shipped to delivered). It costs about 1 API request per 49 orders created in the window on every sync: a store with 30,000 orders in 30 days spends about 610 requests (about 12 minutes at the default rate share). Lower it for a very busy store; 0 turns it off.
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.
4. Configure data source
Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, 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.
- Determine when to execute an Additional Full Sync. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while. A Full sync reads every order since the Start Date again, one request per order, so it takes as long as the first sync.
5. Check your new source
You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.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.
Every table also has an
extra_fields column with any field Loja Integrada returned that is not mapped to a column yet (JSON). Amounts are in BRL and dates and times are in UTC.
Fields by stream
Orders
Orders
Key Fields:
numero- Order number, unique in the store (primary key)data_criacao- When the order was placeddata_modificacao- When the order was last modified, including status changes (replication key)data_expiracao- When an unpaid order expiresid_externo/id_anymarket- Identifiers set by integrations (ERP, hub, AnyMarket)
situacao_id,situacao_codigo,situacao_nome- Current status (e.g.pedido_pago,pedido_enviado,pedido_cancelado)situacao_aprovado,situacao_cancelado,situacao_final- Whether the status counts as approved, cancelled, or final
valor_subtotal- Sum of the itemsvalor_envio- Shipping chargedvalor_desconto- Discount appliedvalor_total- Order totalpeso_real- Total weight (kg)
cliente_id,cliente_nome,cliente_email,cliente_cpf,cliente_cnpj,cliente_razao_social,cliente_sexo,cliente_data_nascimento,cliente_telefone_celular,cliente_telefone_principalcliente_obs- Note the buyer left on the order
cupom_id,cupom_codigo,cupom_desconto- Coupon used (the last one as JSON)utm_campaign- UTM campaign of the orderendereco_entrega- Delivery address (JSON)itens,pagamentos,envios- Items, payments and shipments as returned by the API (JSON); also available as their own streams
Order Items
Order Items
id- Unique identifier of the order item (primary key)pedido_numero- Order numberpedido_data_modificacao- Last modification of the order (replication key)linha- Line number in the orderproduto_id- Loja Integrada identifier of the product soldproduto_id_externo- External identifier of the product, when the API addresses it that way (thenproduto_idis empty)produto_pai_id- Parent product, when the item is a variationsku,nome,tipo- SKU, name and type of the product at the time of the orderquantidade- Quantity soldpreco_cheio,preco_promocional,preco_venda,preco_subtotal,preco_custo- Prices (BRL)peso,altura,largura,profundidade- Weight (kg) and dimensions (cm)disponibilidade- Shipping lead time in days
Order Payments
Order Payments
id- Unique identifier of the payment (primary key)pedido_numero,pedido_data_modificacao- Order number and its last modification (replication key)forma_pagamento_id,forma_pagamento_codigo,forma_pagamento_nome- Payment methodpagamento_tipo- Payment type (e.g.creditCard)bandeira,banco- Card brand and bankvalor,valor_pago- Payment amount and amount paid (BRL)parcelamento_numero_parcelas,parcelamento_valor_parcela- Installmentstransacao_id,identificador_id,authorization_code,codigo_retorno_gateway,mensagem_gateway- Gateway details
Order Shipments
Order Shipments
id- Unique identifier of the shipment (primary key)pedido_numero,pedido_data_modificacao- Order number and its last modification (replication key)forma_envio_id,forma_envio_codigo,forma_envio_nome,forma_envio_tipo- Shipping method and service (e.g.PAC,SEDEX)objeto- Tracking codeprazo- Delivery deadline in daysvalor- Shipping cost (BRL)data_criacao,data_modificacao- When the shipment was created and last modified
Order Status History
Order Status History
id- Unique identifier of the status change (primary key)pedido_numero,pedido_data_modificacao- Order number and its last modification (replication key)data- When the status changedsituacao_id,situacao_codigo,situacao_nome- Status the order moved tosituacao_anterior_id,situacao_anterior_codigo,situacao_anterior_nome- Status the order leftalterado_por,alterado_por_nome- Who changed it (e.g. the payment gateway, the API, a user)obs- Note recorded with the change
Products
Products
id- Unique identifier of the product or variation (primary key)sku,nome,apelido,id_externo- SKU, name, URL slug and external identifiertipo-normal(no variations),atributo(product with variations) oratributo_opcao(one variation)pai_id- For a variation: its parent productfilhos_ids- For a product with variations: its variations (JSON list)variacoes_ids- For a variation: the grid values that define it (JSON list, seevariation_grid_values)grades_ids,categorias_ids- Variation grids and categories (JSON lists)marca_id- Brandativo,bloqueado,removido,destaque,usado- Status flags (removidois true for products deleted in the panel)gtin,mpn,ncm- Barcode, manufacturer part number and tax classificationpeso,altura,largura,profundidade- Weight (kg) and dimensions (cm)url,url_video_youtube,seo_id,descricao_completa- Store page, video, SEO settings and full description (HTML)imagem_principal,imagens,tags- Images and tags (JSON)data_criacao,data_modificacao- When the product was created and last modified (replication key)
product_prices and product_stocks streams.Product Stocks
Product Stocks
id- Unique identifier of the stock record (primary key)produto_id- Product or variationgerenciado- Whether Loja Integrada manages the stock (when false, quantities are 0)quantidade,quantidade_disponivel,quantidade_reservada- In stock, available for sale, reserved by open orderssituacao_em_estoque,situacao_sem_estoque- Shipping lead time in days with and without stock (-1 = unavailable)
Product Prices
Product Prices
id- Unique identifier of the price record (primary key)produto_id- Product or variationcheio,promocional,custo- Full, promotional and cost prices (BRL)sob_consulta- Whether the price is shown as “on request”
Customers
Customers
id- Unique identifier of the customer (primary key)nome,email,tipo(PF or PJ),cpf,cnpj,razao_social,ie,rg,sexo,data_nascimentodata_criacao,data_modificacao- When the customer registered and was last modified (replication key)
Catalogs
Catalogs
- Categories:
id,nome,descricao,id_externo,url,seo_id,categoria_pai_id - Brands:
id,nome,apelido,descricao,ativo,id_externo,imagem - Coupons:
id,codigo,descricao,tipo,valor,valor_minimo,ativo,cumulativo,aplicar_no_total,condicao_cliente,condicao_produto,quantidade,quantidade_por_cliente,quantidade_usada,validade,id_externo,data_criacao,data_modificacao - Order Statuses:
id,codigo,nome,aprovado,cancelado,final,notificar_comprador,padrao - Payment Methods:
id,codigo,nome,ativo,disponivel,imagem - Shipping Methods:
id,codigo,nome,tipo,ativo,disponivel,imagem - Customer Groups:
id,nome,padrao - Variation Grids:
id,nome,nome_visivel,id_externo - Variation Grid Values:
id,grade_id,nome,id_externo
Data Model
Use Cases for Data Analysis
The queries below run on Explorer. Replace the table names with the ones you chose for this source.1. Daily revenue of approved orders
2. Best-selling SKUs
Implementation Notes
Data Quality Considerations
- Dates and times are converted from Brasília time (how Loja Integrada stores them) to UTC.
- An order status change updates the order’s last modification date, so the next sync reads the order again and refreshes its status, items, payments and shipments.
product_stocksandproduct_priceshold the current values and are read in full on every sync. Price and stock changes do not necessarily update a product’s modification date, so use these two streams for prices and stock.- Products deleted in the panel stay in the
productstable withremovidoset to true. - Rows removed from an order after it was synced (an item taken out of the order, a replaced payment) stay in
order_items,order_payments,order_shipmentsandorder_status_historyuntil a Full sync, because these tables are updated by row identifier. - Besides the order’s last modification date, every sync checks the status of the orders created in the last Status Check Window days and re-reads the ones whose status changed, so a status change is never missed in that window.
API Limits & Performance
- Loja Integrada allows 100 API requests per minute per store, shared with the store’s other integrations (ERP, hub, marketplaces). The connector uses only its API Rate Share of that limit (50% by default), slows down further when Loja Integrada says the limit was reached and waits up to 30 minutes for it before failing, so a sync can take longer when other integrations are busy.
- Each order and each changed product is read with its own request;
order_status_historyadds one request per order. Deselect it if you do not need the full history of status changes. - A stream selected for the first time among
order_items,order_payments,order_shipmentsandorder_status_historymakes the next sync read every order since the Start Date again, so that its table is complete.