Gs1DigitalLink

GS1 Digital Link URIs: GS1 data as a web address, e.g. https://id.gs1.org/01/09501101020917/10/ABC123?17=261231.

The primary key (e.g. GTIN) and its qualifiers (e.g. batch, serial) go in the path; other AIs that GS1 allows as attributes go in the query string.

Properties

Link copied to clipboard

GS1's canonical domain. Brands normally use their own, e.g. https://example.com.

Functions

Link copied to clipboard
fun parse(uri: String, permitZeroSuppressedGtin: Boolean = false): Gs1Message

Parses a GS1 Digital Link URI into a Gs1Message (path elements first, then query parameters).

Link copied to clipboard
fun toUri(message: Gs1Message, domain: String = CANONICAL_DOMAIN): String

Builds the GS1 Digital Link URI for message.