Magento Integration

Home Integrations Magento Integration

Overview

Magento (now Adobe Commerce) is one of the most powerful and widely deployed open-source e-commerce platforms, used by mid-market and enterprise retailers who need a highly customisable, feature-rich commerce platform. Magento's architecture — its modular structure, its extensive configuration options, its support for complex product catalogues, multi-store deployments, and B2B commerce — makes it the platform of choice for businesses with sophisticated e-commerce requirements that simpler platforms cannot accommodate. For retailers operating on Magento, connecting the platform to surrounding business systems — ERP, CRM, inventory management, marketplace channels, fulfilment systems — is both a common requirement and a technically demanding integration challenge.

Magento provides two primary integration interfaces. The Magento REST API is the standard integration point for reading and writing Magento data from external systems — orders, customers, products, inventory, invoices, and the other entities that external systems need to interact with. Magento's GraphQL API provides an alternative query interface for read-heavy integrations, particularly for headless frontend applications that need flexible data fetching. For complex integrations that need to execute business logic within Magento rather than through the external API, Magento's plugin architecture (interceptors, observers, plugins) allows custom modules to hook into Magento's internal processes.

Magento's complexity is the source of both its flexibility and its integration challenges. The product model — simple products, configurable products, grouped products, bundle products, virtual products, downloadable products — requires integration code to correctly handle each product type's structure. The multi-store configuration — websites, stores, store views — adds dimensions to data that single-store platforms do not have. The EAV (Entity-Attribute-Value) data model for products and customers means that custom attributes require specific handling in API requests. Understanding these Magento-specific concepts is prerequisite to building integrations that work correctly rather than integrations that work for simple cases but fail for the edge cases Magento's flexibility introduces.

We build Magento integrations for retailers operating on Magento 2 (Adobe Commerce) who need to connect their e-commerce platform to ERP systems, inventory management systems, CRM platforms, marketplace channels, fulfilment systems, and the other operational tools that a Magento-based retail operation uses.


What Magento Integration Covers

Magento REST API authentication. The Magento REST API supports multiple authentication mechanisms for different integration scenarios.

Integration tokens: the primary authentication method for server-to-server integrations. A Magento Integration is created in the admin panel with configurable resource access permissions — the integration generates a permanent access token that is passed in the Authorization: Bearer {token} header of every API request. The resource access control that restricts each integration token to only the Magento API resources the integration requires — the principle of least privilege applied to Magento integration permissions.

Admin user tokens: temporary access tokens issued for specific admin user credentials via POST /rest/V1/integration/admin/token. The token that expires after the configured session lifetime (default 4 hours in Magento). The admin user token approach for integrations that act with the full permissions of a specific admin user rather than a separately configured integration.

Customer tokens: access tokens issued for specific customer credentials via POST /rest/V1/integration/customer/token. The customer-scoped token that restricts API access to the authenticated customer's own data — orders, addresses, account information.

OAuth 1.0a: Magento also supports OAuth 1.0a for integrations that require the full OAuth handshake flow. The OAuth consumer key, consumer secret, access token, and access token secret used for request signing in the OAuth 1.0a authentication flow.

Order management. The most commonly integrated Magento data domain — reading orders and updating their status as they are processed by external fulfilment systems.

Order retrieval: the GET /rest/V1/orders endpoint for listing orders with search criteria. The Magento search criteria format — the searchCriteria[filter_groups][0][filters][0][field], searchCriteria[filter_groups][0][filters][0][value], and searchCriteria[filter_groups][0][filters][0][condition_type] query parameters that define filter conditions. The eq, neq, like, nlike, is, in, nin, notnull, null, lt, lte, gt, gte, moreq condition types. Sorting with searchCriteria[sortOrders][0][field] and searchCriteria[sortOrders][0][direction]. Pagination with searchCriteria[pageSize] and searchCriteria[currentPage].

Order detail: the GET /rest/V1/orders/{id} endpoint for retrieving a specific order by its Magento order ID — the complete order object with items, billing and shipping addresses, payment information, shipping method, order totals, and order status.

Order filtering by status: the search criteria filter for status field with eq condition type — retrieving only orders with status pending, processing, complete, or other Magento order statuses. The status-based filtering that retrieves only the orders requiring action rather than the full order history.

Order status updates: the POST /rest/V1/orders/{id}/comments endpoint for adding status history comments to an order — updating the order status and adding a customer-visible or internal comment. The status update that marks an order as complete or shipped from the external system.

Invoice creation: the POST /rest/V1/invoices endpoint for creating an invoice against a Magento order. The invoice that triggers the financial processing of a paid order. The capture parameter that determines whether the payment is captured at invoice creation.

Shipment creation: the POST /rest/V1/order/{orderId}/ship endpoint for creating a shipment record against an order. The shipment with the items being shipped, the carrier code, the carrier title, and the tracking number. The shipment that triggers the order status transition to complete for fully shipped orders.

Credit memo: the POST /rest/V1/creditmemos endpoint for creating refunds against orders. The credit memo that reduces the order total and triggers the refund payment in Magento.

Product catalogue management. Reading and managing the Magento product catalogue from external systems.

Product retrieval: the GET /rest/V1/products endpoint for listing products with search criteria filtering by SKU, attribute set, product type, or custom attributes. The GET /rest/V1/products/{sku} endpoint for retrieving a specific product by SKU — the complete product object with all attributes including custom EAV attributes.

Product creation and update: the POST /rest/V1/products endpoint for creating new products and the PUT /rest/V1/products/{sku} endpoint for updating existing products. The product payload with the product object containing the SKU, name, price, status, visibility, type ID, attribute set ID, and the custom_attributes array of EAV attribute values. The custom attributes that must be identified by their attribute_code and value in the EAV attribute format.

Product types: the handling of each Magento product type — simple products with a single SKU and no variants, configurable products with child simple products for each variant combination, grouped products that bundle multiple simple products, bundle products with configurable component selections. The integration code that correctly handles the structure of each product type when reading from or writing to the API.

Configurable product management: the POST /rest/V1/configurable-products/{sku}/child endpoint for associating child simple products with a configurable parent. The configurable product options configuration that defines which attributes (size, colour) differentiate the product variants.

Category management: the GET /rest/V1/categories endpoint for the category tree. The PUT /rest/V1/categories/{id} endpoint for updating category assignments. The POST /rest/V1/products/{sku}/links endpoint for managing related, upsell, and cross-sell product links.

Inventory management. Stock level management for products in Magento.

Stock item management: the GET /rest/V1/stockItems/{productSku} endpoint for the current stock status and quantity for a product. The PUT /rest/V1/products/{sku}/stockItems/{itemId} endpoint for updating stock levels — the quantity, the in-stock status, the backorder configuration, and the minimum quantity settings.

Multi-source inventory (MSI): Magento 2.3+ includes the Multi-Source Inventory system that allows stock to be managed across multiple physical sources (warehouses). The GET /rest/V1/inventory/source-items endpoint for stock levels per source. The POST /rest/V1/inventory/source-items endpoint for bulk updating stock across sources. The source code that identifies each inventory source in the MSI system.

Low stock management: the stock level synchronisation that keeps Magento's displayed inventory aligned with the actual warehouse stock — preventing overselling when the same inventory is shared across multiple channels.

Customer management. Reading and managing Magento customer accounts.

Customer retrieval: the GET /rest/V1/customers/{customerId} endpoint for a specific customer. The GET /rest/V1/customers/search endpoint for searching customers by email, name, or custom attributes.

Customer creation: the POST /rest/V1/customers endpoint for creating new customer accounts. The customer payload with the email, first and last name, and the optional address entries.

Customer address management: the POST /rest/V1/customers/{customerId}/addresses endpoint for adding addresses to a customer account.

Pricing and promotions. Managing Magento pricing from external systems.

Tier prices: the POST /rest/V1/products/tier-prices endpoint for setting quantity-based discount pricing — the tier price structure with the customer group, the SKU, the price, and the minimum quantity. The bulk tier price update that sets multiple SKU tier prices in a single request.

Special prices: the POST /rest/V1/products/special-price endpoint for time-limited special prices — the discounted price with the start and end date for the promotional period.

Cart price rules: the Magento promotion system managed through the admin panel or the GET /rest/V1/salesRules and related endpoints for reading and managing cart price rules programmatically.

Webhooks and event-based integration. Receiving notifications from Magento when events occur.

Magento webhooks (Adobe Commerce): Adobe Commerce (the commercial version of Magento) includes a webhook system that sends HTTP notifications when Magento events occur — order placement, order status change, customer registration, product updates. The webhook configuration that specifies the event, the target URL, and the payload fields to include.

Custom event observers: Magento's native event system — the events.xml configuration and the observer class — for custom Magento modules that listen to Magento events and trigger external HTTP calls. The observer that sends an HTTP POST to an external URL when an order is placed, when a shipment is created, or when any other Magento event fires. The custom module approach for event-based integration when the commercial webhook system is not available.

Message queue integration: Magento's built-in message queue system (based on RabbitMQ or MySQL for simpler deployments) for asynchronous processing. The async/bulk REST API endpoints that queue operations for asynchronous processing rather than executing synchronously — improving API response times for bulk operations.

Multi-store architecture. Handling Magento's multi-store configuration in integrations.

Store view scoping: many Magento API endpoints are scoped to a specific store view — the store_code in the URL path (/rest/{store_code}/V1/...) determines which store view's data is accessed. The all store code for store-independent operations. The default store code for the default store view.

Website and store scope: Magento's hierarchy of websites, stores, and store views — each with potentially different product catalogues, pricing, customer data, and configuration. The integration that correctly handles store-scoped pricing (different prices per store view), store-scoped inventory, and store-scoped order management.

Magento GraphQL API. The GraphQL alternative to the REST API for read-heavy integrations.

Product queries: the GraphQL products query for flexible product data retrieval — requesting exactly the fields needed for the integration without the overhead of the full REST product object. The GraphQL product query with attribute filtering, sorting, and pagination.

Cart and checkout: the GraphQL mutations for headless checkout flows — createEmptyCart, addProductsToCart, setShippingAddressesOnCart, setPaymentMethodOnCart, placeOrder. The headless commerce frontend that uses GraphQL for all Magento data access without the REST API.

Magento module development. Custom Magento modules for integrations that need to execute business logic within Magento.

Plugin system: Magento's interceptor pattern — before, around, and after plugins that modify the behaviour of Magento methods without modifying core code. The plugin that intercepts order placement to trigger a synchronous integration action before or after the order is saved.

Observer system: the event-observer architecture that allows custom code to respond to Magento events — the observer class that fires when sales_order_place_after, catalog_product_save_after, or any other Magento event dispatches.

Custom REST endpoints: the webapi.xml configuration that exposes custom PHP service methods as REST API endpoints — the custom API endpoint that wraps complex Magento business logic in a single API call rather than requiring multiple standard API calls.


Integration Patterns

ERP integration. The most common Magento integration pattern — bidirectional data flow between Magento and ERP systems.

Order to ERP: orders placed in Magento are retrieved by the integration, transformed to the ERP's order format, and created in the ERP as sales orders. The integration that monitors new Magento orders, processes them through the ERP's order intake workflow, and updates the Magento order status as the ERP processes the order.

Product from ERP: product data maintained in the ERP — the item master with descriptions, pricing, and attributes — synchronised to Magento's product catalogue. The product sync that maps ERP item codes to Magento SKUs, transforms ERP product data to Magento attribute format, and updates Magento product data when ERP data changes.

Inventory from ERP: stock levels in the ERP synchronised to Magento's stock management. The stock level sync that reads ERP warehouse quantities and updates Magento's stock items or MSI source items to reflect current availability.

Financial data to ERP: invoices, credit memos, and payment data from Magento synchronised to the ERP's financial module.

Marketplace channel management. Magento as the product master for multi-channel selling — product data from Magento synchronised to Amazon, bol.com, and other marketplace channels.

Fulfilment system integration. Orders from Magento routed to third-party fulfilment providers — the 3PL integration that receives Magento orders, arranges fulfilment, and posts shipment tracking back to Magento.


Technologies Used

  • C# / ASP.NET Core — primary Magento integration implementation using .NET HTTP client for REST API calls and JSON processing
  • PHP — Magento module development for integrations requiring custom Magento plugins, observers, or API endpoints
  • Rust / Axum — high-performance Magento data processing for high-volume retailers
  • TypeScript / Node.js — Magento integration for JavaScript-based operational tools and dashboards
  • REST / HTTP — Magento REST API communication
  • GraphQL — Magento GraphQL API for headless frontend integrations
  • OAuth 1.0a — Magento integration authentication where OAuth flow is required
  • SQL (PostgreSQL / MySQL) — synchronisation state, order mapping, product mapping, delta tracking
  • Redis — integration token caching, synchronisation job coordination, rate limit management
  • Hangfire / scheduled jobs — scheduled order polling, inventory synchronisation, product synchronisation
  • RabbitMQ — Magento message queue integration for asynchronous processing
  • Docker — containerised integration service deployment
  • GitHub Actions — CI/CD pipeline for integration service deployment

Magento Integration Complexity

Magento's flexibility is its greatest strength and its greatest integration challenge. The EAV data model that allows unlimited product attributes requires integration code to handle attributes by code rather than by fixed field name. The multi-store architecture requires every data operation to be correctly scoped to the appropriate store view. The product type diversity requires the integration to handle simple, configurable, grouped, and bundle products correctly. The MSI system requires stock updates to target specific inventory sources rather than a single stock item.

These complexities mean that Magento integrations built for simple cases — that work for simple products in a single-store configuration — frequently fail in production environments with configurable products, custom attributes, and multi-store configuration. Production-quality Magento integrations are designed from the outset to handle the full range of Magento's data model rather than the simple cases.


Magento Connected to Your Operations

Magento integrations built to handle the full complexity of the Magento data model — correct multi-store scoping, EAV attribute handling, product type diversity, MSI inventory management, and the event-based integration patterns that keep Magento and surrounding business systems in sync without manual data reconciliation.