Magento and EDI
Magento EDI integration
Magento and Adobe Commerce have no X12 or EDIFACT in them. A retailer's 850 becomes a Magento order through the REST cart endpoints, with the PO number on the Purchase Order payment method, and the 855, 856, 810 and 846 are built from orders, shipments, invoices and salable quantity. We build that layer per trading partner, host it and run it.
What Magento does natively
Magento has no X12 or EDIFACT translator. Adobe's merchant documentation (633 articles in its public source repository) and its web API documentation (645 articles) contain no occurrence of EDI, X12 or EDIFACT, checked on 3 October 2026. What Magento ships is the commerce side that an EDI flow writes to and reads from.
| Native part | What it is | Where it stops |
|---|---|---|
Purchase Order payment method (purchaseorder) |
An offline payment method that stores the buyer's PO number in po_number |
A payment method, no document exchange |
| Cart and order REST API | POST /V1/customers/:customerId/carts, cart items, shipping information, PUT /V1/carts/:cartId/order |
One cart line per request |
| Shipments and invoices | POST /V1/order/:orderId/ship with tracking, POST /V1/order/:orderId/invoice |
No carton contents, no SSCC |
| Inventory (MSI) | Source quantities per source and salable quantity per stock | One number per stock, not per partner |
| B2B purchase orders (Adobe Commerce) | An approval workflow inside a company account | Not the EDI 850 |
A supplier that trades with a US retailer needs the 850, 855, 856 and 810 in X12, with the retailer's version, qualifiers and pack hierarchy. That part runs outside Magento and talks to it through the REST API. This page is the Magento side of our EDI integration; the platform itself is covered under Magento integrations.
What sits between Magento and your trading partner
Each X12 document maps to a Magento record.
| Document | Direction | Magento record | Source of the content |
|---|---|---|---|
| 850 | In | Order, placed through a cart | The partner's file |
| 855 | Out | Order | Quantity per line after the salable quantity check |
| 856 | Out | Shipment, plus pack data | Shipped items and tracks; cartons and SSCCs from packing |
| 810 | Out | Invoice | Lines, tax, shipping amount |
| 846 | Out | Salable quantity or source items | Per stock or per source |
| 997 | Both | None | Kept in the integration per document |
The diagram follows one purchase order, PO 4500018236, the example used on our document pages: 24 units of item 10482 at 12.50 and 16 units of item 10499 at 8.75.
How an 850 becomes a Magento order
Magento has no single call that creates an order with all its lines from outside. The documented route is the cart: an admin token creates an empty cart for the retailer's customer account, each line is added with its own POST /V1/carts/:quoteId/items, the ship-to goes in with shipping-information, and PUT /V1/carts/:cartId/order places the order. The last call carries the payment method:
{
"paymentMethod": {
"method": "purchaseorder",
"po_number": "4500018236"
}
}
The call count follows the line count. A purchase order with n lines is n plus 3 requests. A morning file of 120 purchase orders with 6 lines each is 120 times 9, so 1,080 requests, before the 855s are built. A drop-ship partner that sends one line per order is 4 requests per order.
Before the cart is built, the integration checks the salable quantity. In the example, item 10499 has 30 units in the source and 18 reserved for open orders, so 12 are salable. The cart gets 12, the order total is 24 times 12.50 plus 12 times 8.75, which is 300.00 plus 105.00, so 405.00, and the 855 confirms 24 and 12 with the 4 missing units coded as the partner's guide prescribes.
The technical reality of this pair
Request limits. Adobe documents no request rate for the Magento REST API. Its input limits are off by default; when switched on, a list input holds at most 20 entities in a synchronous request and 5,000 in an asynchronous one, and a page holds at most 300 items. Throughput is set by the server the store runs on, and every cart item that is saved triggers a recalculation of the cart totals. The integration places orders one at a time from a queue, so a file of 120 orders never runs in parallel against the checkout.
Tokens. An admin token is valid for 4 hours by default. A batch that runs longer, or a queue that runs all day, has to request a new token before the old one expires. Since Magento 2.4.4 an integration's access token is no longer accepted as a standalone bearer token unless an admin setting allows it.
Bulk. The asynchronous endpoints return a bulk_uuid and are processed by a message queue consumer. Status 2 means failed and retriable, 3 means failed and needs a fix first. They suit stock updates. Order placement stays synchronous, because the 855 is built from the result of each order.
Stock for the 846. Magento's salable quantity is the quantity across the sources assigned to a stock minus the reservations of open orders. An 846 that reports per warehouse reads source items through /V1/inventory/source-items instead. Which of the two a partner gets is set per partner; see which stock counts.
What Magento and X12 store differently
- PO number. BEG03 holds up to 22 characters. Magento keeps
po_numberon the order payment in a 32-character column, so it fits, but only when the order is placed with the Purchase Order method. A partner's store number or department (REF*DP) has no standard field and goes into an order comment or a custom attribute. - Units. A Magento order line has a quantity and no unit of measure. A partner that orders 2
CAwith 12 units per case means 24 units, and Magento needs the 24. The 855, 856 and 810 convert back to 2 cases. See units of measure. - Item identity. The 850 sends a UPC in PO107. Magento finds products by SKU, at most 64 characters, and holds a GTIN only in an attribute the store defines. The integration keeps the lookup from UPC or case GTIN to SKU per partner.
- Ship-to. The retailer names its distribution center with a code, 0007 in the example. A Magento address has no location code field, and
streetis an array of 1 to 4 lines set in the store configuration. An N3 segment carries two lines of up to 55 characters each. - Cartons. A Magento shipment knows items, quantities and tracks (
track_number,title,carrier_code). The HL loop of an 856 needs cartons, their contents and an SSCC per carton, which come from packing.
When it goes wrong
| What happens | What the integration does |
|---|---|
| The 850 names a UPC with no matching SKU | The order is held with the PO1 line shown; no cart is created |
| The same PO arrives twice | The PO number exists for this customer: held, no second order |
| A cart call fails halfway | The open cart is discarded and the order is built again from the first line |
| The admin token has expired | A new token is requested and the call is repeated |
| The partner rejects an 856 with a 997 | AK3 and AK4 are shown with segment and element; the corrected notice goes out under a new control number |
Every document has a status in the dashboard, with the raw file and the Magento record it became or came from.
We build the integration to your Magento store and your trading partners, host it and run it, for a fixed build price and a monthly fee. A new partner starts as a dry run that places no orders and sends nothing, and you approve the first documents. When a partner publishes a new guide or Adobe changes the API, we change the integration. The same model on other platforms is under Shopify EDI integration and WooCommerce EDI integration; with an ERP behind the store, see Magento NetSuite integration. Tell us which retailer asked you for EDI.
Frequently asked questions
Does Magento have native EDI?
No. Adobe's merchant documentation and web API documentation for Magento Open Source and Adobe Commerce contain no X12, EDIFACT or EDI content. What Magento has is the inside of an EDI flow: customer accounts, the Purchase Order payment method with a PO number, shipments with tracking numbers, invoices and salable quantity per stock. The translation, the envelope and the acknowledgments run outside Magento.
Is the B2B purchase order feature in Adobe Commerce the same as an EDI 850?
No. In Adobe Commerce B2B, Purchase Orders are an approval workflow inside the buyer's company account: when the feature is on, every order a company user places is first created as a purchase order and may need approval from someone in that company. An EDI 850 is the retailer's order sent from its own system. It becomes a normal Magento order, placed by the integration.
Do I need Adobe Commerce, or does Magento Open Source work?
Both work. The REST endpoints that create carts, place orders and create shipments and invoices are part of Magento Open Source. Adobe Commerce adds B2B companies and shared catalogs, which help when each retailer has its own price list. Without them, a retailer's prices come from a customer group with tier prices.
Can EDI orders land in Magento without stock being reserved twice?
Yes. An order placed through the cart API creates a reservation like a storefront order, so the salable quantity drops at once and the store and the next 846 see the same number. The reservation clears when the shipment is created.
Where does the carton and SSCC data for the 856 come from?
Not from Magento. A Magento shipment holds the shipped items and tracking numbers with a carrier code and title. Which units went into which carton, and the SSCC on each label, are recorded by the shipping tool, the warehouse system or the 3PL. The integration reads them there to build the 856.
Tell us what you need
Tell us which systems you use and what needs to work better. We reply personally within one working day. We help you define the work, then agree the price and timing before you commit.
- You know the price and the timeline before you commit to anything
- We work out the connection that takes the work off your hands
- We handle the build, hosting, monitoring and maintenance
- Your team has less information to retype and fewer discrepancies to chase