Skip to content

Translates EPC URIs and EPC Class URIs into their canonical GS1 Digital Link URI equivalents.

License

Notifications You must be signed in to change notification settings

RalphTro/gs1-epc-digitallink-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GS1 EPC URI - Digital Link URI Translator

Introduction

The EPC Pure Identity URI (or simply EPC URI) is a universal identifier for any physical or digital object such as products, assets, logistics units, documents, or locations. It is the preferred way within information systems to denote arbitrary business objects. Applications based on EPCIS, GS1’s core standard for supply chain visibility, SHOULD use this syntax. It takes the form of a Uniform Resource Name (URN), which, taking the example of an SGTIN (= Serialised Global Trade Item Number) looks sth. like this: urn:epc:id:sgtin:4012345.011111.987.

A GS1 Digital Link URI is another GS1 URI, introduced especially to enable web applications through embedding GS1 keys and descriptive attributes into a web-friendly syntax. It SHOULD NOT be used in EPCIS for the purpose of identifying objects or locations. It takes the form of a Web URI, which, taking the above example, looks like this: https://id.gs1.org/01/04012345111118/21/987 or https://example.com/01/04012345111118/21/987?15=211231.

In case organisation wish to combine the powerful features of both supply chain visibility and accessibility to object-related information in the web (e.g. product description page or patient information leaflet), they need to translate EPC URIs into GS1 Digital Link URIs. As GS1 Digital Link URIs can also be constructed with company-specific domain names, this script can easily be adapted to also support custom domain names (e.g "example.com").

Supported EPC/EPC Class URIs

  • SGTIN: Serialised Global Trade Item Number
  • SSCC: Serial Shipping Container Code
  • SGLN: Global Location Number with or without extension
  • GRAI: Global Returnable Asset Identifier
  • GIAI: Global Individual Asset Identifier
  • GSRN: Global Service Relation Number - Recipient
  • GSRNP: Global Service Relation Number – Provider
  • GDTI: Global Document Type Identifier
  • CPI: Component / Part Identifier
  • SGCN: Serialised Global Coupon Number
  • GINC: Global Identification Number for Consignment
  • GSIN: Global Shipment Identification Number
  • ITIP: Individual Trade Item Piece
  • UPUI: Unit Pack Identifier
  • PGLN: Global Location Number of Party
  • LGTIN: GTIN + Batch/Lot

Note that the remaining EPC schemes as defined in the EPC Tag Data Standard, namely GID, USDOD, ADI, and BIC, are not supported as they lack a GS1 Company Prefix, thus cannot be translated into GS1 Element Strings/GS1 Digital Link URIs.

Installation

pip install epcdltranslator (see https://pypi.org/project/epcdltranslator/1.0.0/)

Usage/Short test script

Once installed, enter the following code into the Python shell:
>>> import epcdltranslator as edt
>>> edt.epcDLTranslator('urn:epc:id:sgtin:4012345.011111.987')
It then should return: 'https://id.gs1.org/01/04012345111118/21/987'

References

About

Translates EPC URIs and EPC Class URIs into their canonical GS1 Digital Link URI equivalents.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages