Skip to main content
Magalu (Magazine Luiza) is one of Brazil’s largest retail and e-commerce platforms. The Magalu Seller API provides access to your marketplace seller data including orders, deliveries, product catalog (SKUs), and inventory information. This connector enables you to extract and analyze your Magalu Marketplace operations data.

Configuring Magalu as a Source

In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Magalu option from the list of connectors. Click Next and you’ll be prompted to add your access.

1. Add account access

You’ll need to authorize Nekt to access your Magalu Seller data. Click on the Magalu Authorization button and log in with your Magalu account. Grant the necessary permissions for the seller account you want to extract data from.
Make sure you’re logged in with a Magalu account that has seller access and appropriate permissions to view orders, deliveries, and product catalog data.
The following configurations are available:
  • Start Date: (Optional) The earliest date from which records will be synced. If not provided, all historical data will be extracted.
Once you’re done, click Next.

2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.
Tip: The stream can be found more easily by typing its name.
Select the streams and click Next.

3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.
  • Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
  • Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
  • Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once and make this process faster!
  • Sync Type: you can choose between INCREMENTAL and FULL_TABLE.
    • Incremental: every time the extraction happens, we’ll get only the new data - which is good if, for example, you want to keep every record ever fetched.
    • Full table: every time the extraction happens, we’ll get the current state of the data - which is good if, for example, you don’t want to have deleted data in your catalog.
Once you are done configuring, click Next.

4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, 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.
Once you are ready, click Next to finalize the setup.

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.
For you to be able to see it on your Catalog, you need at least one successful source run.

Streams and Fields

Below you’ll find all available data streams from Magalu and their corresponding fields:
Product catalog stream containing all SKUs (Stock Keeping Units) from your Magalu seller portfolio.Key Fields:
  • sku - SKU identifier - unique code that identifies the product
  • title - Product title or name
  • description - Detailed product description
  • brand - Brand name of the product
  • status - Current status (e.g., ‘active’, ‘inactive’, ‘pending’, ‘rejected’)
  • active - Whether the SKU is currently active and available for sale
  • condition - Product condition (e.g., ‘new’, ‘used’, ‘refurbished’)
  • type - Product type classification
Timestamps:
  • created_at - When the SKU was created
  • updated_at - When the SKU was last updated (replication key)
  • creator - User who created the SKU
  • updater - User who last updated the SKU
Attributes & Datasheet:
  • attributes - Array of product attributes (name/value pairs for characteristics like Color, Size)
  • datasheet - Array of technical specifications (name/value pairs like Voltage, Power, Warranty)
  • extra_data - Array of additional custom data fields
Identifiers:
  • identifiers - Array of product identifiers (EAN, UPC, ISBN, GTIN)
  • has_ean - Whether the product has an EAN barcode
  • group - Product group information linking related SKUs/variants
    • id - Product group identifier
Categories:
  • categories - Array of category classifications
    • categories - List of category names
    • sub_categories - List of subcategory names
    • product_type - Type of product within the category
    • channel - Channel information (id)
Channels:
  • channels - Array of sales channels where product is available
    • id - Channel identifier
  • url_marketplace - Array of marketplace URLs by channel
Dimensions:
  • dimensions - Array of dimension sets
    • name - Dimension set name (e.g., ‘product’, ‘package’)
    • height - Height (value, unit)
    • length - Length (value, unit)
    • width - Width (value, unit)
    • weight - Weight (value, unit)
Media:
  • images - Array of product images (reference, type)
  • videos - Array of product videos (reference, type)
  • podcasts - Array of related podcasts (reference, type)
Flags:
  • fulfillment - Whether the product uses fulfillment services
  • perishable - Whether the product is perishable
Orders stream containing all marketplace orders with customer, payment, and delivery information.Key Fields:
  • id - Unique identifier for the order
  • code - Order code in the platform
  • status - Order status (e.g., ‘new’, ‘approved’, ‘cancelled’, ‘finished’)
Timestamps:
  • created_at - When the order was created
  • updated_at - When the order was last updated (replication key)
  • approved_at - When the order was approved
  • purchased_at - When the order was purchased
Channel Information:
  • channel - Sales channel information
    • id - Channel identifier
    • extras - Additional channel info (alias)
    • marketplace - Marketplace info (document)
Customer Information:
  • customer - Customer details
    • name - Customer name
    • email - Customer email
    • document_number - Customer document (CPF/CNPJ)
    • customer_type - Type (cnpj/cpf)
    • birth_date - Customer birth date
    • phones - Array of phone numbers (area_code, country_code, number, type)
Financial Amounts:
  • amounts - Order totals
    • currency - Currency code
    • normalizer - Price normalizer
    • total - Total amount
    • commission - Commission amounts (currency, normalizer, total, type)
    • discount - Discount amounts (currency, normalizer, total)
    • freight - Freight amounts (currency, normalizer, total)
    • tax - Tax amounts (currency, normalizer, total)
Foreign Amounts:
  • foreign_amounts - Foreign currency amounts
    • currency - Foreign currency code
    • normalizer - Price normalizer
    • total - Total in foreign currency
    • exchange_rate - Exchange rate information
      • currency - Currency code
      • external_id - External identifier
      • normalizer - Exchange rate normalizer
      • value - Exchange rate value
Deliveries:
  • deliveries - Array of order deliveries
    • id - Delivery identifier
    • code - Delivery code
    • status - Delivery status
    • purchased_at - Purchase timestamp
    • seller - Seller info (id, name)
    • amounts - Delivery amounts (total, commission, discount, freight, tax)
    • items - Array of items in delivery
      • quantity - Item quantity
      • sequencial - Item sequence number
      • measure_unit - Unit of measure
      • info - Item information (id, sku, name, images, attributes, extras)
      • amounts - Item amounts (currency, normalizer, total, commission, discount, freight, taxes)
      • unit_price - Unit price (currency, normalizer, value)
    • shipping - Shipping information
      • pickup_details - Pickup address and store info
      • drop_details - Drop-off address and store info
      • recipient - Recipient info (name, document, address)
      • handling_time - Handling time (value, precision, workday, limit_date)
      • deadline - Delivery deadline (value, precision, workday, limit_date)
      • provider - Shipping provider (id, name, description, extras)
      • tracking_url - Tracking URL for the delivery (string)
      • tracking - Tracking information object (url)
      • shipped_at - When shipped
      • delivered_at - When delivered
      • cancelled_at - When cancelled
Payments:
  • payments - Array of payment methods
    • amount - Payment amount
    • currency - Currency code
    • method - Payment method
    • method_brand - Payment method brand
    • description - Payment description
    • installments - Number of installments
    • normalizer - Price normalizer
    • integration_type - Integration type
    • authorization_code - Authorization code
    • gateway - Gateway info (document)
    • extras - Additional payment data
Deliveries stream providing detailed shipping and fulfillment information for orders.Key Fields:
  • id - Unique identifier for the delivery
  • code - Delivery code
  • status - Delivery status
  • purchased_at - When the order was purchased
Order Reference:
  • order - Associated order information
    • id - Order identifier
    • code - Order code
    • channel - Channel info (id, extras, marketplace)
Seller Information:
  • seller - Seller details
    • id - Seller identifier
    • name - Seller name
Financial Amounts:
  • amounts - Delivery totals
    • currency - Currency code
    • normalizer - Price normalizer
    • total - Total amount
    • freight - Freight amounts
    • discount - Discount amounts
    • tax - Tax amounts
Items:
  • items - Array of items in the delivery
    • sequencial - Item sequence number
    • quantity - Item quantity
    • measure_unit - Unit of measure
    • info - Item information
      • sku - SKU identifier
      • id - Item ID
      • name - Item name
      • images - Array of image URLs
      • attributes - Item attributes
      • extras - Additional item data
    • unit_price - Unit price (currency, normalizer, value)
    • amounts - Item amounts (currency, normalizer, total, freight, taxes)
Shipping Information:
  • shipping - Shipping details
    • tracking - Tracking info (url)
    • recipient - Recipient details
      • customer_type - Customer type (cpf/cnpj)
      • document_number - Document number
      • name - Recipient name
      • address - Full address (zipcode, street, number, district, city, state, country, complement, reference)
    • drop_details - Drop-off location
      • store - Store info (document)
      • address - Drop address
    • handling_time - Handling time details
      • value - Time value
      • precision - Time precision
      • workday - Is workday-based
      • limit_date - Limit date
    • deadline - Delivery deadline
      • value - Deadline value
      • precision - Precision (e.g., ‘days’)
      • workday - Is workday-based
      • limit_date - Limit date
    • provider - Shipping provider
      • id - Provider ID
      • name - Provider name
      • description - Provider description
      • extras - Additional info (is_mle, is_fulfillment, shipping_type, shipping_name, tags)
Performance Impact: This stream requires an additional API request for each SKU in your catalog. If you have a large number of SKUs, selecting this stream will significantly increase extraction time. Only enable this stream if you need real-time pricing data per channel.
Pricing information for each SKU per sales channel. This is a child stream of SKUs.Key Fields:
  • sku - SKU identifier - unique code that identifies the product
  • channel_id - Channel identifier where this price is valid
Timestamps:
  • created_at - When the price record was created
  • updated_at - When the price was last updated
Pricing:
  • price - Current selling price of the product
  • list_price - List price or original price before discounts
  • currency - Currency code (e.g., ‘BRL’)
  • normalizer - Price normalizer value used for price calculations
Channel:
  • channel - Channel information
    • id - Channel identifier
Performance Impact: This stream requires an additional API request for each SKU in your catalog. If you have a large number of SKUs, selecting this stream will significantly increase extraction time. Only enable this stream if you need real-time stock levels per channel.
Stock/inventory information for each SKU per sales channel. This is a child stream of SKUs.Key Fields:
  • sku - SKU identifier - unique code that identifies the product
  • channel_id - Channel identifier where this stock is available
Timestamps:
  • created_at - When the stock record was created
  • updated_at - When the stock was last updated
Inventory:
  • quantity - Available quantity of the product in stock
  • type - Type of stock (e.g., ‘AVAILABLE’)

Data Model

The following diagram illustrates the relationships between the core data streams in Magalu. The arrows indicate the join keys that link the different entities, providing a clear overview of the data structure.

Use Cases for Data Analysis

This guide outlines valuable business intelligence use cases when consolidating Magalu Marketplace data, along with ready-to-use SQL queries that you can run on Explorer.

1. Order Status Overview

Track the distribution of order statuses to understand your sales pipeline and identify potential bottlenecks. Business Value:
  • Monitor order fulfillment rates
  • Identify issues with specific order statuses
  • Track cancellation rates and reasons
WITH order_stats AS (
   SELECT
      status,
      COUNT(*) AS order_count,
      SUM(amounts.total / COALESCE(NULLIF(amounts.normalizer, 0), 1)) AS total_revenue,
      AVG(amounts.total / COALESCE(NULLIF(amounts.normalizer, 0), 1)) AS avg_order_value
   FROM
      nekt_raw.magalu_orders
   WHERE
      DATE(created_at) >= CURRENT_DATE - INTERVAL '30' DAY
   GROUP BY
      status
),
total AS (
   SELECT SUM(order_count) AS total_orders FROM order_stats
)
SELECT
   os.status,
   os.order_count,
   ROUND(os.order_count * 100.0 / t.total_orders, 2) AS percentage,
   ROUND(os.total_revenue, 2) AS total_revenue,
   ROUND(os.avg_order_value, 2) AS avg_order_value
FROM
   order_stats os, total t
ORDER BY
   os.order_count DESC
statusorder_countpercentagetotal_revenueavg_order_value
finished1,24562.25892,340.50716.74
approved45622.80312,450.00685.20
new1899.45145,230.00768.41
cancelled1105.5078,560.00714.18

2. Top Selling Products

Identify your best-performing products based on sales volume and revenue. Business Value:
  • Understand which products drive the most revenue
  • Optimize inventory for high-demand items
  • Inform marketing and promotional strategies
WITH item_sales AS (
   SELECT
      i.info.sku AS sku,
      i.info.name AS product_name,
      SUM(i.quantity) AS total_quantity,
      SUM(i.amounts.total / COALESCE(NULLIF(i.amounts.normalizer, 0), 1)) AS total_revenue,
      COUNT(DISTINCT o.id) AS order_count
   FROM
      nekt_raw.magalu_orders o
      CROSS JOIN UNNEST(o.deliveries) AS t(d)
      CROSS JOIN UNNEST(d.items) AS t2(i)
   WHERE
      o.status NOT IN ('cancelled')
      AND DATE(o.created_at) >= CURRENT_DATE - INTERVAL '30' DAY
   GROUP BY
      i.info.sku,
      i.info.name
)
SELECT
   sku,
   product_name,
   total_quantity,
   order_count,
   ROUND(total_revenue, 2) AS total_revenue,
   ROUND(total_revenue / NULLIF(total_quantity, 0), 2) AS avg_unit_price
FROM
   item_sales
ORDER BY
   total_revenue DESC
LIMIT 20
skuproduct_nametotal_quantityorder_counttotal_revenueavg_unit_price
SKU-12345Smart TV 55” 4K Ultra HD234230467,532.001,998.00
SKU-67890Smartphone Galaxy S24189185341,811.001,809.00
SKU-24680Notebook Gamer 16GB RAM7875312,000.004,000.00
SKU-13579Air Fryer Digital 5.5L456420228,456.00501.00
SKU-11223Wireless Earbuds Pro892845178,400.00200.00

3. Delivery Performance Analysis

Monitor delivery times and shipping provider performance to optimize logistics. Business Value:
  • Track delivery success rates
  • Identify slow shipping providers
  • Optimize fulfillment processes
WITH delivery_metrics AS (
   SELECT
      d.shipping.provider.name AS provider_name,
      d.status AS delivery_status,
      COUNT(*) AS delivery_count,
      AVG(d.shipping.deadline.value) AS avg_deadline_days,
      SUM(CASE WHEN d.status = 'delivered' THEN 1 ELSE 0 END) AS delivered_count,
      SUM(CASE WHEN d.status = 'cancelled' THEN 1 ELSE 0 END) AS cancelled_count
   FROM
      nekt_raw.magalu_deliveries d
   WHERE
      DATE(d.purchased_at) >= CURRENT_DATE - INTERVAL '30' DAY
   GROUP BY
      d.shipping.provider.name,
      d.status
)
SELECT
   provider_name,
   SUM(delivery_count) AS total_deliveries,
   SUM(delivered_count) AS total_delivered,
   SUM(cancelled_count) AS total_cancelled,
   ROUND(SUM(delivered_count) * 100.0 / NULLIF(SUM(delivery_count), 0), 2) AS delivery_success_rate,
   ROUND(AVG(avg_deadline_days), 1) AS avg_deadline_days
FROM
   delivery_metrics
GROUP BY
   provider_name
ORDER BY
   total_deliveries DESC
provider_nametotal_deliveriestotal_deliveredtotal_cancelleddelivery_success_rateavg_deadline_days
Magalu Entregas1,4561,3894295.403.2
Correios8928343593.505.8
Jadlog4564211892.324.5
Total Express234218893.164.1

Implementation Notes

Magalu uses a normalizer pattern for monetary values. To get the actual value, divide by the normalizer:
-- Example: Get actual order total
SELECT 
    amounts.total / COALESCE(NULLIF(amounts.normalizer, 0), 1) AS actual_total
FROM orders
Common normalizers:
  • 100 for values stored as cents
  • 1 for values already in the base currency unit
Orders in Magalu typically follow this status flow:
  1. new - Order just placed
  2. approved - Payment confirmed
  3. invoiced - Invoice generated
  4. shipped - Order dispatched
  5. delivered - Order delivered to customer
  6. finished - Order completed
Orders can also be:
  • cancelled - Order was cancelled
  • returned - Customer returned the order
This connector is designed for the Brazilian marketplace:
  • Currency: Values are in BRL (Brazilian Real)
  • Documents: Customer documents are CPF (individuals) or CNPJ (companies)
  • Addresses: Brazilian address format with CEP (postal code), state abbreviations
  • Shipping: Includes Brazilian carriers like Correios, Jadlog, and Magalu’s own logistics
The connector supports incremental sync for:
  • Orders: Uses updated_at as the replication key
  • SKUs: Uses updated_at as the replication key
  • Deliveries: Full table sync (no replication key)
  • Prices: Full table sync (child of SKUs - one request per SKU)
  • Stocks: Full table sync (child of SKUs - one request per SKU)
For orders and SKUs, only records modified since the last sync will be extracted, improving performance.
The Prices and Stocks streams are child streams of SKUs. This means:
  • For each SKU in your catalog, an additional API request is made to fetch price/stock data
  • If you have 1,000 SKUs, selecting both streams will result in 2,000+ additional API calls
  • Extraction time scales linearly with the number of SKUs
Recommendations:
  • Only enable these streams if you need channel-specific pricing or inventory data
  • Consider scheduling extractions during off-peak hours for large catalogs
  • If you have thousands of SKUs, expect extraction times to increase significantly
Magalu data contains deeply nested structures. When querying:
  • Use UNNEST (or CROSS JOIN UNNEST in Athena) to flatten arrays
  • Access nested objects using dot notation (e.g., customer.name)
  • Handle NULL values in nested fields with COALESCE
Example for accessing delivery items:
-- AWS Athena
SELECT d.items
FROM orders o
CROSS JOIN UNNEST(o.deliveries) AS t(d)

-- GCP BigQuery
SELECT i.*
FROM orders o, UNNEST(o.deliveries) AS d, UNNEST(d.items) AS i