Skip to main content

Canonical JSON events

The shared event vocabulary both SDK paths speak — what canonical JSON is and where its schemas live.

Canonical event model

The shared event vocabulary every integration consumes — what a canonical event is, how it travels from scan to your systems, what it looks like, and the schema contract behind it.

What a canonical event is

A canonical event is a checkpointed, structured emission from the portable core to the host — the last step of the scan pipeline. It keeps the host integration explicit and testable.

Each release publishes canonical JSON schemas for the payloads it exchanges, alongside the versioned OpenAPI document. The artifacts carry content hashes so consumers can verify they are building against an unchanged contract.

Event lifecycle

An event travels one way: from the capture to the systems you already run. Your host integration consumes the event at the handoff and maps it into your warehouse or ERP model.

Scan data becomes decoded and validated evidence, then a canonical event consumed by an integration
Canonical events are the checkpointed handoff from scan evidence to the systems your receiving workflow already uses.

Annotated example — a synthetic session

This is the exact canonical JSON the sandbox replays for its "Clean GTIN capture" session. It is synthetic data — it shows the event shape, not production output.

Synthetic canonical event (from the sandbox)
{
  "gtin": "00347019000105",
  "scanState": "success"
}
gtin
The qualified GTIN from the scanned label — GTIN is the primary identity; lot, expiration, and serial stay GTIN-scoped dependent evidence. See the GTIN-first principle in Platform concepts.
scanState
The capture outcome. The sandbox replays success, duplicate-detected, missing-required-field, and ambiguous.
duplicate-detected
Repeated video frames are not quantity. Key your receiving logic on the checkpointed event, not on raw frames.
missing-required-field
A lot, serial, or expiration value without a qualified GTIN is temporary evidence, not a receivable item.

For the on-device side of the same vocabulary, the Android quickstart documents how scan observations are produced before they are emitted as canonical events. Try the synthetic sandbox demo to replay the other sessions.

Schema vocabulary

Canonical JSON schemas provide a single typed vocabulary for request and payload schemas shared across scan sessions, receiving workflows and billing state — so client applications and integrations use one consistent shape per release.

Field-level details live in the generated spec for the release you deploy; this page intentionally does not duplicate them, so the published artifact stays the single source of truth.

Canonical JSON schemas

Coming soon

The machine-readable, versioned schema set for canonical events is being prepared. The concept and the synthetic event shape on this page are available now; the per-release generated spec will carry the field-level reference.

Blocked on: generated versioned canonical-JSON spec — Backend/Platform

GS1 reference

The barcode reference this page hosts: GS1 application identifiers, check digits, and the portal-side validation tooling.

GS1 application identifiers

A GS1 element string is a chain of (AI)value pairs: each two-to-four-digit application identifier (AI) names the data element that follows it. AI (01) carries the GTIN — the primary identity under the GTIN-first principle (Platform concepts); lot, expiration, and serial are GTIN-scoped dependent evidence, never standalone identifiers.

GS1 barcode label with GTIN expiry lot and serial callouts
GS1 application identifiers divide one barcode into the identity and dependent evidence your systems validate.
The six GS1 application identifiers in the Vision Scan barcode tooling, with their formats and DSCSA requirements.
AIData elementFormatDSCSA
(01)GTIN14 digits, Modulo-10 check digitRequired
(21)Serial≤ 20 alphanumeric charactersRequired
(17)Expiry6 digits, YYMMDDRequired
(10)Batch / lot≤ 20 alphanumeric charactersRequired
(00)SSCC18 digits, Modulo-10 check digit—
(11)Production date6 digits, YYMMDD—

Check digits

GTIN and SSCC values carry a Modulo-10 check digit as their final digit. The routine: starting from the rightmost data digit and moving left, multiply alternately by 3 and 1, add the products, and subtract the remainder (mod 10) from 10 — a zero remainder means a zero check digit. A failed check digit means the value was misread or mistyped, never a value to repair silently.

Worked example — synthetic GTIN 00300012345671:

GS1 check digit validation shown with digit and weight tiles ending in a valid result
Check digits catch misread values before they become receivable inventory data.

The same routine guards the 18-digit SSCC carried by AI (00).

GS1 validation — portal-side tooling

The web tooling behind the portal validates bracketed (AI)value element strings with validateGs1Structure(): per-AI length and pattern checks, GTIN and SSCC check-digit verification, a suggestedCheckDigit (and autoFixedGtin when the fix is computable) on failure, and a DSCSA completeness flag for AIs (01), (17), (10), and (21).

OCR rescue policy

OCR rescue is a constrained second pass for worn, partial, or missing labels, gated twice. First, it runs only when no valid barcode is present — a decoded symbol always wins, and rescue never overwrites decoded data. Second, every proposal is labeled as OCR rescue and needs operator review: confirm records it with the review decision; reject or ambiguous stays visible for review. Nothing auto-commits.

OCR rescue only runs when no valid barcode exists and requires operator review
A decoded barcode wins; OCR rescue is review-required and never auto-commits a value.

Barcode catalog reference

Canonical events describe what was scanned, not which symbology carried it — but if you need the barcode reference, the barcode catalog lists the knowledge base's barcode entries and their GS1 application identifiers. The catalog describes the reference collection, not which symbologies the RC2 SDK decodes: SDK decode support is not published yet, so never read a catalog entry as a decode guarantee.