Magalu Developer APIs
website·Indexed 35 days ago
https://developers.magalu.comDeveloper documentation for Magalu marketplace APIs, covering product registration, order management, financial analysis, pricing automation, and Magalu ADS campaigns. Includes guides for logistics via Magalog tracking and Smart Label, customer service (SAC), and webhook integrations.
What's inside Magalu
- The Orders API suite allows sellers to query and manage order and delivery data. Currently, these APIs only support the Magalu (Magazine Luiza) sales channel. To use these APIs, developers must implement the authentication and authorization process to obtain user consent.
Overview of the Smart Label API
The Smart Label API centralizes the generation of Magalog logistics labels to reduce layout inconsistencies, optical reading failures, and routing divergences between shippers. It provides a standardized contract that returns labels ready for printing in either ZPL or PDF formats. Use this API when your workflow requires synchronous issuance of logistics labels for order shipping, including data for the shipper, transport, package, origin, destination, and fiscal information.Overview of Magalu ADS Metrics API
The Magalu ADS Metrics API allows developers to query the performance of advertising campaigns managed on the Magalu ads platform. It provides aggregated and daily metrics across three levels of granularity: seller, campaign, and specific products within a campaign. Key capabilities include querying historical time-series data with cursor-based pagination and calculating efficiency indicators such as ROAS, ACOS, CTR, CVR, and average CPC.Overview of Magalu ADS Campaigns API
The Magalu ADS Campaigns API allows users to query advertising campaigns managed within the Magalu ads platform. It provides a public projection of campaigns, including budget tracking, bidding strategies, and delivery status, while omitting internal routing fields.Overview of the Distribution Centers API
The Distribution Centers API allows sellers or integrators to retrieve a list of registered distribution centers (shipping origin points) linked to an authenticated seller. Each distribution center provides critical logistics data, including:
- Identification: Display name, sequential identifier, and UUID.
- Address: Full address of the origin point.
- Documents: Associated tax documents (e.g., CNPJ).
- Status: Operational status (active/inactive).
- Logistics Services: Available shipping modalities for orders originating from that point.
Overview of the Customer Service (SAC) API
The Customer Service (SAC) API suite enables sellers to operate customer service protocols between themselves and customers from various sales channels (currently supporting Magalu). It provides tools for managing protocol lifecycles, tracking messages, and monitoring protocol events. Sellers are responsible for responding to protocols opened via these e-commerce platforms.Overview of the Price Automation API
The Price Automation API allows sellers to manage automatic pricing rules for products within the marketplace. It supports creating, updating, querying, and deleting pricing rules. These rules can be applied at the individual SKU level or across the entire product catalog and can be configured specifically by sales channel.Interpret the three-layer financial report structure
The API organizes financial data into three hierarchical layers to help sellers reconcile orders:
- Layer 1: Commercial and Operational Summary: Macro view including total item value (
SALE), total discounts (DISCOUNT/PRODUCT), commissions (COMMISSION), platform fees (FEES/PLATFORM), and shipping costs. - Layer 2: Campaign Identification: Details promotions using
identifier(technical key),description(campaign name), andsubcategory(e.g.,COUPON,PERCENTAGE_DISCOUNT). - Layer 3: Accounting Detail (Debit/Credit Pair): The most granular level. Promotions and subsidies are broken into a pair: a
DEBITfor the cost absorbed by the seller and aCREDITfor the subsidy covered by Magalu.
- Layer 1: Commercial and Operational Summary: Macro view including total item value (
Understand Magalu category and attribute types
Products must be associated with a specific category. Categories contain two types of attributes:
- Variation Attributes (attributes): Selectors that differentiate product versions (e.g., color, size, voltage).
- Datasheet Attributes (datasheet): Technical information to support buyer decisions (e.g., model, line, warranty period).
Attributes are further classified by requirement level:
required: Mandatory. Missing required attributes will result in the product being blocked or the update being rejected.recommendedandoptional: Not mandatory, but improve product listing quality.
Compare Magalu Webhook API v0 and v1 specifications
Magalu Webhooks have evolved from v0 to v1, introducing stricter security requirements and new authentication mechanisms. Key changes include the mandatory use of HTTPS, the introduction of a Client Secret (whsec_*), and the implementation of HMAC signatures for payload verification.| Característica | API v0 | API v1 | | ----------------- | --------------------------- | -------------------------------------------------------------------------------- | | Protocolo | HTTP ou HTTPS | HTTPS obrigatório | | Client Secret | Não disponível | whsec_* por subscription | | Assinatura HMAC | Não disponível | X-Signature-256 + X-Timestamp | | Rotação de secret | N/A | Período de graça de 1h com duas assinaturas | | Endpoints | PUT /v0/onboarding/signup | PUT /v1/onboarding/signup |Understand the Magalu Portfolio API structure
The Portfolio API is used to manage product SKUs within the product catalog. It is divided into three primary management areas and one optimization area:
- SKU: Unique representation of products for detailed organization.
- Stock: Controls the available quantity of products for sale.
- Price: Manages product pricing based on sales strategies.
- Offer Optimization (Score): Manages product scores to optimize offer performance.
Best practices for product registration
To ensure high-quality listings and avoid validation errors:
- Consult categories and attributes before registration.
- Always fill
requiredattributes; prioritizerecommendedones. - Use the correct data type: strings for
textand values from thechoiceslist forchoicetypes. - Define the
group.idbefore registering variations to ensure each combination is unique. - Store frequently used category IDs to speed up the process.
- Use custom attributes for additional information if they do not exist in the system.