Circular Economy & Digital Product Passports · 4 min read

EPCIS 2.0 Explained for Developers

A developer's introduction to EPCIS 2.0: the four event types, the JSON-LD binding, and how to model a transformation without breaking your traceability chain.

EPCIS 2.0 is a GS1 standard for recording supply chain events: what object, at what time, at what location, and for what business purpose. Version 2.0 added JSON and JSON-LD bindings plus a REST API, which made it substantially easier to implement than earlier XML-based versions.

What EPCIS actually models

EPCIS answers four questions about every event in a supply chain: what, when, where and why. What object or objects were involved. When it happened, including both the event time and the time zone in which it was recorded. Where it happened, expressed as a location identifier. And why, meaning the business step and disposition — was this a shipping event, a receiving event, an inspection, and what state did the object end up in.

That framing is more useful than it first appears, because it separates the physical facts from any particular company's interpretation of them. Two organisations with completely different internal systems can exchange EPCIS events and understand each other, which is the entire point of having a standard rather than an integration.

For Digital Product Passport work, EPCIS supplies the lifecycle history that the passport presents. The passport says what a product is; the event stream says what has happened to it and where it has been.

The four event types

Object events are the workhorse: something happened to one or more objects. Received, shipped, inspected, destroyed. Most of the volume in any real EPCIS implementation is object events, and they are straightforward to model correctly.

Aggregation events describe containment — cases onto a pallet, items into a case. They record a parent and its children, and they matter because they let you reason about a shipment without tracking every individual item through every step. Disaggregation is the same event type with a different action.

Transaction events link physical objects to business documents such as a purchase order or invoice. Transformation events, added as a first-class concept, describe inputs being consumed to produce outputs — several raw materials becoming one manufactured item. Transformation is where most implementations get into difficulty, and it is worth modelling first rather than last.

Why transformation events are the hard part

In a simple distribution chain, an object retains its identity from manufacture to sale, and traceability is a matter of following one identifier. Manufacturing breaks that. Three input batches are consumed and one output batch appears, and the output is not any of the inputs — it is a new thing with its own identifier and a documented relationship to what produced it.

Modelling this correctly matters because it is precisely where traceability queries either work or fail. A recall on an input batch needs to identify every output that consumed it, which requires the transformation to have been recorded with both sides of the relationship. Implementations that record only inputs, or only outputs, produce a chain that looks complete and breaks under exactly the query it was built for.

The practical advice is to model your hardest transformation first, before building any infrastructure. If your event model can represent a partial batch consumed across two production runs with a byproduct, it can represent everything else. If you start with simple shipping events, you will build something that needs restructuring when manufacturing arrives.

Implementation notes that save time

  • Use the JSON-LD binding rather than XML unless a partner specifically requires otherwise
  • Record event time and record time separately, because they diverge and auditors ask about the gap
  • Include the time zone offset explicitly rather than normalising everything to UTC on ingest
  • Model transformation events before object events, since they constrain the rest of the design
  • Use standard business steps and dispositions rather than inventing your own vocabulary
  • Treat events as immutable, and correct errors with compensating events rather than updates
  • Test the query interface against a partner implementation before declaring the work finished

The query side is half the standard

Teams frequently implement capture, declare success, and then discover that nobody can actually get anything useful out. EPCIS defines a query interface as well as a capture interface, and the query side is what determines whether the event data has any value to anybody outside the system that produced it.

The queries that matter in practice are trace-forward and trace-backward from a given identifier, and events within a time window at a given location. If those are slow or unavailable, your traceability system is a write-only archive. Designing indexes for them at the start is considerably cheaper than retrofitting once the event volume is large.

Interoperability testing belongs here too. A capture interface tested only against your own client will accept exactly what your client sends and reject perfectly valid events from a partner. Validating against an external conforming implementation before launch is the single most effective way to avoid a painful integration phase later.

Part of the Circular Economy & Digital Product Passports cluster · Read the pillar page

More in Circular Economy & Digital Product Passports

  • Circular Economy & Digital Product Passports

    What Is a Digital Product Passport? EU ESPR Explained

    A Digital Product Passport explained for engineers: what EU Regulation 2024/1781 requires, how delegated acts work, and what you actually have to build.

    3 min read

  • Circular Economy & Digital Product Passports

    ESPR Compliance: An Engineering Team's Checklist

    What EU Regulation 2024/1781 means in practice for an engineering team, which decisions come first, and how to avoid building the wrong thing confidently.

    4 min read

  • Circular Economy & Digital Product Passports

    GS1 Digital Link Explained for Engineers

    How GS1 Digital Link turns a product identifier into a resolvable web address, why it matters for Digital Product Passports, and how to implement a resolver.

    4 min read

Frequently asked questions

What is EPCIS 2.0?

A GS1 standard for recording supply chain events — what object, when, where and for what business purpose. Version 2.0 added JSON and JSON-LD bindings plus a REST API, making it far more practical to implement than earlier XML versions.

What are the four EPCIS event types?

Object events for things happening to objects, aggregation events for containment relationships, transaction events linking objects to business documents, and transformation events for inputs being consumed to produce different outputs.

Why are transformation events difficult?

Because the output is a new object rather than a continuation of the inputs. Recording both sides of that relationship is what allows a recall on an input batch to identify every affected output, and implementations that record only one side fail exactly that query.

Do I need blockchain to implement EPCIS?

No. EPCIS is silent on storage, and a relational database serves almost all requirements. A distributed ledger addresses shared state that no single participant can be trusted to host, which is a narrower problem than it is usually presented as.

How does EPCIS relate to Digital Product Passports?

EPCIS supplies the lifecycle and chain-of-custody history that a passport presents. The passport describes what a product is; the EPCIS event stream describes what has happened to it and where it has been.