A mock EDI trading partner. Not an EDI library or an AS2 server, but the thing on the other end. Send it an 850 and it answers with a 997, an 855, an 856 and an 810. Send it EDIFACT ORDERS and you get CONTRL, ORDRSP, DESADV and INVOIC.
you ──850──▶ mock-edi
◀──997── the syntax parsed
◀──855── 2 lines: one confirmed, one short
◀──856── shipment / order / item, with a tracking number
◀──810── 1132.80, terms 2% 10 net 30
HL trees, MDNs with a Received-Content-MIC.POST /_mock/purchase places an order with a partner whose role is supplier - so if the system under test is the one that sells, the mock is the customer sending you the 850 and reading your 855, 856 and 810 back, saying where each disagrees with what it ordered. It also receives a remittance advice, the X12 820 and EDIFACT REMADV, and reports one that advises cash before it settles.--drop-dir and --pickup-dir at directories for integrations that still trade files.ORDCHG is answered by an ORDRSP, having no change acknowledgment of its own. The 997s you send back are matched to what the mock sent, so "nobody acknowledged my invoice" is testable. A replayed interchange is refused with a TA1, not fulfilled twice.Confirmed 35 of 100; 65 to follow on 2026-10-09, two days on. On that day the balance ships as a second consignment, with a ship notice and an invoice of its own: two payables against one purchase order, and a second invoice that is not the first arriving again. While the balance waits the buyer can still lower or cancel it, even after the first consignment is invoiced.Łódź as Lodz, a curled apostrophe as a straight one) rather than written as ?, and one REMADV can replace another, as EANCOM has it.
pip install mock-edi
mock-edi --port 8080
curl -X POST --data-binary @order.edi http://127.0.0.1:8080/edi
Worked examples that use mock-edi: Procure to pay, PO bridge, Invoice check, E-invoice, Pay invoices and Remittance.