Business transactions on EPCIS 2.0
Purchase orders, ASNs, invoices —
compiled onto the event record.
An 856, a DESADV, a purchase order: parsed, validated and joined to EPCIS 2.0 events with every party, lot and serial where the standard puts them, then reconciled against what the dock scanned. A CLI, a library and an MCP server. No key.
curl -sO https://transactions.dev/specimen/856-ship-notice-01.edinpx -y transactions.dev@0.2.0 join 856-ship-notice-01.edi --tz +00:00 --json
exit 0 2 events, valid EPCIS 2.0
| the 856, as it arrived | the field | the value |
|---|---|---|
| BSN*00*SHIP20260730001*20260730*1800 | bizTransactionList · desadv | urn:epcglobal:cbv:bt:061414100…0260730001 |
| HL*1**S | ObjectEvent | shipping · in_transit |
| DTM*011*20260730*1800 | eventTime | 2026-07-30T18:00:00.000Z |
| REF*BM*BOL-991 | bizTransactionList · bol | urn:epcglobal:cbv:bt:0614141000012:BOL-991 |
| N1*SF*ACME FOODS DC*UL*0614141000012 | sourceList · location | https://id.gs1.org/414/0614141000012 |
| N1*ST*NORTH BUYER DC*UL*0724142000024 | destinationList · location | https://id.gs1.org/414/0724142000024 |
| N1*SE*ACME FOODS*UL*0614141000005 | sourceList · owning_party | https://id.gs1.org/417/0614141000005 |
| N1*BY*NORTH BUYER*UL*0724142000017 | destinationList · owning_party | https://id.gs1.org/417/0724142000017 |
| PRF*PO-8812 | bizTransactionList · po | urn:epcglobal:cbv:bt:0724142000017:PO-8812 |
| HL*3*2*P | AggregationEvent | ADD · packing |
| MAN*GM*006141411234567890 | parentID | https://id.gs1.org/00/006141411234567890 |
| LIN**UP*614141123452*LT*L42 | childQuantityList · epcClass | https://id.gs1.org/01/00614141123452/10/L42 |
| SN1**12*EA | childQuantityList · quantity | 12 |
| REF*SE*1001 | childEPCs[0] | https://id.gs1.org/01/00614141765430/21/1001 |
| REF*SE*1002 | childEPCs[1] | https://id.gs1.org/01/00614141765430/21/1002 |
curl -sO https://transactions.dev/specimen/856-receipt-01.edicurl -sO https://transactions.dev/specimen/events-receipt-01.jsonlnpx -y transactions.dev@0.2.0 reconcile 856-receipt-01.edi --against events-receipt-01.jsonl --tz -05:00
exit 1 discrepant, 3 findings
reconcile verdict=DISCREPANT claimed=60 observed=61 pallets=2/2 findings=3
verdict class=matched sscc=https://id.gs1.org/00/006141411234567890
verdict class=matched sscc=https://id.gs1.org/00/006141419876543210
verdict class=matched gtin=00614141073467 lot=2026A claimed=36 observed=36
verdict class=missing gtin=00614141073467 lot=2026B claimed=12 observed=11 delta=-1
verdict class=lot_mismatch gtin=00614141765430 documentLot=L57 observedLot=L58 quantity=12
verdict class=unexpected gtin=00614141073474 observed=2 note=no ASN line covers this GTIN
warning code=CARRIER_PRO_UNSCOPED message=carrier PRO 'PRO-55512' is not emitted as a business-transaction reference
Four faces, one digest.
One shipment, recorded once: the page a driver signs, the 856 the buyer's system receives, the structured documents a modern stack speaks, and the square on the pallet. The same SSCC, in vermilion, in every one of them, and the same digest under all of them.
The page
The document
ISA*00* *00* *ZZ*NRFCSHIP *ZZ*CGDC14 *260804*1400*U*00401*000000093*0*P*>~
GS*SH*NRFCSHIP*CGDC14*20260804*1400*93*X*004010~
ST*856*0093~
BSN*00*95212300000000093*20260804*1400*0001~
HL*1**S~
TD1*CTN25*18****G*94.35*KG~
TD5*B*2*NRFC*M*LTL-DIRECT.DOCK-14~
REF*BM*GINC-95212-260804-0093~
DTM*011*20260804~
TD3*TL*NRFC*48221~
REF*SN*0951447~
DTM*002*20260806*1800~
N1*ST*CENTRAL-GROCERS-DC-14*UL*0952123000019~
N3*220 INTERMODAL PKWY~
N4*LA VERGNE*TN*37086*US~
N1*SF*NORTHRIDGE-FOODS-CO*UL*0952123000033~
N3*1400 DEPOT RD~
N4*LA VERGNE*TN*37086*US~
N1*BT**UL*0952123000026~
HL*2*1*O~
PRF*PO-4471-0093~
HL*3*2*T~
MAN*GM*009521230000000019~
HL*4*3*I~
LIN*1*UP*952123400001*UK*09521234000013~
SN1**120*EA~
HL*5*3*I~
LIN*2*UP*952123400002*UK*09521234000020~
SN1**96*EA~
HL*6*3*I~
LIN*3*UP*952123400003*UK*09521234000037~
SN1**240*EA~
HL*7*3*I~
LIN*4*UP*952123400004*UK*09521234000044~
SN1**60*EA~
HL*8*3*I~
LIN*5*UP*952123400005*UK*09521234000051~
SN1**180*EA~
HL*9*3*I~
LIN*6*UP*952123400006*UK*09521234000068~
SN1**48*EA~
HL*10*3*I~
LIN*7*UP*952123400007*UK*09521234000075~
SN1**144*EA~
HL*11*3*I~
LIN*8*UP*952123400008*UK*09521234000082~
SN1**72*EA~
HL*12*3*I~
LIN*9*UP*952123400009*UK*09521234000099~
SN1**216*EA~
HL*13*3*I~
LIN*10*UP*952123400010*UK*09521234000105~
SN1**36*EA~
HL*14*3*I~
LIN*11*UP*952123400011*UK*09521234000112~
SN1**108*EA~
HL*15*3*I~
LIN*12*UP*952123400012*UK*09521234000129~
SN1**120*EA~
CTT*12*1440~
SE*59*0093~
GE*1*93~
IEA*1*000000093~UNB+UNOC:3+0952123000033:14+0952123000019:14+260804:1400+93'
UNH+1+DESADV:D:96A:UN:EAN005'
BGM+351+95212300000000093+9'
DTM+11:202608041400:203'
DTM+2:202608061800:203'
RFF+ON:PO-4471-0093'
NAD+SU+0952123000033::9++NORTHRIDGE-FOODS-CO+1400 DEPOT RD+LA VERGNE+TN+37086+US'
NAD+DP+0952123000019::9++CENTRAL-GROCERS-DC-14+220 INTERMODAL PKWY+LA VERGNE+TN+37086+US'
NAD+IV+0952123000026::9'
TDT+20++30++NRFC'
EQD+TE+NRFC-48221++++5'
SEL+0951447+CA'
CPS+1'
PAC+1++201'
MEA+PD+AAB+KGM:94.35'
GIN+BJ+009521230000000019'
LIN+1++09521234000013:SRV'
QTY+12:120:PCE'
LIN+2++09521234000020:SRV'
QTY+12:96:PCE'
LIN+3++09521234000037:SRV'
QTY+12:240:PCE'
LIN+4++09521234000044:SRV'
QTY+12:60:PCE'
LIN+5++09521234000051:SRV'
QTY+12:180:PCE'
LIN+6++09521234000068:SRV'
QTY+12:48:PCE'
LIN+7++09521234000075:SRV'
QTY+12:144:PCE'
LIN+8++09521234000082:SRV'
QTY+12:72:PCE'
LIN+9++09521234000099:SRV'
QTY+12:216:PCE'
LIN+10++09521234000105:SRV'
QTY+12:36:PCE'
LIN+11++09521234000112:SRV'
QTY+12:108:PCE'
LIN+12++09521234000129:SRV'
QTY+12:120:PCE'
CNT+2:12'
CNT+11:1440'
UNT+43+1'
UNZ+1+93'<?xml version="1.0" encoding="UTF-8"?>
<DespatchAdvice xmlns="urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:ID>95212300000000093</cbc:ID>
<cbc:IssueDate>2026-08-04</cbc:IssueDate>
<cbc:DocumentStatusCode>9</cbc:DocumentStatusCode>
<cac:OrderReference><cbc:ID>PO-4471-0093</cbc:ID></cac:OrderReference>
<cac:DespatchSupplierParty><cac:Party>
<cbc:EndpointID schemeID="0088">0952123000033</cbc:EndpointID>
<cac:PartyName><cbc:Name>NORTHRIDGE-FOODS-CO</cbc:Name></cac:PartyName>
</cac:Party></cac:DespatchSupplierParty>
<cac:DeliveryCustomerParty><cac:Party>
<cbc:EndpointID schemeID="0088">0952123000019</cbc:EndpointID>
<cac:PartyName><cbc:Name>CENTRAL-GROCERS-DC-14</cbc:Name></cac:PartyName>
</cac:Party></cac:DeliveryCustomerParty>
<cac:Shipment>
<cbc:ID>009521230000000019</cbc:ID>
<cbc:GrossWeightMeasure unitCode="KGM">94.35</cbc:GrossWeightMeasure>
<cbc:TotalTransportHandlingUnitQuantity>18</cbc:TotalTransportHandlingUnitQuantity>
</cac:Shipment>
<cac:DespatchLineGroup>
<cac:DespatchLine>
<cbc:ID>1</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">120</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000013</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>2</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">96</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000020</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>3</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">240</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000037</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>4</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">60</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000044</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>5</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">180</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000051</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>6</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">48</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000068</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>7</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">144</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000075</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>8</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">72</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000082</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>9</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">216</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000099</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>10</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">36</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000105</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>11</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">108</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000112</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
<cac:DespatchLine>
<cbc:ID>12</cbc:ID>
<cbc:DeliveredQuantity unitCode="EA">120</cbc:DeliveredQuantity>
<cac:Item><cac:StandardItemIdentification>
<cbc:ID schemeID="GTIN">09521234000129</cbc:ID>
</cac:StandardItemIdentification></cac:Item>
</cac:DespatchLine>
</cac:DespatchLineGroup>
</DespatchAdvice>{
"type": "desadv",
"id": "95212300000000093",
"order": "PO-4471-0093",
"carrierReference": "GINC-95212-260804-0093",
"shipFrom": {
"gln": "0952123000033",
"name": "NORTHRIDGE-FOODS-CO"
},
"shipTo": {
"gln": "0952123000019",
"name": "CENTRAL-GROCERS-DC-14"
},
"billTo": {
"gln": "0952123000026"
},
"shipped": "20260804T140000Z",
"grossWeightKg": 94.35,
"handlingUnits": 18,
"totalUnits": 1440,
"pallets": [
{
"sscc": "009521230000000019",
"lines": [
{
"line": 1,
"gtin": "09521234000013",
"quantity": 120,
"netWeightKg": 15.75
},
{
"line": 2,
"gtin": "09521234000020",
"quantity": 96,
"netWeightKg": 12.84
},
{
"line": 3,
"gtin": "09521234000037",
"quantity": 240,
"netWeightKg": 31.5
},
{
"line": 4,
"gtin": "09521234000044",
"quantity": 60,
"netWeightKg": 8.2
},
{
"line": 5,
"gtin": "09521234000051",
"quantity": 180,
"netWeightKg": 23.6
},
{
"line": 6,
"gtin": "09521234000068",
"quantity": 48,
"netWeightKg": 6.4
},
{
"line": 7,
"gtin": "09521234000075",
"quantity": 144,
"netWeightKg": 18.9
},
{
"line": 8,
"gtin": "09521234000082",
"quantity": 72,
"netWeightKg": 9.6
},
{
"line": 9,
"gtin": "09521234000099",
"quantity": 216,
"netWeightKg": 28.35
},
{
"line": 10,
"gtin": "09521234000105",
"quantity": 36,
"netWeightKg": 4.8
},
{
"line": 11,
"gtin": "09521234000112",
"quantity": 108,
"netWeightKg": 14.16
},
{
"line": 12,
"gtin": "09521234000129",
"quantity": 120,
"netWeightKg": 15.75
}
]
}
]
}{
"@context": [
"https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld"
],
"type": "EPCISDocument",
"schemaVersion": "2.0",
"creationDate": "20260804T140000.000Z",
"epcisBody": {
"eventList": [
{
"type": "AggregationEvent",
"eventTime": "20260804T140000.000Z",
"eventTimeZoneOffset": "-05:00",
"parentID": "urn:epc:id:sscc:0952123.0000000001",
"childEPCs": [
"urn:epc:idpat:sgtin:9521234.00001.*",
"urn:epc:idpat:sgtin:9521234.00002.*",
"urn:epc:idpat:sgtin:9521234.00003.*",
"urn:epc:idpat:sgtin:9521234.00004.*",
"urn:epc:idpat:sgtin:9521234.00005.*",
"urn:epc:idpat:sgtin:9521234.00006.*",
"urn:epc:idpat:sgtin:9521234.00007.*",
"urn:epc:idpat:sgtin:9521234.00008.*",
"urn:epc:idpat:sgtin:9521234.00009.*",
"urn:epc:idpat:sgtin:9521234.00010.*",
"urn:epc:idpat:sgtin:9521234.00011.*",
"urn:epc:idpat:sgtin:9521234.00012.*"
],
"action": "OBSERVE",
"bizStep": "receiving",
"disposition": "in_progress",
"readPoint": {
"id": "urn:epc:id:sgln:0952123.00001.0"
},
"bizTransactionList": [
{
"type": "bol",
"bizTransaction": "urn:epc:id:gdti:sha256:0a27b6ae29c85616e4201bfee5bebf677441d34f59997eb10804a75d27490254"
},
{
"type": "desadv",
"bizTransaction": "urn:epcglobal:cbv:bt:95212300000000093"
},
{
"type": "po",
"bizTransaction": "urn:epcglobal:cbv:bt:PO-4471-0093"
}
]
}
]
}
}https://barcoding.dev/00/009521230000000019?402=95212300000000093&401=GINC-95212-260804-0093&400=PO-4471-0093&403=LTL-DIRECT.DOCK-14&410=0952123000019&411=0952123000026&412=0952123000033&413=0952123000040&414=0952123000057&415=0952123000064&417=0952123000071&420=37086&422=840&30=18&37=1440&3302=009435&3922=1875500&8008=260804140000&7003=2608061800&90=SCAC.NRFC-CLASS.85-NMFC.156600&91=SHIPFROM.NORTHRIDGE-FOODS-CO.1400-DEPOT-RD.LA-VERGNE.TN.37086.US&92=SHIPTO.CENTRAL-GROCERS-DC-14.220-INTERMODAL-PKWY.LA-VERGNE.TN.37086.US&93=TRAILER.NRFC-48221.SEAL.0951447.APPT.2608041400-2608041800.PREPAID&94=LI.09521234000013.0120.01575&94=LI.09521234000020.0096.01284&94=LI.09521234000037.0240.03150&94=LI.09521234000044.0060.00820&94=LI.09521234000051.0180.02360&94=LI.09521234000068.0048.00640&94=LI.09521234000075.0144.01890&94=LI.09521234000082.0072.00960&94=LI.09521234000099.0216.02835&94=LI.09521234000105.0036.00480&94=LI.09521234000112.0108.01416&94=LI.09521234000129.0120.01575The square
The bytes
The verbs.
One contract: the payload on stdout, typed errors on stderr, the verdict as the exit code, --json everywhere. npx transactions.dev runs them on your machine; the MCP server gives an agent the same verbs through the same core.
| verb | what it does | exit 1 means |
|---|---|---|
| parse | X12 or EDIFACT bytes lossless canonical JSON (segment order and delimiters preserved) | syntax / envelope error |
| emit | canonical JSON wire bytes, the byte-exact inverse of parse | non-emittable structure |
| validate | structural validation against a pinned grammar (set × version) | invalid document |
| ack | 997 / 999 / CONTRL from a validate result | — |
| join | 856 / 850 / 940 / 945 / DESADV EPCIS 2.0 events, validated against the pinned official schema | events fail EPCIS validation |
| reconcile | an ASN against captured events: typed diff, machine verdict | discrepant |
| pins | print grammar and corpus digests | — |
Nine laws, and the engine refuses the rest.
-
01
The canonical document is the native form; EDI is its projection.
X12 and EDIFACT are each one conformant face of a canonical, versioned business document. parse lifts the wire bytes onto a lossless pivot that emit puts back byte for byte, and the document is compiled from that pivot.
-
02
The compile target is the standard's own vocabulary.
po, desadv, inv, recadv, bol, rma and prodorder are CBV 2.0 §7.3 business-transaction types, and bizTransactionList rides on every EPCIS event type. Nothing this layer writes needs an extension namespace.
-
03
Byte-exact or refused.
emit(parse(x)) === x, byte-compared, on every document. A document the round trip cannot hold is refused with a typed error, never silently normalized.
-
04
Superset, and conformant — always together.
Extra context a document carries rides along, and every emitted event validates against the pinned official EPCIS 2.0 JSON schema before it leaves the tool.
-
05
The ASN's tree becomes the aggregation tree.
The 856 HL hierarchy — Shipment, Order, Tare, Pack, Item — compiles to AggregationEvents: SSCC parents from MAN, children from LIN and SN1, serial grain when serials are present, lot grain when they are not. The worked example.
-
06
Parties land as parties, grain intact.
N1-loop GLNs compile to sourceList and destinationList as owning_party, possessing_party and location, CBV 2.0 §7.4. Who performed the scan belongs to the capture interface and is never faked from a document.
-
07
Reconcile returns a verdict, and the verdict is chargeback defense.
What the ASN claimed against what the events observed: a typed diff and an exit code, 0 agree, 1 discrepant, wireable into a go-live gate or a nightly cron. Deductions and shortage claims settle on custody, not on paperwork. The transcript.
-
08
X12 is linked, never republished.
Element-level X12 detail is licensed content, so this site deep-links the canonical public X12 reference for segment detail. EDIFACT and EANCOM are open content, vendored and pinned by digest.
-
09
One way in for people and agents.
Every verb is an MCP tool through the same core: parse, join and reconcile re-dispatch through the code path a shell uses. An agent integrates with the same access a person would.
What the paperwork claimed, against what the dock saw.
An ASN claims. A receiving door observes. reconcile puts the two side by side and returns a verdict at two grains: the pallet and case SSCCs the paperwork names against the ones the events carry, and units per GTIN and lot. The vocabulary is closed — matched, missing, unexpected, lot_mismatch — and the exit code is the contract: 0 agree, 1 discrepant, 2 inputs unusable. Wire it into a go-live gate or a nightly job. Nothing in the path writes to the event stream.
npx -y transactions.dev@0.2.0 reconcile 856-receipt-01.edi \ --against events-receipt-01.jsonl --tz -05:00 --json
exit 1 discrepant, 3 findings
{
"document": "urn:epcglobal:cbv:…260728002",
"po": "urn:epcglobal:cbv:…7:PO-8813",
"claimed": { "pallets": 2, "cases": 60 },
"observed": { "pallets": 2, "cases": 61 },
"verdicts": [
{ "class": "matched", "sscc": "https://id.gs1.org…234567890" },
…,
{ "class": "missing", "gtin": "00614141073467",
"lot": "2026B", "claimed": 12, "observed": 11, "delta": -1 },
{ "class": "lot_mismatch", "gtin": "00614141765430",
"documentLot": "L57", "observedLot": "L58", "quantity": 12 },
{ "class": "unexpected", "gtin": "00614141073474",
"observed": 2, "note": "no ASN line covers this GTIN" }
],
"verdict": "DISCREPANT",
"exit": 1,
"warnings": [ { "code": "CARRIER_PRO_UNSCOPED",
"message": "carrier PRO 'PRO-5…reference" } ]
}
Who this is for.
-
Compiling EDI I already exchange
X12 850/856/810 or EDIFACT ORDERS/DESADV/INVOIC in; conformant EPCIS 2.0 events with bizTransaction context out.
-
Joining a system of record
Orders, fulfillments, and receipts from an ecommerce platform, an ERP, or a 3PL's WMS, compiled to po / desadv / recadv references.
-
Embedding the layer in my product
You ship software to supply-chain customers and want the transaction join as a dependency, not a department.
-
Defending chargebacks and shortage claims
The ASN says what left; the events say what arrived. Vendor compliance, deductions and shortage claims settled by a machine verdict with evidence behind it, rather than by whichever side's records get believed.
-
An agent transacts for me
An agent parses, joins, and reconciles over MCP, with the same access a person would use.
Get access.
The engine runs from npx today with no key. The hosted layer opens from the access list.